From 26e984ffd01dc9f21af3dd4da75fcb7e4309961f Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 10 Jul 2024 17:23:25 +0300 Subject: [PATCH 001/118] feat: only generate models and docs from swagger codegen --- README.md | 74 ----------------- contributing.md | 4 +- docs/Api/FingerprintApi.md | 137 -------------------------------- scripts/generate.sh | 4 +- template/docs/FingerprintApi.md | 0 5 files changed, 5 insertions(+), 214 deletions(-) create mode 100644 template/docs/FingerprintApi.md diff --git a/README.md b/README.md index 70b6c14d..2705848e 100644 --- a/README.md +++ b/README.md @@ -193,83 +193,9 @@ All URIs are relative to your region's base URL. Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by requestId -*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId ## Documentation for Models - - [ASN](docs/Model/ASN.md) - - [BotdDetectionResult](docs/Model/BotdDetectionResult.md) - - [BotdResult](docs/Model/BotdResult.md) - - [BrowserDetails](docs/Model/BrowserDetails.md) - - [ClonedAppResult](docs/Model/ClonedAppResult.md) - - [Confidence](docs/Model/Confidence.md) - - [DataCenter](docs/Model/DataCenter.md) - - [DeprecatedIPLocation](docs/Model/DeprecatedIPLocation.md) - - [DeprecatedIPLocationCity](docs/Model/DeprecatedIPLocationCity.md) - - [EmulatorResult](docs/Model/EmulatorResult.md) - - [ErrorEvent403Response](docs/Model/ErrorEvent403Response.md) - - [ErrorEvent403ResponseError](docs/Model/ErrorEvent403ResponseError.md) - - [ErrorEvent404Response](docs/Model/ErrorEvent404Response.md) - - [ErrorEvent404ResponseError](docs/Model/ErrorEvent404ResponseError.md) - - [ErrorVisits403](docs/Model/ErrorVisits403.md) - - [EventResponse](docs/Model/EventResponse.md) - - [FactoryResetResult](docs/Model/FactoryResetResult.md) - - [FridaResult](docs/Model/FridaResult.md) - - [HighActivityResult](docs/Model/HighActivityResult.md) - - [IPLocation](docs/Model/IPLocation.md) - - [IPLocationCity](docs/Model/IPLocationCity.md) - - [IdentificationError](docs/Model/IdentificationError.md) - - [IncognitoResult](docs/Model/IncognitoResult.md) - - [IpBlockListResult](docs/Model/IpBlockListResult.md) - - [IpBlockListResultDetails](docs/Model/IpBlockListResultDetails.md) - - [IpInfoResult](docs/Model/IpInfoResult.md) - - [IpInfoResultV4](docs/Model/IpInfoResultV4.md) - - [IpInfoResultV6](docs/Model/IpInfoResultV6.md) - - [JailbrokenResult](docs/Model/JailbrokenResult.md) - - [Location](docs/Model/Location.md) - - [LocationSpoofingResult](docs/Model/LocationSpoofingResult.md) - - [ManyRequestsResponse](docs/Model/ManyRequestsResponse.md) - - [PrivacySettingsResult](docs/Model/PrivacySettingsResult.md) - - [ProductError](docs/Model/ProductError.md) - - [ProductsResponse](docs/Model/ProductsResponse.md) - - [ProductsResponseBotd](docs/Model/ProductsResponseBotd.md) - - [ProductsResponseIdentification](docs/Model/ProductsResponseIdentification.md) - - [ProductsResponseIdentificationData](docs/Model/ProductsResponseIdentificationData.md) - - [ProxyResult](docs/Model/ProxyResult.md) - - [RawDeviceAttributesResult](docs/Model/RawDeviceAttributesResult.md) - - [Response](docs/Model/Response.md) - - [ResponseVisits](docs/Model/ResponseVisits.md) - - [RootAppsResult](docs/Model/RootAppsResult.md) - - [SeenAt](docs/Model/SeenAt.md) - - [SignalResponseClonedApp](docs/Model/SignalResponseClonedApp.md) - - [SignalResponseEmulator](docs/Model/SignalResponseEmulator.md) - - [SignalResponseFactoryReset](docs/Model/SignalResponseFactoryReset.md) - - [SignalResponseFrida](docs/Model/SignalResponseFrida.md) - - [SignalResponseHighActivity](docs/Model/SignalResponseHighActivity.md) - - [SignalResponseIncognito](docs/Model/SignalResponseIncognito.md) - - [SignalResponseIpBlocklist](docs/Model/SignalResponseIpBlocklist.md) - - [SignalResponseIpInfo](docs/Model/SignalResponseIpInfo.md) - - [SignalResponseJailbroken](docs/Model/SignalResponseJailbroken.md) - - [SignalResponseLocationSpoofing](docs/Model/SignalResponseLocationSpoofing.md) - - [SignalResponsePrivacySettings](docs/Model/SignalResponsePrivacySettings.md) - - [SignalResponseProxy](docs/Model/SignalResponseProxy.md) - - [SignalResponseRawDeviceAttributes](docs/Model/SignalResponseRawDeviceAttributes.md) - - [SignalResponseRootApps](docs/Model/SignalResponseRootApps.md) - - [SignalResponseSuspectScore](docs/Model/SignalResponseSuspectScore.md) - - [SignalResponseTampering](docs/Model/SignalResponseTampering.md) - - [SignalResponseTor](docs/Model/SignalResponseTor.md) - - [SignalResponseVirtualMachine](docs/Model/SignalResponseVirtualMachine.md) - - [SignalResponseVpn](docs/Model/SignalResponseVpn.md) - - [Subdivision](docs/Model/Subdivision.md) - - [SuspectScoreResult](docs/Model/SuspectScoreResult.md) - - [TamperingResult](docs/Model/TamperingResult.md) - - [TorResult](docs/Model/TorResult.md) - - [VirtualMachineResult](docs/Model/VirtualMachineResult.md) - - [Visit](docs/Model/Visit.md) - - [VpnResult](docs/Model/VpnResult.md) - - [VpnResultMethods](docs/Model/VpnResultMethods.md) - - [WebhookVisit](docs/Model/WebhookVisit.md) ## Documentation for Authorization diff --git a/contributing.md b/contributing.md index 00355047..75717c83 100644 --- a/contributing.md +++ b/contributing.md @@ -5,8 +5,8 @@ Most files in the project are autogenerated by [swagger-codegen](https://swagger.io/tools/swagger-codegen/) for php. - [template](./template) - folder contains redefined templates of `swagger-codegen`. Original templates you can find in [swagger-codegen repo](https://github.com/swagger-api/swagger-codegen/tree/751e59df060b1c3ecf54921e104f2086dfa9f820/modules/swagger-codegen/src/main/resources/php). -- [docs](./docs) - generated documentation for models and [API Client](./docs/Api/FingerprintApi.md). -- [src](./src) - API Client code is generated automatically. +- [docs](./docs) - generated documentation for models and [API Client](docs/Api/FingerprintApi.md). +- [src](./src) - API Client code and generated models. ## Code generation diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index e9b81abc..e69de29b 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -1,137 +0,0 @@ -# Fingerprint\ServerAPI\FingerprintApi - -All URIs are relative to *https://api.fpjs.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId -[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId - -# **getEvent** -> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) - -Get event by requestId - -This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. - -### Example -```php -getEvent($request_id); - echo "
" . $response->__toString() . "
"; -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | - -### Return type - -[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) - -### Authorization - -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **getVisits** -> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - -Get visits by visitorId - -This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. - -### Example -```php -getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - echo "
" . $response->__toString() . "
"; -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | - **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] - **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] - **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] - **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] - **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] - -### Return type - -[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) - -### Authorization - -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - diff --git a/scripts/generate.sh b/scripts/generate.sh index 2d88692a..9654308f 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -38,7 +38,8 @@ platform=$(uname) # clean models before generating rm -f ./src/Model/* -java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json +java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json -Dmodels +java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json -DsupportingFiles # fix invalid code generated for structure with additionalProperties ( @@ -67,3 +68,4 @@ mv -f src/README.md ./README.md mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs +cp template/docs/FingerprintApi.md docs/Api diff --git a/template/docs/FingerprintApi.md b/template/docs/FingerprintApi.md new file mode 100644 index 00000000..e69de29b From ec7c274366ff2248d1a4026c04be55912b4df171 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 10 Jul 2024 17:28:02 +0300 Subject: [PATCH 002/118] chore: remove templates for api client and api doc --- template/api.mustache | 535 -------------------------------------- template/api_doc.mustache | 75 ------ 2 files changed, 610 deletions(-) delete mode 100644 template/api.mustache delete mode 100644 template/api_doc.mustache diff --git a/template/api.mustache b/template/api.mustache deleted file mode 100644 index aca8ab86..00000000 --- a/template/api.mustache +++ /dev/null @@ -1,535 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace {{apiPackage}}; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use {{invokerPackage}}\ApiException; -use {{invokerPackage}}\Configuration; -use {{invokerPackage}}\HeaderSelector; -use {{invokerPackage}}\ObjectSerializer; - -/** - * {{classname}} Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -{{#operations}}class {{classname}} -{ - /** - * @var ClientInterface - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - protected $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; - - /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector - */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - - // TODO Remove on next major release - if(version_compare( - PHP_VERSION, - '8.1', - '<' - )) { - trigger_error('You are using a PHP version that has reached EOL. Support for it will be removed in next major release of this SDK. Please consider upgrading to PHP 8.1 or higher.', E_USER_WARNING); - } - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - -{{#operation}} -{{#contents}} - /** - * Operation {{{operationId}}} -{{#summary}} - * - * {{{summary}}} -{{/summary}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} - */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}});{{#returnType}} - return $response;{{/returnType}} - } - - /** - * Operation {{{operationId}}}WithHttpInfo -{{#summary}} - * - * {{{summary}}} -{{/summary}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) - */ - public function {{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - $returnType = '{{returnType}}'; - $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - {{/returnType}} - {{^returnType}} - return [null, $statusCode, $response->getHeaders()]; - {{/returnType}} - - } catch (ApiException $e) { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '{{dataType}}', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - {{/dataType}} - {{/responses}} - } - throw $e; - } - } - - /** - * Operation {{{operationId}}}Async - * - * {{{summary}}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - return $this->{{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation {{{operationId}}}AsyncWithHttpInfo - * - * {{{summary}}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - $returnType = '{{returnType}}'; - $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - {{/returnType}} - {{^returnType}} - return [null, $response->getStatusCode(), $response->getHeaders()]; - {{/returnType}} - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation '{{{operationId}}}' - * -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function {{operationId}}Request({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - {{#parameters}} - {{#required}} - // verify the required parameter '{{paramName}}' is set - if (${{paramName}} === null || (is_array(${{paramName}}) && count(${{paramName}}) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter ${{paramName}} when calling {{operationId}}' - ); - } - {{/required}} - {{#hasValidation}} - {{#maxLength}} - if ({{^required}}${{paramName}} !== null && {{/required}}strlen(${{paramName}}) > {{maxLength}}) { - throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); - } - {{/maxLength}} - {{#minLength}} - if ({{^required}}${{paramName}} !== null && {{/required}}strlen(${{paramName}}) < {{minLength}}) { - throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); - } - {{/minLength}} - {{#maximum}} - if ({{^required}}${{paramName}} !== null && {{/required}}${{paramName}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}) { - throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); - } - {{/maximum}} - {{#minimum}} - if ({{^required}}${{paramName}} !== null && {{/required}}${{paramName}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}) { - throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); - } - {{/minimum}} - {{#pattern}} - if ({{^required}}${{paramName}} !== null && {{/required}}!preg_match("{{{pattern}}}", ${{paramName}})) { - throw new \InvalidArgumentException("invalid value for \"{{paramName}}\" when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); - } - {{/pattern}} - {{#maxItems}} - if ({{^required}}${{paramName}} !== null && {{/required}}count(${{paramName}}) > {{maxItems}}) { - throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); - } - {{/maxItems}} - {{#minItems}} - if ({{^required}}${{paramName}} !== null && {{/required}}count(${{paramName}}) < {{minItems}}) { - throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); - } - {{/minItems}} - - {{/hasValidation}} - {{/parameters}} - - $resourcePath = '{{{path}}}'; - $formParams = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - {{#queryParams}} - // query params - {{#collectionFormat}} - if (is_array(${{paramName}})) { - ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{collectionFormat}}', true); - } - {{/collectionFormat}} - if (${{paramName}} !== null) { - $queryParams['{{baseName}}'] = ObjectSerializer::toQueryValue(${{paramName}}, {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}); - } - {{/queryParams}} - {{#headerParams}} - // header params - {{#collectionFormat}} - if (is_array(${{paramName}})) { - ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{collectionFormat}}'); - } - {{/collectionFormat}} - if (${{paramName}} !== null) { - $headerParams['{{baseName}}'] = ObjectSerializer::toHeaderValue(${{paramName}}); - } - {{/headerParams}} - - {{#pathParams}} - // path params - {{#collectionFormat}} - if (is_array(${{paramName}})) { - ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{collectionFormat}}'); - } - {{/collectionFormat}} - if (${{paramName}} !== null) { - $resourcePath = str_replace( - '{' . '{{baseName}}' . '}', - ObjectSerializer::toPathValue(${{paramName}}), - $resourcePath - ); - } - {{/pathParams}} - - {{#formParams}} - // form params - if (${{paramName}} !== null) { - {{#isBinary}} - $multipart = true; - $formParams['{{baseName}}'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue(${{paramName}}), 'rb'); - {{/isBinary}} - {{^isBinary}} - $formParams['{{baseName}}'] = ObjectSerializer::toFormValue(${{paramName}}); - {{/isBinary}} - } - {{/formParams}} - // body params - $_tempBody = null; - {{#bodyParams}} - if (isset(${{paramName}})) { - $_tempBody = ${{paramName}}; - } - {{/bodyParams}} - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}], - [{{#consumes}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } - } - - {{#authMethods}} - {{#isApiKey}} - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('{{keyParamName}}'); - if ($apiKey !== null) { - {{#isKeyInHeader}}$headers['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}} - } - {{/isApiKey}} - {{#isBasic}} - // this endpoint requires HTTP basic authentication - if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - {{/isBasic}} - {{#isBearer}} - // // this endpoint requires Bearer token - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - {{/isBearer}} - {{#isOAuth}} - // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - {{/isOAuth}} - {{/authMethods}} - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - '{{httpMethod}}', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - {{/contents}} - {{/operation}} - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} -{{/operations}} diff --git a/template/api_doc.mustache b/template/api_doc.mustache deleted file mode 100644 index 2b6c9f5b..00000000 --- a/template/api_doc.mustache +++ /dev/null @@ -1,75 +0,0 @@ -# {{invokerPackage}}\FingerprintApi{{#description}} -{{description}}{{/description}} - -All URIs are relative to *{{basePath}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} -# **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) - -{{{summary}}}{{#notes}} - -{{{notes}}}{{/notes}} - -### Example -```php -{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - echo "
" . $response->__toString() . "
";{{/returnType}} -} catch (Exception $e) { - echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^@last}}, {{/@last}}{{/authMethods}} - -### HTTP request headers - -- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} -- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -{{/operation}} -{{/operations}} From 001682270fd4370484b25062550a65bd375b9372 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 15 Jul 2024 11:10:48 +0300 Subject: [PATCH 003/118] feat: rewrite request logic BREAKING CHANGE: Request logic is rewritten, Upgraded minimum php version to 8.1 --- .swagger-codegen-ignore | 4 +- README.md | 74 ++++ composer.json | 2 +- docker-compose.yml | 4 +- scripts/generate.sh | 3 +- src/Api/FingerprintApi.php | 730 ++++-------------------------------- src/HeaderSelector.php | 109 ------ template/composer.mustache | 2 +- test/FingerprintApiTest.php | 4 +- 9 files changed, 149 insertions(+), 783 deletions(-) delete mode 100644 src/HeaderSelector.php diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index 7d61e7c8..ce6132b6 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -3,4 +3,6 @@ src/phpunit.xml.dist src/.travis.yml src/.php_cs src/git_push.sh -src/test/** \ No newline at end of file +src/test/** +src/Api/FingerprintApi.php +src/HeaderSelector.php \ No newline at end of file diff --git a/README.md b/README.md index 2705848e..70b6c14d 100644 --- a/README.md +++ b/README.md @@ -193,9 +193,83 @@ All URIs are relative to your region's base URL. Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by requestId +*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId ## Documentation for Models + - [ASN](docs/Model/ASN.md) + - [BotdDetectionResult](docs/Model/BotdDetectionResult.md) + - [BotdResult](docs/Model/BotdResult.md) + - [BrowserDetails](docs/Model/BrowserDetails.md) + - [ClonedAppResult](docs/Model/ClonedAppResult.md) + - [Confidence](docs/Model/Confidence.md) + - [DataCenter](docs/Model/DataCenter.md) + - [DeprecatedIPLocation](docs/Model/DeprecatedIPLocation.md) + - [DeprecatedIPLocationCity](docs/Model/DeprecatedIPLocationCity.md) + - [EmulatorResult](docs/Model/EmulatorResult.md) + - [ErrorEvent403Response](docs/Model/ErrorEvent403Response.md) + - [ErrorEvent403ResponseError](docs/Model/ErrorEvent403ResponseError.md) + - [ErrorEvent404Response](docs/Model/ErrorEvent404Response.md) + - [ErrorEvent404ResponseError](docs/Model/ErrorEvent404ResponseError.md) + - [ErrorVisits403](docs/Model/ErrorVisits403.md) + - [EventResponse](docs/Model/EventResponse.md) + - [FactoryResetResult](docs/Model/FactoryResetResult.md) + - [FridaResult](docs/Model/FridaResult.md) + - [HighActivityResult](docs/Model/HighActivityResult.md) + - [IPLocation](docs/Model/IPLocation.md) + - [IPLocationCity](docs/Model/IPLocationCity.md) + - [IdentificationError](docs/Model/IdentificationError.md) + - [IncognitoResult](docs/Model/IncognitoResult.md) + - [IpBlockListResult](docs/Model/IpBlockListResult.md) + - [IpBlockListResultDetails](docs/Model/IpBlockListResultDetails.md) + - [IpInfoResult](docs/Model/IpInfoResult.md) + - [IpInfoResultV4](docs/Model/IpInfoResultV4.md) + - [IpInfoResultV6](docs/Model/IpInfoResultV6.md) + - [JailbrokenResult](docs/Model/JailbrokenResult.md) + - [Location](docs/Model/Location.md) + - [LocationSpoofingResult](docs/Model/LocationSpoofingResult.md) + - [ManyRequestsResponse](docs/Model/ManyRequestsResponse.md) + - [PrivacySettingsResult](docs/Model/PrivacySettingsResult.md) + - [ProductError](docs/Model/ProductError.md) + - [ProductsResponse](docs/Model/ProductsResponse.md) + - [ProductsResponseBotd](docs/Model/ProductsResponseBotd.md) + - [ProductsResponseIdentification](docs/Model/ProductsResponseIdentification.md) + - [ProductsResponseIdentificationData](docs/Model/ProductsResponseIdentificationData.md) + - [ProxyResult](docs/Model/ProxyResult.md) + - [RawDeviceAttributesResult](docs/Model/RawDeviceAttributesResult.md) + - [Response](docs/Model/Response.md) + - [ResponseVisits](docs/Model/ResponseVisits.md) + - [RootAppsResult](docs/Model/RootAppsResult.md) + - [SeenAt](docs/Model/SeenAt.md) + - [SignalResponseClonedApp](docs/Model/SignalResponseClonedApp.md) + - [SignalResponseEmulator](docs/Model/SignalResponseEmulator.md) + - [SignalResponseFactoryReset](docs/Model/SignalResponseFactoryReset.md) + - [SignalResponseFrida](docs/Model/SignalResponseFrida.md) + - [SignalResponseHighActivity](docs/Model/SignalResponseHighActivity.md) + - [SignalResponseIncognito](docs/Model/SignalResponseIncognito.md) + - [SignalResponseIpBlocklist](docs/Model/SignalResponseIpBlocklist.md) + - [SignalResponseIpInfo](docs/Model/SignalResponseIpInfo.md) + - [SignalResponseJailbroken](docs/Model/SignalResponseJailbroken.md) + - [SignalResponseLocationSpoofing](docs/Model/SignalResponseLocationSpoofing.md) + - [SignalResponsePrivacySettings](docs/Model/SignalResponsePrivacySettings.md) + - [SignalResponseProxy](docs/Model/SignalResponseProxy.md) + - [SignalResponseRawDeviceAttributes](docs/Model/SignalResponseRawDeviceAttributes.md) + - [SignalResponseRootApps](docs/Model/SignalResponseRootApps.md) + - [SignalResponseSuspectScore](docs/Model/SignalResponseSuspectScore.md) + - [SignalResponseTampering](docs/Model/SignalResponseTampering.md) + - [SignalResponseTor](docs/Model/SignalResponseTor.md) + - [SignalResponseVirtualMachine](docs/Model/SignalResponseVirtualMachine.md) + - [SignalResponseVpn](docs/Model/SignalResponseVpn.md) + - [Subdivision](docs/Model/Subdivision.md) + - [SuspectScoreResult](docs/Model/SuspectScoreResult.md) + - [TamperingResult](docs/Model/TamperingResult.md) + - [TorResult](docs/Model/TorResult.md) + - [VirtualMachineResult](docs/Model/VirtualMachineResult.md) + - [Visit](docs/Model/Visit.md) + - [VpnResult](docs/Model/VpnResult.md) + - [VpnResultMethods](docs/Model/VpnResultMethods.md) + - [WebhookVisit](docs/Model/WebhookVisit.md) ## Documentation for Authorization diff --git a/composer.json b/composer.json index dc63c971..b3a04720 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ } ], "require": { - "php": ">=7.1", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/docker-compose.yml b/docker-compose.yml index 1ec14bda..bef1d6f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,14 +7,14 @@ services: volumes: - ./:/app php: - image: php:7.2-cli + image: php:8.1-cli volumes: - ./:/app working_dir: /app env_file: - .env phpunit: - image: php:7.2-cli + image: php:8.1-cli volumes: - ./:/app working_dir: /app diff --git a/scripts/generate.sh b/scripts/generate.sh index 9654308f..818149bd 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -38,8 +38,7 @@ platform=$(uname) # clean models before generating rm -f ./src/Model/* -java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json -Dmodels -java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json -DsupportingFiles +java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json # fix invalid code generated for structure with additionalProperties ( diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 2418a286..c0409712 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -1,739 +1,139 @@ client = $client ?: new Client(); $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - - // TODO Remove on next major release - if(version_compare( - PHP_VERSION, - '8.1', - '<' - )) { - trigger_error('You are using a PHP version that has reached EOL. Support for it will be removed in next major release of this SDK. Please consider upgrading to PHP 8.1 or higher.', E_USER_WARNING); - } - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getEvent - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\EventResponse - */ - public function getEvent($request_id) - { - list($response) = $this->getEventWithHttpInfo($request_id); - return $response; } - /** - * Operation getEventWithHttpInfo - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\EventResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getEventWithHttpInfo($request_id) + protected function getSDKVersion() { - $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; - $request = $this->getEventRequest($request_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $string = file_get_contents(dirname(__FILE__) . "/../../composer.json"); + $jsonData = json_decode($string, true); - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\EventResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } + return $jsonData['version']; } - /** - * Operation getEventAsync - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getEventAsync($request_id) + protected function getEventURL() { - return $this->getEventAsyncWithHttpInfo($request_id) - ->then( - function ($response) { - return $response[0]; - } - ); + return $this->config->getHost() . "/events/{request_id}"; } - /** - * Operation getEventAsyncWithHttpInfo - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getEventAsyncWithHttpInfo($request_id) + protected function getVisitsURL() { - $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; - $request = $this->getEventRequest($request_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); + return $this->config->getHost() . "/visitors/{visitor_id}"; } - /** - * Create request for operation 'getEvent' - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getEventRequest($request_id) + protected function getClientOptions() { - // verify the required parameter 'request_id' is set - if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $request_id when calling getEvent' - ); - } - - $resourcePath = '/events/{request_id}'; - $formParams = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($request_id !== null) { - $resourcePath = str_replace( - '{' . 'request_id' . '}', - ObjectSerializer::toPathValue($request_id), - $resourcePath - ); - } + $options = [ + 'headers' => [ + 'User-Agent' => $this->config->getUserAgent(), + 'Content-Type' => 'application/json; charset=utf-8', + 'Accept' => 'application/json; charset=utf-8', + ], + 'query' => [ + 'ii' => str_replace("{version}", $this->getSDKVersion(), $this->integration_info), + ] + ]; - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } - } - - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); if ($apiKey !== null) { - $headers['Auth-API-Key'] = $apiKey; + $options['headers']['Auth-API-Key'] = $apiKey; } - // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); if ($apiKey !== null) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $options['query']['api_key'] = $apiKey; } - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getVisits - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\Response - */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - list($response) = $this->getVisitsWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - return $response; - } - - /** - * Operation getVisitsWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\Response, HTTP status code, HTTP response headers (array of strings) - */ - public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 429: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); } - throw $e; } + + return $options; } - /** - * Operation getVisitsAsync - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + protected function getEventRequest(string $request_id): Request { - return $this->getVisitsAsyncWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - ->then( - function ($response) { - return $response[0]; - } - ); + $options = $this->getClientOptions(); + $url = str_replace("{request_id}", $request_id, $this->getEventURL()) . "?" . http_build_query($options['query']); + return new Request('GET', $url, $options['headers']); } - /** - * Operation getVisitsAsyncWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsyncWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + public function getEvent(string $request_id): EventResponse { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + $response = $this->client->sendRequest($this->getEventRequest($request_id)); + $content = $response->getBody()->getContents(); + /** @var EventResponse $serialized */ + $serialized = ObjectSerializer::deserialize($content, EventResponse::class, []); - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); + return $serialized; } - /** - * Create request for operation 'getVisits' - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + protected function getVisitsRequest(string $visitor_id, string|null $request_id = null, string|null $linked_id = null, string|null $limit = null, string|null $pagination_key = null, string|null $before = null): Request { - // verify the required parameter 'visitor_id' is set - if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $visitor_id when calling getVisits' - ); - } - - $resourcePath = '/visitors/{visitor_id}'; - $formParams = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params + $options = $this->getClientOptions(); if ($request_id !== null) { - $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); + $options['query']['request_id'] = ObjectSerializer::toQueryValue($request_id); } - // query params if ($linked_id !== null) { - $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); + $options['query']['linked_id'] = ObjectSerializer::toQueryValue($linked_id); } - // query params if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); + $options['query']['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); } - // query params if ($pagination_key !== null) { - $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); + $options['query']['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key); } - // query params if ($before !== null) { - $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); + $options['query']['before'] = ObjectSerializer::toQueryValue($before, 'int64'); } - - // path params - if ($visitor_id !== null) { - $resourcePath = str_replace( - '{' . 'visitor_id' . '}', - ObjectSerializer::toPathValue($visitor_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); + $url = str_replace("{visitor_id}", $visitor_id, $this->getVisitsURL()) . "?" . http_build_query($options['query']); + return new Request('GET', $url, $options['headers']); } - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() + public function getVisits(string $visitor_id, string|null $request_id = null, string|null $linked_id = null, string|null $limit = null, string|null $pagination_key = null, string|null $before = null): Response { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } + $response = $this->client->sendRequest($this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before)); + $content = $response->getBody()->getContents(); + /** @var Response $serialized */ + $serialized = ObjectSerializer::deserialize($content, Response::class, []); - return $options; + return $serialized; } } diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php deleted file mode 100644 index 04b45bc7..00000000 --- a/src/HeaderSelector.php +++ /dev/null @@ -1,109 +0,0 @@ -selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); - return $headers; - } - - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); - - unset($headers['Content-Type']); - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided - * - * @param string[] $accept Array of header - * - * @return string Accept (e.g. application/json) - */ - private function selectAcceptHeader($accept) - { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { - return null; - } elseif (preg_grep("/application\/json/i", $accept)) { - return 'application/json'; - } else { - return implode(',', $accept); - } - } - - /** - * Return the content type based on an array of content-type provided - * - * @param string[] $contentType Array fo content-type - * - * @return string Content-Type (e.g. application/json) - */ - private function selectContentTypeHeader($contentType) - { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; - } else { - return implode(',', $contentType); - } - } -} - diff --git a/template/composer.mustache b/template/composer.mustache index 7e565c26..397d75a8 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -32,7 +32,7 @@ } ], "require": { - "php": ">=7.1", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 788f87f9..8e018bd4 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -32,10 +32,10 @@ protected function getMethod($method_name) protected function getVersion() { - $config_file = file_get_contents(__DIR__ . '/../config.json'); + $config_file = file_get_contents(__DIR__ . '/../composer.json'); $config = json_decode($config_file, true); - return $config['artifactVersion']; + return $config['version']; } public function setUp(): void From dfcea987bca8d17bd106c3c85d6aaf813f76fc60 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 15 Jul 2024 11:14:18 +0300 Subject: [PATCH 004/118] chore(ci): update minimum php version to 8.1 --- .github/workflows/functional.yml | 2 +- scripts/functional.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 01adce64..433e9d5c 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -16,7 +16,7 @@ jobs: strategy: max-parallel: 1 matrix: - php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2" ] + php_version: [ "8.1", "8.2", "8.3" ] steps: - uses: actions/checkout@v4 with: diff --git a/scripts/functional.sh b/scripts/functional.sh index d65c00fc..26b21a26 100755 --- a/scripts/functional.sh +++ b/scripts/functional.sh @@ -1 +1 @@ -docker container run --env-file .env --rm -v $(pwd):/app/ php:7.2-cli php /app/run_checks.php \ No newline at end of file +docker container run --env-file .env --rm -v $(pwd):/app/ php:8.1-cli php /app/run_checks.php \ No newline at end of file From a3157a8f71de6d215ff93aac33b002067646a5db Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 15 Jul 2024 12:13:28 +0300 Subject: [PATCH 005/118] docs(api): add fingerprint api doc --- docs/Api/FingerprintApi.md | 137 ++++++++++++++++++++++++++++++++ template/docs/FingerprintApi.md | 137 ++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index e69de29b..e9b81abc 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -0,0 +1,137 @@ +# Fingerprint\ServerAPI\FingerprintApi + +All URIs are relative to *https://api.fpjs.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId +[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId + +# **getEvent** +> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) + +Get event by requestId + +This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. + +### Example +```php +getEvent($request_id); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | + +### Return type + +[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getVisits** +> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) + +Get visits by visitorId + +This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. + +### Example +```php +getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | + **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] + **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] + **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] + **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] + **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] + +### Return type + +[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/template/docs/FingerprintApi.md b/template/docs/FingerprintApi.md index e69de29b..e9b81abc 100644 --- a/template/docs/FingerprintApi.md +++ b/template/docs/FingerprintApi.md @@ -0,0 +1,137 @@ +# Fingerprint\ServerAPI\FingerprintApi + +All URIs are relative to *https://api.fpjs.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId +[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId + +# **getEvent** +> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) + +Get event by requestId + +This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. + +### Example +```php +getEvent($request_id); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | + +### Return type + +[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + +# **getVisits** +> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) + +Get visits by visitorId + +This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. + +### Example +```php +getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | + **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] + **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] + **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] + **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] + **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] + +### Return type + +[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + From d62eac6d7ed60659d4defeca2bcb8c522c77ad91 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 15 Jul 2024 12:20:04 +0300 Subject: [PATCH 006/118] refactor: add return for methods --- src/Api/FingerprintApi.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index c0409712..fe931a04 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -10,6 +10,7 @@ use Fingerprint\ServerAPI\Configuration; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use RuntimeException; class FingerprintApi { @@ -37,7 +38,7 @@ public function __construct( $this->config = $config ?: new Configuration(); } - protected function getSDKVersion() + protected function getSDKVersion(): string { $string = file_get_contents(dirname(__FILE__) . "/../../composer.json"); $jsonData = json_decode($string, true); @@ -45,17 +46,17 @@ protected function getSDKVersion() return $jsonData['version']; } - protected function getEventURL() + protected function getEventURL(): string { return $this->config->getHost() . "/events/{request_id}"; } - protected function getVisitsURL() + protected function getVisitsURL(): string { return $this->config->getHost() . "/visitors/{visitor_id}"; } - protected function getClientOptions() + protected function getClientOptions(): array { $options = [ 'headers' => [ @@ -81,7 +82,7 @@ protected function getClientOptions() if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + throw new RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); } } From 9b01ba65e7ac794c77afedc155823baef2c80b17 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 16 Jul 2024 13:29:38 +0300 Subject: [PATCH 007/118] feat: introduce rawResponse for getVisits and getEvent methods --- .swagger-codegen-ignore | 4 +- run_checks.php | 18 +- scripts/generate.sh | 2 + src/Api/FingerprintApi.php | 2 + src/Model/EventResponse.php | 55 +-- src/Model/Response.php | 77 ++-- template/Model/EventResponse.php.template | 342 ++++++++++++++++++ template/Model/Response.php.template | 407 ++++++++++++++++++++++ test/FingerprintApiTest.php | 34 +- 9 files changed, 877 insertions(+), 64 deletions(-) create mode 100644 template/Model/EventResponse.php.template create mode 100644 template/Model/Response.php.template diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index ce6132b6..1b456b24 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -5,4 +5,6 @@ src/.php_cs src/git_push.sh src/test/** src/Api/FingerprintApi.php -src/HeaderSelector.php \ No newline at end of file +src/HeaderSelector.php +src/Model/EventResponse.php +src/Model/Response.php \ No newline at end of file diff --git a/run_checks.php b/run_checks.php index 6244d346..d4cb807e 100644 --- a/run_checks.php +++ b/run_checks.php @@ -45,7 +45,12 @@ try { $result = $client->getVisits($visitor_id); - fwrite(STDOUT, sprintf("Got visits: %s \n", $result)); + $rawResponseDecoded = json_decode($result->getRawResponse(), true); + if ($rawResponseDecoded['visitorId'] !== $visitor_id) { + fwrite(STDERR, sprintf("Raw response for getVisits not working")); + exit(1); + } + fwrite(STDOUT, sprintf("Got visits: %s \n", $result->getRawResponse())); } catch (Exception $e) { fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); @@ -53,14 +58,19 @@ try { $result = $client->getEvent($request_id); - fwrite(STDOUT, sprintf("Got event: %s \n", $result)); + $rawResponseDecoded = json_decode($result->getRawResponse(), true); + if ($rawResponseDecoded['products']['identification']['data']['requestId'] !== $request_id) { + fwrite(STDERR, sprintf("Raw response for getEvent not working")); + exit(1); + } + fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $result->getRawResponse())); } catch (Exception $e) { - fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); } // Enable the deprecated ArrayAccess return type warning again if needed error_reporting(error_reporting() | E_DEPRECATED); -fwrite(STDOUT, "Checks passed\n"); +fwrite(STDOUT, "\n\nChecks passed\n"); exit(0); diff --git a/scripts/generate.sh b/scripts/generate.sh index 818149bd..5ee360ee 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -68,3 +68,5 @@ mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs cp template/docs/FingerprintApi.md docs/Api +cp template/Model/Response.php.template src/Model/Response.php +cp template/Model/EventResponse.php.template src/Model/EventResponse.php diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index fe931a04..8003fc22 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -102,6 +102,7 @@ public function getEvent(string $request_id): EventResponse $content = $response->getBody()->getContents(); /** @var EventResponse $serialized */ $serialized = ObjectSerializer::deserialize($content, EventResponse::class, []); + $serialized->setRawResponse($content); return $serialized; } @@ -134,6 +135,7 @@ public function getVisits(string $visitor_id, string|null $request_id = null, st $content = $response->getBody()->getContents(); /** @var Response $serialized */ $serialized = ObjectSerializer::deserialize($content, Response::class, []); + $serialized->setRawResponse($content); return $serialized; } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index eabe5e08..f63148db 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -20,6 +20,7 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.34 */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen @@ -28,8 +29,9 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\Model\ModelInterface; +use Fingerprint\ServerAPI\ObjectSerializer; /** * EventResponse Class Doc Comment @@ -43,31 +45,32 @@ class EventResponse implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; + protected mixed $rawResponse = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $swaggerModelName = 'EventResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerTypes = [ 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerFormats = [ 'products' => null, -'error' => null ]; + 'error' => null]; /** * Array of property to type mappings. Used for (de)serialization @@ -97,7 +100,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'products' => 'products', -'error' => 'error' ]; + 'error' => 'error']; /** * Array of attributes to setter functions (for deserialization of responses) @@ -106,7 +109,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'products' => 'setProducts', -'error' => 'setError' ]; + 'error' => 'setError']; /** * Array of attributes to getter functions (for serialization of requests) @@ -115,7 +118,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'products' => 'getProducts', -'error' => 'getError' ]; + 'error' => 'getError']; /** * Array of attributes where the key is the local name, @@ -158,7 +161,6 @@ public function getModelName() return self::$swaggerModelName; } - /** * Associative array for storing property values @@ -253,6 +255,7 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * @@ -283,7 +286,7 @@ public function offsetGet($offset) * Sets value based on offset. * * @param integer $offset Offset - * @param mixed $value Value to be set + * @param mixed $value Value to be set * * @return void */ @@ -326,4 +329,14 @@ public function __toString() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } + + public function getRawResponse(): mixed + { + return $this->rawResponse; + } + + public function setRawResponse(mixed $rawResponse): void + { + $this->rawResponse = $rawResponse; + } } diff --git a/src/Model/Response.php b/src/Model/Response.php index 540abf2a..d9b4f12f 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -20,16 +20,19 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.34 */ + /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ + namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\Model\ModelInterface; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Response Class Doc Comment @@ -44,34 +47,36 @@ class Response implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; + protected mixed $rawResponse = null; + /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $swaggerModelName = 'Response'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerTypes = [ 'visitor_id' => 'string', -'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', -'last_timestamp' => 'int', -'pagination_key' => 'string' ]; + 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', + 'last_timestamp' => 'int', + 'pagination_key' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerFormats = [ 'visitor_id' => null, -'visits' => null, -'last_timestamp' => 'int64', -'pagination_key' => null ]; + 'visits' => null, + 'last_timestamp' => 'int64', + 'pagination_key' => null]; /** * Array of property to type mappings. Used for (de)serialization @@ -101,9 +106,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', -'visits' => 'visits', -'last_timestamp' => 'lastTimestamp', -'pagination_key' => 'paginationKey' ]; + 'visits' => 'visits', + 'last_timestamp' => 'lastTimestamp', + 'pagination_key' => 'paginationKey']; /** * Array of attributes to setter functions (for deserialization of responses) @@ -112,9 +117,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'visitor_id' => 'setVisitorId', -'visits' => 'setVisits', -'last_timestamp' => 'setLastTimestamp', -'pagination_key' => 'setPaginationKey' ]; + 'visits' => 'setVisits', + 'last_timestamp' => 'setLastTimestamp', + 'pagination_key' => 'setPaginationKey']; /** * Array of attributes to getter functions (for serialization of requests) @@ -123,9 +128,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'visitor_id' => 'getVisitorId', -'visits' => 'getVisits', -'last_timestamp' => 'getLastTimestamp', -'pagination_key' => 'getPaginationKey' ]; + 'visits' => 'getVisits', + 'last_timestamp' => 'getLastTimestamp', + 'pagination_key' => 'getPaginationKey']; /** * Array of attributes where the key is the local name, @@ -168,7 +173,6 @@ public function getModelName() return self::$swaggerModelName; } - /** * Associative array for storing property values @@ -316,6 +320,7 @@ public function setPaginationKey($pagination_key) return $this; } + /** * Returns true if offset exists. False otherwise. * @@ -346,7 +351,7 @@ public function offsetGet($offset) * Sets value based on offset. * * @param integer $offset Offset - * @param mixed $value Value to be set + * @param mixed $value Value to be set * * @return void */ @@ -389,4 +394,14 @@ public function __toString() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } + + public function getRawResponse(): mixed + { + return $this->rawResponse; + } + + public function setRawResponse(mixed $rawResponse): void + { + $this->rawResponse = $rawResponse; + } } diff --git a/template/Model/EventResponse.php.template b/template/Model/EventResponse.php.template new file mode 100644 index 00000000..f63148db --- /dev/null +++ b/template/Model/EventResponse.php.template @@ -0,0 +1,342 @@ + '\Fingerprint\ServerAPI\Model\ProductsResponse', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'products' => null, + 'error' => null]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'products' => 'products', + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'products' => 'setProducts', + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'products' => 'getProducts', + 'error' => 'getError']; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['products'] === null) { + $invalidProperties[] = "'products' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets products + * + * @return \Fingerprint\ServerAPI\Model\ProductsResponse + */ + public function getProducts() + { + return $this->container['products']; + } + + /** + * Sets products + * + * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products + * + * @return $this + */ + public function setProducts($products) + { + $this->container['products'] = $products; + + return $this; + } + + /** + * Gets error + * + * @return \Fingerprint\ServerAPI\Model\ProductError + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * + * @return $this + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + public function getRawResponse(): mixed + { + return $this->rawResponse; + } + + public function setRawResponse(mixed $rawResponse): void + { + $this->rawResponse = $rawResponse; + } +} diff --git a/template/Model/Response.php.template b/template/Model/Response.php.template new file mode 100644 index 00000000..d9b4f12f --- /dev/null +++ b/template/Model/Response.php.template @@ -0,0 +1,407 @@ + 'string', + 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', + 'last_timestamp' => 'int', + 'pagination_key' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'visitor_id' => null, + 'visits' => null, + 'last_timestamp' => 'int64', + 'pagination_key' => null]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'visitor_id' => 'visitorId', + 'visits' => 'visits', + 'last_timestamp' => 'lastTimestamp', + 'pagination_key' => 'paginationKey']; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'visitor_id' => 'setVisitorId', + 'visits' => 'setVisits', + 'last_timestamp' => 'setLastTimestamp', + 'pagination_key' => 'setPaginationKey']; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'visitor_id' => 'getVisitorId', + 'visits' => 'getVisits', + 'last_timestamp' => 'getLastTimestamp', + 'pagination_key' => 'getPaginationKey']; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; + $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; + $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['visitor_id'] === null) { + $invalidProperties[] = "'visitor_id' can't be null"; + } + if ($this->container['visits'] === null) { + $invalidProperties[] = "'visits' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets visitor_id + * + * @return string + */ + public function getVisitorId() + { + return $this->container['visitor_id']; + } + + /** + * Sets visitor_id + * + * @param string $visitor_id visitor_id + * + * @return $this + */ + public function setVisitorId($visitor_id) + { + $this->container['visitor_id'] = $visitor_id; + + return $this; + } + + /** + * Gets visits + * + * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] + */ + public function getVisits() + { + return $this->container['visits']; + } + + /** + * Sets visits + * + * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits + * + * @return $this + */ + public function setVisits($visits) + { + $this->container['visits'] = $visits; + + return $this; + } + + /** + * Gets last_timestamp + * + * @return int + */ + public function getLastTimestamp() + { + return $this->container['last_timestamp']; + } + + /** + * Sets last_timestamp + * + * @param int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. + * + * @return $this + */ + public function setLastTimestamp($last_timestamp) + { + $this->container['last_timestamp'] = $last_timestamp; + + return $this; + } + + /** + * Gets pagination_key + * + * @return string + */ + public function getPaginationKey() + { + return $this->container['pagination_key']; + } + + /** + * Sets pagination_key + * + * @param string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. + * + * @return $this + */ + public function setPaginationKey($pagination_key) + { + $this->container['pagination_key'] = $pagination_key; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + public function getRawResponse(): mixed + { + return $this->rawResponse; + } + + public function setRawResponse(mixed $rawResponse): void + { + $this->rawResponse = $rawResponse; + } +} diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 8e018bd4..735252f8 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -70,7 +70,11 @@ public function getEventMock($request_id) break; } $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); - return ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + /** @var EventResponse $serialized */ + $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + $serialized->setRawResponse($events_mock_data); + + return $serialized; } public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) @@ -85,7 +89,11 @@ public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null if ($limit && is_numeric($limit)) { $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - return ObjectSerializer::deserialize($visits_mock_data, Response::class); + /** @var Response $serialized */ + $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); + $serialized->setRawResponse($visits_mock_data); + + return $serialized; } public function testGetEvent() @@ -104,9 +112,8 @@ public function testGetEvent() $virtual_machine_product = $products->getVirtualMachine(); $request_id = $identification_product->getData()->getRequestId(); $this->assertEquals(self::MOCK_REQUEST_ID, $request_id); - var_dump($botd_product->getData()->getBot()->getResult()); $this->assertEquals('notDetected', $botd_product->getData()->getBot()->getResult()); - $this->assertFalse( $vpn_product->getData()->getMethods()->getPublicVpn()); + $this->assertFalse($vpn_product->getData()->getMethods()->getPublicVpn()); $this->assertEquals('94.142.239.124', $ip_info_product->getData()->getV4()->getAddress()); $this->assertFalse($cloned_app_product->getData()->getResult()); $this->assertEquals(new \DateTime('1970-01-01T00:00:00Z'), $factory_reset_product->getData()->getTime()); @@ -120,13 +127,13 @@ public function testGetEvent() $this->assertEquals(35.73832903057337, $raw_device_attributes['audio']->value); $this->assertEquals('4dce9d6017c3e0c052a77252f29f2b1c', $raw_device_attributes['canvas']->value->Geometry); $this->assertEquals('p3', $raw_device_attributes['colorGamut']->value); - $this->assertTrue( $raw_device_attributes['cookiesEnabled']->value); + $this->assertTrue($raw_device_attributes['cookiesEnabled']->value); $location_spuffing = $products->getLocationSpoofing()->getData(); - $this->assertFalse( $location_spuffing->getResult()); + $this->assertFalse($location_spuffing->getResult()); $high_activity = $products->getHighActivity()->getData(); - $this->assertFalse( $high_activity->getResult()); + $this->assertFalse($high_activity->getResult()); } public function testGetEventWithExtraFields() @@ -203,4 +210,17 @@ public function testGetVisitsWithLimit() $count = count($visits->getVisits()); $this->assertLessThanOrEqual($limit, $count); } + + public function testGetEventRawResponse() + { + $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); + $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_event_200.json")); + $this->assertEquals($mockedResult, $event->getRawResponse()); + } + + public function testGetVisitsRawResponse() { + $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); + $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); + $this->assertEquals($mockedResult, $visits->getRawResponse()); + } } From 8726f6b8d7da01bacbd72066c6d9e6d86a9a21b9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 16 Jul 2024 16:04:57 +0300 Subject: [PATCH 008/118] refactor: set integration info on constructor --- src/Api/FingerprintApi.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 8003fc22..2ff651ad 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -36,6 +36,8 @@ public function __construct( { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); + + $this->integration_info = str_replace("{version}", $this->getSDKVersion(), $this->integration_info); } protected function getSDKVersion(): string @@ -65,7 +67,7 @@ protected function getClientOptions(): array 'Accept' => 'application/json; charset=utf-8', ], 'query' => [ - 'ii' => str_replace("{version}", $this->getSDKVersion(), $this->integration_info), + 'ii' => $this->integration_info, ] ]; From f7bb34378ee7b694db0cf5ae2ef48f938c342400 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 16 Jul 2024 16:39:09 +0300 Subject: [PATCH 009/118] refactor: introduce with raw response trait --- .swagger-codegen-ignore | 4 +- scripts/generate.sh | 20 +- src/Model/ASN.php | 1 + src/Model/BotdDetectionResult.php | 1 + src/Model/BotdResult.php | 1 + src/Model/BrowserDetails.php | 1 + src/Model/ClonedAppResult.php | 1 + src/Model/Confidence.php | 1 + src/Model/DataCenter.php | 1 + src/Model/DeprecatedIPLocation.php | 1 + src/Model/DeprecatedIPLocationCity.php | 1 + src/Model/EmulatorResult.php | 1 + src/Model/ErrorEvent403Response.php | 1 + src/Model/ErrorEvent403ResponseError.php | 1 + src/Model/ErrorEvent404Response.php | 1 + src/Model/ErrorEvent404ResponseError.php | 1 + src/Model/ErrorVisits403.php | 1 + src/Model/EventResponse.php | 56 +-- src/Model/FactoryResetResult.php | 1 + src/Model/FridaResult.php | 1 + src/Model/HighActivityResult.php | 1 + src/Model/IPLocation.php | 1 + src/Model/IPLocationCity.php | 1 + src/Model/IdentificationError.php | 1 + src/Model/IncognitoResult.php | 1 + src/Model/IpBlockListResult.php | 1 + src/Model/IpBlockListResultDetails.php | 1 + src/Model/IpInfoResult.php | 1 + src/Model/IpInfoResultV4.php | 1 + src/Model/IpInfoResultV6.php | 1 + src/Model/JailbrokenResult.php | 1 + src/Model/Location.php | 1 + src/Model/LocationSpoofingResult.php | 1 + src/Model/ManyRequestsResponse.php | 1 + src/Model/PrivacySettingsResult.php | 1 + src/Model/ProductError.php | 1 + src/Model/ProductsResponse.php | 1 + src/Model/ProductsResponseBotd.php | 1 + src/Model/ProductsResponseIdentification.php | 1 + .../ProductsResponseIdentificationData.php | 1 + src/Model/ProxyResult.php | 1 + src/Model/RawDeviceAttributesResult.php | 1 + src/Model/Response.php | 78 ++-- src/Model/ResponseVisits.php | 1 + src/Model/RootAppsResult.php | 1 + src/Model/SeenAt.php | 1 + src/Model/SignalResponseClonedApp.php | 1 + src/Model/SignalResponseEmulator.php | 1 + src/Model/SignalResponseFactoryReset.php | 1 + src/Model/SignalResponseFrida.php | 1 + src/Model/SignalResponseHighActivity.php | 1 + src/Model/SignalResponseIncognito.php | 1 + src/Model/SignalResponseIpBlocklist.php | 1 + src/Model/SignalResponseIpInfo.php | 1 + src/Model/SignalResponseJailbroken.php | 1 + src/Model/SignalResponseLocationSpoofing.php | 1 + src/Model/SignalResponsePrivacySettings.php | 1 + src/Model/SignalResponseProxy.php | 1 + .../SignalResponseRawDeviceAttributes.php | 1 + src/Model/SignalResponseRootApps.php | 1 + src/Model/SignalResponseSuspectScore.php | 1 + src/Model/SignalResponseTampering.php | 1 + src/Model/SignalResponseTor.php | 1 + src/Model/SignalResponseVirtualMachine.php | 1 + src/Model/SignalResponseVpn.php | 1 + src/Model/Subdivision.php | 1 + src/Model/SuspectScoreResult.php | 1 + src/Model/TamperingResult.php | 1 + src/Model/TorResult.php | 1 + src/Model/VirtualMachineResult.php | 1 + src/Model/Visit.php | 1 + src/Model/VpnResult.php | 1 + src/Model/VpnResultMethods.php | 1 + src/Model/WebhookVisit.php | 1 + src/Traits/WithRawResponse.php | 17 + template/Model/EventResponse.php.template | 342 --------------- template/Model/Response.php.template | 407 ------------------ template/model_generic.mustache | 1 + 78 files changed, 161 insertions(+), 834 deletions(-) create mode 100644 src/Traits/WithRawResponse.php delete mode 100644 template/Model/EventResponse.php.template delete mode 100644 template/Model/Response.php.template diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index 1b456b24..ce6132b6 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -5,6 +5,4 @@ src/.php_cs src/git_push.sh src/test/** src/Api/FingerprintApi.php -src/HeaderSelector.php -src/Model/EventResponse.php -src/Model/Response.php \ No newline at end of file +src/HeaderSelector.php \ No newline at end of file diff --git a/scripts/generate.sh b/scripts/generate.sh index 5ee360ee..b1814d93 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -68,5 +68,21 @@ mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs cp template/docs/FingerprintApi.md docs/Api -cp template/Model/Response.php.template src/Model/Response.php -cp template/Model/EventResponse.php.template src/Model/EventResponse.php + +# enable WithRawResponse trait for EventResponse model +( + if [ "$platform" = "Darwin" ]; then + sed -i '' 's/\/\/ use \\/use \\/' ./src/Model/EventResponse.php + else + sed -i 's/\/\/ use \\/use \\/' ./src/Model/EventResponse.php + fi +) + +# enable WithRawResponse trait for Response model +( + if [ "$platform" = "Darwin" ]; then + sed -i '' 's/\/\/ use \\/use \\/' ./src/Model/Response.php + else + sed -i 's/\/\/ use \\/use \\/' ./src/Model/Response.php + fi +) \ No newline at end of file diff --git a/src/Model/ASN.php b/src/Model/ASN.php index c455a809..7e930350 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -41,6 +41,7 @@ */ class ASN implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 01f6e0d4..7add4038 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -42,6 +42,7 @@ */ class BotdDetectionResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 5d2c2b94..6e5ef925 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -42,6 +42,7 @@ */ class BotdResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index f92c3853..58247403 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -41,6 +41,7 @@ */ class BrowserDetails implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 506d0e11..27e55fbf 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -41,6 +41,7 @@ */ class ClonedAppResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 8d429199..e4d216d9 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -41,6 +41,7 @@ */ class Confidence implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 2a0fa7ac..62ccb88f 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -41,6 +41,7 @@ */ class DataCenter implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index fffaad63..d7344ca7 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -42,6 +42,7 @@ */ class DeprecatedIPLocation implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index d297b2e8..9c171517 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -41,6 +41,7 @@ */ class DeprecatedIPLocationCity implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index b0a76d67..f1363cb6 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -41,6 +41,7 @@ */ class EmulatorResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 8f71b507..1aeb9cd1 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -41,6 +41,7 @@ */ class ErrorEvent403Response implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index deba9368..509904e4 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -41,6 +41,7 @@ */ class ErrorEvent403ResponseError implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index c7803054..62e204da 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -41,6 +41,7 @@ */ class ErrorEvent404Response implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index b6b14968..fa6c0003 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -41,6 +41,7 @@ */ class ErrorEvent404ResponseError implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 46826318..bf05bbcd 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -41,6 +41,7 @@ */ class ErrorVisits403 implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index f63148db..186a4234 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -20,7 +20,6 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.34 */ - /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen @@ -29,9 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\Model\ModelInterface; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * EventResponse Class Doc Comment @@ -44,33 +42,33 @@ */ class EventResponse implements ModelInterface, ArrayAccess { + use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; - protected mixed $rawResponse = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $swaggerModelName = 'EventResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerTypes = [ 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerFormats = [ 'products' => null, - 'error' => null]; +'error' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -100,7 +98,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'products' => 'products', - 'error' => 'error']; +'error' => 'error' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -109,7 +107,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'products' => 'setProducts', - 'error' => 'setError']; +'error' => 'setError' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -118,7 +116,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'products' => 'getProducts', - 'error' => 'getError']; +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, @@ -161,6 +159,7 @@ public function getModelName() return self::$swaggerModelName; } + /** * Associative array for storing property values @@ -255,7 +254,6 @@ public function setError($error) return $this; } - /** * Returns true if offset exists. False otherwise. * @@ -286,7 +284,7 @@ public function offsetGet($offset) * Sets value based on offset. * * @param integer $offset Offset - * @param mixed $value Value to be set + * @param mixed $value Value to be set * * @return void */ @@ -329,14 +327,4 @@ public function __toString() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } - - public function getRawResponse(): mixed - { - return $this->rawResponse; - } - - public function setRawResponse(mixed $rawResponse): void - { - $this->rawResponse = $rawResponse; - } } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 8faeac68..0521159d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -41,6 +41,7 @@ */ class FactoryResetResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 48b7de01..94712255 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -41,6 +41,7 @@ */ class FridaResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index b7ebca8b..aa733842 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -41,6 +41,7 @@ */ class HighActivityResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 3709db3f..74223548 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -41,6 +41,7 @@ */ class IPLocation implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index eb1c5ae5..505c98e8 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -41,6 +41,7 @@ */ class IPLocationCity implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 539c584f..02a4e643 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -41,6 +41,7 @@ */ class IdentificationError implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index c5178f47..b3e59de9 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -41,6 +41,7 @@ */ class IncognitoResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 82d9cf37..89722196 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -41,6 +41,7 @@ */ class IpBlockListResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 3fe5d75d..8ae98725 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -41,6 +41,7 @@ */ class IpBlockListResultDetails implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index e64f7e36..fa8a85ce 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -42,6 +42,7 @@ */ class IpInfoResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 4aee3502..e7181164 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -41,6 +41,7 @@ */ class IpInfoResultV4 implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index cd6935d0..44c5b202 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -41,6 +41,7 @@ */ class IpInfoResultV6 implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 1a19096b..1d8c7311 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -41,6 +41,7 @@ */ class JailbrokenResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/Location.php b/src/Model/Location.php index b61a952d..12ac58b8 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -41,6 +41,7 @@ */ class Location implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 2f164617..51e9b08e 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -41,6 +41,7 @@ */ class LocationSpoofingResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 292605f8..3621815c 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -41,6 +41,7 @@ */ class ManyRequestsResponse implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 01a7809f..ebc3fd83 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -41,6 +41,7 @@ */ class PrivacySettingsResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 00e8625d..c2558a9d 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -41,6 +41,7 @@ */ class ProductError implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index fbdf4497..c095e73e 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -42,6 +42,7 @@ */ class ProductsResponse implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 352245dc..6cf6a0d4 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -41,6 +41,7 @@ */ class ProductsResponseBotd implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index a6034934..4c0c7ea0 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -41,6 +41,7 @@ */ class ProductsResponseIdentification implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 0e77cc98..1b839d1b 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -41,6 +41,7 @@ */ class ProductsResponseIdentificationData implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 51f5b296..6d6f5613 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -41,6 +41,7 @@ */ class ProxyResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index cd96408f..a75fab85 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -42,6 +42,7 @@ */ class RawDeviceAttributesResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/Response.php b/src/Model/Response.php index d9b4f12f..c229fa2b 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -20,19 +20,16 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.34 */ - /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ - namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\Model\ModelInterface; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Response Class Doc Comment @@ -45,38 +42,37 @@ */ class Response implements ModelInterface, ArrayAccess { + use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; - protected mixed $rawResponse = null; - /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $swaggerModelName = 'Response'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerTypes = [ 'visitor_id' => 'string', - 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', - 'last_timestamp' => 'int', - 'pagination_key' => 'string']; +'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', +'last_timestamp' => 'int', +'pagination_key' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static $swaggerFormats = [ 'visitor_id' => null, - 'visits' => null, - 'last_timestamp' => 'int64', - 'pagination_key' => null]; +'visits' => null, +'last_timestamp' => 'int64', +'pagination_key' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -106,9 +102,9 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', - 'visits' => 'visits', - 'last_timestamp' => 'lastTimestamp', - 'pagination_key' => 'paginationKey']; +'visits' => 'visits', +'last_timestamp' => 'lastTimestamp', +'pagination_key' => 'paginationKey' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -117,9 +113,9 @@ public static function swaggerFormats() */ protected static $setters = [ 'visitor_id' => 'setVisitorId', - 'visits' => 'setVisits', - 'last_timestamp' => 'setLastTimestamp', - 'pagination_key' => 'setPaginationKey']; +'visits' => 'setVisits', +'last_timestamp' => 'setLastTimestamp', +'pagination_key' => 'setPaginationKey' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -128,9 +124,9 @@ public static function swaggerFormats() */ protected static $getters = [ 'visitor_id' => 'getVisitorId', - 'visits' => 'getVisits', - 'last_timestamp' => 'getLastTimestamp', - 'pagination_key' => 'getPaginationKey']; +'visits' => 'getVisits', +'last_timestamp' => 'getLastTimestamp', +'pagination_key' => 'getPaginationKey' ]; /** * Array of attributes where the key is the local name, @@ -173,6 +169,7 @@ public function getModelName() return self::$swaggerModelName; } + /** * Associative array for storing property values @@ -320,7 +317,6 @@ public function setPaginationKey($pagination_key) return $this; } - /** * Returns true if offset exists. False otherwise. * @@ -351,7 +347,7 @@ public function offsetGet($offset) * Sets value based on offset. * * @param integer $offset Offset - * @param mixed $value Value to be set + * @param mixed $value Value to be set * * @return void */ @@ -394,14 +390,4 @@ public function __toString() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } - - public function getRawResponse(): mixed - { - return $this->rawResponse; - } - - public function setRawResponse(mixed $rawResponse): void - { - $this->rawResponse = $rawResponse; - } } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 9f72d757..9c6834db 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -41,6 +41,7 @@ */ class ResponseVisits implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index c1e6eae6..7140a11a 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -41,6 +41,7 @@ */ class RootAppsResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 17c647fc..5536c8da 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -41,6 +41,7 @@ */ class SeenAt implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 6f1e3658..5d043ff1 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -41,6 +41,7 @@ */ class SignalResponseClonedApp implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 24e25401..e9c12058 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -41,6 +41,7 @@ */ class SignalResponseEmulator implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index b0dca3c5..3f01f288 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -41,6 +41,7 @@ */ class SignalResponseFactoryReset implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 2f4ada91..a79eeeec 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -41,6 +41,7 @@ */ class SignalResponseFrida implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 95653e16..64d195a9 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -41,6 +41,7 @@ */ class SignalResponseHighActivity implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 4d260b01..070bd63e 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -41,6 +41,7 @@ */ class SignalResponseIncognito implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index ef458033..4ce58a29 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -41,6 +41,7 @@ */ class SignalResponseIpBlocklist implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index ce532800..65fcab91 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -41,6 +41,7 @@ */ class SignalResponseIpInfo implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index ea00612a..801440f0 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -41,6 +41,7 @@ */ class SignalResponseJailbroken implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 49e498c4..649a0551 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -41,6 +41,7 @@ */ class SignalResponseLocationSpoofing implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index fb7c9beb..e5d676a1 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -41,6 +41,7 @@ */ class SignalResponsePrivacySettings implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index bcb74a95..55cabbb4 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -41,6 +41,7 @@ */ class SignalResponseProxy implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 44be597f..b7bcb3d2 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -41,6 +41,7 @@ */ class SignalResponseRawDeviceAttributes implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 7c602ae9..13c8d6aa 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -41,6 +41,7 @@ */ class SignalResponseRootApps implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index ff99ef3a..8783e7b0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -41,6 +41,7 @@ */ class SignalResponseSuspectScore implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 55f261f6..d08228d4 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -41,6 +41,7 @@ */ class SignalResponseTampering implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 4a580853..204b47f2 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -41,6 +41,7 @@ */ class SignalResponseTor implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 8a0f878e..080fb336 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -41,6 +41,7 @@ */ class SignalResponseVirtualMachine implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 2a64e9c6..6240a916 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -41,6 +41,7 @@ */ class SignalResponseVpn implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 160c9ce1..e752231c 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -41,6 +41,7 @@ */ class Subdivision implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index f4847f1a..2800ac8f 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -41,6 +41,7 @@ */ class SuspectScoreResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 34800593..93972040 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -41,6 +41,7 @@ */ class TamperingResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 12dc0bf8..f9644d1d 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -41,6 +41,7 @@ */ class TorResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 4cef9e80..7acb369f 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -41,6 +41,7 @@ */ class VirtualMachineResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 6ac84e9e..a494ce5e 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -41,6 +41,7 @@ */ class Visit implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index df82623b..bbccec19 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -41,6 +41,7 @@ */ class VpnResult implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 7db1af75..c6203e06 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -41,6 +41,7 @@ */ class VpnResultMethods implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index d073953a..46a1958e 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -41,6 +41,7 @@ */ class WebhookVisit implements ModelInterface, ArrayAccess { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = null; /** diff --git a/src/Traits/WithRawResponse.php b/src/Traits/WithRawResponse.php new file mode 100644 index 00000000..b8d443f3 --- /dev/null +++ b/src/Traits/WithRawResponse.php @@ -0,0 +1,17 @@ +rawResponse; + } + + public function setRawResponse(mixed $rawResponse): void + { + $this->rawResponse = $rawResponse; + } +} \ No newline at end of file diff --git a/template/Model/EventResponse.php.template b/template/Model/EventResponse.php.template deleted file mode 100644 index f63148db..00000000 --- a/template/Model/EventResponse.php.template +++ /dev/null @@ -1,342 +0,0 @@ - '\Fingerprint\ServerAPI\Model\ProductsResponse', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'products' => null, - 'error' => null]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'products' => 'products', - 'error' => 'error']; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'products' => 'setProducts', - 'error' => 'setError']; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'products' => 'getProducts', - 'error' => 'getError']; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['products'] = isset($data['products']) ? $data['products'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['products'] === null) { - $invalidProperties[] = "'products' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets products - * - * @return \Fingerprint\ServerAPI\Model\ProductsResponse - */ - public function getProducts() - { - return $this->container['products']; - } - - /** - * Sets products - * - * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products - * - * @return $this - */ - public function setProducts($products) - { - $this->container['products'] = $products; - - return $this; - } - - /** - * Gets error - * - * @return \Fingerprint\ServerAPI\Model\ProductError - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error - * - * @return $this - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - public function getRawResponse(): mixed - { - return $this->rawResponse; - } - - public function setRawResponse(mixed $rawResponse): void - { - $this->rawResponse = $rawResponse; - } -} diff --git a/template/Model/Response.php.template b/template/Model/Response.php.template deleted file mode 100644 index d9b4f12f..00000000 --- a/template/Model/Response.php.template +++ /dev/null @@ -1,407 +0,0 @@ - 'string', - 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', - 'last_timestamp' => 'int', - 'pagination_key' => 'string']; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'visitor_id' => null, - 'visits' => null, - 'last_timestamp' => 'int64', - 'pagination_key' => null]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'visitor_id' => 'visitorId', - 'visits' => 'visits', - 'last_timestamp' => 'lastTimestamp', - 'pagination_key' => 'paginationKey']; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'visitor_id' => 'setVisitorId', - 'visits' => 'setVisits', - 'last_timestamp' => 'setLastTimestamp', - 'pagination_key' => 'setPaginationKey']; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'visitor_id' => 'getVisitorId', - 'visits' => 'getVisits', - 'last_timestamp' => 'getLastTimestamp', - 'pagination_key' => 'getPaginationKey']; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; - $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; - $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['visitor_id'] === null) { - $invalidProperties[] = "'visitor_id' can't be null"; - } - if ($this->container['visits'] === null) { - $invalidProperties[] = "'visits' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets visitor_id - * - * @return string - */ - public function getVisitorId() - { - return $this->container['visitor_id']; - } - - /** - * Sets visitor_id - * - * @param string $visitor_id visitor_id - * - * @return $this - */ - public function setVisitorId($visitor_id) - { - $this->container['visitor_id'] = $visitor_id; - - return $this; - } - - /** - * Gets visits - * - * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] - */ - public function getVisits() - { - return $this->container['visits']; - } - - /** - * Sets visits - * - * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits - * - * @return $this - */ - public function setVisits($visits) - { - $this->container['visits'] = $visits; - - return $this; - } - - /** - * Gets last_timestamp - * - * @return int - */ - public function getLastTimestamp() - { - return $this->container['last_timestamp']; - } - - /** - * Sets last_timestamp - * - * @param int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. - * - * @return $this - */ - public function setLastTimestamp($last_timestamp) - { - $this->container['last_timestamp'] = $last_timestamp; - - return $this; - } - - /** - * Gets pagination_key - * - * @return string - */ - public function getPaginationKey() - { - return $this->container['pagination_key']; - } - - /** - * Sets pagination_key - * - * @param string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. - * - * @return $this - */ - public function setPaginationKey($pagination_key) - { - $this->container['pagination_key'] = $pagination_key; - - return $this; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - public function getRawResponse(): mixed - { - return $this->rawResponse; - } - - public function setRawResponse(mixed $rawResponse): void - { - $this->rawResponse = $rawResponse; - } -} diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 98959904..da77a871 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -1,5 +1,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}} { + // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; /** From a3df26c4975f234489da08521b67e28f4744a855 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 16 Jul 2024 16:40:13 +0300 Subject: [PATCH 010/118] refactor: rename duplicate variables --- src/Api/FingerprintApi.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 2ff651ad..f973653d 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -71,14 +71,14 @@ protected function getClientOptions(): array ] ]; - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { - $options['headers']['Auth-API-Key'] = $apiKey; + $headerApiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if ($headerApiKey !== null) { + $options['headers']['Auth-API-Key'] = $headerApiKey; } - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { - $options['query']['api_key'] = $apiKey; + $queryApiKey = $this->config->getApiKeyWithPrefix('api_key'); + if ($queryApiKey !== null) { + $options['query']['api_key'] = $queryApiKey; } if ($this->config->getDebug()) { From 8989f57f81cfab050d49ce6414527401f403dfee Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 16 Jul 2024 16:47:04 +0300 Subject: [PATCH 011/118] chore(generator): update raw response models to an array --- scripts/generate.sh | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index b1814d93..a219bf10 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -69,20 +69,15 @@ find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs cp template/docs/FingerprintApi.md docs/Api -# enable WithRawResponse trait for EventResponse model -( - if [ "$platform" = "Darwin" ]; then - sed -i '' 's/\/\/ use \\/use \\/' ./src/Model/EventResponse.php - else - sed -i 's/\/\/ use \\/use \\/' ./src/Model/EventResponse.php - fi -) +declare -a modelsWithRawResponse=("./src/Model/EventResponse.php" "./src/Model/Response.php") -# enable WithRawResponse trait for Response model -( - if [ "$platform" = "Darwin" ]; then - sed -i '' 's/\/\/ use \\/use \\/' ./src/Model/Response.php - else - sed -i 's/\/\/ use \\/use \\/' ./src/Model/Response.php - fi -) \ No newline at end of file +for model in "${modelsWithRawResponse[@]}"; do + # enable WithRawResponse trait for the model + ( + if [ "$platform" = "Darwin" ]; then + sed -i '' 's/\/\/ use \\/use \\/' $model + else + sed -i 's/\/\/ use \\/use \\/' $model + fi + ) +done From 90f3bb1f1568ee8e69d807dded52d1b8fd96fdfc Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 17 Jul 2024 14:18:47 +0300 Subject: [PATCH 012/118] docs(api): add fingerprint api doc --- docs/Api/FingerprintApi.md | 172 +++++++++++++++++++------------------ template/api_doc.mustache | 75 ++++++++++++++++ 2 files changed, 163 insertions(+), 84 deletions(-) create mode 100644 template/api_doc.mustache diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 98130163..44c82783 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -4,91 +4,95 @@ All URIs are relative to *https://api.fpjs.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getEvent**](FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by requestId -[**getVisits**](FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId +[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId +[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId -# **getEvent** -> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) + # **getEvent** + > \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) -Get event by requestId + Get event by requestId -This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. + This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. + + ### Example + ```php + setApiKey('Auth-API-Key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Auth-API-Key', 'Bearer');// Configure API key authorization: ApiKeyQuery -$config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$apiInstance = new Fingerprint\ServerAPI\Api\FingerprintApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), + +const FPJS_API_SECRET = "Your Fingerprint Secret API Key"; // Fingerprint Secret API Key + +// Import Fingerprint Classes and Guzzle HTTP Client +use Fingerprint\ServerAPI\Api\FingerprintApi; +use Fingerprint\ServerAPI\Configuration; +use GuzzleHttp\Client; + +// Create new Configuration instance with defaultValues, added our API Secret and our Region +$config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); +$client = new FingerprintApi( + new Client(), $config ); + $request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. try { - $result = $apiInstance->getEvent($request_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; -} -?> -``` + $result = $client->getEvent($request_id); + echo "
" . $response->__toString() . "
"; + } catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + } + ?> + ``` -### Parameters + ### Parameters + + Name | Type | Description | Notes + ------------- | ------------- | ------------- | ------------- + **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | + ### Return type -### Return type + [**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) -[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) + ### Authorization -### Authorization + [ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + ### HTTP request headers -### HTTP request headers + - **Content-Type**: Not defined + - **Accept**: application/json - - **Content-Type**: Not defined - - **Accept**: application/json + [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **getVisits** + > \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) -# **getVisits** -> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) + Get visits by visitorId -Get visits by visitorId + This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. -This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. + ### Example + ```php + setApiKey('Auth-API-Key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Auth-API-Key', 'Bearer');// Configure API key authorization: ApiKeyQuery -$config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = Fingerprint\ServerAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); - -$apiInstance = new Fingerprint\ServerAPI\Api\FingerprintApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), + +const FPJS_API_SECRET = "Your Fingerprint Secret API Key"; // Fingerprint Secret API Key + +// Import Fingerprint Classes and Guzzle HTTP Client +use Fingerprint\ServerAPI\Api\FingerprintApi; +use Fingerprint\ServerAPI\Configuration; +use GuzzleHttp\Client; + +// Create new Configuration instance with defaultValues, added our API Secret and our Region +$config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); +$client = new FingerprintApi( + new Client(), $config ); + $visitor_id = "visitor_id_example"; // string | Unique identifier of the visitor issued by Fingerprint Pro. $request_id = "request_id_example"; // string | Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. $linked_id = "linked_id_example"; // string | Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. @@ -97,37 +101,37 @@ $pagination_key = "pagination_key_example"; // string | Use `paginationKey` to g $before = 789; // int | ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. try { - $result = $apiInstance->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters + $result = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $response->__toString() . "
"; + } catch (Exception $e) { + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; + } + ?> + ``` -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | - **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] - **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] - **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] - **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] - **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] + ### Parameters + + Name | Type | Description | Notes + ------------- | ------------- | ------------- | ------------- + **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | + **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] + **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] + **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] + **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] + **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] -### Return type + ### Return type -[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) + [**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) -### Authorization + ### Authorization -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + [ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) -### HTTP request headers + ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/template/api_doc.mustache b/template/api_doc.mustache new file mode 100644 index 00000000..9744a47e --- /dev/null +++ b/template/api_doc.mustache @@ -0,0 +1,75 @@ +# {{invokerPackage}}\FingerprintApi{{#description}} + {{description}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} + {{#operation}} + # **{{{operationId}}}** + > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + + {{{summary}}}{{#notes}} + + {{{notes}}}{{/notes}} + + ### Example + ```php + {{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + echo "
" . $response->__toString() . "
";{{/returnType}} + } catch (Exception $e) { + echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; + } + ?> + ``` + + ### Parameters + {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} + Name | Type | Description | Notes + ------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} + {{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} + {{/allParams}} + + ### Return type + + {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} + + ### Authorization + + {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^@last}}, {{/@last}}{{/authMethods}} + + ### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + + [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + + {{/operation}} +{{/operations}} \ No newline at end of file From 91c550e0b0e76a607b9054a2993ccccc4a15acb5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 17 Jul 2024 14:23:59 +0300 Subject: [PATCH 013/118] docs(api): fix styling --- docs/Api/FingerprintApi.md | 118 +++++++++++++-------------- template/api_doc.mustache | 66 +++++++-------- template/docs/FingerprintApi.md | 137 -------------------------------- 3 files changed, 92 insertions(+), 229 deletions(-) delete mode 100644 template/docs/FingerprintApi.md diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 44c82783..548f05ff 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -7,16 +7,16 @@ Method | HTTP request | Description [**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId - # **getEvent** - > \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) +# **getEvent** +> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) - Get event by requestId +Get event by requestId - This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. +This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. - ### Example - ```php - getEvent($request_id); - echo "
" . $response->__toString() . "
"; - } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; - } - ?> - ``` +$result = $client->getEvent($request_id); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { +echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; +} +?> +``` - ### Parameters - - Name | Type | Description | Notes - ------------- | ------------- | ------------- | ------------- - **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | +### Parameters - ### Return type +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | - [**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) +### Return type - ### Authorization +[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) - [ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) +### Authorization - ### HTTP request headers +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - - **Content-Type**: Not defined - - **Accept**: application/json +### HTTP request headers - [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +- **Content-Type**: Not defined +- **Accept**: application/json - # **getVisits** - > \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - Get visits by visitorId +# **getVisits** +> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. +Get visits by visitorId - ### Example - ```php - getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - echo "
" . $response->__toString() . "
"; - } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; - } - ?> - ``` - - ### Parameters - - Name | Type | Description | Notes - ------------- | ------------- | ------------- | ------------- - **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | +$result = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { +echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] - ### Return type +### Return type - [**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) +[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) - ### Authorization +### Authorization - [ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - ### HTTP request headers +### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json - [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/template/api_doc.mustache b/template/api_doc.mustache index 9744a47e..6b07e9e3 100644 --- a/template/api_doc.mustache +++ b/template/api_doc.mustache @@ -9,17 +9,17 @@ Method | HTTP request | Description {{/operation}}{{/operations}} {{#operations}} - {{#operation}} - # **{{{operationId}}}** - > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +{{#operation}} +# **{{{operationId}}}** +> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) - {{{summary}}}{{#notes}} +{{{summary}}}{{#notes}} - {{{notes}}}{{/notes}} +{{{notes}}}{{/notes}} - ### Example - ```php - {{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - echo "
" . $response->__toString() . "
";{{/returnType}} - } catch (Exception $e) { - echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; - } - ?> - ``` +{{#returnType}}$result = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + echo "
" . $response->__toString() . "
";{{/returnType}} +} catch (Exception $e) { +echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; +} +?> +``` - ### Parameters - {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} - Name | Type | Description | Notes - ------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} - {{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} - {{/allParams}} +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} +{{/allParams}} - ### Return type +### Return type - {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - ### Authorization +### Authorization - {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^@last}}, {{/@last}}{{/authMethods}} +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^@last}}, {{/@last}}{{/authMethods}} - ### HTTP request headers +### HTTP request headers - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - {{/operation}} +{{/operation}} {{/operations}} \ No newline at end of file diff --git a/template/docs/FingerprintApi.md b/template/docs/FingerprintApi.md deleted file mode 100644 index e9b81abc..00000000 --- a/template/docs/FingerprintApi.md +++ /dev/null @@ -1,137 +0,0 @@ -# Fingerprint\ServerAPI\FingerprintApi - -All URIs are relative to *https://api.fpjs.io* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId -[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId - -# **getEvent** -> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) - -Get event by requestId - -This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. - -### Example -```php -getEvent($request_id); - echo "
" . $response->__toString() . "
"; -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | - -### Return type - -[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) - -### Authorization - -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - -# **getVisits** -> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - -Get visits by visitorId - -This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. - -### Example -```php -getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - echo "
" . $response->__toString() . "
"; -} catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | - **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] - **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] - **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] - **pagination_key** | **string**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional] - **before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional] - -### Return type - -[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) - -### Authorization - -[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) - From 5daa81c481e63bdd456a16fd642f4188ebf1830b Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 19 Jul 2024 12:34:33 +0300 Subject: [PATCH 014/118] refactor: remove redundant functions from api --- src/Api/FingerprintApi.php | 148 ++++++------------------------------- template/api.mustache | 90 +++------------------- 2 files changed, 35 insertions(+), 203 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 367ebec0..ee2d4ee6 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -30,12 +30,10 @@ use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use Fingerprint\ServerAPI\ApiException; use Fingerprint\ServerAPI\Configuration; -use Fingerprint\ServerAPI\HeaderSelector; use Fingerprint\ServerAPI\ObjectSerializer; /** @@ -50,23 +48,19 @@ class FingerprintApi { protected ClientInterface $client; protected Configuration $config; - protected HeaderSelector $headerSelector; protected $integration_info = 'fingerprint-pro-server-php-sdk/4.1.0'; /** * @param ClientInterface $client * @param Configuration $config - * @param HeaderSelector $selector */ public function __construct( ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + Configuration $config = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); } /** @@ -138,17 +132,9 @@ public function getEventWithHttpInfo($request_id) ); } - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } + $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -233,17 +219,9 @@ public function getEventAsyncWithHttpInfo($request_id) ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $responseBody = $response->getBody()->getContents(); + + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -287,11 +265,10 @@ protected function getEventRequest($request_id) } $resourcePath = '/events/{request_id}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; // path params @@ -306,44 +283,10 @@ protected function getEventRequest($request_id) // body params $_tempBody = null; - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } + $httpBody = json_encode($_tempBody); } // this endpoint requires API key authentication @@ -357,7 +300,10 @@ protected function getEventRequest($request_id) $queryParams['api_key'] = $apiKey; } - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } @@ -448,17 +394,9 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i ); } - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } + $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -553,17 +491,9 @@ public function getVisitsAsyncWithHttpInfo($visitor_id, $request_id = null, $lin ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $responseBody = $response->getBody()->getContents(); + + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -612,11 +542,10 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id } $resourcePath = '/visitors/{visitor_id}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; // query params if ($request_id !== null) { @@ -651,44 +580,10 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id // body params $_tempBody = null; - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } + $httpBody = json_encode($_tempBody); } // this endpoint requires API key authentication @@ -702,7 +597,10 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id $queryParams['api_key'] = $apiKey; } - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } diff --git a/template/api.mustache b/template/api.mustache index 53e99e50..09ba7bca 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -21,12 +21,10 @@ namespace {{apiPackage}}; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; -use {{invokerPackage}}\HeaderSelector; use {{invokerPackage}}\ObjectSerializer; /** @@ -41,23 +39,19 @@ use {{invokerPackage}}\ObjectSerializer; { protected ClientInterface $client; protected Configuration $config; - protected HeaderSelector $headerSelector; protected $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; /** * @param ClientInterface $client * @param Configuration $config - * @param HeaderSelector $selector */ public function __construct( ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + Configuration $config = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); } /** @@ -148,17 +142,9 @@ use {{invokerPackage}}\ObjectSerializer; } {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } + $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -244,17 +230,9 @@ use {{invokerPackage}}\ObjectSerializer; ->then( function ($response) use ($returnType) { {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $serialized = ObjectSerializer::deserialize($content, $returnType, []); + $responseBody = $response->getBody()->getContents(); + + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); $serialized->setRawResponse($responseBody); return [ @@ -346,11 +324,10 @@ use {{invokerPackage}}\ObjectSerializer; {{/parameters}} $resourcePath = '{{{path}}}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; {{#queryParams}} // query params @@ -391,18 +368,6 @@ use {{invokerPackage}}\ObjectSerializer; } {{/pathParams}} - {{#formParams}} - // form params - if (${{paramName}} !== null) { - {{#isBinary}} - $multipart = true; - $formParams['{{baseName}}'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue(${{paramName}}), 'rb'); - {{/isBinary}} - {{^isBinary}} - $formParams['{{baseName}}'] = ObjectSerializer::toFormValue(${{paramName}}); - {{/isBinary}} - } - {{/formParams}} // body params $_tempBody = null; {{#bodyParams}} @@ -411,44 +376,10 @@ use {{invokerPackage}}\ObjectSerializer; } {{/bodyParams}} - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}], - [{{#consumes}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}] - ); - } - // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } + $httpBody = json_encode($_tempBody); } {{#authMethods}} @@ -479,7 +410,10 @@ use {{invokerPackage}}\ObjectSerializer; {{/isOAuth}} {{/authMethods}} - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } From a6b7a7dff86f83b27bfe5ee039b66336c632cf01 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 11:51:02 +0300 Subject: [PATCH 015/118] refactor: fix body params condition --- template/api.mustache | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/template/api.mustache b/template/api.mustache index 09ba7bca..76e042bc 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -368,19 +368,18 @@ use {{invokerPackage}}\ObjectSerializer; } {{/pathParams}} + {{#bodyParams}} // body params $_tempBody = null; - {{#bodyParams}} if (isset(${{paramName}})) { $_tempBody = ${{paramName}}; } - {{/bodyParams}} - // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present $httpBody = json_encode($_tempBody); } + {{/bodyParams}} {{#authMethods}} {{#isApiKey}} From 3f6aabc90c96b86dcf8cc7419893ab3139d26fe4 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 11:52:08 +0300 Subject: [PATCH 016/118] refactor: generate fingerprint api for temp body fix --- src/Api/FingerprintApi.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index ee2d4ee6..3a78eec7 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -280,14 +280,6 @@ protected function getEventRequest($request_id) ); } - // body params - $_tempBody = null; - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = json_encode($_tempBody); - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); @@ -577,14 +569,6 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id ); } - // body params - $_tempBody = null; - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = json_encode($_tempBody); - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); From 0c9aca81979c86aba24c9911045a1cd34fd3c341 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 12:54:00 +0300 Subject: [PATCH 017/118] docs(api): fix spacings --- docs/Api/FingerprintApi.md | 8 ++++---- template/api_doc.mustache | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 548f05ff..0730eedb 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -30,7 +30,7 @@ use GuzzleHttp\Client; // Create new Configuration instance with defaultValues, added our API Secret and our Region $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( -new Client(), + new Client(), $config ); @@ -40,7 +40,7 @@ try { $result = $client->getEvent($request_id); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { -echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -89,7 +89,7 @@ use GuzzleHttp\Client; // Create new Configuration instance with defaultValues, added our API Secret and our Region $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( -new Client(), + new Client(), $config ); @@ -104,7 +104,7 @@ try { $result = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { -echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } ?> ``` diff --git a/template/api_doc.mustache b/template/api_doc.mustache index 6b07e9e3..6435d6ef 100644 --- a/template/api_doc.mustache +++ b/template/api_doc.mustache @@ -33,7 +33,7 @@ use GuzzleHttp\Client; // Create new Configuration instance with defaultValues, added our API Secret and our Region $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( -new Client(), + new Client(), $config ); @@ -44,7 +44,7 @@ try { {{#returnType}}$result = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} echo "
" . $response->__toString() . "
";{{/returnType}} } catch (Exception $e) { -echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; } ?> ``` From 36d6f9e67c02cdafe2e1772f4d067b69694950a6 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 13:05:03 +0300 Subject: [PATCH 018/118] chore: add php cs fixer cache to gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c54920c8..84ff5e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .vscode .env release/yarn-error.log -release/node_modules \ No newline at end of file +release/node_modules +.php-cs-fixer.cache \ No newline at end of file From a31a1eb9c24b117bb029ac2c1d1c287969ab6e91 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 13:08:32 +0300 Subject: [PATCH 019/118] chore: add php cs fixer to pre commit --- .git_hooks/pre-commit | 3 +++ src/ApiException.php | 3 +-- src/Configuration.php | 2 +- src/HeaderSelector.php | 4 +--- src/Model/ASN.php | 8 ++++---- src/Model/BotdDetectionResult.php | 12 ++++++------ src/Model/BotdResult.php | 8 ++++---- src/Model/BrowserDetails.php | 8 ++++---- src/Model/ClonedAppResult.php | 8 ++++---- src/Model/Confidence.php | 8 ++++---- src/Model/DataCenter.php | 8 ++++---- src/Model/DeprecatedIPLocation.php | 8 ++++---- src/Model/DeprecatedIPLocationCity.php | 8 ++++---- src/Model/EmulatorResult.php | 8 ++++---- src/Model/ErrorEvent403Response.php | 8 ++++---- src/Model/ErrorEvent403ResponseError.php | 14 +++++++------- src/Model/ErrorEvent404Response.php | 8 ++++---- src/Model/ErrorEvent404ResponseError.php | 8 ++++---- src/Model/ErrorVisits403.php | 8 ++++---- src/Model/EventResponse.php | 8 ++++---- src/Model/FactoryResetResult.php | 8 ++++---- src/Model/FridaResult.php | 8 ++++---- src/Model/HighActivityResult.php | 8 ++++---- src/Model/IPLocation.php | 8 ++++---- src/Model/IPLocationCity.php | 8 ++++---- src/Model/IdentificationError.php | 10 +++++----- src/Model/IncognitoResult.php | 8 ++++---- src/Model/IpBlockListResult.php | 8 ++++---- src/Model/IpBlockListResultDetails.php | 8 ++++---- src/Model/IpInfoResult.php | 8 ++++---- src/Model/IpInfoResultV4.php | 8 ++++---- src/Model/IpInfoResultV6.php | 8 ++++---- src/Model/JailbrokenResult.php | 8 ++++---- src/Model/Location.php | 8 ++++---- src/Model/LocationSpoofingResult.php | 8 ++++---- src/Model/ManyRequestsResponse.php | 8 ++++---- src/Model/PrivacySettingsResult.php | 8 ++++---- src/Model/ProductError.php | 10 +++++----- src/Model/ProductsResponse.php | 8 ++++---- src/Model/ProductsResponseBotd.php | 8 ++++---- src/Model/ProductsResponseIdentification.php | 8 ++++---- src/Model/ProductsResponseIdentificationData.php | 8 ++++---- src/Model/ProxyResult.php | 8 ++++---- src/Model/RawDeviceAttributesResult.php | 8 ++++---- src/Model/Response.php | 8 ++++---- src/Model/ResponseVisits.php | 8 ++++---- src/Model/RootAppsResult.php | 8 ++++---- src/Model/SeenAt.php | 8 ++++---- src/Model/SignalResponseClonedApp.php | 8 ++++---- src/Model/SignalResponseEmulator.php | 8 ++++---- src/Model/SignalResponseFactoryReset.php | 8 ++++---- src/Model/SignalResponseFrida.php | 8 ++++---- src/Model/SignalResponseHighActivity.php | 8 ++++---- src/Model/SignalResponseIncognito.php | 8 ++++---- src/Model/SignalResponseIpBlocklist.php | 8 ++++---- src/Model/SignalResponseIpInfo.php | 8 ++++---- src/Model/SignalResponseJailbroken.php | 8 ++++---- src/Model/SignalResponseLocationSpoofing.php | 8 ++++---- src/Model/SignalResponsePrivacySettings.php | 8 ++++---- src/Model/SignalResponseProxy.php | 8 ++++---- src/Model/SignalResponseRawDeviceAttributes.php | 8 ++++---- src/Model/SignalResponseRootApps.php | 8 ++++---- src/Model/SignalResponseSuspectScore.php | 8 ++++---- src/Model/SignalResponseTampering.php | 8 ++++---- src/Model/SignalResponseTor.php | 8 ++++---- src/Model/SignalResponseVirtualMachine.php | 8 ++++---- src/Model/SignalResponseVpn.php | 8 ++++---- src/Model/Subdivision.php | 8 ++++---- src/Model/SuspectScoreResult.php | 8 ++++---- src/Model/TamperingResult.php | 8 ++++---- src/Model/TorResult.php | 8 ++++---- src/Model/VirtualMachineResult.php | 8 ++++---- src/Model/Visit.php | 8 ++++---- src/Model/VpnResult.php | 8 ++++---- src/Model/VpnResultMethods.php | 8 ++++---- src/Model/WebhookVisit.php | 8 ++++---- src/Sealed/DecompressionException.php | 2 +- src/Sealed/DecryptionAlgorithm.php | 4 ++-- src/Sealed/DecryptionKey.php | 2 +- src/Sealed/InvalidSealedDataException.php | 2 +- src/Sealed/InvalidSealedDataHeaderException.php | 2 +- src/Sealed/Sealed.php | 8 +++++--- src/Sealed/UnsealAggregateException.php | 2 +- src/Sealed/UnsealException.php | 3 +-- src/Traits/WithRawResponse.php | 5 +++-- 85 files changed, 317 insertions(+), 315 deletions(-) create mode 100755 .git_hooks/pre-commit diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit new file mode 100755 index 00000000..6a5f1dae --- /dev/null +++ b/.git_hooks/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src \ No newline at end of file diff --git a/src/ApiException.php b/src/ApiException.php index a2d352c3..e9eaae55 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -27,7 +27,7 @@ namespace Fingerprint\ServerAPI; -use \Exception; +use Exception; /** * ApiException Class Doc Comment @@ -39,7 +39,6 @@ */ class ApiException extends Exception { - /** * The HTTP body of the server response either as Json or string. * diff --git a/src/Configuration.php b/src/Configuration.php index 65a67717..931a0514 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -461,4 +461,4 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) return $keyWithPrefix; } -} \ No newline at end of file +} diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 04b45bc7..aec14a28 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -27,7 +27,7 @@ namespace Fingerprint\ServerAPI; -use \Exception; +use Exception; /** * ApiException Class Doc Comment @@ -39,7 +39,6 @@ */ class HeaderSelector { - /** * @param string[] $accept * @param string[] $contentTypes @@ -106,4 +105,3 @@ private function selectContentTypeHeader($contentType) } } } - diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 7e930350..8d30628d 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ASN Class Doc Comment @@ -42,7 +42,7 @@ class ASN implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -163,7 +163,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 7add4038..6c7314ef 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BotdDetectionResult Class Doc Comment @@ -43,7 +43,7 @@ class BotdDetectionResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,9 +159,9 @@ public function getModelName() return self::$swaggerModelName; } - const RESULT_NOT_DETECTED = 'notDetected'; -const RESULT_GOOD = 'good'; -const RESULT_BAD = 'bad'; + public const RESULT_NOT_DETECTED = 'notDetected'; + public const RESULT_GOOD = 'good'; + public const RESULT_BAD = 'bad'; /** * Gets allowable values of the enum diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 6e5ef925..9fd01b06 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BotdResult Class Doc Comment @@ -43,7 +43,7 @@ class BotdResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -184,7 +184,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 58247403..bf948847 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BrowserDetails Class Doc Comment @@ -42,7 +42,7 @@ class BrowserDetails implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -188,7 +188,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 27e55fbf..d48351ba 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ClonedAppResult Class Doc Comment @@ -42,7 +42,7 @@ class ClonedAppResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index e4d216d9..63dc9f92 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Confidence Class Doc Comment @@ -42,7 +42,7 @@ class Confidence implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 62ccb88f..102a06aa 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DataCenter Class Doc Comment @@ -42,7 +42,7 @@ class DataCenter implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index d7344ca7..ba179bb3 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocation Class Doc Comment @@ -43,7 +43,7 @@ class DeprecatedIPLocation implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -194,7 +194,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 9c171517..6034cc8e 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocationCity Class Doc Comment @@ -42,7 +42,7 @@ class DeprecatedIPLocationCity implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index f1363cb6..caa2a74f 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * EmulatorResult Class Doc Comment @@ -42,7 +42,7 @@ class EmulatorResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 1aeb9cd1..fdc18599 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403Response Class Doc Comment @@ -42,7 +42,7 @@ class ErrorEvent403Response implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 509904e4..30edadab 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403ResponseError Class Doc Comment @@ -42,7 +42,7 @@ class ErrorEvent403ResponseError implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,10 +158,10 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOKEN_REQUIRED = 'TokenRequired'; -const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; -const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; -const CODE_WRONG_REGION = 'WrongRegion'; + public const CODE_TOKEN_REQUIRED = 'TokenRequired'; + public const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; + public const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; + public const CODE_WRONG_REGION = 'WrongRegion'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 62e204da..27d4b2ad 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404Response Class Doc Comment @@ -42,7 +42,7 @@ class ErrorEvent404Response implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index fa6c0003..6c3f6ad3 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404ResponseError Class Doc Comment @@ -42,7 +42,7 @@ class ErrorEvent404ResponseError implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; + public const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index bf05bbcd..3201e59b 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorVisits403 Class Doc Comment @@ -42,7 +42,7 @@ class ErrorVisits403 implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 186a4234..605fbb38 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * EventResponse Class Doc Comment @@ -43,7 +43,7 @@ class EventResponse implements ModelInterface, ArrayAccess { use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,7 +159,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 0521159d..8b4cc8ee 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * FactoryResetResult Class Doc Comment @@ -42,7 +42,7 @@ class FactoryResetResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 94712255..3240e141 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * FridaResult Class Doc Comment @@ -42,7 +42,7 @@ class FridaResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index aa733842..5611b832 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * HighActivityResult Class Doc Comment @@ -42,7 +42,7 @@ class HighActivityResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 74223548..99275028 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocation Class Doc Comment @@ -42,7 +42,7 @@ class IPLocation implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -193,7 +193,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 505c98e8..a48d0a9e 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocationCity Class Doc Comment @@ -42,7 +42,7 @@ class IPLocationCity implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 02a4e643..68cc5634 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IdentificationError Class Doc Comment @@ -42,7 +42,7 @@ class IdentificationError implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,8 +158,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; -const CODE_FAILED = 'Failed'; + public const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; + public const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index b3e59de9..a69fc007 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IncognitoResult Class Doc Comment @@ -42,7 +42,7 @@ class IncognitoResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 89722196..47a75103 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResult Class Doc Comment @@ -42,7 +42,7 @@ class IpBlockListResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 8ae98725..21a2a23b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResultDetails Class Doc Comment @@ -42,7 +42,7 @@ class IpBlockListResultDetails implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index fa8a85ce..b307c126 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResult Class Doc Comment @@ -43,7 +43,7 @@ class IpInfoResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,7 +159,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index e7181164..dbe8abfc 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV4 Class Doc Comment @@ -42,7 +42,7 @@ class IpInfoResultV4 implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +168,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 44c5b202..352d138e 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV6 Class Doc Comment @@ -42,7 +42,7 @@ class IpInfoResultV6 implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +168,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 1d8c7311..85d479f9 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * JailbrokenResult Class Doc Comment @@ -42,7 +42,7 @@ class JailbrokenResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Location.php b/src/Model/Location.php index 12ac58b8..9b4d9634 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Location Class Doc Comment @@ -42,7 +42,7 @@ class Location implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 51e9b08e..75edafe6 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * LocationSpoofingResult Class Doc Comment @@ -42,7 +42,7 @@ class LocationSpoofingResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 3621815c..ec0e5fea 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ManyRequestsResponse Class Doc Comment @@ -42,7 +42,7 @@ class ManyRequestsResponse implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index ebc3fd83..53452ddb 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * PrivacySettingsResult Class Doc Comment @@ -42,7 +42,7 @@ class PrivacySettingsResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index c2558a9d..70338d07 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductError Class Doc Comment @@ -42,7 +42,7 @@ class ProductError implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,8 +158,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; -const CODE_FAILED = 'Failed'; + public const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; + public const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index c095e73e..aa305860 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponse Class Doc Comment @@ -43,7 +43,7 @@ class ProductsResponse implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -254,7 +254,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 6cf6a0d4..598dee0a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseBotd Class Doc Comment @@ -42,7 +42,7 @@ class ProductsResponseBotd implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 4c0c7ea0..5649e582 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentification Class Doc Comment @@ -42,7 +42,7 @@ class ProductsResponseIdentification implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 1b839d1b..ac179b16 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentificationData Class Doc Comment @@ -42,7 +42,7 @@ class ProductsResponseIdentificationData implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -223,7 +223,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 6d6f5613..469c3feb 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProxyResult Class Doc Comment @@ -42,7 +42,7 @@ class ProxyResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index a75fab85..77fadc9e 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * RawDeviceAttributesResult Class Doc Comment @@ -43,7 +43,7 @@ class RawDeviceAttributesResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -154,7 +154,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Response.php b/src/Model/Response.php index c229fa2b..2964e65c 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Response Class Doc Comment @@ -43,7 +43,7 @@ class Response implements ModelInterface, ArrayAccess { use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -169,7 +169,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 9c6834db..d8ef5848 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ResponseVisits Class Doc Comment @@ -42,7 +42,7 @@ class ResponseVisits implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -218,7 +218,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 7140a11a..bf19d330 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * RootAppsResult Class Doc Comment @@ -42,7 +42,7 @@ class RootAppsResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 5536c8da..10462ad5 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SeenAt Class Doc Comment @@ -42,7 +42,7 @@ class SeenAt implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 5d043ff1..baa8b82e 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseClonedApp Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseClonedApp implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index e9c12058..62f1cc91 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseEmulator Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseEmulator implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 3f01f288..59a6f441 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFactoryReset Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseFactoryReset implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index a79eeeec..6082aa92 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFrida Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseFrida implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 64d195a9..b79816cd 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseHighActivity Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseHighActivity implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 070bd63e..29ac7857 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIncognito Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseIncognito implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 4ce58a29..5104a577 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpBlocklist Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseIpBlocklist implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 65fcab91..89364a7d 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpInfo Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseIpInfo implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 801440f0..278e9864 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseJailbroken Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseJailbroken implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 649a0551..1ae4a03c 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseLocationSpoofing Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index e5d676a1..0b33b98f 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponsePrivacySettings Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponsePrivacySettings implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 55cabbb4..1a457ce6 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseProxy Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseProxy implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index b7bcb3d2..536f9020 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRawDeviceAttributes Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 13c8d6aa..58be9481 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRootApps Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseRootApps implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 8783e7b0..cca7cee2 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseSuspectScore Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseSuspectScore implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index d08228d4..55939ef2 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTampering Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseTampering implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 204b47f2..e148dcd6 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTor Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseTor implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 080fb336..6d82980a 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVirtualMachine Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseVirtualMachine implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 6240a916..58d6f6f9 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVpn Class Doc Comment @@ -42,7 +42,7 @@ class SignalResponseVpn implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index e752231c..ffd88904 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Subdivision Class Doc Comment @@ -42,7 +42,7 @@ class Subdivision implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 2800ac8f..cae07afc 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SuspectScoreResult Class Doc Comment @@ -42,7 +42,7 @@ class SuspectScoreResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 93972040..fb03c33b 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * TamperingResult Class Doc Comment @@ -42,7 +42,7 @@ class TamperingResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index f9644d1d..826539e5 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * TorResult Class Doc Comment @@ -42,7 +42,7 @@ class TorResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 7acb369f..f85da776 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VirtualMachineResult Class Doc Comment @@ -42,7 +42,7 @@ class VirtualMachineResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Visit.php b/src/Model/Visit.php index a494ce5e..87d5a527 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Visit Class Doc Comment @@ -42,7 +42,7 @@ class Visit implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -218,7 +218,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index bbccec19..a14dd8cf 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResult Class Doc Comment @@ -42,7 +42,7 @@ class VpnResult implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +168,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index c6203e06..5ec53294 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResultMethods Class Doc Comment @@ -42,7 +42,7 @@ class VpnResultMethods implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -163,7 +163,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 46a1958e..4617467f 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * WebhookVisit Class Doc Comment @@ -42,7 +42,7 @@ class WebhookVisit implements ModelInterface, ArrayAccess { // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -328,7 +328,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Sealed/DecompressionException.php b/src/Sealed/DecompressionException.php index 1f5d6622..8ea512d4 100644 --- a/src/Sealed/DecompressionException.php +++ b/src/Sealed/DecompressionException.php @@ -10,4 +10,4 @@ public function __construct() { parent::__construct("Decompression failed"); } -} \ No newline at end of file +} diff --git a/src/Sealed/DecryptionAlgorithm.php b/src/Sealed/DecryptionAlgorithm.php index 766aebc6..80427cf9 100644 --- a/src/Sealed/DecryptionAlgorithm.php +++ b/src/Sealed/DecryptionAlgorithm.php @@ -4,5 +4,5 @@ class DecryptionAlgorithm { - const AES_256_GCM = 'aes-256-gcm'; -} \ No newline at end of file + public const AES_256_GCM = 'aes-256-gcm'; +} diff --git a/src/Sealed/DecryptionKey.php b/src/Sealed/DecryptionKey.php index 3135785f..98799a73 100644 --- a/src/Sealed/DecryptionKey.php +++ b/src/Sealed/DecryptionKey.php @@ -22,4 +22,4 @@ public function getAlgorithm() { return $this->algorithm; } -} \ No newline at end of file +} diff --git a/src/Sealed/InvalidSealedDataException.php b/src/Sealed/InvalidSealedDataException.php index 283857d1..e97070eb 100644 --- a/src/Sealed/InvalidSealedDataException.php +++ b/src/Sealed/InvalidSealedDataException.php @@ -10,4 +10,4 @@ public function __construct() { parent::__construct("Invalid sealed data"); } -} \ No newline at end of file +} diff --git a/src/Sealed/InvalidSealedDataHeaderException.php b/src/Sealed/InvalidSealedDataHeaderException.php index ed72b610..dad3d638 100644 --- a/src/Sealed/InvalidSealedDataHeaderException.php +++ b/src/Sealed/InvalidSealedDataHeaderException.php @@ -10,4 +10,4 @@ public function __construct() { parent::__construct("Invalid sealed data header"); } -} \ No newline at end of file +} diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 909172fc..6414e093 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -6,7 +6,8 @@ use Fingerprint\ServerAPI\Model\EventResponse; use InvalidArgumentException; -class Sealed { +class Sealed +{ private static $SEAL_HEADER = "\x9E\x85\xDC\xED"; private const NONCE_LENGTH = 12; private const AUTH_TAG_LENGTH = 16; @@ -17,7 +18,8 @@ class Sealed { * @return EventResponse * @throws UnsealAggregateException */ - public static function unsealEventResponse(string $sealed, array $keys): EventResponse { + public static function unsealEventResponse(string $sealed, array $keys): EventResponse + { $unsealed = self::unseal($sealed, $keys); $data = json_decode($unsealed, true); @@ -101,4 +103,4 @@ private static function decompress($data): string return $inflated; } -} \ No newline at end of file +} diff --git a/src/Sealed/UnsealAggregateException.php b/src/Sealed/UnsealAggregateException.php index b465f91b..0131c2a1 100644 --- a/src/Sealed/UnsealAggregateException.php +++ b/src/Sealed/UnsealAggregateException.php @@ -26,4 +26,4 @@ public function getExceptions() { return $this->exceptions; } -} \ No newline at end of file +} diff --git a/src/Sealed/UnsealException.php b/src/Sealed/UnsealException.php index 6d35b563..19c36f64 100644 --- a/src/Sealed/UnsealException.php +++ b/src/Sealed/UnsealException.php @@ -2,7 +2,6 @@ namespace Fingerprint\ServerAPI\Sealed; - use Exception; class UnsealException extends Exception @@ -23,4 +22,4 @@ public function __toString() ", cause=" . $this->getPrevious() . '}'; } -} \ No newline at end of file +} diff --git a/src/Traits/WithRawResponse.php b/src/Traits/WithRawResponse.php index b8d443f3..16c9e2b4 100644 --- a/src/Traits/WithRawResponse.php +++ b/src/Traits/WithRawResponse.php @@ -2,7 +2,8 @@ namespace Fingerprint\ServerAPI\Traits; -trait WithRawResponse { +trait WithRawResponse +{ protected mixed $rawResponse = null; public function getRawResponse(): mixed @@ -14,4 +15,4 @@ public function setRawResponse(mixed $rawResponse): void { $this->rawResponse = $rawResponse; } -} \ No newline at end of file +} From 151f7ccaeb82f0ab045aad52e5ca1ae63c0f43b9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 13:22:29 +0300 Subject: [PATCH 020/118] chore: add unknown field tests --- test/FingerprintApiTest.php | 15 + .../get_event_200_with_unknown_field.json | 285 ++++++++++++++++++ 2 files changed, 300 insertions(+) create mode 100644 test/mocks/get_event_200_with_unknown_field.json diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 735252f8..0af5b04b 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -16,6 +16,7 @@ class FingerprintApiTest extends TestCase protected $fingerprint_api; const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; + const MOCK_REQUEST_ID_WITH_UNKNOWN = 'UNKNOWN_FIELD_REQUEST_ID'; const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; @@ -68,6 +69,9 @@ public function getEventMock($request_id) case self::MOCK_REQUEST_EXTRA_FIELDS: $mock_name = 'get_event_200_extra_fields.json'; break; + case self::MOCK_REQUEST_ID_WITH_UNKNOWN: + $mock_name = 'get_event_200_with_unknown_field.json'; + break; } $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); /** @var EventResponse $serialized */ @@ -223,4 +227,15 @@ public function testGetVisitsRawResponse() { $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); $this->assertEquals($mockedResult, $visits->getRawResponse()); } + + public function testGetEventParsedModelWithUnknownField() { + $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $this->assertEquals(false, $event->getProducts()->getIncognito()->getData()->getResult()); + } + + public function testGetUnknownFieldFromEvent() { + $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $decoded = $event->getRawResponse(); + $this->assertEquals("field", $decoded->unknown); + } } diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json new file mode 100644 index 00000000..eba63e09 --- /dev/null +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -0,0 +1,285 @@ +{ + "unknown": "field", + "products": { + "unknown": "field", + "identification": { + "unknown": "field", + "data": { + "unknown": "field", + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "1708102555327.NLOjmg", + "incognito": true, + "linkedId": "somelinkedId", + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login?hope{this{works[!", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": false, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": null, + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login?hope{this{works}[!", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg" + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "ipInfo": { + "data": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + }, + "v6": { + "address": "2001:db8:3333:4444:5555:6666:7777:8888", + "geolocation": { + "accuracyRadius": 5, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "10112", + "timezone": "Europe/Berlin", + "city": { + "name": "Berlin" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "BE", + "name": "Land Berlin" + } + ] + }, + "asn": { + "asn": "6805", + "name": "Telefonica Germany", + "network": "2a02:3100::/24" + }, + "datacenter": { + "result": false, + "name": "" + } + } + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "incognito": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0.1955 + } + }, + "clonedApp": { + "data": { + "result": false + } + }, + "factoryReset": { + "data": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + } + }, + "jailbroken": { + "data": { + "result": false + } + }, + "frida": { + "data": { + "result": false + } + }, + "privacySettings": { + "data": { + "result": false + } + }, + "virtualMachine": { + "data": { + "result": false + } + }, + "rawDeviceAttributes": { + "data": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "p3" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + }, + "cpuClass": {}, + "fonts": { + "value": [ + "Arial Unicode MS", + "Gill Sans", + "Helvetica Neue", + "Menlo" + ] + } + } + }, + "highActivity": { + "data": { + "result": false + } + }, + "locationSpoofing": { + "data": { + "result": false + } + } + } +} From fe587eefb9a28b9c81bc1ec63c85cea2f3daefb0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 13:26:24 +0300 Subject: [PATCH 021/118] chore: extend unknown field from event test case --- test/FingerprintApiTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 0af5b04b..c07673de 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -237,5 +237,8 @@ public function testGetUnknownFieldFromEvent() { $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $decoded = $event->getRawResponse(); $this->assertEquals("field", $decoded->unknown); + $this->assertEquals("field", $decoded->products->unknown); + $this->assertEquals("field", $decoded->products->identification->unknown); + $this->assertEquals("field", $decoded->products->identification->data->unknown); } } From 9578f1edf30496df06ee747d92bfc0dbd3463971 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 14:36:12 +0300 Subject: [PATCH 022/118] refactor: remove header selector --- .swagger-codegen-ignore | 3 +- src/HeaderSelector.php | 107 ---------------------------------------- 2 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 src/HeaderSelector.php diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index 7d61e7c8..a11efba4 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -3,4 +3,5 @@ src/phpunit.xml.dist src/.travis.yml src/.php_cs src/git_push.sh -src/test/** \ No newline at end of file +src/test/** +src/HeaderSelector.php \ No newline at end of file diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php deleted file mode 100644 index aec14a28..00000000 --- a/src/HeaderSelector.php +++ /dev/null @@ -1,107 +0,0 @@ -selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); - return $headers; - } - - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); - - unset($headers['Content-Type']); - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided - * - * @param string[] $accept Array of header - * - * @return string Accept (e.g. application/json) - */ - private function selectAcceptHeader($accept) - { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { - return null; - } elseif (preg_grep("/application\/json/i", $accept)) { - return 'application/json'; - } else { - return implode(',', $accept); - } - } - - /** - * Return the content type based on an array of content-type provided - * - * @param string[] $contentType Array fo content-type - * - * @return string Content-Type (e.g. application/json) - */ - private function selectContentTypeHeader($contentType) - { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; - } else { - return implode(',', $contentType); - } - } -} From ce2fedfcd94f5f1459049ba49eff75e2d3b8620c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 15:56:51 +0300 Subject: [PATCH 023/118] feat: remove raw response and introduce with http info --- run_checks.php | 18 +- scripts/generate.sh | 12 - src/Api/FingerprintApi.php | 60 +++- src/ApiException.php | 3 +- src/Configuration.php | 2 +- src/Model/ASN.php | 9 +- src/Model/BotdDetectionResult.php | 13 +- src/Model/BotdResult.php | 9 +- src/Model/BrowserDetails.php | 9 +- src/Model/ClonedAppResult.php | 9 +- src/Model/Confidence.php | 9 +- src/Model/DataCenter.php | 9 +- src/Model/DeprecatedIPLocation.php | 9 +- src/Model/DeprecatedIPLocationCity.php | 9 +- src/Model/EmulatorResult.php | 9 +- src/Model/ErrorEvent403Response.php | 9 +- src/Model/ErrorEvent403ResponseError.php | 15 +- src/Model/ErrorEvent404Response.php | 9 +- src/Model/ErrorEvent404ResponseError.php | 9 +- src/Model/ErrorVisits403.php | 9 +- src/Model/EventResponse.php | 9 +- src/Model/FactoryResetResult.php | 9 +- src/Model/FridaResult.php | 9 +- src/Model/HighActivityResult.php | 9 +- src/Model/IPLocation.php | 9 +- src/Model/IPLocationCity.php | 9 +- src/Model/IdentificationError.php | 11 +- src/Model/IncognitoResult.php | 9 +- src/Model/IpBlockListResult.php | 9 +- src/Model/IpBlockListResultDetails.php | 9 +- src/Model/IpInfoResult.php | 9 +- src/Model/IpInfoResultV4.php | 9 +- src/Model/IpInfoResultV6.php | 9 +- src/Model/JailbrokenResult.php | 9 +- src/Model/Location.php | 9 +- src/Model/LocationSpoofingResult.php | 9 +- src/Model/ManyRequestsResponse.php | 9 +- src/Model/PrivacySettingsResult.php | 9 +- src/Model/ProductError.php | 11 +- src/Model/ProductsResponse.php | 9 +- src/Model/ProductsResponseBotd.php | 9 +- src/Model/ProductsResponseIdentification.php | 9 +- .../ProductsResponseIdentificationData.php | 9 +- src/Model/ProxyResult.php | 9 +- src/Model/RawDeviceAttributesResult.php | 9 +- src/Model/Response.php | 9 +- src/Model/ResponseVisits.php | 9 +- src/Model/RootAppsResult.php | 9 +- src/Model/SeenAt.php | 9 +- src/Model/SignalResponseClonedApp.php | 9 +- src/Model/SignalResponseEmulator.php | 9 +- src/Model/SignalResponseFactoryReset.php | 9 +- src/Model/SignalResponseFrida.php | 9 +- src/Model/SignalResponseHighActivity.php | 9 +- src/Model/SignalResponseIncognito.php | 9 +- src/Model/SignalResponseIpBlocklist.php | 9 +- src/Model/SignalResponseIpInfo.php | 9 +- src/Model/SignalResponseJailbroken.php | 9 +- src/Model/SignalResponseLocationSpoofing.php | 9 +- src/Model/SignalResponsePrivacySettings.php | 9 +- src/Model/SignalResponseProxy.php | 9 +- .../SignalResponseRawDeviceAttributes.php | 9 +- src/Model/SignalResponseRootApps.php | 9 +- src/Model/SignalResponseSuspectScore.php | 9 +- src/Model/SignalResponseTampering.php | 9 +- src/Model/SignalResponseTor.php | 9 +- src/Model/SignalResponseVirtualMachine.php | 9 +- src/Model/SignalResponseVpn.php | 9 +- src/Model/Subdivision.php | 9 +- src/Model/SuspectScoreResult.php | 9 +- src/Model/TamperingResult.php | 9 +- src/Model/TorResult.php | 9 +- src/Model/VirtualMachineResult.php | 9 +- src/Model/Visit.php | 9 +- src/Model/VpnResult.php | 9 +- src/Model/VpnResultMethods.php | 9 +- src/Model/WebhookVisit.php | 9 +- src/ObjectSerializer.php | 20 ++ src/Traits/WithRawResponse.php | 18 -- template/ObjectSerializer.mustache | 20 ++ template/api.mustache | 30 +- template/model_generic.mustache | 1 - test/FingerprintApiTest.php | 76 +++-- .../get_event_200_with_broken_format.json | 283 ++++++++++++++++++ 84 files changed, 745 insertions(+), 460 deletions(-) delete mode 100644 src/Traits/WithRawResponse.php create mode 100644 test/mocks/get_event_200_with_broken_format.json diff --git a/run_checks.php b/run_checks.php index d4cb807e..dd56a4bc 100644 --- a/run_checks.php +++ b/run_checks.php @@ -44,26 +44,16 @@ error_reporting(error_reporting() & ~E_DEPRECATED); try { - $result = $client->getVisits($visitor_id); - $rawResponseDecoded = json_decode($result->getRawResponse(), true); - if ($rawResponseDecoded['visitorId'] !== $visitor_id) { - fwrite(STDERR, sprintf("Raw response for getVisits not working")); - exit(1); - } - fwrite(STDOUT, sprintf("Got visits: %s \n", $result->getRawResponse())); + list($result, $body) = $client->getVisitsWithHttpInfo($visitor_id); + fwrite(STDOUT, sprintf("Got visits: %s \n", $body)); } catch (Exception $e) { fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); } try { - $result = $client->getEvent($request_id); - $rawResponseDecoded = json_decode($result->getRawResponse(), true); - if ($rawResponseDecoded['products']['identification']['data']['requestId'] !== $request_id) { - fwrite(STDERR, sprintf("Raw response for getEvent not working")); - exit(1); - } - fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $result->getRawResponse())); + list($result, $body) = $client->getEventWithHttpInfo($request_id); + fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $body)); } catch (Exception $e) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); diff --git a/scripts/generate.sh b/scripts/generate.sh index a9faaf94..8510286f 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -68,15 +68,3 @@ mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs -declare -a modelsWithRawResponse=("./src/Model/EventResponse.php" "./src/Model/Response.php") - -for model in "${modelsWithRawResponse[@]}"; do - # enable WithRawResponse trait for the model - ( - if [ "$platform" = "Darwin" ]; then - sed -i '' 's/\/\/ use \\/use \\/' $model - else - sed -i 's/\/\/ use \\/use \\/' $model - fi - ) -done diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 3a78eec7..55c6e5f4 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -85,6 +85,9 @@ public function getConfig() public function getEvent($request_id) { list($response) = $this->getEventWithHttpInfo($request_id); + if ($response === null) { + throw new \Exception("SerializationError, please get full response body with getEventWithHttpInfo"); + } return $response; } @@ -97,7 +100,7 @@ public function getEvent($request_id) * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\EventResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fingerprint\ServerAPI\Model\EventResponse, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) */ public function getEventWithHttpInfo($request_id) { @@ -134,11 +137,16 @@ public function getEventWithHttpInfo($request_id) $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; @@ -152,7 +160,6 @@ public function getEventWithHttpInfo($request_id) '\Fingerprint\ServerAPI\Model\EventResponse', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; case 403: @@ -162,7 +169,6 @@ public function getEventWithHttpInfo($request_id) '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; case 404: @@ -172,7 +178,6 @@ public function getEventWithHttpInfo($request_id) '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; } @@ -195,6 +200,10 @@ public function getEventAsync($request_id) return $this->getEventAsyncWithHttpInfo($request_id) ->then( function ($response) { + list($result) = $response; + if ($result === null) { + throw new \Exception("SerializationError, please get full response body with getEventWithHttpInfo"); + } return $response[0]; } ); @@ -221,11 +230,16 @@ public function getEventAsyncWithHttpInfo($request_id) function ($response) use ($returnType) { $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; @@ -334,6 +348,9 @@ protected function getEventRequest($request_id) public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { list($response) = $this->getVisitsWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + if ($response === null) { + throw new \Exception("SerializationError, please get full response body with getVisitsWithHttpInfo"); + } return $response; } @@ -351,7 +368,7 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\Response, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fingerprint\ServerAPI\Model\Response, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) */ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { @@ -388,11 +405,16 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; @@ -406,7 +428,6 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i '\Fingerprint\ServerAPI\Model\Response', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; case 403: @@ -416,7 +437,6 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i '\Fingerprint\ServerAPI\Model\ErrorVisits403', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; case 429: @@ -426,7 +446,6 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; } @@ -454,6 +473,10 @@ public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = nul return $this->getVisitsAsyncWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) ->then( function ($response) { + list($result) = $response; + if ($result === null) { + throw new \Exception("SerializationError, please get full response body with getVisitsWithHttpInfo"); + } return $response[0]; } ); @@ -485,11 +508,16 @@ public function getVisitsAsyncWithHttpInfo($visitor_id, $request_id = null, $lin function ($response) use ($returnType) { $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; diff --git a/src/ApiException.php b/src/ApiException.php index e9eaae55..a2d352c3 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -27,7 +27,7 @@ namespace Fingerprint\ServerAPI; -use Exception; +use \Exception; /** * ApiException Class Doc Comment @@ -39,6 +39,7 @@ */ class ApiException extends Exception { + /** * The HTTP body of the server response either as Json or string. * diff --git a/src/Configuration.php b/src/Configuration.php index 931a0514..65a67717 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -461,4 +461,4 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) return $keyWithPrefix; } -} +} \ No newline at end of file diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 8d30628d..c455a809 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ASN Class Doc Comment @@ -41,8 +41,7 @@ */ class ASN implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -163,7 +162,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 6c7314ef..01f6e0d4 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * BotdDetectionResult Class Doc Comment @@ -42,8 +42,7 @@ */ class BotdDetectionResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,9 +158,9 @@ public function getModelName() return self::$swaggerModelName; } - public const RESULT_NOT_DETECTED = 'notDetected'; - public const RESULT_GOOD = 'good'; - public const RESULT_BAD = 'bad'; + const RESULT_NOT_DETECTED = 'notDetected'; +const RESULT_GOOD = 'good'; +const RESULT_BAD = 'bad'; /** * Gets allowable values of the enum diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 9fd01b06..5d2c2b94 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * BotdResult Class Doc Comment @@ -42,8 +42,7 @@ */ class BotdResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -184,7 +183,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index bf948847..f92c3853 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * BrowserDetails Class Doc Comment @@ -41,8 +41,7 @@ */ class BrowserDetails implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -188,7 +187,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index d48351ba..506d0e11 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ClonedAppResult Class Doc Comment @@ -41,8 +41,7 @@ */ class ClonedAppResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 63dc9f92..8d429199 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Confidence Class Doc Comment @@ -41,8 +41,7 @@ */ class Confidence implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 102a06aa..2a0fa7ac 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * DataCenter Class Doc Comment @@ -41,8 +41,7 @@ */ class DataCenter implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index ba179bb3..fffaad63 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocation Class Doc Comment @@ -42,8 +42,7 @@ */ class DeprecatedIPLocation implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -194,7 +193,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 6034cc8e..d297b2e8 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocationCity Class Doc Comment @@ -41,8 +41,7 @@ */ class DeprecatedIPLocationCity implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index caa2a74f..b0a76d67 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * EmulatorResult Class Doc Comment @@ -41,8 +41,7 @@ */ class EmulatorResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index fdc18599..8f71b507 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403Response Class Doc Comment @@ -41,8 +41,7 @@ */ class ErrorEvent403Response implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 30edadab..deba9368 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403ResponseError Class Doc Comment @@ -41,8 +41,7 @@ */ class ErrorEvent403ResponseError implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,10 +157,10 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_TOKEN_REQUIRED = 'TokenRequired'; - public const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; - public const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; - public const CODE_WRONG_REGION = 'WrongRegion'; + const CODE_TOKEN_REQUIRED = 'TokenRequired'; +const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; +const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; +const CODE_WRONG_REGION = 'WrongRegion'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 27d4b2ad..c7803054 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404Response Class Doc Comment @@ -41,8 +41,7 @@ */ class ErrorEvent404Response implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 6c3f6ad3..b6b14968 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404ResponseError Class Doc Comment @@ -41,8 +41,7 @@ */ class ErrorEvent404ResponseError implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; + const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 3201e59b..46826318 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorVisits403 Class Doc Comment @@ -41,8 +41,7 @@ */ class ErrorVisits403 implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 605fbb38..eabe5e08 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * EventResponse Class Doc Comment @@ -42,8 +42,7 @@ */ class EventResponse implements ModelInterface, ArrayAccess { - use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 8b4cc8ee..8faeac68 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * FactoryResetResult Class Doc Comment @@ -41,8 +41,7 @@ */ class FactoryResetResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 3240e141..48b7de01 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * FridaResult Class Doc Comment @@ -41,8 +41,7 @@ */ class FridaResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 5611b832..b7ebca8b 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * HighActivityResult Class Doc Comment @@ -41,8 +41,7 @@ */ class HighActivityResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 99275028..3709db3f 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocation Class Doc Comment @@ -41,8 +41,7 @@ */ class IPLocation implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -193,7 +192,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index a48d0a9e..eb1c5ae5 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocationCity Class Doc Comment @@ -41,8 +41,7 @@ */ class IPLocationCity implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 68cc5634..539c584f 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IdentificationError Class Doc Comment @@ -41,8 +41,7 @@ */ class IdentificationError implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,8 +157,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; - public const CODE_FAILED = 'Failed'; + const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; +const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index a69fc007..c5178f47 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IncognitoResult Class Doc Comment @@ -41,8 +41,7 @@ */ class IncognitoResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 47a75103..82d9cf37 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResult Class Doc Comment @@ -41,8 +41,7 @@ */ class IpBlockListResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 21a2a23b..3fe5d75d 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResultDetails Class Doc Comment @@ -41,8 +41,7 @@ */ class IpBlockListResultDetails implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index b307c126..e64f7e36 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResult Class Doc Comment @@ -42,8 +42,7 @@ */ class IpInfoResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -159,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index dbe8abfc..4aee3502 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV4 Class Doc Comment @@ -41,8 +41,7 @@ */ class IpInfoResultV4 implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 352d138e..cd6935d0 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV6 Class Doc Comment @@ -41,8 +41,7 @@ */ class IpInfoResultV6 implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 85d479f9..1a19096b 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * JailbrokenResult Class Doc Comment @@ -41,8 +41,7 @@ */ class JailbrokenResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Location.php b/src/Model/Location.php index 9b4d9634..b61a952d 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Location Class Doc Comment @@ -41,8 +41,7 @@ */ class Location implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 75edafe6..2f164617 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * LocationSpoofingResult Class Doc Comment @@ -41,8 +41,7 @@ */ class LocationSpoofingResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index ec0e5fea..292605f8 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ManyRequestsResponse Class Doc Comment @@ -41,8 +41,7 @@ */ class ManyRequestsResponse implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 53452ddb..01a7809f 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * PrivacySettingsResult Class Doc Comment @@ -41,8 +41,7 @@ */ class PrivacySettingsResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 70338d07..00e8625d 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProductError Class Doc Comment @@ -41,8 +41,7 @@ */ class ProductError implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,8 +157,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; - public const CODE_FAILED = 'Failed'; + const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; +const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index aa305860..fbdf4497 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponse Class Doc Comment @@ -42,8 +42,7 @@ */ class ProductsResponse implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -254,7 +253,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 598dee0a..352245dc 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseBotd Class Doc Comment @@ -41,8 +41,7 @@ */ class ProductsResponseBotd implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 5649e582..a6034934 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentification Class Doc Comment @@ -41,8 +41,7 @@ */ class ProductsResponseIdentification implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index ac179b16..0e77cc98 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentificationData Class Doc Comment @@ -41,8 +41,7 @@ */ class ProductsResponseIdentificationData implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -223,7 +222,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 469c3feb..51f5b296 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ProxyResult Class Doc Comment @@ -41,8 +41,7 @@ */ class ProxyResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 77fadc9e..cd96408f 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * RawDeviceAttributesResult Class Doc Comment @@ -42,8 +42,7 @@ */ class RawDeviceAttributesResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -154,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Response.php b/src/Model/Response.php index 2964e65c..540abf2a 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Response Class Doc Comment @@ -42,8 +42,7 @@ */ class Response implements ModelInterface, ArrayAccess { - use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -169,7 +168,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index d8ef5848..9f72d757 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * ResponseVisits Class Doc Comment @@ -41,8 +41,7 @@ */ class ResponseVisits implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -218,7 +217,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index bf19d330..c1e6eae6 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * RootAppsResult Class Doc Comment @@ -41,8 +41,7 @@ */ class RootAppsResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 10462ad5..17c647fc 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SeenAt Class Doc Comment @@ -41,8 +41,7 @@ */ class SeenAt implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index baa8b82e..6f1e3658 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseClonedApp Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseClonedApp implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 62f1cc91..24e25401 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseEmulator Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseEmulator implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 59a6f441..b0dca3c5 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFactoryReset Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseFactoryReset implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 6082aa92..2f4ada91 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFrida Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseFrida implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index b79816cd..95653e16 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseHighActivity Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseHighActivity implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 29ac7857..4d260b01 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIncognito Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseIncognito implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 5104a577..ef458033 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpBlocklist Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseIpBlocklist implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 89364a7d..ce532800 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpInfo Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseIpInfo implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 278e9864..ea00612a 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseJailbroken Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseJailbroken implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 1ae4a03c..49e498c4 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseLocationSpoofing Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseLocationSpoofing implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 0b33b98f..fb7c9beb 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponsePrivacySettings Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponsePrivacySettings implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 1a457ce6..bcb74a95 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseProxy Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseProxy implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 536f9020..44be597f 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRawDeviceAttributes Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseRawDeviceAttributes implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 58be9481..7c602ae9 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRootApps Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseRootApps implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index cca7cee2..ff99ef3a 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseSuspectScore Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseSuspectScore implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 55939ef2..55f261f6 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTampering Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseTampering implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index e148dcd6..4a580853 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTor Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseTor implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 6d82980a..8a0f878e 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVirtualMachine Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseVirtualMachine implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 58d6f6f9..2a64e9c6 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVpn Class Doc Comment @@ -41,8 +41,7 @@ */ class SignalResponseVpn implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index ffd88904..160c9ce1 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Subdivision Class Doc Comment @@ -41,8 +41,7 @@ */ class Subdivision implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index cae07afc..f4847f1a 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * SuspectScoreResult Class Doc Comment @@ -41,8 +41,7 @@ */ class SuspectScoreResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index fb03c33b..34800593 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * TamperingResult Class Doc Comment @@ -41,8 +41,7 @@ */ class TamperingResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 826539e5..12dc0bf8 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * TorResult Class Doc Comment @@ -41,8 +41,7 @@ */ class TorResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index f85da776..4cef9e80 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * VirtualMachineResult Class Doc Comment @@ -41,8 +41,7 @@ */ class VirtualMachineResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 87d5a527..6ac84e9e 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * Visit Class Doc Comment @@ -41,8 +41,7 @@ */ class Visit implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -218,7 +217,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index a14dd8cf..df82623b 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResult Class Doc Comment @@ -41,8 +41,7 @@ */ class VpnResult implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 5ec53294..7db1af75 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResultMethods Class Doc Comment @@ -41,8 +41,7 @@ */ class VpnResultMethods implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -163,7 +162,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 4617467f..d073953a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use ArrayAccess; -use Fingerprint\ServerAPI\ObjectSerializer; +use \ArrayAccess; +use \Fingerprint\ServerAPI\ObjectSerializer; /** * WebhookVisit Class Doc Comment @@ -41,8 +41,7 @@ */ class WebhookVisit implements ModelInterface, ArrayAccess { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; - public const DISCRIMINATOR = null; + const DISCRIMINATOR = null; /** * The original name of the model. @@ -328,7 +327,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index cd6ecc02..2b50ed35 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -269,8 +269,28 @@ public static function deserialize($data, $class, $httpHeaders = null) return null; } } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $originalData = $data; + $normalizedClass = strtolower($class); + switch ($normalizedClass) { + case "int": + $normalizedClass = "integer"; + break; + case "bool": + $normalizedClass = "boolean"; + break; + } + if ($normalizedClass === "float" && is_numeric($originalData)) { + return (float)$originalData; + } + if ($normalizedClass === 'string' && is_object($data)) { + throw new \Exception("Cannot convert object to string"); + } + settype($data, $class); + if (gettype($data) === $normalizedClass) { return $data; + } + throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); } elseif ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ diff --git a/src/Traits/WithRawResponse.php b/src/Traits/WithRawResponse.php deleted file mode 100644 index 16c9e2b4..00000000 --- a/src/Traits/WithRawResponse.php +++ /dev/null @@ -1,18 +0,0 @@ -rawResponse; - } - - public function setRawResponse(mixed $rawResponse): void - { - $this->rawResponse = $rawResponse; - } -} diff --git a/template/ObjectSerializer.mustache b/template/ObjectSerializer.mustache index 89e95e21..3aa34e4c 100644 --- a/template/ObjectSerializer.mustache +++ b/template/ObjectSerializer.mustache @@ -260,8 +260,28 @@ class ObjectSerializer return null; } } elseif (in_array($class, [{{&primitives}}], true)) { + $originalData = $data; + $normalizedClass = strtolower($class); + switch ($normalizedClass) { + case "int": + $normalizedClass = "integer"; + break; + case "bool": + $normalizedClass = "boolean"; + break; + } + if ($normalizedClass === "float" && is_numeric($originalData)) { + return (float)$originalData; + } + if ($normalizedClass === 'string' && is_object($data)) { + throw new \Exception("Cannot convert object to string"); + } + settype($data, $class); + if (gettype($data) === $normalizedClass) { return $data; + } + throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); } elseif ($class === '\SplFileObject') { /** @var \Psr\Http\Message\StreamInterface $data */ diff --git a/template/api.mustache b/template/api.mustache index 76e042bc..dac98725 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -86,6 +86,9 @@ use {{invokerPackage}}\ObjectSerializer; public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) { {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}});{{#returnType}} + if ($response === null) { + throw new \Exception("SerializationError, please get full response body with {{operationId}}WithHttpInfo"); + } return $response;{{/returnType}} } @@ -106,7 +109,7 @@ use {{invokerPackage}}\ObjectSerializer; * * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) + * @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) */ public function {{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) { @@ -144,11 +147,16 @@ use {{invokerPackage}}\ObjectSerializer; {{#returnType}} $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; @@ -168,7 +176,6 @@ use {{invokerPackage}}\ObjectSerializer; '{{dataType}}', $e->getResponseHeaders() ); - $data->setRawResponse($responseBody); $e->setResponseObject($data); break; {{/dataType}} @@ -199,6 +206,10 @@ use {{invokerPackage}}\ObjectSerializer; return $this->{{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) ->then( function ($response) { + list($result) = $response; + if ($result === null) { + throw new \Exception("SerializationError, please get full response body with {{operationId}}WithHttpInfo"); + } return $response[0]; } ); @@ -232,17 +243,22 @@ use {{invokerPackage}}\ObjectSerializer; {{#returnType}} $responseBody = $response->getBody()->getContents(); - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - $serialized->setRawResponse($responseBody); + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + } return [ $serialized, + $responseBody, $response->getStatusCode(), $response->getHeaders() ]; {{/returnType}} {{^returnType}} - return [null, $response->getStatusCode(), $response->getHeaders()]; + return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; {{/returnType}} }, function ($exception) { diff --git a/template/model_generic.mustache b/template/model_generic.mustache index da77a871..98959904 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -1,6 +1,5 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}} { - // use \Fingerprint\ServerAPI\Traits\WithRawResponse; const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; /** diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index c07673de..98a729e9 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -17,6 +17,7 @@ class FingerprintApiTest extends TestCase const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; const MOCK_REQUEST_ID_WITH_UNKNOWN = 'UNKNOWN_FIELD_REQUEST_ID'; + const MOCK_REQUEST_ID_WITH_BROKEN = 'BROKEN_FIELD_REQUEST_ID'; const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; @@ -47,18 +48,29 @@ public function setUp(): void $this->fingerprint_api = $this->getMockBuilder(FingerprintApi::class) ->getMock(); + $this->fingerprint_api->method('getEventWithHttpInfo')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventMock'])); + $this->fingerprint_api->method('getVisitsWithHttpInfo')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsMock'])); } - public function getEventMock($request_id) - { + public function getEventMock($request_id) { + list($response) = $this->getEventWithHttpInfoMock($request_id); + return $response; + } + + public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) { + list($response) = $this->getVisitsWithHttpInfoMock($visitor_id, $request_id, $linked_id, $limit, $before); + return $response; + } + + public function getEventWithHttpInfoMock($request_id) { $event_request_method = $this->getMethod('getEventRequest'); /** @var \GuzzleHttp\Psr7\Request $event_request */ $event_request = $event_request_method->invokeArgs($this->fingerprint_api, [self::MOCK_REQUEST_ID]); $query = $event_request->getUri()->getQuery(); $this->assertStringContainsString("ii=" . urlencode("fingerprint-pro-server-php-sdk/" . $this->getVersion()), $query); - $mock_name = ''; + $mock_name = ""; switch ($request_id) { case self::MOCK_REQUEST_ID: $mock_name = 'get_event_200.json'; @@ -72,16 +84,21 @@ public function getEventMock($request_id) case self::MOCK_REQUEST_ID_WITH_UNKNOWN: $mock_name = 'get_event_200_with_unknown_field.json'; break; + case self::MOCK_REQUEST_ID_WITH_BROKEN: + $mock_name = 'get_event_200_with_broken_format.json'; + break; + } + try { + $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); + $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + } catch (\Exception $exception) { + return [null, $events_mock_data, 200, []]; } - $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); - /** @var EventResponse $serialized */ - $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); - $serialized->setRawResponse($events_mock_data); - return $serialized; + return [$serialized, $events_mock_data, 200, []]; } - public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) + public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) { $visits_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json')); if ($request_id) { @@ -93,11 +110,15 @@ public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null if ($limit && is_numeric($limit)) { $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - /** @var Response $serialized */ - $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); - $serialized->setRawResponse($visits_mock_data); - return $serialized; + $serialized = null; + try { + $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); + } catch (\Exception $exception) { + return [null, $visits_mock_data, 200, []]; + } + + return [$serialized, $visits_mock_data, 200, []]; } public function testGetEvent() @@ -217,15 +238,15 @@ public function testGetVisitsWithLimit() public function testGetEventRawResponse() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); + list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_event_200.json")); - $this->assertEquals($mockedResult, $event->getRawResponse()); + $this->assertEquals($mockedResult, $responseBody); } public function testGetVisitsRawResponse() { - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); + list($visits, $responseBody) = $this->fingerprint_api->getVisitsWithHttpInfo(self::MOCK_VISITOR_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); - $this->assertEquals($mockedResult, $visits->getRawResponse()); + $this->assertEquals($mockedResult, $responseBody); } public function testGetEventParsedModelWithUnknownField() { @@ -234,11 +255,20 @@ public function testGetEventParsedModelWithUnknownField() { } public function testGetUnknownFieldFromEvent() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); - $decoded = $event->getRawResponse(); - $this->assertEquals("field", $decoded->unknown); - $this->assertEquals("field", $decoded->products->unknown); - $this->assertEquals("field", $decoded->products->identification->unknown); - $this->assertEquals("field", $decoded->products->identification->data->unknown); + list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $this->assertEquals("field", $responseBody->unknown); + $this->assertEquals("field", $responseBody->products->unknown); + $this->assertEquals("field", $responseBody->products->identification->unknown); + $this->assertEquals("field", $responseBody->products->identification->data->unknown); + } + + public function testGetBrokenFormatEvent() { + $event = null; + $responseBody = null; + list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_BROKEN); + + $this->assertNull($event); + $this->assertNotNull($responseBody); + $this->assertEquals("format", $responseBody->products->identification->data->linkedId->broken); } } diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json new file mode 100644 index 00000000..4ac8b6f5 --- /dev/null +++ b/test/mocks/get_event_200_with_broken_format.json @@ -0,0 +1,283 @@ +{ + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "1708102555327.NLOjmg", + "incognito": true, + "linkedId": { + "broken": "format" + }, + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login?hope{this{works[!", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": false, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": null, + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login?hope{this{works}[!", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg" + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "ipInfo": { + "data": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + }, + "v6": { + "address": "2001:db8:3333:4444:5555:6666:7777:8888", + "geolocation": { + "accuracyRadius": 5, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "10112", + "timezone": "Europe/Berlin", + "city": { + "name": "Berlin" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "BE", + "name": "Land Berlin" + } + ] + }, + "asn": { + "asn": "6805", + "name": "Telefonica Germany", + "network": "2a02:3100::/24" + }, + "datacenter": { + "result": false, + "name": "" + } + } + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "incognito": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0.1955 + } + }, + "clonedApp": { + "data": { + "result": false + } + }, + "factoryReset": { + "data": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + } + }, + "jailbroken": { + "data": { + "result": false + } + }, + "frida": { + "data": { + "result": false + } + }, + "privacySettings": { + "data": { + "result": false + } + }, + "virtualMachine": { + "data": { + "result": false + } + }, + "rawDeviceAttributes": { + "data": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "p3" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + }, + "cpuClass": {}, + "fonts": { + "value": [ + "Arial Unicode MS", + "Gill Sans", + "Helvetica Neue", + "Menlo" + ] + } + } + }, + "highActivity": { + "data": { + "result": false + } + }, + "locationSpoofing": { + "data": { + "result": false + } + } + } +} From 9da81d3765210f53e60436cd9473717a137f82c1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 15:57:02 +0300 Subject: [PATCH 024/118] chore: php cs fixer --- src/ApiException.php | 3 +-- src/Configuration.php | 2 +- src/Model/ASN.php | 8 ++++---- src/Model/BotdDetectionResult.php | 12 ++++++------ src/Model/BotdResult.php | 8 ++++---- src/Model/BrowserDetails.php | 8 ++++---- src/Model/ClonedAppResult.php | 8 ++++---- src/Model/Confidence.php | 8 ++++---- src/Model/DataCenter.php | 8 ++++---- src/Model/DeprecatedIPLocation.php | 8 ++++---- src/Model/DeprecatedIPLocationCity.php | 8 ++++---- src/Model/EmulatorResult.php | 8 ++++---- src/Model/ErrorEvent403Response.php | 8 ++++---- src/Model/ErrorEvent403ResponseError.php | 14 +++++++------- src/Model/ErrorEvent404Response.php | 8 ++++---- src/Model/ErrorEvent404ResponseError.php | 8 ++++---- src/Model/ErrorVisits403.php | 8 ++++---- src/Model/EventResponse.php | 8 ++++---- src/Model/FactoryResetResult.php | 8 ++++---- src/Model/FridaResult.php | 8 ++++---- src/Model/HighActivityResult.php | 8 ++++---- src/Model/IPLocation.php | 8 ++++---- src/Model/IPLocationCity.php | 8 ++++---- src/Model/IdentificationError.php | 10 +++++----- src/Model/IncognitoResult.php | 8 ++++---- src/Model/IpBlockListResult.php | 8 ++++---- src/Model/IpBlockListResultDetails.php | 8 ++++---- src/Model/IpInfoResult.php | 8 ++++---- src/Model/IpInfoResultV4.php | 8 ++++---- src/Model/IpInfoResultV6.php | 8 ++++---- src/Model/JailbrokenResult.php | 8 ++++---- src/Model/Location.php | 8 ++++---- src/Model/LocationSpoofingResult.php | 8 ++++---- src/Model/ManyRequestsResponse.php | 8 ++++---- src/Model/PrivacySettingsResult.php | 8 ++++---- src/Model/ProductError.php | 10 +++++----- src/Model/ProductsResponse.php | 8 ++++---- src/Model/ProductsResponseBotd.php | 8 ++++---- src/Model/ProductsResponseIdentification.php | 8 ++++---- src/Model/ProductsResponseIdentificationData.php | 8 ++++---- src/Model/ProxyResult.php | 8 ++++---- src/Model/RawDeviceAttributesResult.php | 8 ++++---- src/Model/Response.php | 8 ++++---- src/Model/ResponseVisits.php | 8 ++++---- src/Model/RootAppsResult.php | 8 ++++---- src/Model/SeenAt.php | 8 ++++---- src/Model/SignalResponseClonedApp.php | 8 ++++---- src/Model/SignalResponseEmulator.php | 8 ++++---- src/Model/SignalResponseFactoryReset.php | 8 ++++---- src/Model/SignalResponseFrida.php | 8 ++++---- src/Model/SignalResponseHighActivity.php | 8 ++++---- src/Model/SignalResponseIncognito.php | 8 ++++---- src/Model/SignalResponseIpBlocklist.php | 8 ++++---- src/Model/SignalResponseIpInfo.php | 8 ++++---- src/Model/SignalResponseJailbroken.php | 8 ++++---- src/Model/SignalResponseLocationSpoofing.php | 8 ++++---- src/Model/SignalResponsePrivacySettings.php | 8 ++++---- src/Model/SignalResponseProxy.php | 8 ++++---- src/Model/SignalResponseRawDeviceAttributes.php | 8 ++++---- src/Model/SignalResponseRootApps.php | 8 ++++---- src/Model/SignalResponseSuspectScore.php | 8 ++++---- src/Model/SignalResponseTampering.php | 8 ++++---- src/Model/SignalResponseTor.php | 8 ++++---- src/Model/SignalResponseVirtualMachine.php | 8 ++++---- src/Model/SignalResponseVpn.php | 8 ++++---- src/Model/Subdivision.php | 8 ++++---- src/Model/SuspectScoreResult.php | 8 ++++---- src/Model/TamperingResult.php | 8 ++++---- src/Model/TorResult.php | 8 ++++---- src/Model/VirtualMachineResult.php | 8 ++++---- src/Model/Visit.php | 8 ++++---- src/Model/VpnResult.php | 8 ++++---- src/Model/VpnResultMethods.php | 8 ++++---- src/Model/WebhookVisit.php | 8 ++++---- src/ObjectSerializer.php | 8 ++++---- 75 files changed, 301 insertions(+), 302 deletions(-) diff --git a/src/ApiException.php b/src/ApiException.php index a2d352c3..e9eaae55 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -27,7 +27,7 @@ namespace Fingerprint\ServerAPI; -use \Exception; +use Exception; /** * ApiException Class Doc Comment @@ -39,7 +39,6 @@ */ class ApiException extends Exception { - /** * The HTTP body of the server response either as Json or string. * diff --git a/src/Configuration.php b/src/Configuration.php index 65a67717..931a0514 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -461,4 +461,4 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) return $keyWithPrefix; } -} \ No newline at end of file +} diff --git a/src/Model/ASN.php b/src/Model/ASN.php index c455a809..36241c78 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ASN Class Doc Comment @@ -41,7 +41,7 @@ */ class ASN implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -162,7 +162,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 01f6e0d4..b6b90ac3 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BotdDetectionResult Class Doc Comment @@ -42,7 +42,7 @@ */ class BotdDetectionResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,9 +158,9 @@ public function getModelName() return self::$swaggerModelName; } - const RESULT_NOT_DETECTED = 'notDetected'; -const RESULT_GOOD = 'good'; -const RESULT_BAD = 'bad'; + public const RESULT_NOT_DETECTED = 'notDetected'; + public const RESULT_GOOD = 'good'; + public const RESULT_BAD = 'bad'; /** * Gets allowable values of the enum diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 5d2c2b94..743e00f0 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BotdResult Class Doc Comment @@ -42,7 +42,7 @@ */ class BotdResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -183,7 +183,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index f92c3853..773f89d0 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * BrowserDetails Class Doc Comment @@ -41,7 +41,7 @@ */ class BrowserDetails implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -187,7 +187,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 506d0e11..469112c2 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ClonedAppResult Class Doc Comment @@ -41,7 +41,7 @@ */ class ClonedAppResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 8d429199..f9959fb6 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Confidence Class Doc Comment @@ -41,7 +41,7 @@ */ class Confidence implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 2a0fa7ac..43d2f436 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DataCenter Class Doc Comment @@ -41,7 +41,7 @@ */ class DataCenter implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index fffaad63..cad21d7b 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocation Class Doc Comment @@ -42,7 +42,7 @@ */ class DeprecatedIPLocation implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -193,7 +193,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index d297b2e8..d437a507 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * DeprecatedIPLocationCity Class Doc Comment @@ -41,7 +41,7 @@ */ class DeprecatedIPLocationCity implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index b0a76d67..bfcd69be 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * EmulatorResult Class Doc Comment @@ -41,7 +41,7 @@ */ class EmulatorResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 8f71b507..5f652bd2 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403Response Class Doc Comment @@ -41,7 +41,7 @@ */ class ErrorEvent403Response implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index deba9368..a4508276 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent403ResponseError Class Doc Comment @@ -41,7 +41,7 @@ */ class ErrorEvent403ResponseError implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,10 +157,10 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOKEN_REQUIRED = 'TokenRequired'; -const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; -const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; -const CODE_WRONG_REGION = 'WrongRegion'; + public const CODE_TOKEN_REQUIRED = 'TokenRequired'; + public const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; + public const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; + public const CODE_WRONG_REGION = 'WrongRegion'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index c7803054..fce3aefc 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404Response Class Doc Comment @@ -41,7 +41,7 @@ */ class ErrorEvent404Response implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index b6b14968..6b8fed5b 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorEvent404ResponseError Class Doc Comment @@ -41,7 +41,7 @@ */ class ErrorEvent404ResponseError implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; + public const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; /** * Gets allowable values of the enum diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 46826318..21f996f8 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ErrorVisits403 Class Doc Comment @@ -41,7 +41,7 @@ */ class ErrorVisits403 implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index eabe5e08..bd1bf37e 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * EventResponse Class Doc Comment @@ -42,7 +42,7 @@ */ class EventResponse implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 8faeac68..90521518 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * FactoryResetResult Class Doc Comment @@ -41,7 +41,7 @@ */ class FactoryResetResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 48b7de01..2a39cb11 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * FridaResult Class Doc Comment @@ -41,7 +41,7 @@ */ class FridaResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index b7ebca8b..900af0d6 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * HighActivityResult Class Doc Comment @@ -41,7 +41,7 @@ */ class HighActivityResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 3709db3f..7de0a344 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocation Class Doc Comment @@ -41,7 +41,7 @@ */ class IPLocation implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -192,7 +192,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index eb1c5ae5..b2cc0806 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IPLocationCity Class Doc Comment @@ -41,7 +41,7 @@ */ class IPLocationCity implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 539c584f..c8e1d222 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IdentificationError Class Doc Comment @@ -41,7 +41,7 @@ */ class IdentificationError implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,8 +157,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; -const CODE_FAILED = 'Failed'; + public const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; + public const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index c5178f47..777f9166 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IncognitoResult Class Doc Comment @@ -41,7 +41,7 @@ */ class IncognitoResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 82d9cf37..ada18c8e 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResult Class Doc Comment @@ -41,7 +41,7 @@ */ class IpBlockListResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 3fe5d75d..90581a2b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpBlockListResultDetails Class Doc Comment @@ -41,7 +41,7 @@ */ class IpBlockListResultDetails implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index e64f7e36..82340750 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResult Class Doc Comment @@ -42,7 +42,7 @@ */ class IpInfoResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -158,7 +158,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 4aee3502..68105f75 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV4 Class Doc Comment @@ -41,7 +41,7 @@ */ class IpInfoResultV4 implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -167,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index cd6935d0..d8a866d5 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * IpInfoResultV6 Class Doc Comment @@ -41,7 +41,7 @@ */ class IpInfoResultV6 implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -167,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 1a19096b..3b48a66c 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * JailbrokenResult Class Doc Comment @@ -41,7 +41,7 @@ */ class JailbrokenResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Location.php b/src/Model/Location.php index b61a952d..f0b69a2f 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Location Class Doc Comment @@ -41,7 +41,7 @@ */ class Location implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 2f164617..2ded103f 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * LocationSpoofingResult Class Doc Comment @@ -41,7 +41,7 @@ */ class LocationSpoofingResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 292605f8..658834f2 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ManyRequestsResponse Class Doc Comment @@ -41,7 +41,7 @@ */ class ManyRequestsResponse implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 01a7809f..12f2c0cc 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * PrivacySettingsResult Class Doc Comment @@ -41,7 +41,7 @@ */ class PrivacySettingsResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 00e8625d..4638a72b 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductError Class Doc Comment @@ -41,7 +41,7 @@ */ class ProductError implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,8 +157,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; -const CODE_FAILED = 'Failed'; + public const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; + public const CODE_FAILED = 'Failed'; /** * Gets allowable values of the enum diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index fbdf4497..33f909ab 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponse Class Doc Comment @@ -42,7 +42,7 @@ */ class ProductsResponse implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -253,7 +253,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 352245dc..96048d1d 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseBotd Class Doc Comment @@ -41,7 +41,7 @@ */ class ProductsResponseBotd implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index a6034934..b3010b1d 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentification Class Doc Comment @@ -41,7 +41,7 @@ */ class ProductsResponseIdentification implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 0e77cc98..bfe5d5fd 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProductsResponseIdentificationData Class Doc Comment @@ -41,7 +41,7 @@ */ class ProductsResponseIdentificationData implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -222,7 +222,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 51f5b296..ab3c30bb 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ProxyResult Class Doc Comment @@ -41,7 +41,7 @@ */ class ProxyResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index cd96408f..61e29953 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * RawDeviceAttributesResult Class Doc Comment @@ -42,7 +42,7 @@ */ class RawDeviceAttributesResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -153,7 +153,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Response.php b/src/Model/Response.php index 540abf2a..83e35b2b 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Response Class Doc Comment @@ -42,7 +42,7 @@ */ class Response implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -168,7 +168,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 9f72d757..d9f91edf 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * ResponseVisits Class Doc Comment @@ -41,7 +41,7 @@ */ class ResponseVisits implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -217,7 +217,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index c1e6eae6..1c3b4c8f 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * RootAppsResult Class Doc Comment @@ -41,7 +41,7 @@ */ class RootAppsResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 17c647fc..647f2886 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SeenAt Class Doc Comment @@ -41,7 +41,7 @@ */ class SeenAt implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 6f1e3658..837a6113 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseClonedApp Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseClonedApp implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 24e25401..eaffdb6e 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseEmulator Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseEmulator implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index b0dca3c5..47e37cf5 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFactoryReset Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseFactoryReset implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 2f4ada91..f0703edc 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseFrida Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseFrida implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 95653e16..cc023aac 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseHighActivity Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseHighActivity implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 4d260b01..4969658c 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIncognito Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseIncognito implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index ef458033..4d1c8e8b 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpBlocklist Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseIpBlocklist implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index ce532800..f49ce2af 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseIpInfo Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseIpInfo implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index ea00612a..90962b73 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseJailbroken Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseJailbroken implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 49e498c4..a246fe8e 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseLocationSpoofing Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseLocationSpoofing implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index fb7c9beb..c970fa1b 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponsePrivacySettings Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponsePrivacySettings implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index bcb74a95..0fe7ae72 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseProxy Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseProxy implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 44be597f..810d7126 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRawDeviceAttributes Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseRawDeviceAttributes implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 7c602ae9..a6adc7f2 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseRootApps Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseRootApps implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index ff99ef3a..fdf506a1 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseSuspectScore Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseSuspectScore implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 55f261f6..ddcb9ca1 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTampering Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseTampering implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 4a580853..46e37c69 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseTor Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseTor implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 8a0f878e..f22b0643 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVirtualMachine Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseVirtualMachine implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 2a64e9c6..a772bfb9 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SignalResponseVpn Class Doc Comment @@ -41,7 +41,7 @@ */ class SignalResponseVpn implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 160c9ce1..7614e811 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Subdivision Class Doc Comment @@ -41,7 +41,7 @@ */ class Subdivision implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index f4847f1a..8fb6f2fd 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * SuspectScoreResult Class Doc Comment @@ -41,7 +41,7 @@ */ class SuspectScoreResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 34800593..87e21653 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * TamperingResult Class Doc Comment @@ -41,7 +41,7 @@ */ class TamperingResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -157,7 +157,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 12dc0bf8..cfccf39f 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * TorResult Class Doc Comment @@ -41,7 +41,7 @@ */ class TorResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 4cef9e80..0257e35e 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VirtualMachineResult Class Doc Comment @@ -41,7 +41,7 @@ */ class VirtualMachineResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -152,7 +152,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 6ac84e9e..13a6a689 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * Visit Class Doc Comment @@ -41,7 +41,7 @@ */ class Visit implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -217,7 +217,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index df82623b..597a2cd2 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResult Class Doc Comment @@ -41,7 +41,7 @@ */ class VpnResult implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -167,7 +167,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 7db1af75..a9361fd9 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * VpnResultMethods Class Doc Comment @@ -41,7 +41,7 @@ */ class VpnResultMethods implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -162,7 +162,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index d073953a..845d3760 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -28,8 +28,8 @@ namespace Fingerprint\ServerAPI\Model; -use \ArrayAccess; -use \Fingerprint\ServerAPI\ObjectSerializer; +use ArrayAccess; +use Fingerprint\ServerAPI\ObjectSerializer; /** * WebhookVisit Class Doc Comment @@ -41,7 +41,7 @@ */ class WebhookVisit implements ModelInterface, ArrayAccess { - const DISCRIMINATOR = null; + public const DISCRIMINATOR = null; /** * The original name of the model. @@ -327,7 +327,7 @@ public function getModelName() return self::$swaggerModelName; } - + /** * Associative array for storing property values diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 2b50ed35..310f6243 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -274,21 +274,21 @@ public static function deserialize($data, $class, $httpHeaders = null) switch ($normalizedClass) { case "int": $normalizedClass = "integer"; - break; + break; case "bool": $normalizedClass = "boolean"; - break; + break; } if ($normalizedClass === "float" && is_numeric($originalData)) { return (float)$originalData; } if ($normalizedClass === 'string' && is_object($data)) { - throw new \Exception("Cannot convert object to string"); + throw new \Exception("Cannot convert object to string"); } settype($data, $class); if (gettype($data) === $normalizedClass) { - return $data; + return $data; } throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); } elseif ($class === '\SplFileObject') { From cce2ee4a94673784ecf80a93a6d93620e5c3b671 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 16:00:32 +0300 Subject: [PATCH 025/118] chore: add style fixer to generate script --- scripts/generate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/generate.sh b/scripts/generate.sh index 8510286f..574c20a3 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -68,3 +68,4 @@ mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs +docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src From 66d90156c5e1e407518268907318951c4289c26c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 23 Jul 2024 16:01:52 +0300 Subject: [PATCH 026/118] chore: style fix to tests --- test/FingerprintApiTest.php | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 98a729e9..58a114be 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -15,14 +15,14 @@ class FingerprintApiTest extends TestCase /** @var FingerprintApi */ protected $fingerprint_api; - const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; - const MOCK_REQUEST_ID_WITH_UNKNOWN = 'UNKNOWN_FIELD_REQUEST_ID'; - const MOCK_REQUEST_ID_WITH_BROKEN = 'BROKEN_FIELD_REQUEST_ID'; - const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; - const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; - const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; - const MOCK_VISITOR_ID = 'AcxioeQKffpXF8iGQK3P'; - const MOCK_VISITOR_REQUEST_ID = '1655373780901.HhjRFX'; + public const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; + public const MOCK_REQUEST_ID_WITH_UNKNOWN = 'UNKNOWN_FIELD_REQUEST_ID'; + public const MOCK_REQUEST_ID_WITH_BROKEN = 'BROKEN_FIELD_REQUEST_ID'; + public const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; + public const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; + public const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; + public const MOCK_VISITOR_ID = 'AcxioeQKffpXF8iGQK3P'; + public const MOCK_VISITOR_REQUEST_ID = '1655373780901.HhjRFX'; protected function getMethod($method_name) { @@ -54,17 +54,20 @@ public function setUp(): void $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsMock'])); } - public function getEventMock($request_id) { + public function getEventMock($request_id) + { list($response) = $this->getEventWithHttpInfoMock($request_id); return $response; } - public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) { + public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) + { list($response) = $this->getVisitsWithHttpInfoMock($visitor_id, $request_id, $linked_id, $limit, $before); return $response; } - public function getEventWithHttpInfoMock($request_id) { + public function getEventWithHttpInfoMock($request_id) + { $event_request_method = $this->getMethod('getEventRequest'); /** @var \GuzzleHttp\Psr7\Request $event_request */ $event_request = $event_request_method->invokeArgs($this->fingerprint_api, [self::MOCK_REQUEST_ID]); @@ -243,18 +246,21 @@ public function testGetEventRawResponse() $this->assertEquals($mockedResult, $responseBody); } - public function testGetVisitsRawResponse() { + public function testGetVisitsRawResponse() + { list($visits, $responseBody) = $this->fingerprint_api->getVisitsWithHttpInfo(self::MOCK_VISITOR_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); $this->assertEquals($mockedResult, $responseBody); } - public function testGetEventParsedModelWithUnknownField() { + public function testGetEventParsedModelWithUnknownField() + { $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $this->assertEquals(false, $event->getProducts()->getIncognito()->getData()->getResult()); } - public function testGetUnknownFieldFromEvent() { + public function testGetUnknownFieldFromEvent() + { list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $this->assertEquals("field", $responseBody->unknown); $this->assertEquals("field", $responseBody->products->unknown); @@ -262,7 +268,8 @@ public function testGetUnknownFieldFromEvent() { $this->assertEquals("field", $responseBody->products->identification->data->unknown); } - public function testGetBrokenFormatEvent() { + public function testGetBrokenFormatEvent() + { $event = null; $responseBody = null; list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_BROKEN); From 62e4ad3020425667f45e3beeb166b4095a437ab5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 24 Jul 2024 13:55:39 +0300 Subject: [PATCH 027/118] feat: change api to return tuple instead of serialized model BREAKING CHANGE: API Methods returns tuple instead of models BREAKING CHANGE: API Methods removed other than `getModel` --- docs/Api/FingerprintApi.md | 22 ++-- run_checks.php | 8 +- src/Api/FingerprintApi.php | 243 +++--------------------------------- template/api.mustache | 143 ++------------------- template/api_doc.mustache | 11 +- test/FingerprintApiTest.php | 68 +++++----- 6 files changed, 80 insertions(+), 415 deletions(-) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 0730eedb..14da8e99 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId # **getEvent** -> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) +> [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id) Get event by requestId @@ -37,8 +37,8 @@ $config $request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. try { -$result = $client->getEvent($request_id); - echo "
" . $response->__toString() . "
"; + list($model, $httpResponse) = $client->getEvent($request_id); + echo "
" . $httpResponse->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; } @@ -53,7 +53,10 @@ Name | Type | Description | Notes ### Return type -[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) +Array: +0. [**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) | null, +1. \Psr\Http\Message\ResponseInterface + ### Authorization @@ -67,7 +70,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getVisits** -> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) +> [ \Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface ] getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) Get visits by visitorId @@ -101,8 +104,8 @@ $pagination_key = "pagination_key_example"; // string | Use `paginationKey` to g $before = 789; // int | ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. try { -$result = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - echo "
" . $response->__toString() . "
"; + list($model, $httpResponse) = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $httpResponse->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } @@ -122,7 +125,10 @@ Name | Type | Description | Notes ### Return type -[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) +Array: +0. [**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) | null, +1. \Psr\Http\Message\ResponseInterface + ### Authorization diff --git a/run_checks.php b/run_checks.php index dd56a4bc..f6f1abde 100644 --- a/run_checks.php +++ b/run_checks.php @@ -44,16 +44,16 @@ error_reporting(error_reporting() & ~E_DEPRECATED); try { - list($result, $body) = $client->getVisitsWithHttpInfo($visitor_id); - fwrite(STDOUT, sprintf("Got visits: %s \n", $body)); + list($result, $response) = $client->getVisits($visitor_id); + fwrite(STDOUT, sprintf("Got visits: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); } try { - list($result, $body) = $client->getEventWithHttpInfo($request_id); - fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $body)); + list($result, $response) = $client->getEvent($request_id); + fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 55c6e5f4..b2965028 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -71,6 +71,7 @@ public function getConfig() return $this->config; } + /** * Operation getEvent * @@ -80,29 +81,9 @@ public function getConfig() * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\EventResponse + * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent($request_id) - { - list($response) = $this->getEventWithHttpInfo($request_id); - if ($response === null) { - throw new \Exception("SerializationError, please get full response body with getEventWithHttpInfo"); - } - return $response; - } - - /** - * Operation getEventWithHttpInfo - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\EventResponse, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) - */ - public function getEventWithHttpInfo($request_id) { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -112,11 +93,13 @@ public function getEventWithHttpInfo($request_id) try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $errorBody = $e->getResponse()->getBody()->getContents(); + $e->getResponse()->getBody()->rewind(); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + $e->getResponse() ? $errorBody : null ); } @@ -136,20 +119,15 @@ public function getEventWithHttpInfo($request_id) } $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); - $serialized = null; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + return [null, $response]; } - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [$serialized, $response]; } catch (ApiException $e) { switch ($e->getCode()) { @@ -185,82 +163,6 @@ public function getEventWithHttpInfo($request_id) } } - /** - * Operation getEventAsync - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getEventAsync($request_id) - { - return $this->getEventAsyncWithHttpInfo($request_id) - ->then( - function ($response) { - list($result) = $response; - if ($result === null) { - throw new \Exception("SerializationError, please get full response body with getEventWithHttpInfo"); - } - return $response[0]; - } - ); - } - - /** - * Operation getEventAsyncWithHttpInfo - * - * Get event by requestId - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getEventAsyncWithHttpInfo($request_id) - { - $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; - $request = $this->getEventRequest($request_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody()->getContents(); - - $serialized = null; - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; - } - - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - /** * Create request for operation 'getEvent' * @@ -329,6 +231,7 @@ protected function getEventRequest($request_id) ); } + /** * Operation getVisits * @@ -343,34 +246,9 @@ protected function getEventRequest($request_id) * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\Response + * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } */ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - list($response) = $this->getVisitsWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - if ($response === null) { - throw new \Exception("SerializationError, please get full response body with getVisitsWithHttpInfo"); - } - return $response; - } - - /** - * Operation getVisitsWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\Response, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) - */ - public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -380,11 +258,13 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $errorBody = $e->getResponse()->getBody()->getContents(); + $e->getResponse()->getBody()->rewind(); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + $e->getResponse() ? $errorBody : null ); } @@ -404,20 +284,15 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i } $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); - $serialized = null; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + return [null, $response]; } - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [$serialized, $response]; } catch (ApiException $e) { switch ($e->getCode()) { @@ -453,92 +328,6 @@ public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_i } } - /** - * Operation getVisitsAsync - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - return $this->getVisitsAsyncWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - ->then( - function ($response) { - list($result) = $response; - if ($result === null) { - throw new \Exception("SerializationError, please get full response body with getVisitsWithHttpInfo"); - } - return $response[0]; - } - ); - } - - /** - * Operation getVisitsAsyncWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsyncWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody()->getContents(); - - $serialized = null; - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; - } - - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - /** * Create request for operation 'getVisits' * diff --git a/template/api.mustache b/template/api.mustache index dac98725..27f39bc7 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -64,36 +64,9 @@ use {{invokerPackage}}\ObjectSerializer; {{#operation}} {{#contents}} - /** - * Operation {{{operationId}}} -{{#summary}} - * - * {{{summary}}} -{{/summary}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} - */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}});{{#returnType}} - if ($response === null) { - throw new \Exception("SerializationError, please get full response body with {{operationId}}WithHttpInfo"); - } - return $response;{{/returnType}} - } /** - * Operation {{{operationId}}}WithHttpInfo + * Operation {{{operationId}}} {{#summary}} * * {{{summary}}} @@ -109,9 +82,9 @@ use {{invokerPackage}}\ObjectSerializer; * * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP Response body contents, HTTP status code, HTTP response headers (array of strings) + * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -121,11 +94,13 @@ use {{invokerPackage}}\ObjectSerializer; try { $response = $this->client->send($request, $options); } catch (RequestException $e) { + $errorBody = $e->getResponse()->getBody()->getContents(); + $e->getResponse()->getBody()->rewind(); throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + $e->getResponse() ? $errorBody : null ); } @@ -146,23 +121,18 @@ use {{invokerPackage}}\ObjectSerializer; {{#returnType}} $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); - $serialized = null; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; + return [null, $response]; } - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [$serialized, $response]; {{/returnType}} {{^returnType}} - return [null, $statusCode, $response->getHeaders()]; + return [null, $response]; {{/returnType}} } catch (ApiException $e) { @@ -185,99 +155,6 @@ use {{invokerPackage}}\ObjectSerializer; } } - /** - * Operation {{{operationId}}}Async - * - * {{{summary}}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - return $this->{{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - ->then( - function ($response) { - list($result) = $response; - if ($result === null) { - throw new \Exception("SerializationError, please get full response body with {{operationId}}WithHttpInfo"); - } - return $response[0]; - } - ); - } - - /** - * Operation {{{operationId}}}AsyncWithHttpInfo - * - * {{{summary}}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - $returnType = '{{returnType}}'; - $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - {{#returnType}} - $responseBody = $response->getBody()->getContents(); - - $serialized = null; - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; - } - - return [ - $serialized, - $responseBody, - $response->getStatusCode(), - $response->getHeaders() - ]; - {{/returnType}} - {{^returnType}} - return [null, $responseBody, $response->getStatusCode(), $response->getHeaders()]; - {{/returnType}} - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - /** * Create request for operation '{{{operationId}}}' * diff --git a/template/api_doc.mustache b/template/api_doc.mustache index 6435d6ef..f42a5e90 100644 --- a/template/api_doc.mustache +++ b/template/api_doc.mustache @@ -11,7 +11,7 @@ Method | HTTP request | Description {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +> {{#returnType}} [ {{{returnType}}}, \Psr\Http\Message\ResponseInterface ] {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{{summary}}}{{#notes}} @@ -41,8 +41,8 @@ $config {{/allParams}} try { -{{#returnType}}$result = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - echo "
" . $response->__toString() . "
";{{/returnType}} + {{#returnType}}list($model, $httpResponse) = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + echo "
" . $httpResponse->getBody()->getContents() . "
";{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; } @@ -58,7 +58,10 @@ Name | Type | Description | Notes ### Return type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} +Array: +0. {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md) | null{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null{{/returnType}}, +1. \Psr\Http\Message\ResponseInterface + ### Authorization diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 58a114be..c6c72375 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -48,24 +48,9 @@ public function setUp(): void $this->fingerprint_api = $this->getMockBuilder(FingerprintApi::class) ->getMock(); - $this->fingerprint_api->method('getEventWithHttpInfo')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); - $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventMock'])); - $this->fingerprint_api->method('getVisitsWithHttpInfo')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); - $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsMock'])); + $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); + $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); } - - public function getEventMock($request_id) - { - list($response) = $this->getEventWithHttpInfoMock($request_id); - return $response; - } - - public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) - { - list($response) = $this->getVisitsWithHttpInfoMock($visitor_id, $request_id, $linked_id, $limit, $before); - return $response; - } - public function getEventWithHttpInfoMock($request_id) { $event_request_method = $this->getMethod('getEventRequest'); @@ -91,19 +76,24 @@ public function getEventWithHttpInfoMock($request_id) $mock_name = 'get_event_200_with_broken_format.json'; break; } + + $file = file_get_contents(__DIR__ . "/mocks/$mock_name"); + $events_mock_data = \GuzzleHttp\json_decode($file); + $response = new \GuzzleHttp\Psr7\Response(200, [], $file); + try { - $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); } catch (\Exception $exception) { - return [null, $events_mock_data, 200, []]; + return [null, $response]; } - return [$serialized, $events_mock_data, 200, []]; + return [$serialized, $response]; } public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) { - $visits_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json')); + $file = file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json'); + $visits_mock_data = \GuzzleHttp\json_decode($file); if ($request_id) { $visits_mock_data->visits = array_filter($visits_mock_data->visits, function ($item) use ($request_id) { return $item->requestId = $request_id; @@ -114,19 +104,19 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - $serialized = null; + $response = new \GuzzleHttp\Psr7\Response(200, [], $file); try { $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); } catch (\Exception $exception) { - return [null, $visits_mock_data, 200, []]; + return [null, $response]; } - return [$serialized, $visits_mock_data, 200, []]; + return [$serialized, $response]; } public function testGetEvent() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); $products = $event->getProducts(); $identification_product = $products->getIdentification(); $botd_product = $products->getBotd(); @@ -166,7 +156,7 @@ public function testGetEvent() public function testGetEventWithExtraFields() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_EXTRA_FIELDS); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_EXTRA_FIELDS); $products = $event->getProducts(); $identification_product = $products->getIdentification(); $request_id = $identification_product->getData()->getRequestId(); @@ -175,7 +165,7 @@ public function testGetEventWithExtraFields() public function testGetEventWithAllErrors() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ALL_ERRORS); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ALL_ERRORS); $products = $event->getProducts(); $identification_error = $products->getIdentification()->getError(); $botd_error = $products->getBotd()->getError(); @@ -219,13 +209,13 @@ public function testGetEventWithAllErrors() public function testGetVisits() { - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); $this->assertEquals($visits->getVisitorId(), self::MOCK_VISITOR_ID); } public function testGetVisitsByRequestId() { - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); foreach ($visits->getVisits() as $visit) { $this->assertEquals(self::MOCK_VISITOR_REQUEST_ID, $visit->getRequestId()); } @@ -234,34 +224,35 @@ public function testGetVisitsByRequestId() public function testGetVisitsWithLimit() { $limit = 100; - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, null, $limit); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, null, $limit); $count = count($visits->getVisits()); $this->assertLessThanOrEqual($limit, $count); } public function testGetEventRawResponse() { - list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_event_200.json")); - $this->assertEquals($mockedResult, $responseBody); + $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); } public function testGetVisitsRawResponse() { - list($visits, $responseBody) = $this->fingerprint_api->getVisitsWithHttpInfo(self::MOCK_VISITOR_ID); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); - $this->assertEquals($mockedResult, $responseBody); + $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); } public function testGetEventParsedModelWithUnknownField() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $this->assertEquals(false, $event->getProducts()->getIncognito()->getData()->getResult()); } public function testGetUnknownFieldFromEvent() { - list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); $this->assertEquals("field", $responseBody->unknown); $this->assertEquals("field", $responseBody->products->unknown); $this->assertEquals("field", $responseBody->products->identification->unknown); @@ -270,9 +261,8 @@ public function testGetUnknownFieldFromEvent() public function testGetBrokenFormatEvent() { - $event = null; - $responseBody = null; - list($event, $responseBody) = $this->fingerprint_api->getEventWithHttpInfo(self::MOCK_REQUEST_ID_WITH_BROKEN); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); + $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); $this->assertNull($event); $this->assertNotNull($responseBody); From f6b7659bcf8600b1a63d4267a8669077825a815b Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 24 Jul 2024 14:03:32 +0300 Subject: [PATCH 028/118] refactor: remove discriminator from object serializer and remove its template --- .swagger-codegen-ignore | 3 +- src/Model/ASN.php | 2 - src/Model/BotdDetectionResult.php | 2 - src/Model/BotdResult.php | 2 - src/Model/BrowserDetails.php | 2 - src/Model/ClonedAppResult.php | 2 - src/Model/Confidence.php | 2 - src/Model/DataCenter.php | 2 - src/Model/DeprecatedIPLocation.php | 2 - src/Model/DeprecatedIPLocationCity.php | 2 - src/Model/EmulatorResult.php | 2 - src/Model/ErrorEvent403Response.php | 2 - src/Model/ErrorEvent403ResponseError.php | 2 - src/Model/ErrorEvent404Response.php | 2 - src/Model/ErrorEvent404ResponseError.php | 2 - src/Model/ErrorVisits403.php | 2 - src/Model/EventResponse.php | 2 - src/Model/FactoryResetResult.php | 2 - src/Model/FridaResult.php | 2 - src/Model/HighActivityResult.php | 2 - src/Model/IPLocation.php | 2 - src/Model/IPLocationCity.php | 2 - src/Model/IdentificationError.php | 2 - src/Model/IncognitoResult.php | 2 - src/Model/IpBlockListResult.php | 2 - src/Model/IpBlockListResultDetails.php | 2 - src/Model/IpInfoResult.php | 2 - src/Model/IpInfoResultV4.php | 2 - src/Model/IpInfoResultV6.php | 2 - src/Model/JailbrokenResult.php | 2 - src/Model/Location.php | 2 - src/Model/LocationSpoofingResult.php | 2 - src/Model/ManyRequestsResponse.php | 2 - src/Model/PrivacySettingsResult.php | 2 - src/Model/ProductError.php | 2 - src/Model/ProductsResponse.php | 2 - src/Model/ProductsResponseBotd.php | 2 - src/Model/ProductsResponseIdentification.php | 2 - .../ProductsResponseIdentificationData.php | 2 - src/Model/ProxyResult.php | 2 - src/Model/RawDeviceAttributesResult.php | 2 - src/Model/Response.php | 2 - src/Model/ResponseVisits.php | 2 - src/Model/RootAppsResult.php | 2 - src/Model/SeenAt.php | 2 - src/Model/SignalResponseClonedApp.php | 2 - src/Model/SignalResponseEmulator.php | 2 - src/Model/SignalResponseFactoryReset.php | 2 - src/Model/SignalResponseFrida.php | 2 - src/Model/SignalResponseHighActivity.php | 2 - src/Model/SignalResponseIncognito.php | 2 - src/Model/SignalResponseIpBlocklist.php | 2 - src/Model/SignalResponseIpInfo.php | 2 - src/Model/SignalResponseJailbroken.php | 2 - src/Model/SignalResponseLocationSpoofing.php | 2 - src/Model/SignalResponsePrivacySettings.php | 2 - src/Model/SignalResponseProxy.php | 2 - .../SignalResponseRawDeviceAttributes.php | 2 - src/Model/SignalResponseRootApps.php | 2 - src/Model/SignalResponseSuspectScore.php | 2 - src/Model/SignalResponseTampering.php | 2 - src/Model/SignalResponseTor.php | 2 - src/Model/SignalResponseVirtualMachine.php | 2 - src/Model/SignalResponseVpn.php | 2 - src/Model/Subdivision.php | 2 - src/Model/SuspectScoreResult.php | 2 - src/Model/TamperingResult.php | 2 - src/Model/TorResult.php | 2 - src/Model/VirtualMachineResult.php | 2 - src/Model/Visit.php | 2 - src/Model/VpnResult.php | 2 - src/Model/VpnResultMethods.php | 2 - src/Model/WebhookVisit.php | 2 - src/ObjectSerializer.php | 44 +-- template/ObjectSerializer.mustache | 334 ------------------ template/model_generic.mustache | 8 - 76 files changed, 4 insertions(+), 529 deletions(-) delete mode 100644 template/ObjectSerializer.mustache diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index a11efba4..9bf2c9b9 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -4,4 +4,5 @@ src/.travis.yml src/.php_cs src/git_push.sh src/test/** -src/HeaderSelector.php \ No newline at end of file +src/HeaderSelector.php +src/ObjectSerializer.php \ No newline at end of file diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 36241c78..0cd33a21 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -41,8 +41,6 @@ */ class ASN implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index b6b90ac3..b96fa87f 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -42,8 +42,6 @@ */ class BotdDetectionResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 743e00f0..cb809460 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -42,8 +42,6 @@ */ class BotdResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 773f89d0..e590825b 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -41,8 +41,6 @@ */ class BrowserDetails implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 469112c2..033bc380 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -41,8 +41,6 @@ */ class ClonedAppResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index f9959fb6..4c65b832 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -41,8 +41,6 @@ */ class Confidence implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 43d2f436..7ddf5c6b 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -41,8 +41,6 @@ */ class DataCenter implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index cad21d7b..ed3b35bd 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -42,8 +42,6 @@ */ class DeprecatedIPLocation implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index d437a507..04a743ab 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -41,8 +41,6 @@ */ class DeprecatedIPLocationCity implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index bfcd69be..4b9502c7 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -41,8 +41,6 @@ */ class EmulatorResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 5f652bd2..ef2cce50 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -41,8 +41,6 @@ */ class ErrorEvent403Response implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index a4508276..83135173 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -41,8 +41,6 @@ */ class ErrorEvent403ResponseError implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index fce3aefc..8fb06d82 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -41,8 +41,6 @@ */ class ErrorEvent404Response implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 6b8fed5b..ef933a88 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -41,8 +41,6 @@ */ class ErrorEvent404ResponseError implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 21f996f8..baefef9e 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -41,8 +41,6 @@ */ class ErrorVisits403 implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index bd1bf37e..7d24c596 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -42,8 +42,6 @@ */ class EventResponse implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 90521518..efa0b0ab 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -41,8 +41,6 @@ */ class FactoryResetResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 2a39cb11..7ced36b4 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -41,8 +41,6 @@ */ class FridaResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 900af0d6..91d79bba 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -41,8 +41,6 @@ */ class HighActivityResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 7de0a344..105009fa 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -41,8 +41,6 @@ */ class IPLocation implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index b2cc0806..912f56f7 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -41,8 +41,6 @@ */ class IPLocationCity implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c8e1d222..caba198c 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -41,8 +41,6 @@ */ class IdentificationError implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 777f9166..50abc0a9 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -41,8 +41,6 @@ */ class IncognitoResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index ada18c8e..b6fbcbf4 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -41,8 +41,6 @@ */ class IpBlockListResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 90581a2b..a6fff095 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -41,8 +41,6 @@ */ class IpBlockListResultDetails implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 82340750..de507494 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -42,8 +42,6 @@ */ class IpInfoResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 68105f75..3ca971b3 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -41,8 +41,6 @@ */ class IpInfoResultV4 implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index d8a866d5..121c639f 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -41,8 +41,6 @@ */ class IpInfoResultV6 implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 3b48a66c..3050fddd 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -41,8 +41,6 @@ */ class JailbrokenResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/Location.php b/src/Model/Location.php index f0b69a2f..9c4ef99d 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -41,8 +41,6 @@ */ class Location implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 2ded103f..d7c4cea2 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -41,8 +41,6 @@ */ class LocationSpoofingResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 658834f2..2dc39488 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -41,8 +41,6 @@ */ class ManyRequestsResponse implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 12f2c0cc..74d272bf 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -41,8 +41,6 @@ */ class PrivacySettingsResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 4638a72b..87621846 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -41,8 +41,6 @@ */ class ProductError implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 33f909ab..ee4a8e18 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -42,8 +42,6 @@ */ class ProductsResponse implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 96048d1d..bd392ddf 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -41,8 +41,6 @@ */ class ProductsResponseBotd implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index b3010b1d..51569838 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -41,8 +41,6 @@ */ class ProductsResponseIdentification implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index bfe5d5fd..7af7e0c8 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -41,8 +41,6 @@ */ class ProductsResponseIdentificationData implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index ab3c30bb..2d3db6e6 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -41,8 +41,6 @@ */ class ProxyResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 61e29953..af772cc9 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -42,8 +42,6 @@ */ class RawDeviceAttributesResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/Response.php b/src/Model/Response.php index 83e35b2b..ed92336b 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -42,8 +42,6 @@ */ class Response implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index d9f91edf..919ce4e7 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -41,8 +41,6 @@ */ class ResponseVisits implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 1c3b4c8f..a65885f8 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -41,8 +41,6 @@ */ class RootAppsResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 647f2886..90d4554e 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -41,8 +41,6 @@ */ class SeenAt implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 837a6113..a6425aa2 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -41,8 +41,6 @@ */ class SignalResponseClonedApp implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index eaffdb6e..68375671 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -41,8 +41,6 @@ */ class SignalResponseEmulator implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 47e37cf5..f9b764be 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -41,8 +41,6 @@ */ class SignalResponseFactoryReset implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index f0703edc..50d9e892 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -41,8 +41,6 @@ */ class SignalResponseFrida implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index cc023aac..2b270118 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -41,8 +41,6 @@ */ class SignalResponseHighActivity implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 4969658c..7f720d14 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -41,8 +41,6 @@ */ class SignalResponseIncognito implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 4d1c8e8b..dcd61fe5 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -41,8 +41,6 @@ */ class SignalResponseIpBlocklist implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index f49ce2af..be79e742 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -41,8 +41,6 @@ */ class SignalResponseIpInfo implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 90962b73..c6043bca 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -41,8 +41,6 @@ */ class SignalResponseJailbroken implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index a246fe8e..fb7dc72d 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -41,8 +41,6 @@ */ class SignalResponseLocationSpoofing implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index c970fa1b..4e20282f 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -41,8 +41,6 @@ */ class SignalResponsePrivacySettings implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 0fe7ae72..7e4aa4d9 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -41,8 +41,6 @@ */ class SignalResponseProxy implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 810d7126..9640eaf9 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -41,8 +41,6 @@ */ class SignalResponseRawDeviceAttributes implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index a6adc7f2..ac9dcecc 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -41,8 +41,6 @@ */ class SignalResponseRootApps implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index fdf506a1..46bf8b0c 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -41,8 +41,6 @@ */ class SignalResponseSuspectScore implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index ddcb9ca1..bfdf39a1 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -41,8 +41,6 @@ */ class SignalResponseTampering implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 46e37c69..83603d8e 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -41,8 +41,6 @@ */ class SignalResponseTor implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index f22b0643..493fadac 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -41,8 +41,6 @@ */ class SignalResponseVirtualMachine implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index a772bfb9..391039bb 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -41,8 +41,6 @@ */ class SignalResponseVpn implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 7614e811..a21876d5 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -41,8 +41,6 @@ */ class Subdivision implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 8fb6f2fd..c9b61c2c 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -41,8 +41,6 @@ */ class SuspectScoreResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 87e21653..01a57964 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -41,8 +41,6 @@ */ class TamperingResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index cfccf39f..f67ce32f 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -41,8 +41,6 @@ */ class TorResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 0257e35e..0b36e712 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -41,8 +41,6 @@ */ class VirtualMachineResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 13a6a689..79c743fa 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -41,8 +41,6 @@ */ class Visit implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 597a2cd2..a0647950 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -41,8 +41,6 @@ */ class VpnResult implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index a9361fd9..b57a059f 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -41,8 +41,6 @@ */ class VpnResultMethods implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 845d3760..008c9a2b 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -41,8 +41,6 @@ */ class WebhookVisit implements ModelInterface, ArrayAccess { - public const DISCRIMINATOR = null; - /** * The original name of the model. * diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 310f6243..cd0fd290 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -227,7 +227,6 @@ public static function serializeCollection(array $collection, $collectionFormat, * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used * * @return object|array|null an single or an array of $class instances */ @@ -291,53 +290,14 @@ public static function deserialize($data, $class, $httpHeaders = null) return $data; } throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); - } elseif ($class === '\SplFileObject') { - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } return $data; - } else { - // If a discriminator is defined and points to a valid subclass, use it. - $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = 'Fingerprint\ServerAPI\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } - } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; - - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } - - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); - } - } - return $instance; } + + return $data; } } diff --git a/template/ObjectSerializer.mustache b/template/ObjectSerializer.mustache deleted file mode 100644 index 3aa34e4c..00000000 --- a/template/ObjectSerializer.mustache +++ /dev/null @@ -1,334 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace {{invokerPackage}}; - -/** - * ObjectSerializer Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ObjectSerializer -{ - /** - * Serialize data - * - * @param mixed $data the data to serialize - * @param string $format the format of the Swagger type of the data - * - * @return string|object serialized form of $data - */ - public static function sanitizeForSerialization($data, $format = null) - { - if (is_scalar($data) || null === $data) { - return $data; - } elseif ($data instanceof \DateTime) { - return ($format === 'date') ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM); - } elseif (is_array($data)) { - foreach ($data as $property => $value) { - $data[$property] = self::sanitizeForSerialization($value); - } - return $data; - } elseif ($data instanceof \stdClass) { - foreach ($data as $property => $value) { - $data->$property = self::sanitizeForSerialization($value); - } - return $data; - } elseif (is_object($data)) { - $values = []; - $formats = $data::swaggerFormats(); - foreach ($data::swaggerTypes() as $property => $swaggerType) { - $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null - && !in_array($swaggerType, [{{&primitives}}], true) - && method_exists($swaggerType, 'getAllowableEnumValues') - && !in_array($value, $swaggerType::getAllowableEnumValues())) { - $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); - } - if ($value !== null) { - $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); - } - } - return (object)$values; - } else { - return (string)$data; - } - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param string $filename filename to be sanitized - * - * @return string the sanitized filename - */ - public static function sanitizeFilename($filename) - { - if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { - return $match[1]; - } else { - return $filename; - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the path, by url-encoding. - * - * @param string $value a string which will be part of the path - * - * @return string the serialized object - */ - public static function toPathValue($value) - { - return rawurlencode(self::toString($value)); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. - * - * @param string[]|string|\DateTime $object an object to be serialized to a string - * @param string|null $format the format of the parameter - * - * @return string the serialized object - */ - public static function toQueryValue($object, $format = null) - { - if (is_array($object)) { - return implode(',', $object); - } else { - return self::toString($object, $format); - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339 - * - * @param string $value a string which will be part of the header - * - * @return string the header string - */ - public static function toHeaderValue($value) - { - return self::toString($value); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339 - * - * @param string|\SplFileObject $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue($value) - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } else { - return self::toString($value); - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the parameter. If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339 - * If it's a date, format it in Y-m-d - * - * @param string|\DateTime $value the value of the parameter - * @param string|null $format the format of the parameter - * - * @return string the header string - */ - public static function toString($value, $format = null) - { - if ($value instanceof \DateTime) { - return ($format === 'date') ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); - } else { - return $value; - } - } - - /** - * Serialize an array to a string. - * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * - * @return string - */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) - { - if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { - // http_build_query() almost does the job for us. We just - // need to fix the result of multidimensional arrays. - return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); - } - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); - - case 'tsv': - return implode("\t", $collection); - - case 'ssv': - return implode(' ', $collection); - - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); - } - } - - /** - * Deserialize a JSON string into an object - * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used - * - * @return object|array|null an single or an array of $class instances - */ - public static function deserialize($data, $class, $httpHeaders = null) - { - if (null === $data) { - return null; - } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] - $inner = substr($class, 4, -1); - $deserialized = []; - if (strrpos($inner, ",") !== false) { - $subClass_array = explode(',', $inner, 2); - $subClass = $subClass_array[1]; - foreach ($data as $key => $value) { - $deserialized[$key] = self::deserialize($value, $subClass, null); - } - } - return $deserialized; - } elseif (strcasecmp(substr($class, -2), '[]') === 0) { - $subClass = substr($class, 0, -2); - $values = []; - foreach ($data as $key => $value) { - $values[] = self::deserialize($value, $subClass, null); - } - return $values; - } elseif ($class === 'object' || $class === '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult') { - settype($data, 'array'); - return $data; - } elseif ($class === '\DateTime') { - // Some API's return an invalid, empty string as a - // date-time property. DateTime::__construct() will return - // the current time for empty input which is probably not - // what is meant. The invalid empty string is probably to - // be interpreted as a missing field/value. Let's handle - // this graceful. - if (!empty($data)) { - return new \DateTime($data); - } else { - return null; - } - } elseif (in_array($class, [{{&primitives}}], true)) { - $originalData = $data; - $normalizedClass = strtolower($class); - switch ($normalizedClass) { - case "int": - $normalizedClass = "integer"; - break; - case "bool": - $normalizedClass = "boolean"; - break; - } - if ($normalizedClass === "float" && is_numeric($originalData)) { - return (float)$originalData; - } - if ($normalizedClass === 'string' && is_object($data)) { - throw new \Exception("Cannot convert object to string"); - } - - settype($data, $class); - if (gettype($data) === $normalizedClass) { - return $data; - } - throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); - } elseif ($class === '\SplFileObject') { - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } elseif (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues())) { - $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); - } - return $data; - } else { - // If a discriminator is defined and points to a valid subclass, use it. - $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } - } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; - - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } - - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); - } - } - return $instance; - } - } -} diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 98959904..4604ec01 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -1,7 +1,5 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}} { - const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; - /** * The original name of the model. * @@ -163,12 +161,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa {{#vars}} $this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; {{/vars}} - {{#discriminator}} - - // Initialize discriminator property with the model name. - $discriminator = array_search('{{discriminator}}', self::$attributeMap, true); - $this->container[$discriminator] = static::$swaggerModelName; - {{/discriminator}} } /** From bfea23a50b61152d4fc65d290c730d0e3fcb6123 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 24 Jul 2024 14:25:24 +0300 Subject: [PATCH 029/118] feat: introduce serialization exception BREAKING CHANGE: API Methods now throws `SerializationException` --- src/Api/FingerprintApi.php | 7 +++++-- src/ObjectSerializer.php | 37 +++++++++++++++++++++++++--------- src/SerializationException.php | 22 ++++++++++++++++++++ template/api.mustache | 4 +++- test/FingerprintApiTest.php | 27 ++++++++++++++++++------- 5 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 src/SerializationException.php diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index b2965028..4c11953e 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -35,6 +35,7 @@ use Fingerprint\ServerAPI\ApiException; use Fingerprint\ServerAPI\Configuration; use Fingerprint\ServerAPI\ObjectSerializer; +use Fingerprint\ServerAPI\SerializationException; /** * FingerprintApi Class Doc Comment @@ -81,6 +82,7 @@ public function getConfig() * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException + * @throws SerializationException * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent($request_id) @@ -124,7 +126,7 @@ public function getEvent($request_id) try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $response]; + throw new SerializationException($response); } return [$serialized, $response]; @@ -246,6 +248,7 @@ protected function getEventRequest($request_id) * * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException + * @throws SerializationException * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } */ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) @@ -289,7 +292,7 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $response]; + throw new SerializationException($response); } return [$serialized, $response]; diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index cd0fd290..05e28574 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -28,6 +28,9 @@ namespace Fingerprint\ServerAPI; +use Exception; +use InvalidArgumentException; + /** * ObjectSerializer Class Doc Comment * @@ -73,7 +76,7 @@ public static function sanitizeForSerialization($data, $format = null) && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); + throw new InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); } if ($value !== null) { $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); @@ -224,13 +227,14 @@ public static function serializeCollection(array $collection, $collectionFormat, /** * Deserialize a JSON string into an object * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers * - * @return object|array|null an single or an array of $class instances + * @return mixed + * @throws Exception */ - public static function deserialize($data, $class, $httpHeaders = null) + public static function deserialize($data, $class, $httpHeaders = null): mixed { if (null === $data) { return null; @@ -282,22 +286,35 @@ public static function deserialize($data, $class, $httpHeaders = null) return (float)$originalData; } if ($normalizedClass === 'string' && is_object($data)) { - throw new \Exception("Cannot convert object to string"); + throw new Exception("Cannot convert object to string"); } settype($data, $class); if (gettype($data) === $normalizedClass) { return $data; } - throw new \Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); + throw new Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + throw new InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } return $data; } - return $data; + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; } } diff --git a/src/SerializationException.php b/src/SerializationException.php new file mode 100644 index 00000000..2bbffc25 --- /dev/null +++ b/src/SerializationException.php @@ -0,0 +1,22 @@ +response = $response; + } + + public function getResponse(): ResponseInterface + { + return $this->response; + } +} diff --git a/template/api.mustache b/template/api.mustache index 27f39bc7..80456da1 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -26,6 +26,7 @@ use GuzzleHttp\RequestOptions; use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; use {{invokerPackage}}\ObjectSerializer; +use {{invokerPackage}}\SerializationException; /** * {{classname}} Class Doc Comment @@ -82,6 +83,7 @@ use {{invokerPackage}}\ObjectSerializer; * * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException + * @throws SerializationException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) @@ -126,7 +128,7 @@ use {{invokerPackage}}\ObjectSerializer; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - return [null, $response]; + throw new SerializationException($response); } return [$serialized, $response]; diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index c6c72375..64152ec6 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -2,6 +2,7 @@ namespace Fingerprint\ServerAPI; +use Exception; use Fingerprint\ServerAPI\Api\FingerprintApi; use Fingerprint\ServerAPI\Model\EventResponse; use Fingerprint\ServerAPI\Model\IdentificationError; @@ -51,7 +52,12 @@ public function setUp(): void $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); } - public function getEventWithHttpInfoMock($request_id) + + /** + * @throws \ReflectionException + * @throws SerializationException + */ + public function getEventWithHttpInfoMock($request_id): array { $event_request_method = $this->getMethod('getEventRequest'); /** @var \GuzzleHttp\Psr7\Request $event_request */ @@ -83,14 +89,17 @@ public function getEventWithHttpInfoMock($request_id) try { $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); - } catch (\Exception $exception) { - return [null, $response]; + } catch (Exception $exception) { + throw new SerializationException($response); } return [$serialized, $response]; } - public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) + /** + * @throws SerializationException + */ + public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null): array { $file = file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json'); $visits_mock_data = \GuzzleHttp\json_decode($file); @@ -107,8 +116,8 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link $response = new \GuzzleHttp\Psr7\Response(200, [], $file); try { $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); - } catch (\Exception $exception) { - return [null, $response]; + } catch (Exception $exception) { + throw new SerializationException($response); } return [$serialized, $response]; @@ -261,7 +270,11 @@ public function testGetUnknownFieldFromEvent() public function testGetBrokenFormatEvent() { - list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); + try { + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); + } catch (SerializationException $exception) { + $response = $exception->getResponse(); + } $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); $this->assertNull($event); From 6e0d193008ebce3c073d6ef601f77435d541c196 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 25 Jul 2024 11:58:42 +0300 Subject: [PATCH 030/118] refactor: add previous exception for serialization exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Przemysław Żydek --- src/SerializationException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SerializationException.php b/src/SerializationException.php index 2bbffc25..ccbb578b 100644 --- a/src/SerializationException.php +++ b/src/SerializationException.php @@ -9,9 +9,9 @@ final class SerializationException extends Exception { protected readonly ResponseInterface $response; - public function __construct(ResponseInterface $response) +public function __construct(ResponseInterface $response, Exception $prev) { - parent::__construct("Response from the server couldn't be serialized"); + parent::__construct("Response from the server couldn't be serialized", $prev->getCode(), $prev); $this->response = $response; } From 7e154d9731ff89a970e11ba241350ef4ac8f84b3 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 25 Jul 2024 12:01:42 +0300 Subject: [PATCH 031/118] refactor: change error handling --- src/Api/FingerprintApi.php | 6 ++++-- src/SerializationException.php | 2 +- template/api.mustache | 3 ++- test/FingerprintApiTest.php | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 4c11953e..3cfc58ed 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -83,6 +83,7 @@ public function getConfig() * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent($request_id) @@ -126,7 +127,7 @@ public function getEvent($request_id) try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - throw new SerializationException($response); + throw new SerializationException($response, $e); } return [$serialized, $response]; @@ -249,6 +250,7 @@ protected function getEventRequest($request_id) * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } */ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) @@ -292,7 +294,7 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - throw new SerializationException($response); + throw new SerializationException($response, $e); } return [$serialized, $response]; diff --git a/src/SerializationException.php b/src/SerializationException.php index ccbb578b..0214a464 100644 --- a/src/SerializationException.php +++ b/src/SerializationException.php @@ -9,7 +9,7 @@ final class SerializationException extends Exception { protected readonly ResponseInterface $response; -public function __construct(ResponseInterface $response, Exception $prev) + public function __construct(ResponseInterface $response, Exception $prev) { parent::__construct("Response from the server couldn't be serialized", $prev->getCode(), $prev); $this->response = $response; diff --git a/template/api.mustache b/template/api.mustache index 80456da1..da7fee4e 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -84,6 +84,7 @@ use {{invokerPackage}}\SerializationException; * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) @@ -128,7 +129,7 @@ use {{invokerPackage}}\SerializationException; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); } catch (\Exception $e) { - throw new SerializationException($response); + throw new SerializationException($response, $e); } return [$serialized, $response]; diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 64152ec6..3ee91f78 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -90,7 +90,7 @@ public function getEventWithHttpInfoMock($request_id): array try { $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); } catch (Exception $exception) { - throw new SerializationException($response); + throw new SerializationException($response, $exception); } return [$serialized, $response]; @@ -117,7 +117,7 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link try { $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); } catch (Exception $exception) { - throw new SerializationException($response); + throw new SerializationException($response, $exception); } return [$serialized, $response]; From abb338bd9f1453cd36dd3f13e5a0fba2e9ea67fb Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 26 Jul 2024 12:56:08 +0300 Subject: [PATCH 032/118] refactor: code style and error handling --- .git_hooks/pre-commit | 2 +- .php-cs-fixer.php | 23 + composer.json | 9 +- composer.lock | 3292 +++++------------ docker-compose.yml | 10 +- run_checks.php | 2 - scripts/generate.sh | 4 +- src/Api/FingerprintApi.php | 424 ++- src/ApiException.php | 76 +- src/Configuration.php | 149 +- src/Model/ASN.php | 230 +- src/Model/BotdDetectionResult.php | 224 +- src/Model/BotdResult.php | 311 +- src/Model/BrowserDetails.php | 320 +- src/Model/ClonedAppResult.php | 200 +- src/Model/Confidence.php | 202 +- src/Model/DataCenter.php | 212 +- src/Model/DeprecatedIPLocation.php | 348 +- src/Model/DeprecatedIPLocationCity.php | 201 +- src/Model/EmulatorResult.php | 200 +- src/Model/ErrorEvent403Response.php | 205 +- src/Model/ErrorEvent403ResponseError.php | 230 +- src/Model/ErrorEvent404Response.php | 205 +- src/Model/ErrorEvent404ResponseError.php | 218 +- src/Model/ErrorVisits403.php | 202 +- src/Model/EventResponse.php | 221 +- src/Model/FactoryResetResult.php | 216 +- src/Model/FridaResult.php | 200 +- src/Model/HighActivityResult.php | 216 +- src/Model/IPLocation.php | 347 +- src/Model/IPLocationCity.php | 201 +- src/Model/IdentificationError.php | 222 +- src/Model/IncognitoResult.php | 202 +- src/Model/IpBlockListResult.php | 220 +- src/Model/IpBlockListResultDetails.php | 218 +- src/Model/IpInfoResult.php | 222 +- src/Model/IpInfoResultV4.php | 258 +- src/Model/IpInfoResultV6.php | 258 +- src/Model/JailbrokenResult.php | 200 +- src/Model/Location.php | 214 +- src/Model/LocationSpoofingResult.php | 202 +- src/Model/ManyRequestsResponse.php | 202 +- src/Model/ModelInterface.php | 22 +- src/Model/PrivacySettingsResult.php | 200 +- src/Model/ProductError.php | 222 +- src/Model/ProductsResponse.php | 614 ++- src/Model/ProductsResponseBotd.php | 221 +- src/Model/ProductsResponseIdentification.php | 221 +- .../ProductsResponseIdentificationData.php | 492 ++- src/Model/ProxyResult.php | 202 +- src/Model/RawDeviceAttributesResult.php | 194 +- src/Model/Response.php | 247 +- src/Model/ResponseVisits.php | 472 ++- src/Model/RootAppsResult.php | 200 +- src/Model/SeenAt.php | 214 +- src/Model/SignalResponseClonedApp.php | 221 +- src/Model/SignalResponseEmulator.php | 221 +- src/Model/SignalResponseFactoryReset.php | 221 +- src/Model/SignalResponseFrida.php | 221 +- src/Model/SignalResponseHighActivity.php | 221 +- src/Model/SignalResponseIncognito.php | 221 +- src/Model/SignalResponseIpBlocklist.php | 221 +- src/Model/SignalResponseIpInfo.php | 221 +- src/Model/SignalResponseJailbroken.php | 221 +- src/Model/SignalResponseLocationSpoofing.php | 221 +- src/Model/SignalResponsePrivacySettings.php | 221 +- src/Model/SignalResponseProxy.php | 221 +- .../SignalResponseRawDeviceAttributes.php | 221 +- src/Model/SignalResponseRootApps.php | 221 +- src/Model/SignalResponseSuspectScore.php | 221 +- src/Model/SignalResponseTampering.php | 221 +- src/Model/SignalResponseTor.php | 221 +- src/Model/SignalResponseVirtualMachine.php | 221 +- src/Model/SignalResponseVpn.php | 221 +- src/Model/Subdivision.php | 213 +- src/Model/SuspectScoreResult.php | 200 +- src/Model/TamperingResult.php | 216 +- src/Model/TorResult.php | 202 +- src/Model/VirtualMachineResult.php | 200 +- src/Model/Visit.php | 472 ++- src/Model/VpnResult.php | 256 +- src/Model/VpnResultMethods.php | 236 +- src/Model/WebhookVisit.php | 882 +++-- src/ObjectSerializer.php | 161 +- src/Sealed/DecompressionException.php | 6 +- src/Sealed/InvalidSealedDataException.php | 6 +- .../InvalidSealedDataHeaderException.php | 6 +- src/Sealed/Sealed.php | 36 +- src/Sealed/UnsealAggregateException.php | 11 +- src/Sealed/UnsealException.php | 12 +- src/SerializationException.php | 5 +- template/ApiException.mustache | 75 + template/api.mustache | 58 +- template/composer.mustache | 4 +- 94 files changed, 10378 insertions(+), 11917 deletions(-) create mode 100644 .php-cs-fixer.php create mode 100644 template/ApiException.mustache diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit index 6a5f1dae..0d1e2b3f 100755 --- a/.git_hooks/pre-commit +++ b/.git_hooks/pre-commit @@ -1,3 +1,3 @@ #!/bin/sh -docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src \ No newline at end of file +docker-compose run --rm lint \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..d91c14a8 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,23 @@ +setRules([ + '@PSR1' => true, + '@PSR2' => true, + '@PSR12' => true, + '@PhpCsFixer' => true, + 'array_indentation' => true, + 'trailing_comma_in_multiline' => ['elements' => ['arrays']], + 'no_whitespace_before_comma_in_array' => true, + 'whitespace_after_comma_in_array' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => [ + 'default' => 'single_space', + 'operators' => ['=>' => null], + ], + 'multiline_whitespace_before_semicolons' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__) + ); \ No newline at end of file diff --git a/composer.json b/composer.json index b3a04720..e8db066d 100644 --- a/composer.json +++ b/composer.json @@ -36,12 +36,11 @@ "ext-mbstring": "*", "guzzlehttp/guzzle": "~7.2", "ext-zlib": "*", - "ext-openssl": "*" + "ext-openssl": "*", + "vlucas/phpdotenv": "^5.6" }, "require-dev": { - "phpunit/phpunit": "8.5.33", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.19" + "phpunit/phpunit": "8.5.33" }, "autoload": { "psr-4": { "Fingerprint\\ServerAPI\\" : "./src" } @@ -49,4 +48,4 @@ "autoload-dev": { "psr-4": { "Fingerprint\\ServerAPI\\" : "test/" } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index c2fd2464..2b131405 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "683b80cf00c63b24702815cf520d56ec", + "content-hash": "d252675910c39b945743e945daf6ff88", "packages": [ { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -54,7 +54,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -66,26 +66,26 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.5.0", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -94,10 +94,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -110,9 +111,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -176,38 +174,55 @@ "rest", "web service" ], - "time": "2022-08-28T15:39:27+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -242,20 +257,38 @@ "keywords": [ "promise" ], - "time": "2022-08-28T14:55:35+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -269,9 +302,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -342,7 +375,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -358,20 +391,20 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -379,13 +412,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -421,7 +454,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -433,25 +466,25 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -471,7 +504,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -482,24 +515,27 @@ "psr", "psr-18" ], - "time": "2020-06-29T06:28:15+00:00" + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -523,7 +559,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -535,22 +571,22 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -559,7 +595,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -574,7 +610,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -588,9 +624,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "ralouphie/getallheaders", @@ -638,25 +674,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -684,20 +720,37 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2022-01-02T09:53:40+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -711,9 +764,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -749,20 +799,37 @@ "polyfill", "portable" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -776,9 +843,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -815,20 +879,37 @@ "portable", "shim" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -836,9 +917,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -881,35 +959,52 @@ "portable", "shim" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -918,10 +1013,10 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -953,7 +1048,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -965,41 +1060,41 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2024-07-20T21:52:34+00:00" } ], "packages-dev": [ { - "name": "composer/pcre", - "version": "1.0.1", + "name": "doctrine/instantiator", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Pcre\\": "src" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1008,572 +1103,180 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" + "constructor", + "instantiate" ], - "time": "2022-01-21T20:24:37+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" }, { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "composer/xdebug-handler", - "version": "2.0.5", + "name": "myclabs/deep-copy", + "version": "1.12.0", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1 || ^2 || ^3" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { - "Composer\\XdebugHandler\\": "src" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "time": "2022-02-24T20:20:32+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { - "name": "doctrine/annotations", - "version": "1.14.3", + "name": "phar-io/manifest", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" }, { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } ], - "time": "2023-02-01T09:20:38+00:00" + "time": "2024-03-03T12:33:53+00:00" }, { - "name": "doctrine/deprecations", - "version": "v1.0.0", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "time": "2022-05-02T15:47:09+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2022-12-30T00:15:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "time": "2022-12-14T08:49:07+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "time": "2021-11-15T17:17:55+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1603,72 +1306,24 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, "time": "2022-02-21T01:04:05+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "name": "phpunit/php-code-coverage", + "version": "7.0.17", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "abandoned": true, - "time": "2020-10-14T08:39:05+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "7.0.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "819f92bba8b001d4363065928088de22f25a3a48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", - "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", + "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", "shasum": "" }, "require": { @@ -1677,1051 +1332,22 @@ "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.3 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2021-07-26T12:20:09+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2021-12-02T12:42:26+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2020-11-30T08:20:02+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "8.5.33", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.5", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.5", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2023-02-27T13:04:50+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2020-11-30T08:15:22+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2022-09-14T12:31:48+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2020-11-30T07:59:04+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2020-11-30T07:53:42+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", - "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2022-09-14T06:00:17+00:00" - }, - { - "name": "sebastian/global-state", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2022-02-10T06:55:38+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2020-11-30T07:40:27+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2020-11-30T07:37:18+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2020-11-30T07:34:24+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-11-30T07:30:19+00:00" - }, - { - "name": "sebastian/type", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "shasum": "" - }, - "require": { - "php": ">=7.2" + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -2740,26 +1366,44 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-11-30T07:25:11+00:00" + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:09:37+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "phpunit/php-file-iterator", + "version": "2.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "69deeb8664f611f156a924154985fbd4911eb36b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b", + "reference": "69deeb8664f611f156a924154985fbd4911eb36b", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2783,68 +1427,45 @@ "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-01T13:39:50+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "name": "phpunit/php-text-template", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "php": ">=5.3.3" }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2853,915 +1474,978 @@ ], "authors": [ { - "name": "Greg Sherwood", + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "phpcs", - "standards" + "template" ], - "time": "2018-11-07T22:31:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" }, { - "name": "symfony/console", - "version": "v5.4.21", + "name": "phpunit/php-timer", + "version": "2.1.4", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c77433ddc6cdc689caf48065d9ea22ca0853fbd9", - "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb", + "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" + "php": ">=7.1" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "phpunit/phpunit": "^8.5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "cli", - "command line", - "console", - "terminal" + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2023-02-25T16:59:41+00:00" + "time": "2024-03-01T13:42:41+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v5.4.21", + "name": "phpunit/php-token-stream", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a" + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f0ae1383a8285dfc6752b8d8602790953118ff5a", - "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0" }, "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "phpunit/phpunit": "^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" }, { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "name": "phpunit/phpunit", + "version": "8.5.33", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" }, "suggest": { - "symfony/event-dispatcher-implementation": "" + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "8.5-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-02-27T13:04:50+00:00" }, { - "name": "symfony/filesystem", - "version": "v5.4.21", + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", + "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-01T13:45:45+00:00" }, { - "name": "symfony/finder", - "version": "v5.4.21", + "name": "sebastian/comparator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "time": "2023-02-16T09:33:00+00:00" + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:31:48+00:00" }, { - "name": "symfony/options-resolver", - "version": "v5.4.21", + "name": "sebastian/diff", + "version": "3.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6", + "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "config", - "configuration", - "options" + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-02T06:16:36+00:00" }, { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "name": "sebastian/environment", + "version": "4.2.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "56932f6049a0482853056ffd617c91ffcc754205" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205", + "reference": "56932f6049a0482853056ffd617c91ffcc754205", "shasum": "" }, "require": { "php": ">=7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, "suggest": { - "ext-intl": "For best performance" + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.2-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:49:59+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "name": "sebastian/exporter", + "version": "3.1.6", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56", + "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2", + "sebastian/recursion-context": "^3.0" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.1.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" + "export", + "exporter" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:21:38+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "sebastian/global-state", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9", + "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" }, - "type": "metapackage", + "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2024-03-02T06:13:16+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "name": "sebastian/object-enumerator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "ac5b293dba925751b808e02923399fb44ff0d541" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541", + "reference": "ac5b293dba925751b808e02923399fb44ff0d541", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:54:02+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "name": "sebastian/object-reflector", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "1d439c229e61f244ff1f211e5c99737f90c67def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def", + "reference": "1d439c229e61f244ff1f211e5c99737f90c67def", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.1-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:56:04+00:00" }, { - "name": "symfony/process", - "version": "v5.4.21", + "name": "sebastian/recursion-context", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", - "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c", + "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "time": "2023-02-21T19:46:44+00:00" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-01T14:07:30+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.5.2", + "name": "sebastian/resource-operations", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee", + "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2024-03-01T13:59:09+00:00" }, { - "name": "symfony/stopwatch", - "version": "v5.4.21", + "name": "sebastian/type", + "version": "1.1.5", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874", + "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.5" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides a way to profile code", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-01T14:04:07+00:00" }, { - "name": "symfony/string", - "version": "v5.4.21", + "name": "sebastian/version", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/edac10d167b78b1d90f46a80320d632de0bd9f2f", - "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "php": ">=5.6" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "time": "2023-02-22T08:00:55+00:00" + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -3788,7 +2472,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2021-07-28T10:34:58+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -3797,11 +2491,13 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-zlib": "*", + "ext-openssl": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docker-compose.yml b/docker-compose.yml index bef1d6f3..d94eb86e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: composer: - image: composer:1.9.3 + image: composer:2.7 environment: - COMPOSER_CACHE_DIR=/app/.cache/composer volumes: @@ -20,4 +20,10 @@ services: working_dir: /app entrypoint: vendor/bin/phpunit env_file: - - .env \ No newline at end of file + - .env + lint: + image: ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} + volumes: + - .:/code + - ./.php-cs-fixer.php:/code/.php-cs-fixer.php + command: fix --config=/code/.php-cs-fixer.php /code/src \ No newline at end of file diff --git a/run_checks.php b/run_checks.php index f6f1abde..4f5831f2 100644 --- a/run_checks.php +++ b/run_checks.php @@ -1,7 +1,5 @@ client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -72,19 +72,19 @@ public function getConfig() return $this->config; } - /** - * Operation getEvent + * Operation getEvent. * * Get event by requestId * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response + * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } + * + * @throws ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException - * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent($request_id) { @@ -93,32 +93,33 @@ public function getEvent($request_id) try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - $errorBody = $e->getResponse()->getBody()->getContents(); - $e->getResponse()->getBody()->rewind(); - throw new ApiException( + $apiException = new ApiException( "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $errorBody : null + $e->getCode() ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( + $apiException = new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), - $statusCode, - $response->getHeaders(), - $response->getBody() + $statusCode ); + $apiException->setResponseObject($response); + + throw $apiException; } $responseBody = $response->getBody()->getContents(); @@ -131,53 +132,188 @@ public function getEvent($request_id) } return [$serialized, $response]; + } catch (ApiException $e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\EventResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 404: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { + } + } + } + + /** + * Operation getVisits. + * + * Get visits by visitorId + * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * + * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } + * + * @throws ApiException on non-2xx response + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + */ + public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + { + $returnType = '\Fingerprint\ServerAPI\Model\Response'; + $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + + try { + $options = $this->createHttpClientOption(); + + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + $apiException = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode() + ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + return [$serialized, $response]; } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\EventResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorVisits403', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 429: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { } - throw $e; } } /** - * Create request for operation 'getEvent' + * Create request for operation 'getEvent'. * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * + * @return Request * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request */ protected function getEventRequest($request_id) { // verify the required parameter 'request_id' is set - if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { + if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { throw new \InvalidArgumentException( 'Missing the required parameter $request_id when calling getEvent' ); @@ -189,25 +325,23 @@ protected function getEventRequest($request_id) $headerParams = []; $httpBody = ''; - // path params - if ($request_id !== null) { + if (null !== $request_id) { $resourcePath = str_replace( - '{' . 'request_id' . '}', + '{request_id}', ObjectSerializer::toPathValue($request_id), $resourcePath ); } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $queryParams['api_key'] = $apiKey; } @@ -226,130 +360,33 @@ protected function getEventRequest($request_id) ); $query = http_build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); } - /** - * Operation getVisits - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * Create request for operation 'getVisits'. * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } - */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - $errorBody = $e->getResponse()->getBody()->getContents(); - $e->getResponse()->getBody()->rewind(); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $errorBody : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); - } - - return [$serialized, $response]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 429: - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Create request for operation 'getVisits' + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * @return Request * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request */ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { // verify the required parameter 'visitor_id' is set - if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { + if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { throw new \InvalidArgumentException( 'Missing the required parameter $visitor_id when calling getVisits' ); @@ -362,44 +399,43 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id $httpBody = ''; // query params - if ($request_id !== null) { + if (null !== $request_id) { $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); } // query params - if ($linked_id !== null) { + if (null !== $linked_id) { $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); } // query params - if ($limit !== null) { + if (null !== $limit) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); } // query params - if ($pagination_key !== null) { + if (null !== $pagination_key) { $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); } // query params - if ($before !== null) { + if (null !== $before) { $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); } // path params - if ($visitor_id !== null) { + if (null !== $visitor_id) { $resourcePath = str_replace( - '{' . 'visitor_id' . '}', + '{visitor_id}', ObjectSerializer::toPathValue($visitor_id), $resourcePath ); } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $queryParams['api_key'] = $apiKey; } @@ -418,19 +454,21 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id ); $query = http_build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); } /** - * Create http client option + * Create http client option. * - * @throws \RuntimeException on file opening failure * @return array of http client options + * + * @throws \RuntimeException on file opening failure */ protected function createHttpClientOption() { @@ -438,7 +476,7 @@ protected function createHttpClientOption() if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); } } diff --git a/src/ApiException.php b/src/ApiException.php index e9eaae55..846ec390 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -1,16 +1,17 @@ responseHeaders = $responseHeaders; - $this->responseBody = $responseBody; } /** - * Gets the HTTP response header - * - * @return string[]|null HTTP response header - */ - public function getResponseHeaders() - { - return $this->responseHeaders; - } - - /** - * Gets the HTTP body of the server response either as Json or string - * - * @return mixed HTTP body of the server response either as \stdClass or string - */ - public function getResponseBody() - { - return $this->responseBody; - } - - /** - * Sets the deseralized response object (during deserialization) + * Sets the deseralized response object (during deserialization). * * @param mixed $obj Deserialized response object - * - * @return void */ public function setResponseObject($obj) { @@ -108,7 +66,7 @@ public function setResponseObject($obj) } /** - * Gets the deseralized response object (during deserialization) + * Gets the deseralized response object (during deserialization). * * @return mixed the deserialized response object */ diff --git a/src/Configuration.php b/src/Configuration.php index 931a0514..c605ebd1 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -1,16 +1,17 @@ apiKeys[$apiKeyIdentifier] = $key; + return $this; } /** - * Gets API key + * Gets API key. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @@ -148,21 +151,22 @@ public function getApiKey($apiKeyIdentifier) } /** - * Sets the prefix for API key (e.g. Bearer) + * Sets the prefix for API key (e.g. Bearer). * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } /** - * Gets API key prefix + * Gets API key prefix. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @@ -174,7 +178,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) } /** - * Sets the access token for OAuth + * Sets the access token for OAuth. * * @param string $accessToken Token for OAuth * @@ -183,11 +187,12 @@ public function getApiKeyPrefix($apiKeyIdentifier) public function setAccessToken($accessToken) { $this->accessToken = $accessToken; + return $this; } /** - * Gets the access token for OAuth + * Gets the access token for OAuth. * * @return string Access token for OAuth */ @@ -197,7 +202,7 @@ public function getAccessToken() } /** - * Sets the username for HTTP basic authentication + * Sets the username for HTTP basic authentication. * * @param string $username Username for HTTP basic authentication * @@ -206,11 +211,12 @@ public function getAccessToken() public function setUsername($username) { $this->username = $username; + return $this; } /** - * Gets the username for HTTP basic authentication + * Gets the username for HTTP basic authentication. * * @return string Username for HTTP basic authentication */ @@ -220,7 +226,7 @@ public function getUsername() } /** - * Sets the password for HTTP basic authentication + * Sets the password for HTTP basic authentication. * * @param string $password Password for HTTP basic authentication * @@ -229,11 +235,12 @@ public function getUsername() public function setPassword($password) { $this->password = $password; + return $this; } /** - * Gets the password for HTTP basic authentication + * Gets the password for HTTP basic authentication. * * @return string Password for HTTP basic authentication */ @@ -243,7 +250,7 @@ public function getPassword() } /** - * Sets the host + * Sets the host. * * @param string $host Host * @@ -252,11 +259,12 @@ public function getPassword() public function setHost($host) { $this->host = $host; + return $this; } /** - * Gets the host + * Gets the host. * * @return string Host */ @@ -266,26 +274,30 @@ public function getHost() } /** - * @param $region * @return $this */ public function setRegion($region = self::REGION_GLOBAL) { switch (trim(strtolower($region))) { case self::REGION_ASIA: - case "as": - case "asia": + case 'as': + case 'asia': $this->setHost(self::REGION_ASIA); + break; + case self::REGION_EUROPE: - case "eu": - case "europe": + case 'eu': + case 'europe': $this->setHost(self::REGION_EUROPE); + break; + default: case self::REGION_GLOBAL: - case "global": + case 'global': $this->setHost(self::REGION_GLOBAL); + break; } @@ -293,11 +305,12 @@ public function setRegion($region = self::REGION_GLOBAL) } /** - * Sets the user agent of the api client + * Sets the user agent of the api client. * * @param string $userAgent the user agent of the api client * * @return $this + * * @throws \InvalidArgumentException */ public function setUserAgent($userAgent) @@ -307,11 +320,12 @@ public function setUserAgent($userAgent) } $this->userAgent = $userAgent; + return $this; } /** - * Gets the user agent of the api client + * Gets the user agent of the api client. * * @return string user agent */ @@ -321,7 +335,7 @@ public function getUserAgent() } /** - * Sets debug flag + * Sets debug flag. * * @param bool $debug Debug flag * @@ -330,11 +344,12 @@ public function getUserAgent() public function setDebug($debug) { $this->debug = $debug; + return $this; } /** - * Gets the debug flag + * Gets the debug flag. * * @return bool */ @@ -344,7 +359,7 @@ public function getDebug() } /** - * Sets the debug file + * Sets the debug file. * * @param string $debugFile Debug file * @@ -353,11 +368,12 @@ public function getDebug() public function setDebugFile($debugFile) { $this->debugFile = $debugFile; + return $this; } /** - * Gets the debug file + * Gets the debug file. * * @return string */ @@ -367,7 +383,7 @@ public function getDebugFile() } /** - * Sets the temp folder path + * Sets the temp folder path. * * @param string $tempFolderPath Temp folder path * @@ -376,11 +392,12 @@ public function getDebugFile() public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; + return $this; } /** - * Gets the temp folder path + * Gets the temp folder path. * * @return string Temp folder path */ @@ -390,15 +407,13 @@ public function getTempFolderPath() } /** - * Gets the default configuration instance, with apiKey and host params + * Gets the default configuration instance, with apiKey and host params. * - * @param $api_key - * @param $region * @return Configuration */ public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) { - if (self::$defaultConfiguration === null) { + if (null === self::$defaultConfiguration) { self::$defaultConfiguration = new Configuration(); } @@ -409,11 +424,9 @@ public static function getDefaultConfiguration($api_key = null, $region = self:: } /** - * Sets the detault configuration instance + * Sets the detault configuration instance. * * @param Configuration $config An instance of the Configuration Object - * - * @return void */ public static function setDefaultConfiguration(Configuration $config) { @@ -421,24 +434,24 @@ public static function setDefaultConfiguration(Configuration $config) } /** - * Gets the essential information for debugging + * Gets the essential information for debugging. * * @return string The report for debugging */ public static function toDebugReport() { - $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 3' . PHP_EOL; - $report .= ' SDK Package Version: 4.1.0' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; + $report .= ' OS: '.php_uname().PHP_EOL; + $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; + $report .= ' OpenAPI Spec Version: 3'.PHP_EOL; + $report .= ' SDK Package Version: 4.1.0'.PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } /** - * Get API key (with prefix if set) + * Get API key (with prefix if set). * * @param string $apiKeyIdentifier name of apikey * @@ -449,14 +462,14 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); - if ($apiKey === null) { + if (null === $apiKey) { return null; } - if ($prefix === null) { + if (null === $prefix) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; + $keyWithPrefix = $prefix.' '.$apiKey; } return $keyWithPrefix; diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 0cd33a21..e27ebd1a 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -1,17 +1,18 @@ 'string', -'network' => 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'asn' => null, -'network' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'asn' => 'string', + 'network' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'asn' => null, + 'network' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'asn' => 'asn', -'network' => 'network', -'name' => 'name' ]; + 'network' => 'network', + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'asn' => 'setAsn', -'network' => 'setNetwork', -'name' => 'setName' ]; + 'network' => 'setNetwork', + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'asn' => 'getAsn', -'network' => 'getNetwork', -'name' => 'getName' ]; + 'network' => 'getNetwork', + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['network'] = isset($data['network']) ? $data['network'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -131,7 +169,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -141,7 +179,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -160,28 +198,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['network'] = isset($data['network']) ? $data['network'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -191,29 +207,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['asn'] === null) { + if (null === $this->container['asn']) { $invalidProperties[] = "'asn' can't be null"; } - if ($this->container['network'] === null) { + if (null === $this->container['network']) { $invalidProperties[] = "'network' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets asn + * Gets asn. * * @return string */ @@ -223,7 +239,7 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * * @param string $asn asn * @@ -237,7 +253,7 @@ public function setAsn($asn) } /** - * Gets network + * Gets network. * * @return string */ @@ -247,7 +263,7 @@ public function getNetwork() } /** - * Sets network + * Sets network. * * @param string $network network * @@ -261,7 +277,7 @@ public function setNetwork($network) } /** - * Gets name + * Gets name. * * @return string */ @@ -271,7 +287,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -283,12 +299,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -299,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -312,10 +329,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -330,30 +345,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index b96fa87f..db3b2e28 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -1,17 +1,18 @@ 'string', -'type' => 'string' ]; + public const RESULT_NOT_DETECTED = 'notDetected'; + public const RESULT_GOOD = 'good'; + public const RESULT_BAD = 'bad'; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'type' => null ]; + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'BotdDetectionResult'; /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'string', + 'type' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'type' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'type' => 'type' ]; + 'type' => 'type']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'type' => 'setType' ]; + 'type' => 'setType']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'type' => 'getType' ]; + 'type' => 'getType']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -127,7 +169,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -137,7 +179,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -156,12 +198,8 @@ public function getModelName() return self::$swaggerModelName; } - public const RESULT_NOT_DETECTED = 'notDetected'; - public const RESULT_GOOD = 'good'; - public const RESULT_BAD = 'bad'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -169,27 +207,8 @@ public function getResultAllowableValues() { return [ self::RESULT_NOT_DETECTED, -self::RESULT_GOOD, -self::RESULT_BAD, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; + self::RESULT_GOOD, + self::RESULT_BAD, ]; } /** @@ -201,7 +220,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } $allowedValues = $this->getResultAllowableValues(); @@ -217,18 +236,17 @@ public function listInvalidProperties() /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return string */ @@ -238,7 +256,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param string $result Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on * @@ -261,7 +279,7 @@ public function setResult($result) } /** - * Gets type + * Gets type. * * @return string */ @@ -271,7 +289,7 @@ public function getType() } /** - * Sets type + * Sets type. * * @param string $type type * @@ -283,12 +301,13 @@ public function setType($type) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -299,7 +318,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -312,10 +331,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -330,30 +347,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index cb809460..526e9bc0 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -1,17 +1,18 @@ 'string', -'time' => '\DateTime', -'url' => 'string', -'user_agent' => 'string', -'request_id' => 'string', -'linked_id' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'ip' => 'ipv4', -'time' => 'date-time', -'url' => null, -'user_agent' => null, -'request_id' => null, -'linked_id' => null, -'bot' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'ip' => 'string', + 'time' => '\DateTime', + 'url' => 'string', + 'user_agent' => 'string', + 'request_id' => 'string', + 'linked_id' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'ip' => 'ipv4', + 'time' => 'date-time', + 'url' => null, + 'user_agent' => null, + 'request_id' => null, + 'linked_id' => null, + 'bot' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'ip' => 'ip', -'time' => 'time', -'url' => 'url', -'user_agent' => 'userAgent', -'request_id' => 'requestId', -'linked_id' => 'linkedId', -'bot' => 'bot' ]; + 'time' => 'time', + 'url' => 'url', + 'user_agent' => 'userAgent', + 'request_id' => 'requestId', + 'linked_id' => 'linkedId', + 'bot' => 'bot']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'ip' => 'setIp', -'time' => 'setTime', -'url' => 'setUrl', -'user_agent' => 'setUserAgent', -'request_id' => 'setRequestId', -'linked_id' => 'setLinkedId', -'bot' => 'setBot' ]; + 'time' => 'setTime', + 'url' => 'setUrl', + 'user_agent' => 'setUserAgent', + 'request_id' => 'setRequestId', + 'linked_id' => 'setLinkedId', + 'bot' => 'setBot']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'ip' => 'getIp', -'time' => 'getTime', -'url' => 'getUrl', -'user_agent' => 'getUserAgent', -'request_id' => 'getRequestId', -'linked_id' => 'getLinkedId', -'bot' => 'getBot' ]; + 'time' => 'getTime', + 'url' => 'getUrl', + 'user_agent' => 'getUserAgent', + 'request_id' => 'getRequestId', + 'linked_id' => 'getLinkedId', + 'bot' => 'getBot']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -152,7 +195,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -162,7 +205,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -181,32 +224,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -216,41 +233,41 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['bot'] === null) { + if (null === $this->container['bot']) { $invalidProperties[] = "'bot' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets ip + * Gets ip. * * @return string */ @@ -260,9 +277,9 @@ public function getIp() } /** - * Sets ip + * Sets ip. * - * @param string $ip IP address of the requesting browser or bot. + * @param string $ip IP address of the requesting browser or bot * * @return $this */ @@ -274,7 +291,7 @@ public function setIp($ip) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -284,7 +301,7 @@ public function getTime() } /** - * Sets time + * Sets time. * * @param \DateTime $time Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible * @@ -298,7 +315,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -308,9 +325,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which identification request was sent. + * @param string $url page URL from which identification request was sent * * @return $this */ @@ -322,7 +339,7 @@ public function setUrl($url) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -332,7 +349,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -346,7 +363,7 @@ public function setUserAgent($user_agent) } /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -356,7 +373,7 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * * @param string $request_id request_id * @@ -370,7 +387,7 @@ public function setRequestId($request_id) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -380,7 +397,7 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * * @param string $linked_id linked_id * @@ -394,9 +411,9 @@ public function setLinkedId($linked_id) } /** - * Gets bot + * Gets bot. * - * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult + * @return BotdDetectionResult */ public function getBot() { @@ -404,9 +421,9 @@ public function getBot() } /** - * Sets bot + * Sets bot. * - * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot + * @param BotdDetectionResult $bot bot * * @return $this */ @@ -416,12 +433,13 @@ public function setBot($bot) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -432,7 +450,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -445,10 +463,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -463,30 +479,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index e590825b..63fd242d 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -1,17 +1,18 @@ 'string', -'browser_major_version' => 'string', -'browser_full_version' => 'string', -'os' => 'string', -'os_version' => 'string', -'device' => 'string', -'user_agent' => 'string', -'bot_probability' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'browser_name' => null, -'browser_major_version' => null, -'browser_full_version' => null, -'os' => null, -'os_version' => null, -'device' => null, -'user_agent' => null, -'bot_probability' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'browser_name' => 'string', + 'browser_major_version' => 'string', + 'browser_full_version' => 'string', + 'os' => 'string', + 'os_version' => 'string', + 'device' => 'string', + 'user_agent' => 'string', + 'bot_probability' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'browser_name' => null, + 'browser_major_version' => null, + 'browser_full_version' => null, + 'os' => null, + 'os_version' => null, + 'device' => null, + 'user_agent' => null, + 'bot_probability' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'browser_name' => 'browserName', -'browser_major_version' => 'browserMajorVersion', -'browser_full_version' => 'browserFullVersion', -'os' => 'os', -'os_version' => 'osVersion', -'device' => 'device', -'user_agent' => 'userAgent', -'bot_probability' => 'botProbability' ]; + 'browser_major_version' => 'browserMajorVersion', + 'browser_full_version' => 'browserFullVersion', + 'os' => 'os', + 'os_version' => 'osVersion', + 'device' => 'device', + 'user_agent' => 'userAgent', + 'bot_probability' => 'botProbability']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'browser_name' => 'setBrowserName', -'browser_major_version' => 'setBrowserMajorVersion', -'browser_full_version' => 'setBrowserFullVersion', -'os' => 'setOs', -'os_version' => 'setOsVersion', -'device' => 'setDevice', -'user_agent' => 'setUserAgent', -'bot_probability' => 'setBotProbability' ]; + 'browser_major_version' => 'setBrowserMajorVersion', + 'browser_full_version' => 'setBrowserFullVersion', + 'os' => 'setOs', + 'os_version' => 'setOsVersion', + 'device' => 'setDevice', + 'user_agent' => 'setUserAgent', + 'bot_probability' => 'setBotProbability']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'browser_name' => 'getBrowserName', -'browser_major_version' => 'getBrowserMajorVersion', -'browser_full_version' => 'getBrowserFullVersion', -'os' => 'getOs', -'os_version' => 'getOsVersion', -'device' => 'getDevice', -'user_agent' => 'getUserAgent', -'bot_probability' => 'getBotProbability' ]; + 'browser_major_version' => 'getBrowserMajorVersion', + 'browser_full_version' => 'getBrowserFullVersion', + 'os' => 'getOs', + 'os_version' => 'getOsVersion', + 'device' => 'getDevice', + 'user_agent' => 'getUserAgent', + 'bot_probability' => 'getBotProbability']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; + $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; + $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; + $this->container['os'] = isset($data['os']) ? $data['os'] : null; + $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; + $this->container['device'] = isset($data['device']) ? $data['device'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -156,7 +199,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -166,7 +209,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -185,33 +228,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; - $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; - $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; - $this->container['os'] = isset($data['os']) ? $data['os'] : null; - $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; - $this->container['device'] = isset($data['device']) ? $data['device'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -221,44 +237,44 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['browser_name'] === null) { + if (null === $this->container['browser_name']) { $invalidProperties[] = "'browser_name' can't be null"; } - if ($this->container['browser_major_version'] === null) { + if (null === $this->container['browser_major_version']) { $invalidProperties[] = "'browser_major_version' can't be null"; } - if ($this->container['browser_full_version'] === null) { + if (null === $this->container['browser_full_version']) { $invalidProperties[] = "'browser_full_version' can't be null"; } - if ($this->container['os'] === null) { + if (null === $this->container['os']) { $invalidProperties[] = "'os' can't be null"; } - if ($this->container['os_version'] === null) { + if (null === $this->container['os_version']) { $invalidProperties[] = "'os_version' can't be null"; } - if ($this->container['device'] === null) { + if (null === $this->container['device']) { $invalidProperties[] = "'device' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets browser_name + * Gets browser_name. * * @return string */ @@ -268,7 +284,7 @@ public function getBrowserName() } /** - * Sets browser_name + * Sets browser_name. * * @param string $browser_name browser_name * @@ -282,7 +298,7 @@ public function setBrowserName($browser_name) } /** - * Gets browser_major_version + * Gets browser_major_version. * * @return string */ @@ -292,7 +308,7 @@ public function getBrowserMajorVersion() } /** - * Sets browser_major_version + * Sets browser_major_version. * * @param string $browser_major_version browser_major_version * @@ -306,7 +322,7 @@ public function setBrowserMajorVersion($browser_major_version) } /** - * Gets browser_full_version + * Gets browser_full_version. * * @return string */ @@ -316,7 +332,7 @@ public function getBrowserFullVersion() } /** - * Sets browser_full_version + * Sets browser_full_version. * * @param string $browser_full_version browser_full_version * @@ -330,7 +346,7 @@ public function setBrowserFullVersion($browser_full_version) } /** - * Gets os + * Gets os. * * @return string */ @@ -340,7 +356,7 @@ public function getOs() } /** - * Sets os + * Sets os. * * @param string $os os * @@ -354,7 +370,7 @@ public function setOs($os) } /** - * Gets os_version + * Gets os_version. * * @return string */ @@ -364,7 +380,7 @@ public function getOsVersion() } /** - * Sets os_version + * Sets os_version. * * @param string $os_version os_version * @@ -378,7 +394,7 @@ public function setOsVersion($os_version) } /** - * Gets device + * Gets device. * * @return string */ @@ -388,7 +404,7 @@ public function getDevice() } /** - * Sets device + * Sets device. * * @param string $device device * @@ -402,7 +418,7 @@ public function setDevice($device) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -412,7 +428,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -426,7 +442,7 @@ public function setUserAgent($user_agent) } /** - * Gets bot_probability + * Gets bot_probability. * * @return int */ @@ -436,7 +452,7 @@ public function getBotProbability() } /** - * Sets bot_probability + * Sets bot_probability. * * @param int $bot_probability bot_probability * @@ -448,12 +464,13 @@ public function setBotProbability($bot_probability) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -464,7 +481,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -477,10 +494,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -495,30 +510,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 033bc380..fca05bcc 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific cloned application detection. There are 2 values: • `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). • `false` - No signs of cloned application detected or the client is not Android. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 4c65b832..833894ca 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -1,17 +1,18 @@ 'float' ]; + 'score' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'score' => 'float' ]; + 'score' => 'float']; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'score' => 'score']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'score' => 'setScore']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'score' => 'getScore']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['score'] = isset($data['score']) ? $data['score'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'score' => 'score' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'score' => 'setScore' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'score' => 'getScore' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['score'] = isset($data['score']) ? $data['score'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['score'] === null) { + if (null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets score + * Gets score. * * @return float */ @@ -208,9 +224,9 @@ public function getScore() } /** - * Sets score + * Sets score. * - * @param float $score The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. + * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification * * @return $this */ @@ -220,12 +236,13 @@ public function setScore($score) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 7ddf5c6b..1c9562e7 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -1,17 +1,18 @@ 'bool', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,26 +201,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -214,7 +230,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result result * @@ -228,7 +244,7 @@ public function setResult($result) } /** - * Gets name + * Gets name. * * @return string */ @@ -238,7 +254,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -250,12 +266,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -266,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -279,10 +296,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -297,30 +312,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index ed3b35bd..1e460ff7 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -1,17 +1,18 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'accuracy_radius' => 'int', + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -162,7 +207,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -172,7 +217,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -191,34 +236,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -226,25 +243,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. * * @return int */ @@ -254,9 +268,9 @@ public function getAccuracyRadius() } /** - * Sets accuracy_radius + * Sets accuracy_radius. * - * @param int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. + * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -268,9 +282,9 @@ public function setAccuracyRadius($accuracy_radius) } /** - * Gets latitude + * Gets latitude. * - * @return double + * @return float */ public function getLatitude() { @@ -278,9 +292,9 @@ public function getLatitude() } /** - * Sets latitude + * Sets latitude. * - * @param double $latitude latitude + * @param float $latitude latitude * * @return $this */ @@ -292,9 +306,9 @@ public function setLatitude($latitude) } /** - * Gets longitude + * Gets longitude. * - * @return double + * @return float */ public function getLongitude() { @@ -302,9 +316,9 @@ public function getLongitude() } /** - * Sets longitude + * Sets longitude. * - * @param double $longitude longitude + * @param float $longitude longitude * * @return $this */ @@ -316,7 +330,7 @@ public function setLongitude($longitude) } /** - * Gets postal_code + * Gets postal_code. * * @return string */ @@ -326,7 +340,7 @@ public function getPostalCode() } /** - * Sets postal_code + * Sets postal_code. * * @param string $postal_code postal_code * @@ -340,7 +354,7 @@ public function setPostalCode($postal_code) } /** - * Gets timezone + * Gets timezone. * * @return string */ @@ -350,7 +364,7 @@ public function getTimezone() } /** - * Sets timezone + * Sets timezone. * * @param string $timezone timezone * @@ -364,9 +378,9 @@ public function setTimezone($timezone) } /** - * Gets city + * Gets city. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity + * @return DeprecatedIPLocationCity */ public function getCity() { @@ -374,9 +388,9 @@ public function getCity() } /** - * Sets city + * Sets city. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city + * @param DeprecatedIPLocationCity $city city * * @return $this */ @@ -388,9 +402,9 @@ public function setCity($city) } /** - * Gets country + * Gets country. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getCountry() { @@ -398,9 +412,9 @@ public function getCountry() } /** - * Sets country + * Sets country. * - * @param \Fingerprint\ServerAPI\Model\Location $country country + * @param Location $country country * * @return $this */ @@ -412,9 +426,9 @@ public function setCountry($country) } /** - * Gets continent + * Gets continent. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getContinent() { @@ -422,9 +436,9 @@ public function getContinent() } /** - * Sets continent + * Sets continent. * - * @param \Fingerprint\ServerAPI\Model\Location $continent continent + * @param Location $continent continent * * @return $this */ @@ -436,7 +450,7 @@ public function setContinent($continent) } /** - * Gets subdivisions + * Gets subdivisions. * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ @@ -446,7 +460,7 @@ public function getSubdivisions() } /** - * Sets subdivisions + * Sets subdivisions. * * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -458,12 +472,13 @@ public function setSubdivisions($subdivisions) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -474,7 +489,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -487,10 +502,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -505,30 +518,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 04a743ab..e7d441d8 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -1,17 +1,18 @@ 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'name' => null ]; + 'name' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'name' => 'name']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'name' => 'setName']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'name' => 'name' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'name' => 'setName' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'name' => 'getName' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -177,25 +193,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. * * @return string */ @@ -205,7 +218,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -217,12 +230,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -233,7 +247,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -246,10 +260,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -264,30 +276,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 4b9502c7..492de46d 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected or the client is not Android. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index ef2cce50..8037e37e 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -177,27 +193,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError + * @return ErrorEvent403ResponseError */ public function getError() { @@ -205,9 +218,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error + * @param ErrorEvent403ResponseError $error error * * @return $this */ @@ -217,12 +230,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -233,7 +247,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -246,10 +260,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -264,30 +276,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 83135173..bc5e8c46 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -1,17 +1,18 @@ 'string', -'message' => 'string' ]; + public const CODE_TOKEN_REQUIRED = 'TokenRequired'; + public const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; + public const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; + public const CODE_WRONG_REGION = 'WrongRegion'; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'ErrorEvent403ResponseError'; /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +168,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +178,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,13 +197,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_TOKEN_REQUIRED = 'TokenRequired'; - public const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; - public const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; - public const CODE_WRONG_REGION = 'WrongRegion'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -169,28 +206,9 @@ public function getCodeAllowableValues() { return [ self::CODE_TOKEN_REQUIRED, -self::CODE_TOKEN_NOT_FOUND, -self::CODE_SUBSCRIPTION_NOT_ACTIVE, -self::CODE_WRONG_REGION, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_TOKEN_NOT_FOUND, + self::CODE_SUBSCRIPTION_NOT_ACTIVE, + self::CODE_WRONG_REGION, ]; } /** @@ -202,7 +220,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -213,26 +231,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -242,7 +260,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ * @@ -265,7 +283,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -275,7 +293,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -287,12 +305,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -303,7 +322,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -316,10 +335,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -334,30 +351,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 8fb06d82..318465c0 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -177,27 +193,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError + * @return ErrorEvent404ResponseError */ public function getError() { @@ -205,9 +218,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error + * @param ErrorEvent404ResponseError $error error * * @return $this */ @@ -217,12 +230,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -233,7 +247,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -246,10 +260,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -264,30 +276,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index ef933a88..b8f4bcbc 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -1,17 +1,18 @@ 'string', -'message' => 'string' ]; + public const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'ErrorEvent404ResponseError'; /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +165,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +175,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,10 +194,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -168,25 +205,6 @@ public function getCodeAllowableValues() self::CODE_REQUEST_NOT_FOUND, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -196,7 +214,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +225,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -236,7 +254,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `RequestNotFound` - request not found for specified id * @@ -259,7 +277,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -269,7 +287,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -281,12 +299,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -297,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -310,10 +329,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -328,30 +345,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index baefef9e..35b8eab7 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -1,17 +1,18 @@ 'string' ]; + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * * @return string */ @@ -208,9 +224,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -220,12 +236,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 7d24c596..6f3ebd3e 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ProductsResponse', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'products' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'products' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'products' => 'products', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'products' => 'setProducts', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'products' => 'getProducts', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -127,7 +165,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -137,7 +175,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -156,27 +194,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['products'] = isset($data['products']) ? $data['products'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -186,28 +203,28 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['products'] === null) { + if (null === $this->container['products']) { $invalidProperties[] = "'products' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets products + * Gets products. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponse + * @return ProductsResponse */ public function getProducts() { @@ -215,9 +232,9 @@ public function getProducts() } /** - * Sets products + * Sets products. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products + * @param ProductsResponse $products products * * @return $this */ @@ -229,9 +246,9 @@ public function setProducts($products) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -239,9 +256,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -251,12 +268,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -267,7 +285,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -280,10 +298,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -298,30 +314,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index efa0b0ab..06cecc87 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -1,17 +1,18 @@ '\DateTime', -'timestamp' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'time' => 'date-time', -'timestamp' => 'int64' ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'time' => '\DateTime', + 'timestamp' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'time' => 'date-time', + 'timestamp' => 'int64']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'time' => 'time', -'timestamp' => 'timestamp' ]; + 'timestamp' => 'timestamp']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'time' => 'setTime', -'timestamp' => 'setTimestamp' ]; + 'timestamp' => 'setTimestamp']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'time' => 'getTime', -'timestamp' => 'getTimestamp' ]; + 'timestamp' => 'getTimestamp']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -217,7 +233,7 @@ public function getTime() } /** - * Sets time + * Sets time. * * @param \DateTime $time Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. * @@ -231,7 +247,7 @@ public function setTime($time) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -241,9 +257,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Same value as it's in the `time` field but represented in timestamp format. + * @param int $timestamp same value as it's in the `time` field but represented in timestamp format * * @return $this */ @@ -253,12 +269,13 @@ public function setTimestamp($timestamp) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 7ced36b4..a616ae49 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: • `true` - Frida detected • `false` - No signs of Frida or the client is not a mobile device. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 91d79bba..b46e2b28 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -1,17 +1,18 @@ 'bool', -'daily_requests' => 'float' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'daily_requests' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'daily_requests' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'daily_requests' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'daily_requests' => 'dailyRequests' ]; + 'daily_requests' => 'dailyRequests']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'daily_requests' => 'setDailyRequests' ]; + 'daily_requests' => 'setDailyRequests']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'daily_requests' => 'getDailyRequests' ]; + 'daily_requests' => 'getDailyRequests']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,26 +201,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -214,9 +230,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a high activity visitor. + * @param bool $result flag indicating whether the request came from a high activity visitor * * @return $this */ @@ -228,7 +244,7 @@ public function setResult($result) } /** - * Gets daily_requests + * Gets daily_requests. * * @return float */ @@ -238,9 +254,9 @@ public function getDailyRequests() } /** - * Sets daily_requests + * Sets daily_requests. * - * @param float $daily_requests Number of requests from the same visitor in the previous day. + * @param float $daily_requests number of requests from the same visitor in the previous day * * @return $this */ @@ -250,12 +266,13 @@ public function setDailyRequests($daily_requests) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -266,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -279,10 +296,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -297,30 +312,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 105009fa..0ca7bead 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -1,17 +1,18 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'accuracy_radius' => 'int', + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -161,7 +205,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -171,7 +215,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -190,34 +234,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -225,25 +241,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. * * @return int */ @@ -253,9 +266,9 @@ public function getAccuracyRadius() } /** - * Sets accuracy_radius + * Sets accuracy_radius. * - * @param int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. + * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -267,9 +280,9 @@ public function setAccuracyRadius($accuracy_radius) } /** - * Gets latitude + * Gets latitude. * - * @return double + * @return float */ public function getLatitude() { @@ -277,9 +290,9 @@ public function getLatitude() } /** - * Sets latitude + * Sets latitude. * - * @param double $latitude latitude + * @param float $latitude latitude * * @return $this */ @@ -291,9 +304,9 @@ public function setLatitude($latitude) } /** - * Gets longitude + * Gets longitude. * - * @return double + * @return float */ public function getLongitude() { @@ -301,9 +314,9 @@ public function getLongitude() } /** - * Sets longitude + * Sets longitude. * - * @param double $longitude longitude + * @param float $longitude longitude * * @return $this */ @@ -315,7 +328,7 @@ public function setLongitude($longitude) } /** - * Gets postal_code + * Gets postal_code. * * @return string */ @@ -325,7 +338,7 @@ public function getPostalCode() } /** - * Sets postal_code + * Sets postal_code. * * @param string $postal_code postal_code * @@ -339,7 +352,7 @@ public function setPostalCode($postal_code) } /** - * Gets timezone + * Gets timezone. * * @return string */ @@ -349,7 +362,7 @@ public function getTimezone() } /** - * Sets timezone + * Sets timezone. * * @param string $timezone timezone * @@ -363,9 +376,9 @@ public function setTimezone($timezone) } /** - * Gets city + * Gets city. * - * @return \Fingerprint\ServerAPI\Model\IPLocationCity + * @return IPLocationCity */ public function getCity() { @@ -373,9 +386,9 @@ public function getCity() } /** - * Sets city + * Sets city. * - * @param \Fingerprint\ServerAPI\Model\IPLocationCity $city city + * @param IPLocationCity $city city * * @return $this */ @@ -387,9 +400,9 @@ public function setCity($city) } /** - * Gets country + * Gets country. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getCountry() { @@ -397,9 +410,9 @@ public function getCountry() } /** - * Sets country + * Sets country. * - * @param \Fingerprint\ServerAPI\Model\Location $country country + * @param Location $country country * * @return $this */ @@ -411,9 +424,9 @@ public function setCountry($country) } /** - * Gets continent + * Gets continent. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getContinent() { @@ -421,9 +434,9 @@ public function getContinent() } /** - * Sets continent + * Sets continent. * - * @param \Fingerprint\ServerAPI\Model\Location $continent continent + * @param Location $continent continent * * @return $this */ @@ -435,7 +448,7 @@ public function setContinent($continent) } /** - * Gets subdivisions + * Gets subdivisions. * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ @@ -445,7 +458,7 @@ public function getSubdivisions() } /** - * Sets subdivisions + * Sets subdivisions. * * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -457,12 +470,13 @@ public function setSubdivisions($subdivisions) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -473,7 +487,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -486,10 +500,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -504,30 +516,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 912f56f7..d6a7f76d 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -1,17 +1,18 @@ 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'name' => null ]; + 'name' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'name' => 'name']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'name' => 'setName']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'name' => 'name' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'name' => 'setName' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'name' => 'getName' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -177,25 +193,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. * * @return string */ @@ -205,7 +218,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -217,12 +230,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -233,7 +247,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -246,10 +260,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -264,30 +276,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index caba198c..16b91f66 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -1,17 +1,18 @@ 'string', -'message' => 'string' ]; + public const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; + public const CODE_FAILED = 'Failed'; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'IdentificationError'; /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +166,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +176,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,11 +195,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; - public const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -167,26 +204,7 @@ public function getCodeAllowableValues() { return [ self::CODE__429_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -198,7 +216,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +227,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -238,7 +256,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -261,7 +279,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -271,7 +289,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -283,12 +301,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -299,7 +318,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -312,10 +331,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -330,30 +347,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 50abc0a9..e8d8713a 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,9 +224,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise. + * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise * * @return $this */ @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index b6fbcbf4..b18d7066 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -1,17 +1,18 @@ 'bool', -'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'details' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'details' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'details' => 'details' ]; + 'details' => 'details']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'details' => 'setDetails' ]; + 'details' => 'setDetails']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'details' => 'getDetails' ]; + 'details' => 'getDetails']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['details'] = isset($data['details']) ? $data['details'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['details'] === null) { + if (null === $this->container['details']) { $invalidProperties[] = "'details' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -217,9 +233,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. + * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise * * @return $this */ @@ -231,9 +247,9 @@ public function setResult($result) } /** - * Gets details + * Gets details. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResultDetails + * @return IpBlockListResultDetails */ public function getDetails() { @@ -241,9 +257,9 @@ public function getDetails() } /** - * Sets details + * Sets details. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details details + * @param IpBlockListResultDetails $details details * * @return $this */ @@ -253,12 +269,13 @@ public function setDetails($details) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index a6fff095..3e60669b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -1,17 +1,18 @@ 'bool', -'attack_source' => 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email_spam' => null, -'attack_source' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'email_spam' => 'bool', + 'attack_source' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'email_spam' => null, + 'attack_source' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'email_spam' => 'emailSpam', -'attack_source' => 'attackSource' ]; + 'attack_source' => 'attackSource']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'email_spam' => 'setEmailSpam', -'attack_source' => 'setAttackSource' ]; + 'attack_source' => 'setAttackSource']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'email_spam' => 'getEmailSpam', -'attack_source' => 'getAttackSource' ]; + 'attack_source' => 'getAttackSource']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; + $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; - $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['email_spam'] === null) { + if (null === $this->container['email_spam']) { $invalidProperties[] = "'email_spam' can't be null"; } - if ($this->container['attack_source'] === null) { + if (null === $this->container['attack_source']) { $invalidProperties[] = "'attack_source' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets email_spam + * Gets email_spam. * * @return bool */ @@ -217,9 +233,9 @@ public function getEmailSpam() } /** - * Sets email_spam + * Sets email_spam. * - * @param bool $email_spam IP address was part of a known email spam attack (SMTP). + * @param bool $email_spam IP address was part of a known email spam attack (SMTP) * * @return $this */ @@ -231,7 +247,7 @@ public function setEmailSpam($email_spam) } /** - * Gets attack_source + * Gets attack_source. * * @return bool */ @@ -241,9 +257,9 @@ public function getAttackSource() } /** - * Sets attack_source + * Sets attack_source. * - * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS). + * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS) * * @return $this */ @@ -253,12 +269,13 @@ public function setAttackSource($attack_source) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index de507494..ee5fc12b 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\IpInfoResultV4', -'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'v4' => null, -'v6' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'v4' => '\Fingerprint\ServerAPI\Model\IpInfoResultV4', + 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'v4' => null, + 'v6' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'v4' => 'v4', -'v6' => 'v6' ]; + 'v6' => 'v6']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'v4' => 'setV4', -'v6' => 'setV6' ]; + 'v6' => 'setV6']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'v4' => 'getV4', -'v6' => 'getV6' ]; + 'v6' => 'getV6']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; + $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -127,7 +165,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -137,7 +175,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -156,27 +194,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; - $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -184,27 +201,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets v4 + * Gets v4. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResultV4 + * @return IpInfoResultV4 */ public function getV4() { @@ -212,9 +226,9 @@ public function getV4() } /** - * Sets v4 + * Sets v4. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 + * @param IpInfoResultV4 $v4 v4 * * @return $this */ @@ -226,9 +240,9 @@ public function setV4($v4) } /** - * Gets v6 + * Gets v6. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResultV6 + * @return IpInfoResultV6 */ public function getV6() { @@ -236,9 +250,9 @@ public function getV6() } /** - * Sets v6 + * Sets v6. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 + * @param IpInfoResultV6 $v6 v6 * * @return $this */ @@ -248,12 +262,13 @@ public function setV6($v6) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -264,7 +279,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -277,10 +292,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -295,30 +308,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 3ca971b3..c6a7674a 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -1,17 +1,18 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'address' => 'ipv4', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'address' => 'string', + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'address' => 'ipv4', + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -136,7 +175,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -146,7 +185,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -165,29 +204,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -197,29 +213,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address + * Gets address. * * @return string */ @@ -229,7 +245,7 @@ public function getAddress() } /** - * Sets address + * Sets address. * * @param string $address address * @@ -243,9 +259,9 @@ public function setAddress($address) } /** - * Gets geolocation + * Gets geolocation. * - * @return \Fingerprint\ServerAPI\Model\IPLocation + * @return IPLocation */ public function getGeolocation() { @@ -253,9 +269,9 @@ public function getGeolocation() } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ @@ -267,9 +283,9 @@ public function setGeolocation($geolocation) } /** - * Gets asn + * Gets asn. * - * @return \Fingerprint\ServerAPI\Model\ASN + * @return ASN */ public function getAsn() { @@ -277,9 +293,9 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * - * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * @param ASN $asn asn * * @return $this */ @@ -291,9 +307,9 @@ public function setAsn($asn) } /** - * Gets datacenter + * Gets datacenter. * - * @return \Fingerprint\ServerAPI\Model\DataCenter + * @return DataCenter */ public function getDatacenter() { @@ -301,9 +317,9 @@ public function getDatacenter() } /** - * Sets datacenter + * Sets datacenter. * - * @param \Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter + * @param DataCenter $datacenter datacenter * * @return $this */ @@ -313,12 +329,13 @@ public function setDatacenter($datacenter) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -329,7 +346,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -342,10 +359,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -360,30 +375,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 121c639f..5157af7d 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -1,17 +1,18 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'address' => 'ipv6', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'address' => 'string', + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'address' => 'ipv6', + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -136,7 +175,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -146,7 +185,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -165,29 +204,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -197,29 +213,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address + * Gets address. * * @return string */ @@ -229,7 +245,7 @@ public function getAddress() } /** - * Sets address + * Sets address. * * @param string $address address * @@ -243,9 +259,9 @@ public function setAddress($address) } /** - * Gets geolocation + * Gets geolocation. * - * @return \Fingerprint\ServerAPI\Model\IPLocation + * @return IPLocation */ public function getGeolocation() { @@ -253,9 +269,9 @@ public function getGeolocation() } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ @@ -267,9 +283,9 @@ public function setGeolocation($geolocation) } /** - * Gets asn + * Gets asn. * - * @return \Fingerprint\ServerAPI\Model\ASN + * @return ASN */ public function getAsn() { @@ -277,9 +293,9 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * - * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * @param ASN $asn asn * * @return $this */ @@ -291,9 +307,9 @@ public function setAsn($asn) } /** - * Gets datacenter + * Gets datacenter. * - * @return \Fingerprint\ServerAPI\Model\DataCenter + * @return DataCenter */ public function getDatacenter() { @@ -301,9 +317,9 @@ public function getDatacenter() } /** - * Sets datacenter + * Sets datacenter. * - * @param \Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter + * @param DataCenter $datacenter datacenter * * @return $this */ @@ -313,12 +329,13 @@ public function setDatacenter($datacenter) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -329,7 +346,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -342,10 +359,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -360,30 +375,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 3050fddd..25f58eaa 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result iOS specific jailbreak detection. There are 2 values: • `true` - Jailbreak detected • `false` - No signs of jailbreak or the client is not iOS. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Location.php b/src/Model/Location.php index 9c4ef99d..aac2b040 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -1,17 +1,18 @@ 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } - if ($this->container['name'] === null) { + if (null === $this->container['name']) { $invalidProperties[] = "'name' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -217,7 +233,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code code * @@ -231,7 +247,7 @@ public function setCode($code) } /** - * Gets name + * Gets name. * * @return string */ @@ -241,7 +257,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -253,12 +269,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index d7c4cea2..6ac2d299 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,9 +224,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a mobile device with location spoofing enabled. + * @param bool $result flag indicating whether the request came from a mobile device with location spoofing enabled * * @return $this */ @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 2dc39488..8f97e293 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -1,17 +1,18 @@ 'string' ]; + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * * @return string */ @@ -208,9 +224,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -220,12 +236,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index c6adaf20..0156c76d 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 87621846..7eba5405 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -1,17 +1,18 @@ 'string', -'message' => 'string' ]; + public const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; + public const CODE_FAILED = 'Failed'; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; + * The original name of the model. + * + * @var string + */ + protected static $swaggerModelName = 'ProductError'; /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +166,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +176,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,11 +195,8 @@ public function getModelName() return self::$swaggerModelName; } - public const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; - public const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -167,26 +204,7 @@ public function getCodeAllowableValues() { return [ self::CODE_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -198,7 +216,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +227,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -238,7 +256,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -261,7 +279,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -271,7 +289,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -283,12 +301,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -299,7 +318,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -312,10 +331,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -330,30 +347,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index ee4a8e18..c7867c8d 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', -'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', -'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', -'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', -'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', -'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', -'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', -'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', -'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', -'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', -'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', -'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', -'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', -'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', -'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'identification' => null, -'botd' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'raw_device_attributes' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'identification' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', + 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', + 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', + 'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', + 'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', + 'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', + 'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', + 'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', + 'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', + 'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', + 'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', + 'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'identification' => null, + 'botd' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'raw_device_attributes' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'identification' => 'identification', -'botd' => 'botd', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'raw_device_attributes' => 'rawDeviceAttributes' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'botd' => 'botd', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'raw_device_attributes' => 'rawDeviceAttributes']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'identification' => 'setIdentification', -'botd' => 'setBotd', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'raw_device_attributes' => 'setRawDeviceAttributes' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'botd' => 'setBotd', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'raw_device_attributes' => 'setRawDeviceAttributes']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'identification' => 'getIdentification', -'botd' => 'getBotd', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'raw_device_attributes' => 'getRawDeviceAttributes' ]; + 'botd' => 'getBotd', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'raw_device_attributes' => 'getRawDeviceAttributes']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; + $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; + $this->container['ip_info'] = isset($data['ip_info']) ? $data['ip_info'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['root_apps'] = isset($data['root_apps']) ? $data['root_apps'] : null; + $this->container['emulator'] = isset($data['emulator']) ? $data['emulator'] : null; + $this->container['cloned_app'] = isset($data['cloned_app']) ? $data['cloned_app'] : null; + $this->container['factory_reset'] = isset($data['factory_reset']) ? $data['factory_reset'] : null; + $this->container['jailbroken'] = isset($data['jailbroken']) ? $data['jailbroken'] : null; + $this->container['frida'] = isset($data['frida']) ? $data['frida'] : null; + $this->container['ip_blocklist'] = isset($data['ip_blocklist']) ? $data['ip_blocklist'] : null; + $this->container['tor'] = isset($data['tor']) ? $data['tor'] : null; + $this->container['privacy_settings'] = isset($data['privacy_settings']) ? $data['privacy_settings'] : null; + $this->container['virtual_machine'] = isset($data['virtual_machine']) ? $data['virtual_machine'] : null; + $this->container['vpn'] = isset($data['vpn']) ? $data['vpn'] : null; + $this->container['proxy'] = isset($data['proxy']) ? $data['proxy'] : null; + $this->container['tampering'] = isset($data['tampering']) ? $data['tampering'] : null; + $this->container['high_activity'] = isset($data['high_activity']) ? $data['high_activity'] : null; + $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; + $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; + $this->container['raw_device_attributes'] = isset($data['raw_device_attributes']) ? $data['raw_device_attributes'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -222,7 +279,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -232,7 +289,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -251,46 +308,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; - $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; - $this->container['ip_info'] = isset($data['ip_info']) ? $data['ip_info'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['root_apps'] = isset($data['root_apps']) ? $data['root_apps'] : null; - $this->container['emulator'] = isset($data['emulator']) ? $data['emulator'] : null; - $this->container['cloned_app'] = isset($data['cloned_app']) ? $data['cloned_app'] : null; - $this->container['factory_reset'] = isset($data['factory_reset']) ? $data['factory_reset'] : null; - $this->container['jailbroken'] = isset($data['jailbroken']) ? $data['jailbroken'] : null; - $this->container['frida'] = isset($data['frida']) ? $data['frida'] : null; - $this->container['ip_blocklist'] = isset($data['ip_blocklist']) ? $data['ip_blocklist'] : null; - $this->container['tor'] = isset($data['tor']) ? $data['tor'] : null; - $this->container['privacy_settings'] = isset($data['privacy_settings']) ? $data['privacy_settings'] : null; - $this->container['virtual_machine'] = isset($data['virtual_machine']) ? $data['virtual_machine'] : null; - $this->container['vpn'] = isset($data['vpn']) ? $data['vpn'] : null; - $this->container['proxy'] = isset($data['proxy']) ? $data['proxy'] : null; - $this->container['tampering'] = isset($data['tampering']) ? $data['tampering'] : null; - $this->container['high_activity'] = isset($data['high_activity']) ? $data['high_activity'] : null; - $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; - $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; - $this->container['raw_device_attributes'] = isset($data['raw_device_attributes']) ? $data['raw_device_attributes'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -298,27 +315,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets identification + * Gets identification. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseIdentification + * @return ProductsResponseIdentification */ public function getIdentification() { @@ -326,9 +340,9 @@ public function getIdentification() } /** - * Sets identification + * Sets identification. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification + * @param ProductsResponseIdentification $identification identification * * @return $this */ @@ -340,9 +354,9 @@ public function setIdentification($identification) } /** - * Gets botd + * Gets botd. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseBotd + * @return ProductsResponseBotd */ public function getBotd() { @@ -350,9 +364,9 @@ public function getBotd() } /** - * Sets botd + * Sets botd. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd + * @param ProductsResponseBotd $botd botd * * @return $this */ @@ -364,9 +378,9 @@ public function setBotd($botd) } /** - * Gets ip_info + * Gets ip_info. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIpInfo + * @return SignalResponseIpInfo */ public function getIpInfo() { @@ -374,9 +388,9 @@ public function getIpInfo() } /** - * Sets ip_info + * Sets ip_info. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info + * @param SignalResponseIpInfo $ip_info ip_info * * @return $this */ @@ -388,9 +402,9 @@ public function setIpInfo($ip_info) } /** - * Gets incognito + * Gets incognito. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIncognito + * @return SignalResponseIncognito */ public function getIncognito() { @@ -398,9 +412,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito + * @param SignalResponseIncognito $incognito incognito * * @return $this */ @@ -412,9 +426,9 @@ public function setIncognito($incognito) } /** - * Gets root_apps + * Gets root_apps. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseRootApps + * @return SignalResponseRootApps */ public function getRootApps() { @@ -422,9 +436,9 @@ public function getRootApps() } /** - * Sets root_apps + * Sets root_apps. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps + * @param SignalResponseRootApps $root_apps root_apps * * @return $this */ @@ -436,9 +450,9 @@ public function setRootApps($root_apps) } /** - * Gets emulator + * Gets emulator. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseEmulator + * @return SignalResponseEmulator */ public function getEmulator() { @@ -446,9 +460,9 @@ public function getEmulator() } /** - * Sets emulator + * Sets emulator. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator + * @param SignalResponseEmulator $emulator emulator * * @return $this */ @@ -460,9 +474,9 @@ public function setEmulator($emulator) } /** - * Gets cloned_app + * Gets cloned_app. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseClonedApp + * @return SignalResponseClonedApp */ public function getClonedApp() { @@ -470,9 +484,9 @@ public function getClonedApp() } /** - * Sets cloned_app + * Sets cloned_app. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app + * @param SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ @@ -484,9 +498,9 @@ public function setClonedApp($cloned_app) } /** - * Gets factory_reset + * Gets factory_reset. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseFactoryReset + * @return SignalResponseFactoryReset */ public function getFactoryReset() { @@ -494,9 +508,9 @@ public function getFactoryReset() } /** - * Sets factory_reset + * Sets factory_reset. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset + * @param SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ @@ -508,9 +522,9 @@ public function setFactoryReset($factory_reset) } /** - * Gets jailbroken + * Gets jailbroken. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseJailbroken + * @return SignalResponseJailbroken */ public function getJailbroken() { @@ -518,9 +532,9 @@ public function getJailbroken() } /** - * Sets jailbroken + * Sets jailbroken. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken + * @param SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ @@ -532,9 +546,9 @@ public function setJailbroken($jailbroken) } /** - * Gets frida + * Gets frida. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseFrida + * @return SignalResponseFrida */ public function getFrida() { @@ -542,9 +556,9 @@ public function getFrida() } /** - * Sets frida + * Sets frida. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida + * @param SignalResponseFrida $frida frida * * @return $this */ @@ -556,9 +570,9 @@ public function setFrida($frida) } /** - * Gets ip_blocklist + * Gets ip_blocklist. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist + * @return SignalResponseIpBlocklist */ public function getIpBlocklist() { @@ -566,9 +580,9 @@ public function getIpBlocklist() } /** - * Sets ip_blocklist + * Sets ip_blocklist. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist + * @param SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ @@ -580,9 +594,9 @@ public function setIpBlocklist($ip_blocklist) } /** - * Gets tor + * Gets tor. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseTor + * @return SignalResponseTor */ public function getTor() { @@ -590,9 +604,9 @@ public function getTor() } /** - * Sets tor + * Sets tor. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor + * @param SignalResponseTor $tor tor * * @return $this */ @@ -604,9 +618,9 @@ public function setTor($tor) } /** - * Gets privacy_settings + * Gets privacy_settings. * - * @return \Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings + * @return SignalResponsePrivacySettings */ public function getPrivacySettings() { @@ -614,9 +628,9 @@ public function getPrivacySettings() } /** - * Sets privacy_settings + * Sets privacy_settings. * - * @param \Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings + * @param SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ @@ -628,9 +642,9 @@ public function setPrivacySettings($privacy_settings) } /** - * Gets virtual_machine + * Gets virtual_machine. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine + * @return SignalResponseVirtualMachine */ public function getVirtualMachine() { @@ -638,9 +652,9 @@ public function getVirtualMachine() } /** - * Sets virtual_machine + * Sets virtual_machine. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine + * @param SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ @@ -652,9 +666,9 @@ public function setVirtualMachine($virtual_machine) } /** - * Gets vpn + * Gets vpn. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseVpn + * @return SignalResponseVpn */ public function getVpn() { @@ -662,9 +676,9 @@ public function getVpn() } /** - * Sets vpn + * Sets vpn. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn + * @param SignalResponseVpn $vpn vpn * * @return $this */ @@ -676,9 +690,9 @@ public function setVpn($vpn) } /** - * Gets proxy + * Gets proxy. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseProxy + * @return SignalResponseProxy */ public function getProxy() { @@ -686,9 +700,9 @@ public function getProxy() } /** - * Sets proxy + * Sets proxy. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy + * @param SignalResponseProxy $proxy proxy * * @return $this */ @@ -700,9 +714,9 @@ public function setProxy($proxy) } /** - * Gets tampering + * Gets tampering. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseTampering + * @return SignalResponseTampering */ public function getTampering() { @@ -710,9 +724,9 @@ public function getTampering() } /** - * Sets tampering + * Sets tampering. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering + * @param SignalResponseTampering $tampering tampering * * @return $this */ @@ -724,9 +738,9 @@ public function setTampering($tampering) } /** - * Gets high_activity + * Gets high_activity. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseHighActivity + * @return SignalResponseHighActivity */ public function getHighActivity() { @@ -734,9 +748,9 @@ public function getHighActivity() } /** - * Sets high_activity + * Sets high_activity. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity + * @param SignalResponseHighActivity $high_activity high_activity * * @return $this */ @@ -748,9 +762,9 @@ public function setHighActivity($high_activity) } /** - * Gets location_spoofing + * Gets location_spoofing. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing + * @return SignalResponseLocationSpoofing */ public function getLocationSpoofing() { @@ -758,9 +772,9 @@ public function getLocationSpoofing() } /** - * Sets location_spoofing + * Sets location_spoofing. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing + * @param SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ @@ -772,9 +786,9 @@ public function setLocationSpoofing($location_spoofing) } /** - * Gets suspect_score + * Gets suspect_score. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseSuspectScore + * @return SignalResponseSuspectScore */ public function getSuspectScore() { @@ -782,9 +796,9 @@ public function getSuspectScore() } /** - * Sets suspect_score + * Sets suspect_score. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score + * @param SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ @@ -796,9 +810,9 @@ public function setSuspectScore($suspect_score) } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes + * @return SignalResponseRawDeviceAttributes */ public function getRawDeviceAttributes() { @@ -806,9 +820,9 @@ public function getRawDeviceAttributes() } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes + * @param SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ @@ -818,12 +832,13 @@ public function setRawDeviceAttributes($raw_device_attributes) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -834,7 +849,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -847,10 +862,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -865,30 +878,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index bd392ddf..2d5688d4 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\BotdResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\BotdResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\BotdResult + * @return BotdResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\BotdResult $data data + * @param BotdResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 51569838..13f0f7b8 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData + * @return ProductsResponseIdentificationData */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data + * @param ProductsResponseIdentificationData $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\IdentificationError + * @return IdentificationError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\IdentificationError $error error + * @param IdentificationError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 7af7e0c8..1b5c1d97 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -1,17 +1,18 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'visitor_id' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null, -'visitor_id' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'visitor_id' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null, + 'visitor_id' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt', -'visitor_id' => 'visitorId' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt', + 'visitor_id' => 'visitorId']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt', -'visitor_id' => 'setVisitorId' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt', + 'visitor_id' => 'setVisitorId']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt', -'visitor_id' => 'getVisitorId' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt', + 'visitor_id' => 'getVisitorId']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -191,7 +241,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -201,7 +251,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -220,40 +270,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -263,59 +279,59 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -325,9 +341,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -339,9 +355,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -349,9 +365,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -363,7 +379,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -373,9 +389,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -387,7 +403,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -397,7 +413,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -411,9 +427,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -421,9 +437,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -435,7 +451,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -445,9 +461,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -459,7 +475,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -469,9 +485,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -483,7 +499,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -493,9 +509,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -507,7 +523,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -517,9 +533,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -531,7 +547,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -541,9 +557,9 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * - * @param string $linked_id A customer-provided id that was sent with identification request. + * @param string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -555,9 +571,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -565,9 +581,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -579,7 +595,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -589,9 +605,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -603,9 +619,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -613,9 +629,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -627,9 +643,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -637,9 +653,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -651,7 +667,7 @@ public function setLastSeenAt($last_seen_at) } /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -661,9 +677,9 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * - * @param string $visitor_id String of 20 characters that uniquely identifies the visitor's browser. + * @param string $visitor_id string of 20 characters that uniquely identifies the visitor's browser * * @return $this */ @@ -673,12 +689,13 @@ public function setVisitorId($visitor_id) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -689,7 +706,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -702,10 +719,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -720,30 +735,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 2d3db6e6..09b180aa 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,9 +224,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise. + * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise * * @return $this */ @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index af772cc9..4cd9caca 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -1,17 +1,18 @@ listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -209,7 +222,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -222,10 +235,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -240,30 +251,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Response.php b/src/Model/Response.php index ed92336b..aa806a04 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -1,17 +1,18 @@ 'string', -'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', -'last_timestamp' => 'int', -'pagination_key' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'visitor_id' => null, -'visits' => null, -'last_timestamp' => 'int64', -'pagination_key' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'visitor_id' => 'string', + 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', + 'last_timestamp' => 'int', + 'pagination_key' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'visitor_id' => null, + 'visits' => null, + 'last_timestamp' => 'int64', + 'pagination_key' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', -'visits' => 'visits', -'last_timestamp' => 'lastTimestamp', -'pagination_key' => 'paginationKey' ]; + 'visits' => 'visits', + 'last_timestamp' => 'lastTimestamp', + 'pagination_key' => 'paginationKey']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'visitor_id' => 'setVisitorId', -'visits' => 'setVisits', -'last_timestamp' => 'setLastTimestamp', -'pagination_key' => 'setPaginationKey' ]; + 'visits' => 'setVisits', + 'last_timestamp' => 'setLastTimestamp', + 'pagination_key' => 'setPaginationKey']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'visitor_id' => 'getVisitorId', -'visits' => 'getVisits', -'last_timestamp' => 'getLastTimestamp', -'pagination_key' => 'getPaginationKey' ]; + 'visits' => 'getVisits', + 'last_timestamp' => 'getLastTimestamp', + 'pagination_key' => 'getPaginationKey']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; + $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; + $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -137,7 +177,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -147,7 +187,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -166,29 +206,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; - $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; - $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -198,29 +215,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['visits'] === null) { + if (null === $this->container['visits']) { $invalidProperties[] = "'visits' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -230,7 +247,7 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -244,7 +261,7 @@ public function setVisitorId($visitor_id) } /** - * Gets visits + * Gets visits. * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ @@ -254,7 +271,7 @@ public function getVisits() } /** - * Sets visits + * Sets visits. * * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits * @@ -268,7 +285,7 @@ public function setVisits($visits) } /** - * Gets last_timestamp + * Gets last_timestamp. * * @return int */ @@ -278,7 +295,7 @@ public function getLastTimestamp() } /** - * Sets last_timestamp + * Sets last_timestamp. * * @param int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. * @@ -292,7 +309,7 @@ public function setLastTimestamp($last_timestamp) } /** - * Gets pagination_key + * Gets pagination_key. * * @return string */ @@ -302,7 +319,7 @@ public function getPaginationKey() } /** - * Sets pagination_key + * Sets pagination_key. * * @param string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. * @@ -314,12 +331,13 @@ public function setPaginationKey($pagination_key) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -330,7 +348,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -343,10 +361,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -361,30 +377,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 919ce4e7..e055eeff 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -1,17 +1,18 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -186,7 +235,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -196,7 +245,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -215,39 +264,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -257,56 +273,56 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -316,9 +332,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -330,9 +346,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -340,9 +356,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -354,7 +370,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -364,9 +380,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -378,7 +394,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -388,7 +404,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -402,9 +418,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -412,9 +428,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -426,7 +442,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -436,9 +452,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -450,7 +466,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -460,9 +476,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -474,7 +490,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -484,9 +500,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -498,7 +514,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -508,9 +524,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -522,7 +538,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -532,9 +548,9 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * - * @param string $linked_id A customer-provided id that was sent with identification request. + * @param string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -546,9 +562,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -556,9 +572,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -570,7 +586,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -580,9 +596,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -594,9 +610,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -604,9 +620,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -618,9 +634,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -628,9 +644,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -640,12 +656,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -656,7 +673,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -669,10 +686,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -687,30 +702,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index a65885f8..857c7a49 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected or the client isn't Android. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 90d4554e..d6b068d1 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -1,17 +1,18 @@ '\DateTime', -'subscription' => '\DateTime' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'global' => 'date-time', -'subscription' => 'date-time' ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'global' => '\DateTime', + 'subscription' => '\DateTime']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'global' => 'date-time', + 'subscription' => 'date-time']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'global' => 'global', -'subscription' => 'subscription' ]; + 'subscription' => 'subscription']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'global' => 'setGlobal', -'subscription' => 'setSubscription' ]; + 'subscription' => 'setSubscription']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'global' => 'getGlobal', -'subscription' => 'getSubscription' ]; + 'subscription' => 'getSubscription']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['global'] = isset($data['global']) ? $data['global'] : null; + $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['global'] = isset($data['global']) ? $data['global'] : null; - $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['global'] === null) { + if (null === $this->container['global']) { $invalidProperties[] = "'global' can't be null"; } - if ($this->container['subscription'] === null) { + if (null === $this->container['subscription']) { $invalidProperties[] = "'subscription' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets global + * Gets global. * * @return \DateTime */ @@ -217,7 +233,7 @@ public function getGlobal() } /** - * Sets global + * Sets global. * * @param \DateTime $global global * @@ -231,7 +247,7 @@ public function setGlobal($global) } /** - * Gets subscription + * Gets subscription. * * @return \DateTime */ @@ -241,7 +257,7 @@ public function getSubscription() } /** - * Sets subscription + * Sets subscription. * * @param \DateTime $subscription subscription * @@ -253,12 +269,13 @@ public function setSubscription($subscription) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index a6425aa2..c1c421f0 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ClonedAppResult + * @return ClonedAppResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ClonedAppResult $data data + * @param ClonedAppResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 68375671..f858ffc6 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\EmulatorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\EmulatorResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\EmulatorResult + * @return EmulatorResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\EmulatorResult $data data + * @param EmulatorResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index f9b764be..f64e8fcb 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\FactoryResetResult + * @return FactoryResetResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\FactoryResetResult $data data + * @param FactoryResetResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 50d9e892..b929a385 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\FridaResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\FridaResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\FridaResult + * @return FridaResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\FridaResult $data data + * @param FridaResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 2b270118..ccb4a057 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\HighActivityResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\HighActivityResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\HighActivityResult + * @return HighActivityResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\HighActivityResult $data data + * @param HighActivityResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 7f720d14..9e1a0644 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\IncognitoResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IncognitoResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IncognitoResult + * @return IncognitoResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IncognitoResult $data data + * @param IncognitoResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index dcd61fe5..a9244059 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResult + * @return IpBlockListResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResult $data data + * @param IpBlockListResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index be79e742..77f116e2 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\IpInfoResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IpInfoResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResult + * @return IpInfoResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResult $data data + * @param IpInfoResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index c6043bca..e6669e07 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\JailbrokenResult + * @return JailbrokenResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\JailbrokenResult $data data + * @param JailbrokenResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index fb7dc72d..226ed8a2 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\LocationSpoofingResult + * @return LocationSpoofingResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data + * @param LocationSpoofingResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 4e20282f..9ebcbfd8 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\PrivacySettingsResult + * @return PrivacySettingsResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data + * @param PrivacySettingsResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 7e4aa4d9..b529f3eb 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\ProxyResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ProxyResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ProxyResult + * @return ProxyResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ProxyResult $data data + * @param ProxyResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 9640eaf9..0921c456 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + * @return RawDeviceAttributesResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data + * @param RawDeviceAttributesResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index ac9dcecc..e25f947a 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\RootAppsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\RootAppsResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\RootAppsResult + * @return RootAppsResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\RootAppsResult $data data + * @param RootAppsResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 46bf8b0c..bfe2b90e 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\SuspectScoreResult + * @return SuspectScoreResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\SuspectScoreResult $data data + * @param SuspectScoreResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index bfdf39a1..49be1f05 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\TamperingResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\TamperingResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\TamperingResult + * @return TamperingResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\TamperingResult $data data + * @param TamperingResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 83603d8e..6e62b9a6 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\TorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\TorResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\TorResult + * @return TorResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\TorResult $data data + * @param TorResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 493fadac..8b13d675 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\VirtualMachineResult + * @return VirtualMachineResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\VirtualMachineResult $data data + * @param VirtualMachineResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 391039bb..6d7a3e71 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -1,17 +1,18 @@ '\Fingerprint\ServerAPI\Model\VpnResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\VpnResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\VpnResult + * @return VpnResult */ public function getData() { @@ -211,9 +224,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\VpnResult $data data + * @param VpnResult $data data * * @return $this */ @@ -225,9 +238,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -235,9 +248,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -247,12 +260,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index a21876d5..6724848a 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -1,17 +1,18 @@ 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'iso_code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'iso_code' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'iso_code' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'iso_code' => 'isoCode', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'iso_code' => 'setIsoCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'iso_code' => 'getIsoCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,25 +199,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets iso_code + * Gets iso_code. * * @return string */ @@ -211,7 +224,7 @@ public function getIsoCode() } /** - * Sets iso_code + * Sets iso_code. * * @param string $iso_code iso_code * @@ -225,7 +238,7 @@ public function setIsoCode($iso_code) } /** - * Gets name + * Gets name. * * @return string */ @@ -235,7 +248,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -247,12 +260,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -263,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -276,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -294,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index c9b61c2c..981c5192 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -1,17 +1,18 @@ 'int' ]; + 'result' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return int */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param int $result Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 01a57964..cf390c54 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -1,17 +1,18 @@ 'bool', -'anomaly_score' => 'float' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'anomaly_score' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'anomaly_score' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'anomaly_score' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'anomaly_score' => 'anomalyScore' ]; + 'anomaly_score' => 'anomalyScore']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'anomaly_score' => 'setAnomalyScore' ]; + 'anomaly_score' => 'setAnomalyScore']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'anomaly_score' => 'getAnomalyScore' ]; + 'anomaly_score' => 'getAnomalyScore']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -126,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -136,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -155,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,29 +201,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['anomaly_score'] === null) { + if (null === $this->container['anomaly_score']) { $invalidProperties[] = "'anomaly_score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -217,9 +233,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether browser tampering was detected according to our internal thresholds. + * @param bool $result flag indicating whether browser tampering was detected according to our internal thresholds * * @return $this */ @@ -231,7 +247,7 @@ public function setResult($result) } /** - * Gets anomaly_score + * Gets anomaly_score. * * @return float */ @@ -241,7 +257,7 @@ public function getAnomalyScore() } /** - * Sets anomaly_score + * Sets anomaly_score. * * @param float $anomaly_score Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. * @@ -253,12 +269,13 @@ public function setAnomalyScore($anomaly_score) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +286,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +299,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +315,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index f67ce32f..e98b3f50 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,9 +224,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise. + * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise * * @return $this */ @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 0b36e712..92c44b91 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -121,7 +157,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -131,7 +167,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -150,26 +186,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,26 +195,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -208,7 +224,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. * @@ -220,12 +236,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -236,7 +253,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -249,10 +266,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -267,30 +282,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 79c743fa..ba742042 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -1,17 +1,18 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -186,7 +235,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -196,7 +245,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -215,39 +264,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -257,56 +273,56 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -316,9 +332,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -330,9 +346,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -340,9 +356,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -354,7 +370,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -364,9 +380,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -378,7 +394,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -388,7 +404,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -402,9 +418,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -412,9 +428,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -426,7 +442,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -436,9 +452,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -450,7 +466,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -460,9 +476,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -474,7 +490,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -484,9 +500,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -498,7 +514,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -508,9 +524,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -522,7 +538,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -532,9 +548,9 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * - * @param string $linked_id A customer-provided id that was sent with identification request. + * @param string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -546,9 +562,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -556,9 +572,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -570,7 +586,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -580,9 +596,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -594,9 +610,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -604,9 +620,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -618,9 +634,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -628,9 +644,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -640,12 +656,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -656,7 +673,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -669,10 +686,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -687,30 +702,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index a0647950..1a1cefa7 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -1,17 +1,18 @@ 'bool', -'origin_timezone' => 'string', -'origin_country' => 'string', -'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'origin_timezone' => null, -'origin_country' => null, -'methods' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'origin_timezone' => 'string', + 'origin_country' => 'string', + 'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'origin_timezone' => null, + 'origin_country' => null, + 'methods' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'origin_timezone' => 'originTimezone', -'origin_country' => 'originCountry', -'methods' => 'methods' ]; + 'origin_timezone' => 'originTimezone', + 'origin_country' => 'originCountry', + 'methods' => 'methods']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'origin_timezone' => 'setOriginTimezone', -'origin_country' => 'setOriginCountry', -'methods' => 'setMethods' ]; + 'origin_timezone' => 'setOriginTimezone', + 'origin_country' => 'setOriginCountry', + 'methods' => 'setMethods']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'origin_timezone' => 'getOriginTimezone', -'origin_country' => 'getOriginCountry', -'methods' => 'getMethods' ]; + 'origin_timezone' => 'getOriginTimezone', + 'origin_country' => 'getOriginCountry', + 'methods' => 'getMethods']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; + $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; + $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -136,7 +175,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -146,7 +185,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -165,29 +204,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; - $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; - $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -197,32 +213,32 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['origin_timezone'] === null) { + if (null === $this->container['origin_timezone']) { $invalidProperties[] = "'origin_timezone' can't be null"; } - if ($this->container['methods'] === null) { + if (null === $this->container['methods']) { $invalidProperties[] = "'methods' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -232,9 +248,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result VPN or other anonymizing service has been used when sending the request. + * @param bool $result VPN or other anonymizing service has been used when sending the request * * @return $this */ @@ -246,7 +262,7 @@ public function setResult($result) } /** - * Gets origin_timezone + * Gets origin_timezone. * * @return string */ @@ -256,9 +272,9 @@ public function getOriginTimezone() } /** - * Sets origin_timezone + * Sets origin_timezone. * - * @param string $origin_timezone Local timezone which is used in timezoneMismatch method. + * @param string $origin_timezone local timezone which is used in timezoneMismatch method * * @return $this */ @@ -270,7 +286,7 @@ public function setOriginTimezone($origin_timezone) } /** - * Gets origin_country + * Gets origin_country. * * @return string */ @@ -280,7 +296,7 @@ public function getOriginCountry() } /** - * Sets origin_country + * Sets origin_country. * * @param string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * @@ -294,9 +310,9 @@ public function setOriginCountry($origin_country) } /** - * Gets methods + * Gets methods. * - * @return \Fingerprint\ServerAPI\Model\VpnResultMethods + * @return VpnResultMethods */ public function getMethods() { @@ -304,9 +320,9 @@ public function getMethods() } /** - * Sets methods + * Sets methods. * - * @param \Fingerprint\ServerAPI\Model\VpnResultMethods $methods methods + * @param VpnResultMethods $methods methods * * @return $this */ @@ -316,12 +332,13 @@ public function setMethods($methods) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -332,7 +349,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -345,10 +362,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -363,30 +378,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index b57a059f..bf991334 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -1,17 +1,18 @@ 'bool', -'public_vpn' => 'bool', -'auxiliary_mobile' => 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'timezone_mismatch' => null, -'public_vpn' => null, -'auxiliary_mobile' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'timezone_mismatch' => 'bool', + 'public_vpn' => 'bool', + 'auxiliary_mobile' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'timezone_mismatch' => null, + 'public_vpn' => null, + 'auxiliary_mobile' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', -'public_vpn' => 'publicVPN', -'auxiliary_mobile' => 'auxiliaryMobile' ]; + 'public_vpn' => 'publicVPN', + 'auxiliary_mobile' => 'auxiliaryMobile']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', -'public_vpn' => 'setPublicVpn', -'auxiliary_mobile' => 'setAuxiliaryMobile' ]; + 'public_vpn' => 'setPublicVpn', + 'auxiliary_mobile' => 'setAuxiliaryMobile']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', -'public_vpn' => 'getPublicVpn', -'auxiliary_mobile' => 'getAuxiliaryMobile' ]; + 'public_vpn' => 'getPublicVpn', + 'auxiliary_mobile' => 'getAuxiliaryMobile']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; + $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; + $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -131,7 +169,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -141,7 +179,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -160,28 +198,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; - $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; - $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -191,32 +207,32 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['timezone_mismatch'] === null) { + if (null === $this->container['timezone_mismatch']) { $invalidProperties[] = "'timezone_mismatch' can't be null"; } - if ($this->container['public_vpn'] === null) { + if (null === $this->container['public_vpn']) { $invalidProperties[] = "'public_vpn' can't be null"; } - if ($this->container['auxiliary_mobile'] === null) { + if (null === $this->container['auxiliary_mobile']) { $invalidProperties[] = "'auxiliary_mobile' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets timezone_mismatch + * Gets timezone_mismatch. * * @return bool */ @@ -226,9 +242,9 @@ public function getTimezoneMismatch() } /** - * Sets timezone_mismatch + * Sets timezone_mismatch. * - * @param bool $timezone_mismatch User's browser timezone doesn't match the timezone from which the request was originally made. + * @param bool $timezone_mismatch user's browser timezone doesn't match the timezone from which the request was originally made * * @return $this */ @@ -240,7 +256,7 @@ public function setTimezoneMismatch($timezone_mismatch) } /** - * Gets public_vpn + * Gets public_vpn. * * @return bool */ @@ -250,9 +266,9 @@ public function getPublicVpn() } /** - * Sets public_vpn + * Sets public_vpn. * - * @param bool $public_vpn Request IP address is owned and used by a public VPN service provider. + * @param bool $public_vpn request IP address is owned and used by a public VPN service provider * * @return $this */ @@ -264,7 +280,7 @@ public function setPublicVpn($public_vpn) } /** - * Gets auxiliary_mobile + * Gets auxiliary_mobile. * * @return bool */ @@ -274,7 +290,7 @@ public function getAuxiliaryMobile() } /** - * Sets auxiliary_mobile + * Sets auxiliary_mobile. * * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. * @@ -286,12 +302,13 @@ public function setAuxiliaryMobile($auxiliary_mobile) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -302,7 +319,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -315,10 +332,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -333,30 +348,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 008c9a2b..e2bad593 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -1,17 +1,18 @@ 'string', -'client_referrer' => 'string', -'user_agent' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', -'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', -'incognito' => 'bool', -'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', -'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', -'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'tor' => '\Fingerprint\ServerAPI\Model\TorResult', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', -'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', -'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'request_id' => 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'visitor_id' => null, -'client_referrer' => null, -'user_agent' => null, -'bot' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'raw_device_attributes' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'request_id' => null, -'browser_details' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'visitor_id' => 'string', + 'client_referrer' => 'string', + 'user_agent' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', + 'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', + 'incognito' => 'bool', + 'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', + 'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', + 'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', + 'tor' => '\Fingerprint\ServerAPI\Model\TorResult', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', + 'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', + 'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', + 'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', + 'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'visitor_id' => null, + 'client_referrer' => null, + 'user_agent' => null, + 'bot' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'raw_device_attributes' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'request_id' => null, + 'browser_details' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', -'client_referrer' => 'clientReferrer', -'user_agent' => 'userAgent', -'bot' => 'bot', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'raw_device_attributes' => 'rawDeviceAttributes', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'client_referrer' => 'clientReferrer', + 'user_agent' => 'userAgent', + 'bot' => 'bot', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'raw_device_attributes' => 'rawDeviceAttributes', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'request_id' => 'requestId', + 'browser_details' => 'browserDetails', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'visitor_id' => 'setVisitorId', -'client_referrer' => 'setClientReferrer', -'user_agent' => 'setUserAgent', -'bot' => 'setBot', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'raw_device_attributes' => 'setRawDeviceAttributes', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'client_referrer' => 'setClientReferrer', + 'user_agent' => 'setUserAgent', + 'bot' => 'setBot', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'raw_device_attributes' => 'setRawDeviceAttributes', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'request_id' => 'setRequestId', + 'browser_details' => 'setBrowserDetails', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'visitor_id' => 'getVisitorId', -'client_referrer' => 'getClientReferrer', -'user_agent' => 'getUserAgent', -'bot' => 'getBot', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'raw_device_attributes' => 'getRawDeviceAttributes', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values + 'client_referrer' => 'getClientReferrer', + 'user_agent' => 'getUserAgent', + 'bot' => 'getBot', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'raw_device_attributes' => 'getRawDeviceAttributes', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'request_id' => 'getRequestId', + 'browser_details' => 'getBrowserDetails', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. * * @var mixed[] */ protected $container = []; /** - * Constructor + * Constructor. * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; $this->container['client_referrer'] = isset($data['client_referrer']) ? $data['client_referrer'] : null; @@ -380,6 +318,84 @@ public function __construct(array $data = null) $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; } + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + /** * Show all the invalid properties with reasons. * @@ -389,59 +405,59 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -451,7 +467,7 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -465,7 +481,7 @@ public function setVisitorId($visitor_id) } /** - * Gets client_referrer + * Gets client_referrer. * * @return string */ @@ -475,7 +491,7 @@ public function getClientReferrer() } /** - * Sets client_referrer + * Sets client_referrer. * * @param string $client_referrer client_referrer * @@ -489,7 +505,7 @@ public function setClientReferrer($client_referrer) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -499,7 +515,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -513,9 +529,9 @@ public function setUserAgent($user_agent) } /** - * Gets bot + * Gets bot. * - * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult + * @return BotdDetectionResult */ public function getBot() { @@ -523,9 +539,9 @@ public function getBot() } /** - * Sets bot + * Sets bot. * - * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot + * @param BotdDetectionResult $bot bot * * @return $this */ @@ -537,9 +553,9 @@ public function setBot($bot) } /** - * Gets ip_info + * Gets ip_info. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResult + * @return IpInfoResult */ public function getIpInfo() { @@ -547,9 +563,9 @@ public function getIpInfo() } /** - * Sets ip_info + * Sets ip_info. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info + * @param IpInfoResult $ip_info ip_info * * @return $this */ @@ -561,7 +577,7 @@ public function setIpInfo($ip_info) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -571,9 +587,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -585,9 +601,9 @@ public function setIncognito($incognito) } /** - * Gets root_apps + * Gets root_apps. * - * @return \Fingerprint\ServerAPI\Model\RootAppsResult + * @return RootAppsResult */ public function getRootApps() { @@ -595,9 +611,9 @@ public function getRootApps() } /** - * Sets root_apps + * Sets root_apps. * - * @param \Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps + * @param RootAppsResult $root_apps root_apps * * @return $this */ @@ -609,9 +625,9 @@ public function setRootApps($root_apps) } /** - * Gets emulator + * Gets emulator. * - * @return \Fingerprint\ServerAPI\Model\EmulatorResult + * @return EmulatorResult */ public function getEmulator() { @@ -619,9 +635,9 @@ public function getEmulator() } /** - * Sets emulator + * Sets emulator. * - * @param \Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator + * @param EmulatorResult $emulator emulator * * @return $this */ @@ -633,9 +649,9 @@ public function setEmulator($emulator) } /** - * Gets cloned_app + * Gets cloned_app. * - * @return \Fingerprint\ServerAPI\Model\ClonedAppResult + * @return ClonedAppResult */ public function getClonedApp() { @@ -643,9 +659,9 @@ public function getClonedApp() } /** - * Sets cloned_app + * Sets cloned_app. * - * @param \Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app + * @param ClonedAppResult $cloned_app cloned_app * * @return $this */ @@ -657,9 +673,9 @@ public function setClonedApp($cloned_app) } /** - * Gets factory_reset + * Gets factory_reset. * - * @return \Fingerprint\ServerAPI\Model\FactoryResetResult + * @return FactoryResetResult */ public function getFactoryReset() { @@ -667,9 +683,9 @@ public function getFactoryReset() } /** - * Sets factory_reset + * Sets factory_reset. * - * @param \Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset + * @param FactoryResetResult $factory_reset factory_reset * * @return $this */ @@ -681,9 +697,9 @@ public function setFactoryReset($factory_reset) } /** - * Gets jailbroken + * Gets jailbroken. * - * @return \Fingerprint\ServerAPI\Model\JailbrokenResult + * @return JailbrokenResult */ public function getJailbroken() { @@ -691,9 +707,9 @@ public function getJailbroken() } /** - * Sets jailbroken + * Sets jailbroken. * - * @param \Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken + * @param JailbrokenResult $jailbroken jailbroken * * @return $this */ @@ -705,9 +721,9 @@ public function setJailbroken($jailbroken) } /** - * Gets frida + * Gets frida. * - * @return \Fingerprint\ServerAPI\Model\FridaResult + * @return FridaResult */ public function getFrida() { @@ -715,9 +731,9 @@ public function getFrida() } /** - * Sets frida + * Sets frida. * - * @param \Fingerprint\ServerAPI\Model\FridaResult $frida frida + * @param FridaResult $frida frida * * @return $this */ @@ -729,9 +745,9 @@ public function setFrida($frida) } /** - * Gets ip_blocklist + * Gets ip_blocklist. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResult + * @return IpBlockListResult */ public function getIpBlocklist() { @@ -739,9 +755,9 @@ public function getIpBlocklist() } /** - * Sets ip_blocklist + * Sets ip_blocklist. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist + * @param IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ @@ -753,9 +769,9 @@ public function setIpBlocklist($ip_blocklist) } /** - * Gets tor + * Gets tor. * - * @return \Fingerprint\ServerAPI\Model\TorResult + * @return TorResult */ public function getTor() { @@ -763,9 +779,9 @@ public function getTor() } /** - * Sets tor + * Sets tor. * - * @param \Fingerprint\ServerAPI\Model\TorResult $tor tor + * @param TorResult $tor tor * * @return $this */ @@ -777,9 +793,9 @@ public function setTor($tor) } /** - * Gets privacy_settings + * Gets privacy_settings. * - * @return \Fingerprint\ServerAPI\Model\PrivacySettingsResult + * @return PrivacySettingsResult */ public function getPrivacySettings() { @@ -787,9 +803,9 @@ public function getPrivacySettings() } /** - * Sets privacy_settings + * Sets privacy_settings. * - * @param \Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings + * @param PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ @@ -801,9 +817,9 @@ public function setPrivacySettings($privacy_settings) } /** - * Gets virtual_machine + * Gets virtual_machine. * - * @return \Fingerprint\ServerAPI\Model\VirtualMachineResult + * @return VirtualMachineResult */ public function getVirtualMachine() { @@ -811,9 +827,9 @@ public function getVirtualMachine() } /** - * Sets virtual_machine + * Sets virtual_machine. * - * @param \Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine + * @param VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ @@ -825,9 +841,9 @@ public function setVirtualMachine($virtual_machine) } /** - * Gets vpn + * Gets vpn. * - * @return \Fingerprint\ServerAPI\Model\VpnResult + * @return VpnResult */ public function getVpn() { @@ -835,9 +851,9 @@ public function getVpn() } /** - * Sets vpn + * Sets vpn. * - * @param \Fingerprint\ServerAPI\Model\VpnResult $vpn vpn + * @param VpnResult $vpn vpn * * @return $this */ @@ -849,9 +865,9 @@ public function setVpn($vpn) } /** - * Gets proxy + * Gets proxy. * - * @return \Fingerprint\ServerAPI\Model\ProxyResult + * @return ProxyResult */ public function getProxy() { @@ -859,9 +875,9 @@ public function getProxy() } /** - * Sets proxy + * Sets proxy. * - * @param \Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy + * @param ProxyResult $proxy proxy * * @return $this */ @@ -873,9 +889,9 @@ public function setProxy($proxy) } /** - * Gets tampering + * Gets tampering. * - * @return \Fingerprint\ServerAPI\Model\TamperingResult + * @return TamperingResult */ public function getTampering() { @@ -883,9 +899,9 @@ public function getTampering() } /** - * Sets tampering + * Sets tampering. * - * @param \Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering + * @param TamperingResult $tampering tampering * * @return $this */ @@ -897,9 +913,9 @@ public function setTampering($tampering) } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. * - * @return \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + * @return RawDeviceAttributesResult */ public function getRawDeviceAttributes() { @@ -907,9 +923,9 @@ public function getRawDeviceAttributes() } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * - * @param \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes + * @param RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ @@ -921,9 +937,9 @@ public function setRawDeviceAttributes($raw_device_attributes) } /** - * Gets high_activity + * Gets high_activity. * - * @return \Fingerprint\ServerAPI\Model\HighActivityResult + * @return HighActivityResult */ public function getHighActivity() { @@ -931,9 +947,9 @@ public function getHighActivity() } /** - * Sets high_activity + * Sets high_activity. * - * @param \Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity + * @param HighActivityResult $high_activity high_activity * * @return $this */ @@ -945,9 +961,9 @@ public function setHighActivity($high_activity) } /** - * Gets location_spoofing + * Gets location_spoofing. * - * @return \Fingerprint\ServerAPI\Model\LocationSpoofingResult + * @return LocationSpoofingResult */ public function getLocationSpoofing() { @@ -955,9 +971,9 @@ public function getLocationSpoofing() } /** - * Sets location_spoofing + * Sets location_spoofing. * - * @param \Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing + * @param LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ @@ -969,9 +985,9 @@ public function setLocationSpoofing($location_spoofing) } /** - * Gets suspect_score + * Gets suspect_score. * - * @return \Fingerprint\ServerAPI\Model\SuspectScoreResult + * @return SuspectScoreResult */ public function getSuspectScore() { @@ -979,9 +995,9 @@ public function getSuspectScore() } /** - * Sets suspect_score + * Sets suspect_score. * - * @param \Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score + * @param SuspectScoreResult $suspect_score suspect_score * * @return $this */ @@ -993,7 +1009,7 @@ public function setSuspectScore($suspect_score) } /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -1003,9 +1019,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -1017,9 +1033,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -1027,9 +1043,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -1041,7 +1057,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -1051,7 +1067,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -1065,9 +1081,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -1075,9 +1091,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -1089,7 +1105,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -1099,9 +1115,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -1113,7 +1129,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -1123,9 +1139,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -1137,7 +1153,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -1147,9 +1163,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -1161,7 +1177,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -1171,9 +1187,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -1185,7 +1201,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -1195,9 +1211,9 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * - * @param string $linked_id A customer-provided id that was sent with identification request. + * @param string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -1209,9 +1225,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -1219,9 +1235,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -1233,7 +1249,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -1243,9 +1259,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -1257,9 +1273,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -1267,9 +1283,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -1281,9 +1297,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -1291,9 +1307,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -1303,12 +1319,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -1319,7 +1336,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -1332,10 +1349,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -1350,30 +1365,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 05e28574..214bb57a 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -1,17 +1,18 @@ format('Y-m-d') : $data->format(\DateTime::ATOM); - } elseif (is_array($data)) { + } + if ($data instanceof \DateTime) { + return ('date' === $format) ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM); + } + if (is_array($data)) { foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } + return $data; - } elseif ($data instanceof \stdClass) { + } + if ($data instanceof \stdClass) { foreach ($data as $property => $value) { - $data->$property = self::sanitizeForSerialization($value); + $data->{$property} = self::sanitizeForSerialization($value); } + return $data; - } elseif (is_object($data)) { + } + if (is_object($data)) { $values = []; $formats = $data::swaggerFormats(); foreach ($data::swaggerTypes() as $property => $swaggerType) { $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null + $value = $data->{$getter}(); + if (null !== $value && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); + + throw new \InvalidArgumentException("Invalid value for enum '{$swaggerType}', must be one of: '{$imploded}'"); } - if ($value !== null) { + if (null !== $value) { $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); } } - return (object)$values; - } else { - return (string)$data; + + return (object) $values; } + + return (string) $data; } /** * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif + * e.g. ../../sun.gif becomes sun.gif. * * @param string $filename filename to be sanitized * @@ -98,11 +105,11 @@ public static function sanitizeForSerialization($data, $format = null) */ public static function sanitizeFilename($filename) { - if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { return $match[1]; - } else { - return $filename; } + + return $filename; } /** @@ -124,8 +131,8 @@ public static function toPathValue($value) * If it's a string, pass through unchanged. It will be url-encoded * later. * - * @param string[]|string|\DateTime $object an object to be serialized to a string - * @param string|null $format the format of the parameter + * @param \DateTime|string|string[] $object an object to be serialized to a string + * @param null|string $format the format of the parameter * * @return string the serialized object */ @@ -133,15 +140,15 @@ public static function toQueryValue($object, $format = null) { if (is_array($object)) { return implode(',', $object); - } else { - return self::toString($object, $format); } + + return self::toString($object, $format); } /** * Take value and turn it into a string suitable for inclusion in * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339 + * If it's a datetime object, format it in RFC3339. * * @param string $value a string which will be part of the header * @@ -155,9 +162,9 @@ public static function toHeaderValue($value) /** * Take value and turn it into a string suitable for inclusion in * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339 + * If it's a datetime object, format it in RFC3339. * - * @param string|\SplFileObject $value the value of the form parameter + * @param \SplFileObject|string $value the value of the form parameter * * @return string the form string */ @@ -165,29 +172,29 @@ public static function toFormValue($value) { if ($value instanceof \SplFileObject) { return $value->getRealPath(); - } else { - return self::toString($value); } + + return self::toString($value); } /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged * If it's a datetime object, format it in RFC3339 - * If it's a date, format it in Y-m-d + * If it's a date, format it in Y-m-d. * - * @param string|\DateTime $value the value of the parameter - * @param string|null $format the format of the parameter + * @param \DateTime|string $value the value of the parameter + * @param null|string $format the format of the parameter * * @return string the header string */ public static function toString($value, $format = null) { if ($value instanceof \DateTime) { - return ($format === 'date') ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); - } else { - return $value; + return ('date' === $format) ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); } + + return $value; } /** @@ -195,7 +202,7 @@ public static function toString($value, $format = null) * * @param array $collection collection to serialize to a string * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) + * ssv, tsv, pipes, multi) * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array * * @return string @@ -207,6 +214,7 @@ public static function serializeCollection(array $collection, $collectionFormat, // need to fix the result of multidimensional arrays. return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); } + switch ($collectionFormat) { case 'pipes': return implode('|', $collection); @@ -225,41 +233,47 @@ public static function serializeCollection(array $collection, $collectionFormat, } /** - * Deserialize a JSON string into an object + * Deserialize a JSON string into an object. * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string * @param string[] $httpHeaders HTTP headers * - * @return mixed - * @throws Exception + * @throws \Exception */ public static function deserialize($data, $class, $httpHeaders = null): mixed { if (null === $data) { return null; - } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] + } + if ('map[' === substr($class, 0, 4)) { // for associative array e.g. map[string,int] $inner = substr($class, 4, -1); $deserialized = []; - if (strrpos($inner, ",") !== false) { + if (false !== strrpos($inner, ',')) { $subClass_array = explode(',', $inner, 2); $subClass = $subClass_array[1]; foreach ($data as $key => $value) { $deserialized[$key] = self::deserialize($value, $subClass, null); } } + return $deserialized; - } elseif (strcasecmp(substr($class, -2), '[]') === 0) { + } + if (0 === strcasecmp(substr($class, -2), '[]')) { $subClass = substr($class, 0, -2); $values = []; foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } + return $values; - } elseif ($class === 'object' || $class === '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult') { + } + if ('object' === $class || '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult' === $class) { settype($data, 'array'); + return $data; - } elseif ($class === '\DateTime') { + } + if ('\DateTime' === $class) { // Some API's return an invalid, empty string as a // date-time property. DateTime::__construct() will return // the current time for empty input which is probably not @@ -268,37 +282,45 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed // this graceful. if (!empty($data)) { return new \DateTime($data); - } else { - return null; } - } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + + return null; + } + if (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $originalData = $data; $normalizedClass = strtolower($class); + switch ($normalizedClass) { - case "int": - $normalizedClass = "integer"; + case 'int': + $normalizedClass = 'integer'; + break; - case "bool": - $normalizedClass = "boolean"; + + case 'bool': + $normalizedClass = 'boolean'; + break; } - if ($normalizedClass === "float" && is_numeric($originalData)) { - return (float)$originalData; + if ('float' === $normalizedClass && is_numeric($originalData)) { + return (float) $originalData; } - if ($normalizedClass === 'string' && is_object($data)) { - throw new Exception("Cannot convert object to string"); + if ('string' === $normalizedClass && is_object($data)) { + throw new \Exception('Cannot convert object to string'); } settype($data, $class); if (gettype($data) === $normalizedClass) { return $data; } - throw new Exception("Serialization error: Could not convert " . gettype($originalData) . " to " . $class); + + throw new \Exception('Serialization error: Could not convert '.gettype($originalData).' to '.$class); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + + throw new \InvalidArgumentException("Invalid value for enum '{$class}', must be one of: '{$imploded}'"); } + return $data; } @@ -312,9 +334,10 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed $propertyValue = $data->{$instance::attributeMap()[$property]}; if (isset($propertyValue)) { - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + $instance->{$propertySetter}(self::deserialize($propertyValue, $type, null)); } } + return $instance; } } diff --git a/src/Sealed/DecompressionException.php b/src/Sealed/DecompressionException.php index 8ea512d4..6f6d3763 100644 --- a/src/Sealed/DecompressionException.php +++ b/src/Sealed/DecompressionException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; - -class DecompressionException extends Exception +class DecompressionException extends \Exception { public function __construct() { - parent::__construct("Decompression failed"); + parent::__construct('Decompression failed'); } } diff --git a/src/Sealed/InvalidSealedDataException.php b/src/Sealed/InvalidSealedDataException.php index e97070eb..809199f9 100644 --- a/src/Sealed/InvalidSealedDataException.php +++ b/src/Sealed/InvalidSealedDataException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use InvalidArgumentException; - -class InvalidSealedDataException extends InvalidArgumentException +class InvalidSealedDataException extends \InvalidArgumentException { public function __construct() { - parent::__construct("Invalid sealed data"); + parent::__construct('Invalid sealed data'); } } diff --git a/src/Sealed/InvalidSealedDataHeaderException.php b/src/Sealed/InvalidSealedDataHeaderException.php index dad3d638..9f4d70e9 100644 --- a/src/Sealed/InvalidSealedDataHeaderException.php +++ b/src/Sealed/InvalidSealedDataHeaderException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use InvalidArgumentException; - -class InvalidSealedDataHeaderException extends InvalidArgumentException +class InvalidSealedDataHeaderException extends \InvalidArgumentException { public function __construct() { - parent::__construct("Invalid sealed data header"); + parent::__construct('Invalid sealed data header'); } } diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 6414e093..5bd26c57 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -2,20 +2,17 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; use Fingerprint\ServerAPI\Model\EventResponse; -use InvalidArgumentException; class Sealed { - private static $SEAL_HEADER = "\x9E\x85\xDC\xED"; private const NONCE_LENGTH = 12; private const AUTH_TAG_LENGTH = 16; + private static $SEAL_HEADER = "\x9E\x85\xDC\xED"; /** - * @param string $sealed * @param DecryptionKey[] $keys - * @return EventResponse + * * @throws UnsealAggregateException */ public static function unsealEventResponse(string $sealed, array $keys): EventResponse @@ -34,9 +31,9 @@ public static function unsealEventResponse(string $sealed, array $keys): EventRe /** * Decrypts the sealed response with the provided keys. * - * @param string $sealed Base64 encoded sealed data - * @param DecryptionKey[] $keys Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. - * @return string + * @param string $sealed Base64 encoded sealed data + * @param DecryptionKey[] $keys Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. + * * @throws UnsealAggregateException */ public static function unseal(string $sealed, array $keys): string @@ -52,18 +49,20 @@ public static function unseal(string $sealed, array $keys): string case DecryptionAlgorithm::AES_256_GCM: try { $data = substr($sealed, strlen(self::$SEAL_HEADER)); + return self::decryptAes256Gcm($data, $key->getKey()); - } catch (Exception $exception) { + } catch (\Exception $exception) { $aggregateException->addException(new UnsealException( - "Failed to decrypt", + 'Failed to decrypt', $exception, $key )); } + break; default: - throw new InvalidArgumentException("Invalid decryption algorithm"); + throw new \InvalidArgumentException('Invalid decryption algorithm'); } } @@ -71,7 +70,10 @@ public static function unseal(string $sealed, array $keys): string } /** - * @throws Exception + * @param mixed $sealedData + * @param mixed $decryptionKey + * + * @throws \Exception */ private static function decryptAes256Gcm($sealedData, $decryptionKey): string { @@ -83,21 +85,23 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string $decryptedData = openssl_decrypt($ciphertext, 'aes-256-gcm', $decryptionKey, OPENSSL_RAW_DATA, $nonce, $tag); - if ($decryptedData === false) { - throw new Exception("Decryption failed"); + if (false === $decryptedData) { + throw new \Exception('Decryption failed'); } return self::decompress($decryptedData); } /** - * @throws Exception + * @param mixed $data + * + * @throws \Exception */ private static function decompress($data): string { $inflated = gzinflate($data); - if ($inflated === false) { + if (false === $inflated) { throw new DecompressionException(); } diff --git a/src/Sealed/UnsealAggregateException.php b/src/Sealed/UnsealAggregateException.php index 0131c2a1..00f3969b 100644 --- a/src/Sealed/UnsealAggregateException.php +++ b/src/Sealed/UnsealAggregateException.php @@ -2,26 +2,23 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; - -class UnsealAggregateException extends Exception +class UnsealAggregateException extends \Exception { /** - * @var Exception[] + * @var \Exception[] */ private $exceptions; public function __construct() { - parent::__construct("Failed to unseal with all decryption keys"); + parent::__construct('Failed to unseal with all decryption keys'); } - public function addException(Exception $exception) + public function addException(\Exception $exception) { $this->exceptions[] = $exception; } - public function getExceptions() { return $this->exceptions; diff --git a/src/Sealed/UnsealException.php b/src/Sealed/UnsealException.php index 19c36f64..16bbad3a 100644 --- a/src/Sealed/UnsealException.php +++ b/src/Sealed/UnsealException.php @@ -2,9 +2,7 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; - -class UnsealException extends Exception +class UnsealException extends \Exception { public $decryptionKeyDescription; @@ -16,10 +14,10 @@ public function __construct($message, $cause, $decryptionKey) public function __toString() { - return "UnsealException{" . - "decryptionKey=" . $this->decryptionKeyDescription . - ", message=" . $this->getMessage() . - ", cause=" . $this->getPrevious() . + return 'UnsealException{'. + 'decryptionKey='.$this->decryptionKeyDescription. + ', message='.$this->getMessage(). + ', cause='.$this->getPrevious(). '}'; } } diff --git a/src/SerializationException.php b/src/SerializationException.php index 0214a464..9c0fe867 100644 --- a/src/SerializationException.php +++ b/src/SerializationException.php @@ -2,14 +2,13 @@ namespace Fingerprint\ServerAPI; -use Exception; use Psr\Http\Message\ResponseInterface; -final class SerializationException extends Exception +final class SerializationException extends \Exception { protected readonly ResponseInterface $response; - public function __construct(ResponseInterface $response, Exception $prev) + public function __construct(ResponseInterface $response, \Exception $prev) { parent::__construct("Response from the server couldn't be serialized", $prev->getCode(), $prev); $this->response = $response; diff --git a/template/ApiException.mustache b/template/ApiException.mustache new file mode 100644 index 00000000..d8b983c9 --- /dev/null +++ b/template/ApiException.mustache @@ -0,0 +1,75 @@ +partial_header}} +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace {{invokerPackage}}; + +use \Exception; + +/** + * ApiException Class Doc Comment + * + * @category Class + * @package {{invokerPackage}} + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class ApiException extends Exception +{ + + /** + * The deserialized response object + * + * @var $responseObject; + */ + protected $responseObject; + + /** + * Constructor + * + * @param string $message Error message + * @param int $code HTTP status code + * @param string[]|null $responseHeaders HTTP response header + * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string + */ + public function __construct($message = "", $code = 0) + { + parent::__construct($message, $code); + } + + /** + * Sets the deseralized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deseralized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} \ No newline at end of file diff --git a/template/api.mustache b/template/api.mustache index da7fee4e..a47717ca 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -27,6 +27,8 @@ use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; use {{invokerPackage}}\ObjectSerializer; use {{invokerPackage}}\SerializationException; +use Psr\Http\Message\ResponseInterface; +use \GuzzleHttp\Exception\GuzzleException; /** * {{classname}} Class Doc Comment @@ -97,29 +99,27 @@ use {{invokerPackage}}\SerializationException; try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - $errorBody = $e->getResponse()->getBody()->getContents(); - $e->getResponse()->getBody()->rewind(); - throw new ApiException( + $apiException = new ApiException( "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $errorBody : null + $e->getCode() ); + $apiException->setResponseObject($e->getResponse()); + throw $apiException; } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( + $apiException = new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), - $statusCode, - $response->getHeaders(), - $response->getBody() + $statusCode ); + $apiException->setResponseObject($response); + throw $apiException; } {{#returnType}} @@ -139,23 +139,29 @@ use {{invokerPackage}}\SerializationException; {{/returnType}} } catch (ApiException $e) { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $responseBody = $e->getResponseBody(); - $data = ObjectSerializer::deserialize( - $responseBody, - '{{dataType}}', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - {{/dataType}} - {{/responses}} + try { + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '{{dataType}}', + $response->getHeaders() + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} + } + throw $e; + } catch (\Exception $_) { + } } - throw $e; - } } /** diff --git a/template/composer.mustache b/template/composer.mustache index 397d75a8..eb11e0bc 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -41,9 +41,7 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.19" + "phpunit/phpunit": "8.5.33" }, "autoload": { "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/src" } From b8a89cfc848718796efa8dbf809908699bd4f193 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 26 Jul 2024 12:56:22 +0300 Subject: [PATCH 033/118] refactor: update pre commit --- .git_hooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit index 0d1e2b3f..4dfceeb5 100755 --- a/.git_hooks/pre-commit +++ b/.git_hooks/pre-commit @@ -1,3 +1,3 @@ #!/bin/sh -docker-compose run --rm lint \ No newline at end of file +docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix --config=/code/.php-cs-fixer.php /code/src \ No newline at end of file From ae7c93a97600543e39a95f50db88fcad4915463e Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 26 Jul 2024 14:37:42 +0300 Subject: [PATCH 034/118] refactor: update composer dependencies --- composer.json | 8 ++++---- template/composer.mustache | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index e8db066d..61e80160 100644 --- a/composer.json +++ b/composer.json @@ -36,11 +36,11 @@ "ext-mbstring": "*", "guzzlehttp/guzzle": "~7.2", "ext-zlib": "*", - "ext-openssl": "*", - "vlucas/phpdotenv": "^5.6" + "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33" + "phpunit/phpunit": "8.5.33", + "vlucas/phpdotenv": "^5.6" }, "autoload": { "psr-4": { "Fingerprint\\ServerAPI\\" : "./src" } @@ -48,4 +48,4 @@ "autoload-dev": { "psr-4": { "Fingerprint\\ServerAPI\\" : "test/" } } -} +} \ No newline at end of file diff --git a/template/composer.mustache b/template/composer.mustache index eb11e0bc..1f968f05 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -41,7 +41,8 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33" + "phpunit/phpunit": "8.5.33", + "vlucas/phpdotenv": "^5.6" }, "autoload": { "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/src" } From 15b71da497be385d6da209305f7ca46b9750ecc4 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 26 Jul 2024 14:39:50 +0300 Subject: [PATCH 035/118] refactor: update model comment header --- src/Model/ASN.php | 2 -- src/Model/BotdDetectionResult.php | 2 -- src/Model/BotdResult.php | 2 -- src/Model/BrowserDetails.php | 2 -- src/Model/ClonedAppResult.php | 2 -- src/Model/Confidence.php | 2 -- src/Model/DataCenter.php | 2 -- src/Model/DeprecatedIPLocation.php | 2 -- src/Model/DeprecatedIPLocationCity.php | 2 -- src/Model/EmulatorResult.php | 2 -- src/Model/ErrorEvent403Response.php | 2 -- src/Model/ErrorEvent403ResponseError.php | 2 -- src/Model/ErrorEvent404Response.php | 2 -- src/Model/ErrorEvent404ResponseError.php | 2 -- src/Model/ErrorVisits403.php | 2 -- src/Model/EventResponse.php | 2 -- src/Model/FactoryResetResult.php | 2 -- src/Model/FridaResult.php | 2 -- src/Model/HighActivityResult.php | 2 -- src/Model/IPLocation.php | 2 -- src/Model/IPLocationCity.php | 2 -- src/Model/IdentificationError.php | 2 -- src/Model/IncognitoResult.php | 2 -- src/Model/IpBlockListResult.php | 2 -- src/Model/IpBlockListResultDetails.php | 2 -- src/Model/IpInfoResult.php | 2 -- src/Model/IpInfoResultV4.php | 2 -- src/Model/IpInfoResultV6.php | 2 -- src/Model/JailbrokenResult.php | 2 -- src/Model/Location.php | 2 -- src/Model/LocationSpoofingResult.php | 2 -- src/Model/ManyRequestsResponse.php | 2 -- src/Model/PrivacySettingsResult.php | 2 -- src/Model/ProductError.php | 2 -- src/Model/ProductsResponse.php | 2 -- src/Model/ProductsResponseBotd.php | 2 -- src/Model/ProductsResponseIdentification.php | 2 -- src/Model/ProductsResponseIdentificationData.php | 2 -- src/Model/ProxyResult.php | 2 -- src/Model/RawDeviceAttributesResult.php | 2 -- src/Model/Response.php | 2 -- src/Model/ResponseVisits.php | 2 -- src/Model/RootAppsResult.php | 2 -- src/Model/SeenAt.php | 2 -- src/Model/SignalResponseClonedApp.php | 2 -- src/Model/SignalResponseEmulator.php | 2 -- src/Model/SignalResponseFactoryReset.php | 2 -- src/Model/SignalResponseFrida.php | 2 -- src/Model/SignalResponseHighActivity.php | 2 -- src/Model/SignalResponseIncognito.php | 2 -- src/Model/SignalResponseIpBlocklist.php | 2 -- src/Model/SignalResponseIpInfo.php | 2 -- src/Model/SignalResponseJailbroken.php | 2 -- src/Model/SignalResponseLocationSpoofing.php | 2 -- src/Model/SignalResponsePrivacySettings.php | 2 -- src/Model/SignalResponseProxy.php | 2 -- src/Model/SignalResponseRawDeviceAttributes.php | 2 -- src/Model/SignalResponseRootApps.php | 2 -- src/Model/SignalResponseSuspectScore.php | 2 -- src/Model/SignalResponseTampering.php | 2 -- src/Model/SignalResponseTor.php | 2 -- src/Model/SignalResponseVirtualMachine.php | 2 -- src/Model/SignalResponseVpn.php | 2 -- src/Model/Subdivision.php | 2 -- src/Model/SuspectScoreResult.php | 2 -- src/Model/TamperingResult.php | 2 -- src/Model/TorResult.php | 2 -- src/Model/VirtualMachineResult.php | 2 -- src/Model/Visit.php | 2 -- src/Model/VpnResult.php | 2 -- src/Model/VpnResultMethods.php | 2 -- src/Model/WebhookVisit.php | 2 -- template/model.mustache | 5 +---- 73 files changed, 1 insertion(+), 148 deletions(-) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index e27ebd1a..850ad69d 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -2,8 +2,6 @@ /** * ASN. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index db3b2e28..1e02803a 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -2,8 +2,6 @@ /** * BotdDetectionResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 526e9bc0..24083d55 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -2,8 +2,6 @@ /** * BotdResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 63fd242d..2c49a252 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -2,8 +2,6 @@ /** * BrowserDetails. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index fca05bcc..f0b84ebe 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -2,8 +2,6 @@ /** * ClonedAppResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 833894ca..4156b5c9 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -2,8 +2,6 @@ /** * Confidence. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 1c9562e7..e2f62094 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -2,8 +2,6 @@ /** * DataCenter. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 1e460ff7..3b5d8507 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -2,8 +2,6 @@ /** * DeprecatedIPLocation. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index e7d441d8..fdb8ccf1 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -2,8 +2,6 @@ /** * DeprecatedIPLocationCity. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 492de46d..337177a2 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -2,8 +2,6 @@ /** * EmulatorResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 8037e37e..f2f059d7 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -2,8 +2,6 @@ /** * ErrorEvent403Response. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index bc5e8c46..155f99fe 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -2,8 +2,6 @@ /** * ErrorEvent403ResponseError. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 318465c0..7c7da1d0 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -2,8 +2,6 @@ /** * ErrorEvent404Response. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index b8f4bcbc..f1f83b7f 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -2,8 +2,6 @@ /** * ErrorEvent404ResponseError. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 35b8eab7..f5a15bb5 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -2,8 +2,6 @@ /** * ErrorVisits403. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 6f3ebd3e..09c7e3c5 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -2,8 +2,6 @@ /** * EventResponse. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 06cecc87..7329208d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -2,8 +2,6 @@ /** * FactoryResetResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index a616ae49..b879047f 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -2,8 +2,6 @@ /** * FridaResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index b46e2b28..af56699e 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -2,8 +2,6 @@ /** * HighActivityResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 0ca7bead..b6586802 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -2,8 +2,6 @@ /** * IPLocation. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index d6a7f76d..82c30ead 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -2,8 +2,6 @@ /** * IPLocationCity. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 16b91f66..c925b7d8 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -2,8 +2,6 @@ /** * IdentificationError. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index e8d8713a..33286e0d 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -2,8 +2,6 @@ /** * IncognitoResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index b18d7066..7674a616 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -2,8 +2,6 @@ /** * IpBlockListResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 3e60669b..4ee07f8b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -2,8 +2,6 @@ /** * IpBlockListResultDetails. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index ee5fc12b..56464e4d 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -2,8 +2,6 @@ /** * IpInfoResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index c6a7674a..1090ed91 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -2,8 +2,6 @@ /** * IpInfoResultV4. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 5157af7d..daa674c9 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -2,8 +2,6 @@ /** * IpInfoResultV6. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 25f58eaa..6fe4347d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -2,8 +2,6 @@ /** * JailbrokenResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/Location.php b/src/Model/Location.php index aac2b040..7945b367 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -2,8 +2,6 @@ /** * Location. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 6ac2d299..f45f1cce 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -2,8 +2,6 @@ /** * LocationSpoofingResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 8f97e293..7ccc9158 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -2,8 +2,6 @@ /** * ManyRequestsResponse. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index edc8527e..90f305b9 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -2,8 +2,6 @@ /** * PrivacySettingsResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 7eba5405..84c226fd 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -2,8 +2,6 @@ /** * ProductError. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index c7867c8d..eaecc677 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -2,8 +2,6 @@ /** * ProductsResponse. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 2d5688d4..3897e44a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -2,8 +2,6 @@ /** * ProductsResponseBotd. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 13f0f7b8..11480f1c 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -2,8 +2,6 @@ /** * ProductsResponseIdentification. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 1b5c1d97..179e9557 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -2,8 +2,6 @@ /** * ProductsResponseIdentificationData. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 09b180aa..68db9d14 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -2,8 +2,6 @@ /** * ProxyResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 4cd9caca..18c9ecd7 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -2,8 +2,6 @@ /** * RawDeviceAttributesResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/Response.php b/src/Model/Response.php index aa806a04..1bb0e2e8 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -2,8 +2,6 @@ /** * Response. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index e055eeff..36789502 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -2,8 +2,6 @@ /** * ResponseVisits. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 857c7a49..b886abf7 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -2,8 +2,6 @@ /** * RootAppsResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index d6b068d1..0e26bd5a 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -2,8 +2,6 @@ /** * SeenAt. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index c1c421f0..bab0095a 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -2,8 +2,6 @@ /** * SignalResponseClonedApp. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index f858ffc6..3a985b4b 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -2,8 +2,6 @@ /** * SignalResponseEmulator. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index f64e8fcb..773d3c59 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -2,8 +2,6 @@ /** * SignalResponseFactoryReset. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index b929a385..944505f5 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -2,8 +2,6 @@ /** * SignalResponseFrida. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index ccb4a057..8f59aac2 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -2,8 +2,6 @@ /** * SignalResponseHighActivity. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 9e1a0644..402abf6d 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -2,8 +2,6 @@ /** * SignalResponseIncognito. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index a9244059..0106c05a 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -2,8 +2,6 @@ /** * SignalResponseIpBlocklist. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 77f116e2..360fa531 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -2,8 +2,6 @@ /** * SignalResponseIpInfo. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index e6669e07..287bd034 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -2,8 +2,6 @@ /** * SignalResponseJailbroken. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 226ed8a2..8e84399e 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -2,8 +2,6 @@ /** * SignalResponseLocationSpoofing. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 9ebcbfd8..eaa80457 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -2,8 +2,6 @@ /** * SignalResponsePrivacySettings. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index b529f3eb..2a86019e 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -2,8 +2,6 @@ /** * SignalResponseProxy. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 0921c456..18a15574 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -2,8 +2,6 @@ /** * SignalResponseRawDeviceAttributes. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index e25f947a..bfaacc84 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -2,8 +2,6 @@ /** * SignalResponseRootApps. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index bfe2b90e..470c7989 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -2,8 +2,6 @@ /** * SignalResponseSuspectScore. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 49be1f05..4c529e74 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -2,8 +2,6 @@ /** * SignalResponseTampering. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 6e62b9a6..70b27080 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -2,8 +2,6 @@ /** * SignalResponseTor. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 8b13d675..ca6c2e45 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -2,8 +2,6 @@ /** * SignalResponseVirtualMachine. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 6d7a3e71..cb22f0e4 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -2,8 +2,6 @@ /** * SignalResponseVpn. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 6724848a..616a1e6d 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -2,8 +2,6 @@ /** * Subdivision. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 981c5192..1b55d36c 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -2,8 +2,6 @@ /** * SuspectScoreResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index cf390c54..c48b0f18 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -2,8 +2,6 @@ /** * TamperingResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index e98b3f50..4a5cd84f 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -2,8 +2,6 @@ /** * TorResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 92c44b91..fda99fb1 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -2,8 +2,6 @@ /** * VirtualMachineResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/Visit.php b/src/Model/Visit.php index ba742042..f308038d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -2,8 +2,6 @@ /** * Visit. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 1a1cefa7..b318d1e7 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -2,8 +2,6 @@ /** * VpnResult. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index bf991334..50cb6c9a 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -2,8 +2,6 @@ /** * VpnResultMethods. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index e2bad593..843ba581 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -2,8 +2,6 @@ /** * WebhookVisit. * - * PHP version 5 - * * @category Class * * @author Swagger Codegen team diff --git a/template/model.mustache b/template/model.mustache index e1a87299..bac220d1 100644 --- a/template/model.mustache +++ b/template/model.mustache @@ -4,12 +4,9 @@ /** * {{classname}} * - * PHP version 5 - * * @category Class - * @package {{invokerPackage}} * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @see https://github.com/swagger-api/swagger-codegen */ {{>partial_header}} From c2c3d145dbf449532ef10c8b8d1f16c7da99a113 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 26 Jul 2024 14:42:11 +0300 Subject: [PATCH 036/118] refactor: remove psr 1 and psr 2 from cs fixer --- .php-cs-fixer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index d91c14a8..59505d88 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -2,8 +2,6 @@ return (new PhpCsFixer\Config()) ->setRules([ - '@PSR1' => true, - '@PSR2' => true, '@PSR12' => true, '@PhpCsFixer' => true, 'array_indentation' => true, From 0302ee6d475dc20923d802e523164321e509b056 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 30 Jul 2024 21:03:49 +0300 Subject: [PATCH 037/118] refactor: introduce async method and wip inline types --- run_checks.php | 18 +++ src/Api/FingerprintApi.php | 217 +++++++++++++++++++++++++++++++++++-- template/api.mustache | 88 ++++++++++++++- 3 files changed, 308 insertions(+), 15 deletions(-) diff --git a/run_checks.php b/run_checks.php index 4f5831f2..c676c1fb 100644 --- a/run_checks.php +++ b/run_checks.php @@ -57,6 +57,24 @@ exit(1); } +$eventPromise = $client->getEventAsync($request_id); +$eventPromise->then(function ($tuple) { + list($result, $response) = $tuple; + fwrite(STDOUT, sprintf("\n\nGot async event: %s \n", $response->getBody()->getContents())); +}, function($exception) { + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); + exit(1); +})->wait(); + +$visitsPromise = $client->getVisitsAsync($visitor_id); +$visitsPromise->then(function($tuple) { + list($result, $response) = $tuple; + fwrite(STDOUT, sprintf("\n\nGot async visits: %s \n", $response->getBody()->getContents())); +}, function ($exception) { + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); + exit(1); +})->wait(); + // Enable the deprecated ArrayAccess return type warning again if needed error_reporting(error_reporting() | E_DEPRECATED); diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 31cbbb38..29118191 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -81,12 +81,11 @@ public function getConfig() * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * - * @throws ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getEvent($request_id) + public function getEvent($request_id): array { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -184,6 +183,105 @@ public function getEvent($request_id) } } + /** + * Operation getEventAsync. + * + * Get event by requestId + * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * + * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } > + * + * @throws \InvalidArgumentException + */ + public function getEventAsync($request_id) + { + $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; + $request = $this->getEventRequest($request_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + }, + function ($e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\EventResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 404: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Operation getVisits. * @@ -198,12 +296,11 @@ public function getEvent($request_id) * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * - * @throws ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -301,16 +398,118 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l } } + /** + * Operation getVisitsAsync. + * + * Get visits by visitorId + * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * + * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } > + * + * @throws \InvalidArgumentException + */ + public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + { + $returnType = '\Fingerprint\ServerAPI\Model\Response'; + $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + }, + function ($e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorVisits403', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 429: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Create request for operation 'getEvent'. * * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) * - * @return Request - * * @throws \InvalidArgumentException */ - protected function getEventRequest($request_id) + protected function getEventRequest(string $request_id): Request { // verify the required parameter 'request_id' is set if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { @@ -379,11 +578,9 @@ protected function getEventRequest($request_id) * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * - * @return Request - * * @throws \InvalidArgumentException */ - protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request { // verify the required parameter 'visitor_id' is set if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { diff --git a/template/api.mustache b/template/api.mustache index a47717ca..9ef0a5b0 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -82,14 +82,12 @@ use \GuzzleHttp\Exception\GuzzleException; {{#parameters}} * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -164,6 +162,87 @@ use \GuzzleHttp\Exception\GuzzleException; } } + /** + * Operation {{{operationId}}}Async + * + * {{{summary}}} + {{#description}} + * {{.}} + * + {{/description}} + {{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/parameters}} + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface< array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } > + */ + public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface + { + $returnType = '{{returnType}}'; + $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + throw $apiException; + } + {{#returnType}} + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + {{/returnType}} + {{^returnType}} + return [null, $response]; + {{/returnType}} + }, + function ($e) { + try { + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '{{dataType}}', + $response->getHeaders() + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} + } + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Create request for operation '{{{operationId}}}' * @@ -172,9 +251,8 @@ use \GuzzleHttp\Exception\GuzzleException; {{/parameters}} * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request */ - protected function {{operationId}}Request({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request { {{#parameters}} {{#required}} From e74f9201b916571de2cc4fe477b63cb615c28ea1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 31 Jul 2024 17:40:54 +0300 Subject: [PATCH 038/118] refactor: introduce inline types for methods and properties --- src/Api/FingerprintApi.php | 51 ++----- src/ApiException.php | 29 +--- src/Configuration.php | 101 +++++-------- src/Model/ASN.php | 70 +++------ src/Model/BotdDetectionResult.php | 70 +++------ src/Model/BotdResult.php | 78 ++++------ src/Model/BrowserDetails.php | 80 ++++------- src/Model/ClonedAppResult.php | 66 +++------ src/Model/Confidence.php | 66 +++------ src/Model/DataCenter.php | 68 +++------ src/Model/DeprecatedIPLocation.php | 82 ++++------- src/Model/DeprecatedIPLocationCity.php | 66 +++------ src/Model/EmulatorResult.php | 66 +++------ src/Model/ErrorEvent403Response.php | 66 +++------ src/Model/ErrorEvent403ResponseError.php | 70 +++------ src/Model/ErrorEvent404Response.php | 66 +++------ src/Model/ErrorEvent404ResponseError.php | 70 +++------ src/Model/ErrorVisits403.php | 66 +++------ src/Model/EventResponse.php | 68 +++------ src/Model/FactoryResetResult.php | 68 +++------ src/Model/FridaResult.php | 66 +++------ src/Model/HighActivityResult.php | 68 +++------ src/Model/IPLocation.php | 82 ++++------- src/Model/IPLocationCity.php | 66 +++------ src/Model/IdentificationError.php | 70 +++------ src/Model/IncognitoResult.php | 66 +++------ src/Model/IpBlockListResult.php | 68 +++------ src/Model/IpBlockListResultDetails.php | 68 +++------ src/Model/IpInfoResult.php | 68 +++------ src/Model/IpInfoResultV4.php | 72 ++++------ src/Model/IpInfoResultV6.php | 72 ++++------ src/Model/JailbrokenResult.php | 66 +++------ src/Model/Location.php | 68 +++------ src/Model/LocationSpoofingResult.php | 66 +++------ src/Model/ManyRequestsResponse.php | 66 +++------ src/Model/PrivacySettingsResult.php | 66 +++------ src/Model/ProductError.php | 70 +++------ src/Model/ProductsResponse.php | 106 ++++++-------- src/Model/ProductsResponseBotd.php | 68 +++------ src/Model/ProductsResponseIdentification.php | 68 +++------ .../ProductsResponseIdentificationData.php | 94 +++++------- src/Model/ProxyResult.php | 66 +++------ src/Model/RawDeviceAttributesResult.php | 64 +++------ src/Model/Response.php | 72 ++++------ src/Model/ResponseVisits.php | 92 +++++------- src/Model/RootAppsResult.php | 66 +++------ src/Model/SeenAt.php | 68 +++------ src/Model/SignalResponseClonedApp.php | 68 +++------ src/Model/SignalResponseEmulator.php | 68 +++------ src/Model/SignalResponseFactoryReset.php | 68 +++------ src/Model/SignalResponseFrida.php | 68 +++------ src/Model/SignalResponseHighActivity.php | 68 +++------ src/Model/SignalResponseIncognito.php | 68 +++------ src/Model/SignalResponseIpBlocklist.php | 68 +++------ src/Model/SignalResponseIpInfo.php | 68 +++------ src/Model/SignalResponseJailbroken.php | 68 +++------ src/Model/SignalResponseLocationSpoofing.php | 68 +++------ src/Model/SignalResponsePrivacySettings.php | 68 +++------ src/Model/SignalResponseProxy.php | 68 +++------ .../SignalResponseRawDeviceAttributes.php | 68 +++------ src/Model/SignalResponseRootApps.php | 68 +++------ src/Model/SignalResponseSuspectScore.php | 68 +++------ src/Model/SignalResponseTampering.php | 68 +++------ src/Model/SignalResponseTor.php | 68 +++------ src/Model/SignalResponseVirtualMachine.php | 68 +++------ src/Model/SignalResponseVpn.php | 68 +++------ src/Model/Subdivision.php | 68 +++------ src/Model/SuspectScoreResult.php | 66 +++------ src/Model/TamperingResult.php | 68 +++------ src/Model/TorResult.php | 66 +++------ src/Model/VirtualMachineResult.php | 66 +++------ src/Model/Visit.php | 92 +++++------- src/Model/VpnResult.php | 72 ++++------ src/Model/VpnResultMethods.php | 70 +++------ src/Model/WebhookVisit.php | 136 ++++++++---------- src/ObjectSerializer.php | 51 +++---- template/ApiException.mustache | 36 +---- template/Configuration.mustache | 95 +++++------- template/api.mustache | 28 +--- template/model_generic.mustache | 69 +++------ 80 files changed, 1836 insertions(+), 3738 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 29118191..d3b451ef 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -36,6 +36,7 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use Psr\Http\Message\ResponseInterface; @@ -54,7 +55,7 @@ class FingerprintApi protected ClientInterface $client; protected Configuration $config; - protected $integration_info = 'fingerprint-pro-server-php-sdk/4.1.0'; + protected string $integration_info = 'fingerprint-pro-server-php-sdk/4.1.0'; public function __construct( ?ClientInterface $client = null, @@ -64,10 +65,7 @@ public function __construct( $this->config = $config ?: new Configuration(); } - /** - * @return Configuration - */ - public function getConfig() + public function getConfig(): Configuration { return $this->config; } @@ -77,15 +75,13 @@ public function getConfig() * * Get event by requestId * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getEvent($request_id): array + public function getEvent(string $request_id): array { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -188,13 +184,9 @@ public function getEvent($request_id): array * * Get event by requestId * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } > - * * @throws \InvalidArgumentException */ - public function getEventAsync($request_id) + public function getEventAsync(string $request_id): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -287,20 +279,13 @@ function ($e) { * * Get visits by visitorId * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null): array + public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -403,18 +388,9 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l * * Get visits by visitorId * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } > - * * @throws \InvalidArgumentException */ - public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -505,8 +481,6 @@ function ($e) { /** * Create request for operation 'getEvent'. * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * * @throws \InvalidArgumentException */ protected function getEventRequest(string $request_id): Request @@ -571,13 +545,6 @@ protected function getEventRequest(string $request_id): Request /** * Create request for operation 'getVisits'. * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * * @throws \InvalidArgumentException */ protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request @@ -663,11 +630,9 @@ protected function getVisitsRequest(string $visitor_id, ?string $request_id = nu /** * Create http client option. * - * @return array of http client options - * * @throws \RuntimeException on file opening failure */ - protected function createHttpClientOption() + protected function createHttpClientOption(): array { $options = []; if ($this->config->getDebug()) { diff --git a/src/ApiException.php b/src/ApiException.php index 846ec390..8d5e8d70 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -28,6 +28,8 @@ namespace Fingerprint\ServerAPI; +use Psr\Http\Message\ResponseInterface; + /** * ApiException Class Doc Comment. * @@ -39,38 +41,19 @@ */ class ApiException extends \Exception { - /** - * The deserialized response object. - */ - protected $responseObject; + protected ResponseInterface $responseObject; - /** - * Constructor. - * - * @param string $message Error message - * @param int $code HTTP status code - */ - public function __construct($message = '', $code = 0) + public function __construct(?string $message = '', ?int $code = 0) { parent::__construct($message, $code); } - /** - * Sets the deseralized response object (during deserialization). - * - * @param mixed $obj Deserialized response object - */ - public function setResponseObject($obj) + public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; } - /** - * Gets the deseralized response object (during deserialization). - * - * @return mixed the deserialized response object - */ - public function getResponseObject() + public function getResponseObject(): ResponseInterface { return $this->responseObject; } diff --git a/src/Configuration.php b/src/Configuration.php index c605ebd1..54098a4c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -49,75 +49,56 @@ class Configuration * * @var string[] */ - protected $apiKeys = []; + protected array $apiKeys = []; /** * Associate array to store API prefix (e.g. Bearer). * * @var string[] */ - protected $apiKeyPrefixes = []; + protected array $apiKeyPrefixes = []; /** * Access token for OAuth. - * - * @var string */ - protected $accessToken = ''; + protected string $accessToken = ''; /** * Username for HTTP basic authentication. - * - * @var string */ - protected $username = ''; + protected string $username = ''; /** * Password for HTTP basic authentication. - * - * @var string */ - protected $password = ''; + protected string $password = ''; /** * The host. - * - * @var string */ - protected $host = 'https://api.fpjs.io'; + protected string $host = 'https://api.fpjs.io'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default. - * - * @var string */ - protected $userAgent = 'Swagger-Codegen/4.1.0/php'; + protected string $userAgent = 'Swagger-Codegen/4.1.0/php'; /** * Debug switch (default set to false). - * - * @var bool */ - protected $debug = false; + protected bool $debug = false; /** * Debug file location (log to STDOUT by default). - * - * @var string */ - protected $debugFile = 'php://output'; + protected string $debugFile = 'php://output'; /** * Debug file location (log to STDOUT by default). - * - * @var string */ - protected $tempFolderPath; + protected string $tempFolderPath; private static $defaultConfiguration; - /** - * Constructor. - */ public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); @@ -131,7 +112,7 @@ public function __construct() * * @return $this */ - public function setApiKey($apiKeyIdentifier, $key) + public function setApiKey(string $apiKeyIdentifier, string $key): self { $this->apiKeys[$apiKeyIdentifier] = $key; @@ -143,9 +124,9 @@ public function setApiKey($apiKeyIdentifier, $key) * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string API key or token + * @return null|string API key or token */ - public function getApiKey($apiKeyIdentifier) + public function getApiKey($apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } @@ -158,7 +139,7 @@ public function getApiKey($apiKeyIdentifier) * * @return $this */ - public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; @@ -169,10 +150,8 @@ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) * Gets API key prefix. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return string */ - public function getApiKeyPrefix($apiKeyIdentifier) + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; } @@ -184,7 +163,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) * * @return $this */ - public function setAccessToken($accessToken) + public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; @@ -196,7 +175,7 @@ public function setAccessToken($accessToken) * * @return string Access token for OAuth */ - public function getAccessToken() + public function getAccessToken(): string { return $this->accessToken; } @@ -208,7 +187,7 @@ public function getAccessToken() * * @return $this */ - public function setUsername($username) + public function setUsername(string $username): self { $this->username = $username; @@ -220,7 +199,7 @@ public function setUsername($username) * * @return string Username for HTTP basic authentication */ - public function getUsername() + public function getUsername(): string { return $this->username; } @@ -232,7 +211,7 @@ public function getUsername() * * @return $this */ - public function setPassword($password) + public function setPassword(string $password): self { $this->password = $password; @@ -244,7 +223,7 @@ public function setPassword($password) * * @return string Password for HTTP basic authentication */ - public function getPassword() + public function getPassword(): string { return $this->password; } @@ -256,7 +235,7 @@ public function getPassword() * * @return $this */ - public function setHost($host) + public function setHost(string $host): self { $this->host = $host; @@ -268,7 +247,7 @@ public function setHost($host) * * @return string Host */ - public function getHost() + public function getHost(): string { return $this->host; } @@ -276,7 +255,7 @@ public function getHost() /** * @return $this */ - public function setRegion($region = self::REGION_GLOBAL) + public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: @@ -313,7 +292,7 @@ public function setRegion($region = self::REGION_GLOBAL) * * @throws \InvalidArgumentException */ - public function setUserAgent($userAgent) + public function setUserAgent(string $userAgent): self { if (!is_string($userAgent)) { throw new \InvalidArgumentException('User-agent must be a string.'); @@ -329,7 +308,7 @@ public function setUserAgent($userAgent) * * @return string user agent */ - public function getUserAgent() + public function getUserAgent(): string { return $this->userAgent; } @@ -341,7 +320,7 @@ public function getUserAgent() * * @return $this */ - public function setDebug($debug) + public function setDebug(bool $debug): self { $this->debug = $debug; @@ -350,10 +329,8 @@ public function setDebug($debug) /** * Gets the debug flag. - * - * @return bool */ - public function getDebug() + public function getDebug(): bool { return $this->debug; } @@ -365,7 +342,7 @@ public function getDebug() * * @return $this */ - public function setDebugFile($debugFile) + public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; @@ -374,10 +351,8 @@ public function setDebugFile($debugFile) /** * Gets the debug file. - * - * @return string */ - public function getDebugFile() + public function getDebugFile(): string { return $this->debugFile; } @@ -389,7 +364,7 @@ public function getDebugFile() * * @return $this */ - public function setTempFolderPath($tempFolderPath) + public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; @@ -401,17 +376,15 @@ public function setTempFolderPath($tempFolderPath) * * @return string Temp folder path */ - public function getTempFolderPath() + public function getTempFolderPath(): string { return $this->tempFolderPath; } /** * Gets the default configuration instance, with apiKey and host params. - * - * @return Configuration */ - public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) + public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { if (null === self::$defaultConfiguration) { self::$defaultConfiguration = new Configuration(); @@ -428,7 +401,7 @@ public static function getDefaultConfiguration($api_key = null, $region = self:: * * @param Configuration $config An instance of the Configuration Object */ - public static function setDefaultConfiguration(Configuration $config) + public static function setDefaultConfiguration(Configuration $config): void { self::$defaultConfiguration = $config; } @@ -438,7 +411,7 @@ public static function setDefaultConfiguration(Configuration $config) * * @return string The report for debugging */ - public static function toDebugReport() + public static function toDebugReport(): string { $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; $report .= ' OS: '.php_uname().PHP_EOL; @@ -455,9 +428,9 @@ public static function toDebugReport() * * @param string $apiKeyIdentifier name of apikey * - * @return string API key with the prefix + * @return null|string API key with the prefix */ - public function getApiKeyWithPrefix($apiKeyIdentifier) + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 850ad69d..39b08230 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -42,17 +42,15 @@ class ASN implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ASN'; + protected static string $swaggerModelName = 'ASN'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'asn' => 'string', 'network' => 'string', 'name' => 'string']; @@ -62,7 +60,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'asn' => null, 'network' => null, 'name' => null]; @@ -73,7 +71,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'asn' => 'asn', 'network' => 'network', 'name' => 'name']; @@ -83,7 +81,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'asn' => 'setAsn', 'network' => 'setNetwork', 'name' => 'setName']; @@ -93,7 +91,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'asn' => 'getAsn', 'network' => 'getNetwork', 'name' => 'getName']; @@ -103,7 +101,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -221,7 +205,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -243,7 +227,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -267,7 +251,7 @@ public function getNetwork() * * @return $this */ - public function setNetwork($network) + public function setNetwork($network): self { $this->container['network'] = $network; @@ -291,7 +275,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -302,11 +286,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -315,11 +296,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -330,8 +308,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -345,8 +322,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 1e02803a..e04a377a 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -48,17 +48,15 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BotdDetectionResult'; + protected static string $swaggerModelName = 'BotdDetectionResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'string', 'type' => 'string']; @@ -67,7 +65,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'type' => null]; @@ -77,7 +75,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'type' => 'type']; @@ -86,7 +84,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'type' => 'setType']; @@ -95,7 +93,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'type' => 'getType']; @@ -104,7 +102,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return string[] */ - public function getResultAllowableValues() + public function getResultAllowableValues(): array { return [ self::RESULT_NOT_DETECTED, @@ -214,7 +198,7 @@ public function getResultAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getType() * * @return $this */ - public function setType($type) + public function setType($type): self { $this->container['type'] = $type; @@ -304,11 +288,8 @@ public function setType($type) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 24083d55..b0d054a6 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -44,17 +44,15 @@ class BotdResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BotdResult'; + protected static string $swaggerModelName = 'BotdResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'ip' => 'string', 'time' => '\DateTime', 'url' => 'string', @@ -68,7 +66,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'ip' => 'ipv4', 'time' => 'date-time', 'url' => null, @@ -83,7 +81,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'ip' => 'ip', 'time' => 'time', 'url' => 'url', @@ -97,7 +95,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'ip' => 'setIp', 'time' => 'setTime', 'url' => 'setUrl', @@ -111,7 +109,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'ip' => 'getIp', 'time' => 'getTime', 'url' => 'getUrl', @@ -125,7 +123,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -146,10 +144,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -163,20 +159,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -184,40 +176,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -227,7 +211,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -259,7 +243,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -281,7 +265,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -305,7 +289,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -329,7 +313,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -353,7 +337,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -377,7 +361,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -401,7 +385,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -425,7 +409,7 @@ public function getBot() * * @return $this */ - public function setBot($bot) + public function setBot($bot): self { $this->container['bot'] = $bot; @@ -436,11 +420,8 @@ public function setBot($bot) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -449,11 +430,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -464,8 +442,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -479,8 +456,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 2c49a252..4c6436be 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -42,17 +42,15 @@ class BrowserDetails implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BrowserDetails'; + protected static string $swaggerModelName = 'BrowserDetails'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'browser_name' => 'string', 'browser_major_version' => 'string', 'browser_full_version' => 'string', @@ -67,7 +65,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'browser_name' => null, 'browser_major_version' => null, 'browser_full_version' => null, @@ -83,7 +81,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'browser_name' => 'browserName', 'browser_major_version' => 'browserMajorVersion', 'browser_full_version' => 'browserFullVersion', @@ -98,7 +96,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'browser_name' => 'setBrowserName', 'browser_major_version' => 'setBrowserMajorVersion', 'browser_full_version' => 'setBrowserFullVersion', @@ -113,7 +111,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'browser_name' => 'getBrowserName', 'browser_major_version' => 'getBrowserMajorVersion', 'browser_full_version' => 'getBrowserFullVersion', @@ -128,7 +126,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -150,10 +148,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -167,20 +163,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -188,40 +180,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -231,7 +215,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -266,7 +250,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -288,7 +272,7 @@ public function getBrowserName() * * @return $this */ - public function setBrowserName($browser_name) + public function setBrowserName($browser_name): self { $this->container['browser_name'] = $browser_name; @@ -312,7 +296,7 @@ public function getBrowserMajorVersion() * * @return $this */ - public function setBrowserMajorVersion($browser_major_version) + public function setBrowserMajorVersion($browser_major_version): self { $this->container['browser_major_version'] = $browser_major_version; @@ -336,7 +320,7 @@ public function getBrowserFullVersion() * * @return $this */ - public function setBrowserFullVersion($browser_full_version) + public function setBrowserFullVersion($browser_full_version): self { $this->container['browser_full_version'] = $browser_full_version; @@ -360,7 +344,7 @@ public function getOs() * * @return $this */ - public function setOs($os) + public function setOs($os): self { $this->container['os'] = $os; @@ -384,7 +368,7 @@ public function getOsVersion() * * @return $this */ - public function setOsVersion($os_version) + public function setOsVersion($os_version): self { $this->container['os_version'] = $os_version; @@ -408,7 +392,7 @@ public function getDevice() * * @return $this */ - public function setDevice($device) + public function setDevice($device): self { $this->container['device'] = $device; @@ -432,7 +416,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -456,7 +440,7 @@ public function getBotProbability() * * @return $this */ - public function setBotProbability($bot_probability) + public function setBotProbability($bot_probability): self { $this->container['bot_probability'] = $bot_probability; @@ -467,11 +451,8 @@ public function setBotProbability($bot_probability) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -480,11 +461,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -495,8 +473,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -510,8 +487,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index f0b84ebe..15fae901 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -42,17 +42,15 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ClonedAppResult'; + protected static string $swaggerModelName = 'ClonedAppResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 4156b5c9..84db4fd0 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -42,17 +42,15 @@ class Confidence implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Confidence'; + protected static string $swaggerModelName = 'Confidence'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'score' => 'float']; /** @@ -60,7 +58,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'score' => 'float']; /** @@ -69,7 +67,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'score' => 'score']; /** @@ -77,7 +75,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'score' => 'setScore']; /** @@ -85,7 +83,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'score' => 'getScore']; /** @@ -93,7 +91,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getScore() * * @return $this */ - public function setScore($score) + public function setScore($score): self { $this->container['score'] = $score; @@ -239,11 +223,8 @@ public function setScore($score) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index e2f62094..e44d4ced 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -42,17 +42,15 @@ class DataCenter implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DataCenter'; + protected static string $swaggerModelName = 'DataCenter'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'name' => 'string']; @@ -61,7 +59,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'name' => null]; @@ -71,7 +69,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'name' => 'name']; @@ -80,7 +78,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'name' => 'setName']; @@ -89,7 +87,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'name' => 'getName']; @@ -98,7 +96,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -212,7 +196,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -234,7 +218,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -258,7 +242,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -269,11 +253,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -282,11 +263,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -297,8 +275,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -312,8 +289,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 3b5d8507..7ea9beb2 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -44,17 +44,15 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DeprecatedIPLocation'; + protected static string $swaggerModelName = 'DeprecatedIPLocation'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'accuracy_radius' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -70,7 +68,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'accuracy_radius' => null, 'latitude' => 'double', 'longitude' => 'double', @@ -87,7 +85,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -103,7 +101,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -119,7 +117,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -135,7 +133,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -158,10 +156,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -175,20 +171,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -196,40 +188,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -239,7 +223,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -250,7 +234,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -272,7 +256,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius($accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -296,7 +280,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude) + public function setLatitude($latitude): self { $this->container['latitude'] = $latitude; @@ -320,7 +304,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude) + public function setLongitude($longitude): self { $this->container['longitude'] = $longitude; @@ -344,7 +328,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode($postal_code): self { $this->container['postal_code'] = $postal_code; @@ -368,7 +352,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone) + public function setTimezone($timezone): self { $this->container['timezone'] = $timezone; @@ -392,7 +376,7 @@ public function getCity() * * @return $this */ - public function setCity($city) + public function setCity($city): self { $this->container['city'] = $city; @@ -416,7 +400,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country) + public function setCountry($country): self { $this->container['country'] = $country; @@ -440,7 +424,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent) + public function setContinent($continent): self { $this->container['continent'] = $continent; @@ -464,7 +448,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions($subdivisions): self { $this->container['subdivisions'] = $subdivisions; @@ -475,11 +459,8 @@ public function setSubdivisions($subdivisions) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -488,11 +469,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -503,8 +481,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -518,8 +495,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index fdb8ccf1..7025cd42 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -42,17 +42,15 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DeprecatedIPLocationCity'; + protected static string $swaggerModelName = 'DeprecatedIPLocationCity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'name' => 'string']; /** @@ -60,7 +58,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'name' => null]; /** @@ -69,7 +67,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'name' => 'name']; /** @@ -77,7 +75,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'name' => 'setName']; /** @@ -85,7 +83,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'name' => 'getName']; /** @@ -93,7 +91,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -233,11 +217,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 337177a2..f6bb7ed7 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -42,17 +42,15 @@ class EmulatorResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'EmulatorResult'; + protected static string $swaggerModelName = 'EmulatorResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index f2f059d7..ba116f62 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -42,17 +42,15 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent403Response'; + protected static string $swaggerModelName = 'ErrorEvent403Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError']; /** @@ -60,7 +58,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -233,11 +217,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 155f99fe..aea1a345 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -47,17 +47,15 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent403ResponseError'; + protected static string $swaggerModelName = 'ErrorEvent403ResponseError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -66,7 +64,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -76,7 +74,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -85,7 +83,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -94,7 +92,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -103,7 +101,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -119,10 +117,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -136,20 +132,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -157,40 +149,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -200,7 +184,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_TOKEN_REQUIRED, @@ -214,7 +198,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -242,7 +226,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -264,7 +248,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -297,7 +281,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -308,11 +292,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -321,11 +302,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -336,8 +314,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -351,8 +328,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 7c7da1d0..b3358e43 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -42,17 +42,15 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent404Response'; + protected static string $swaggerModelName = 'ErrorEvent404Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; /** @@ -60,7 +58,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -233,11 +217,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index f1f83b7f..88142d91 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -44,17 +44,15 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent404ResponseError'; + protected static string $swaggerModelName = 'ErrorEvent404ResponseError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -63,7 +61,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -73,7 +71,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -82,7 +80,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -91,7 +89,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -100,7 +98,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_REQUEST_NOT_FOUND, ]; @@ -208,7 +192,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -236,7 +220,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -258,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -291,7 +275,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -302,11 +286,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -315,11 +296,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -330,8 +308,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -345,8 +322,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index f5a15bb5..318c8060 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -42,17 +42,15 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorVisits403'; + protected static string $swaggerModelName = 'ErrorVisits403'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => 'string']; /** @@ -60,7 +58,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -239,11 +223,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 09c7e3c5..243ef3dc 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -44,17 +44,15 @@ class EventResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'EventResponse'; + protected static string $swaggerModelName = 'EventResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -63,7 +61,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'products' => null, 'error' => null]; @@ -73,7 +71,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'products' => 'products', 'error' => 'error']; @@ -82,7 +80,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'products' => 'setProducts', 'error' => 'setError']; @@ -91,7 +89,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'products' => 'getProducts', 'error' => 'getError']; @@ -100,7 +98,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -214,7 +198,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -236,7 +220,7 @@ public function getProducts() * * @return $this */ - public function setProducts($products) + public function setProducts($products): self { $this->container['products'] = $products; @@ -260,7 +244,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -271,11 +255,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -284,11 +265,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -299,8 +277,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -314,8 +291,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 7329208d..83f8617a 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -42,17 +42,15 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'FactoryResetResult'; + protected static string $swaggerModelName = 'FactoryResetResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'time' => '\DateTime', 'timestamp' => 'int']; @@ -61,7 +59,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'time' => 'date-time', 'timestamp' => 'int64']; @@ -71,7 +69,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'time' => 'time', 'timestamp' => 'timestamp']; @@ -80,7 +78,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'time' => 'setTime', 'timestamp' => 'setTimestamp']; @@ -89,7 +87,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'time' => 'getTime', 'timestamp' => 'getTimestamp']; @@ -98,7 +96,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -261,7 +245,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -272,11 +256,8 @@ public function setTimestamp($timestamp) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index b879047f..32b5887f 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -42,17 +42,15 @@ class FridaResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'FridaResult'; + protected static string $swaggerModelName = 'FridaResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index af56699e..9047bc79 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -42,17 +42,15 @@ class HighActivityResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'HighActivityResult'; + protected static string $swaggerModelName = 'HighActivityResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'daily_requests' => 'float']; @@ -61,7 +59,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'daily_requests' => null]; @@ -71,7 +69,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'daily_requests' => 'dailyRequests']; @@ -80,7 +78,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'daily_requests' => 'setDailyRequests']; @@ -89,7 +87,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'daily_requests' => 'getDailyRequests']; @@ -98,7 +96,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -212,7 +196,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -234,7 +218,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -258,7 +242,7 @@ public function getDailyRequests() * * @return $this */ - public function setDailyRequests($daily_requests) + public function setDailyRequests($daily_requests): self { $this->container['daily_requests'] = $daily_requests; @@ -269,11 +253,8 @@ public function setDailyRequests($daily_requests) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -282,11 +263,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -297,8 +275,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -312,8 +289,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index b6586802..5310c895 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -42,17 +42,15 @@ class IPLocation implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IPLocation'; + protected static string $swaggerModelName = 'IPLocation'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'accuracy_radius' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -68,7 +66,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'accuracy_radius' => null, 'latitude' => 'double', 'longitude' => 'double', @@ -85,7 +83,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -101,7 +99,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -117,7 +115,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -133,7 +131,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -156,10 +154,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -173,20 +169,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -194,40 +186,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -237,7 +221,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -248,7 +232,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -270,7 +254,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius($accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -294,7 +278,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude) + public function setLatitude($latitude): self { $this->container['latitude'] = $latitude; @@ -318,7 +302,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude) + public function setLongitude($longitude): self { $this->container['longitude'] = $longitude; @@ -342,7 +326,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode($postal_code): self { $this->container['postal_code'] = $postal_code; @@ -366,7 +350,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone) + public function setTimezone($timezone): self { $this->container['timezone'] = $timezone; @@ -390,7 +374,7 @@ public function getCity() * * @return $this */ - public function setCity($city) + public function setCity($city): self { $this->container['city'] = $city; @@ -414,7 +398,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country) + public function setCountry($country): self { $this->container['country'] = $country; @@ -438,7 +422,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent) + public function setContinent($continent): self { $this->container['continent'] = $continent; @@ -462,7 +446,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions($subdivisions): self { $this->container['subdivisions'] = $subdivisions; @@ -473,11 +457,8 @@ public function setSubdivisions($subdivisions) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -486,11 +467,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -501,8 +479,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -516,8 +493,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 82c30ead..be5c2707 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -42,17 +42,15 @@ class IPLocationCity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IPLocationCity'; + protected static string $swaggerModelName = 'IPLocationCity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'name' => 'string']; /** @@ -60,7 +58,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'name' => null]; /** @@ -69,7 +67,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'name' => 'name']; /** @@ -77,7 +75,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'name' => 'setName']; /** @@ -85,7 +83,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'name' => 'getName']; /** @@ -93,7 +91,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -233,11 +217,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c925b7d8..a100c8b3 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -45,17 +45,15 @@ class IdentificationError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IdentificationError'; + protected static string $swaggerModelName = 'IdentificationError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -64,7 +62,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -74,7 +72,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -83,7 +81,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -92,7 +90,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -101,7 +99,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -117,10 +115,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -134,20 +130,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -155,40 +147,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -198,7 +182,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE__429_TOO_MANY_REQUESTS, @@ -210,7 +194,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -304,11 +288,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 33286e0d..15325b69 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -42,17 +42,15 @@ class IncognitoResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IncognitoResult'; + protected static string $swaggerModelName = 'IncognitoResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 7674a616..e16568b2 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -42,17 +42,15 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpBlockListResult'; + protected static string $swaggerModelName = 'IpBlockListResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; @@ -61,7 +59,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'details' => null]; @@ -71,7 +69,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'details' => 'details']; @@ -80,7 +78,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'details' => 'setDetails']; @@ -89,7 +87,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'details' => 'getDetails']; @@ -98,7 +96,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -261,7 +245,7 @@ public function getDetails() * * @return $this */ - public function setDetails($details) + public function setDetails($details): self { $this->container['details'] = $details; @@ -272,11 +256,8 @@ public function setDetails($details) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 4ee07f8b..15427c7b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -42,17 +42,15 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpBlockListResult_details'; + protected static string $swaggerModelName = 'IpBlockListResult_details'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'email_spam' => 'bool', 'attack_source' => 'bool']; @@ -61,7 +59,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'email_spam' => null, 'attack_source' => null]; @@ -71,7 +69,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'email_spam' => 'emailSpam', 'attack_source' => 'attackSource']; @@ -80,7 +78,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'email_spam' => 'setEmailSpam', 'attack_source' => 'setAttackSource']; @@ -89,7 +87,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'email_spam' => 'getEmailSpam', 'attack_source' => 'getAttackSource']; @@ -98,7 +96,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getEmailSpam() * * @return $this */ - public function setEmailSpam($email_spam) + public function setEmailSpam($email_spam): self { $this->container['email_spam'] = $email_spam; @@ -261,7 +245,7 @@ public function getAttackSource() * * @return $this */ - public function setAttackSource($attack_source) + public function setAttackSource($attack_source): self { $this->container['attack_source'] = $attack_source; @@ -272,11 +256,8 @@ public function setAttackSource($attack_source) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 56464e4d..5b7130ec 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -44,17 +44,15 @@ class IpInfoResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult'; + protected static string $swaggerModelName = 'IpInfoResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'v4' => '\Fingerprint\ServerAPI\Model\IpInfoResultV4', 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; @@ -63,7 +61,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'v4' => null, 'v6' => null]; @@ -73,7 +71,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'v4' => 'v4', 'v6' => 'v6']; @@ -82,7 +80,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'v4' => 'setV4', 'v6' => 'setV6']; @@ -91,7 +89,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'v4' => 'getV4', 'v6' => 'getV6']; @@ -100,7 +98,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -208,7 +192,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -230,7 +214,7 @@ public function getV4() * * @return $this */ - public function setV4($v4) + public function setV4($v4): self { $this->container['v4'] = $v4; @@ -254,7 +238,7 @@ public function getV6() * * @return $this */ - public function setV6($v6) + public function setV6($v6): self { $this->container['v6'] = $v6; @@ -265,11 +249,8 @@ public function setV6($v6) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,11 +259,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -293,8 +271,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -308,8 +285,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 1090ed91..f26007c1 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -42,17 +42,15 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult_v4'; + protected static string $swaggerModelName = 'IpInfoResult_v4'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'address' => 'string', 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', 'asn' => '\Fingerprint\ServerAPI\Model\ASN', @@ -63,7 +61,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'address' => 'ipv4', 'geolocation' => null, 'asn' => null, @@ -75,7 +73,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'address' => 'address', 'geolocation' => 'geolocation', 'asn' => 'asn', @@ -86,7 +84,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'address' => 'setAddress', 'geolocation' => 'setGeolocation', 'asn' => 'setAsn', @@ -97,7 +95,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'address' => 'getAddress', 'geolocation' => 'getGeolocation', 'asn' => 'getAsn', @@ -108,7 +106,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -227,7 +211,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -249,7 +233,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress($address): self { $this->container['address'] = $address; @@ -273,7 +257,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation($geolocation): self { $this->container['geolocation'] = $geolocation; @@ -297,7 +281,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -321,7 +305,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter($datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +316,8 @@ public function setDatacenter($datacenter) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -345,11 +326,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -360,8 +338,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -375,8 +352,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index daa674c9..f4ce13f9 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -42,17 +42,15 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult_v6'; + protected static string $swaggerModelName = 'IpInfoResult_v6'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'address' => 'string', 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', 'asn' => '\Fingerprint\ServerAPI\Model\ASN', @@ -63,7 +61,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'address' => 'ipv6', 'geolocation' => null, 'asn' => null, @@ -75,7 +73,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'address' => 'address', 'geolocation' => 'geolocation', 'asn' => 'asn', @@ -86,7 +84,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'address' => 'setAddress', 'geolocation' => 'setGeolocation', 'asn' => 'setAsn', @@ -97,7 +95,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'address' => 'getAddress', 'geolocation' => 'getGeolocation', 'asn' => 'getAsn', @@ -108,7 +106,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -227,7 +211,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -249,7 +233,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress($address): self { $this->container['address'] = $address; @@ -273,7 +257,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation($geolocation): self { $this->container['geolocation'] = $geolocation; @@ -297,7 +281,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -321,7 +305,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter($datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +316,8 @@ public function setDatacenter($datacenter) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -345,11 +326,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -360,8 +338,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -375,8 +352,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 6fe4347d..acee0e24 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -42,17 +42,15 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'JailbrokenResult'; + protected static string $swaggerModelName = 'JailbrokenResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Location.php b/src/Model/Location.php index 7945b367..f544a828 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -42,17 +42,15 @@ class Location implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Location'; + protected static string $swaggerModelName = 'Location'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'name' => 'string']; @@ -61,7 +59,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'name' => null]; @@ -71,7 +69,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'name' => 'name']; @@ -80,7 +78,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'name' => 'setName']; @@ -89,7 +87,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'name' => 'getName']; @@ -98,7 +96,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $this->container['code'] = $code; @@ -261,7 +245,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -272,11 +256,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index f45f1cce..e74b634a 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -42,17 +42,15 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'LocationSpoofingResult'; + protected static string $swaggerModelName = 'LocationSpoofingResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 7ccc9158..7e8b0608 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -42,17 +42,15 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ManyRequestsResponse'; + protected static string $swaggerModelName = 'ManyRequestsResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => 'string']; /** @@ -60,7 +58,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -239,11 +223,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 90f305b9..b0867854 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -42,17 +42,15 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'PrivacySettingsResult'; + protected static string $swaggerModelName = 'PrivacySettingsResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 84c226fd..c5f19ab3 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -45,17 +45,15 @@ class ProductError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductError'; + protected static string $swaggerModelName = 'ProductError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -64,7 +62,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -74,7 +72,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -83,7 +81,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -92,7 +90,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -101,7 +99,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -117,10 +115,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -134,20 +130,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -155,40 +147,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -198,7 +182,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_TOO_MANY_REQUESTS, @@ -210,7 +194,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -304,11 +288,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index eaecc677..8a98ff3e 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -44,17 +44,15 @@ class ProductsResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponse'; + protected static string $swaggerModelName = 'ProductsResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'identification' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', @@ -82,7 +80,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'identification' => null, 'botd' => null, 'ip_info' => null, @@ -111,7 +109,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'identification' => 'identification', 'botd' => 'botd', 'ip_info' => 'ipInfo', @@ -139,7 +137,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'identification' => 'setIdentification', 'botd' => 'setBotd', 'ip_info' => 'setIpInfo', @@ -167,7 +165,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'identification' => 'getIdentification', 'botd' => 'getBotd', 'ip_info' => 'getIpInfo', @@ -195,7 +193,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -230,10 +228,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -247,20 +243,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -268,40 +260,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -311,7 +295,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -322,7 +306,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -344,7 +328,7 @@ public function getIdentification() * * @return $this */ - public function setIdentification($identification) + public function setIdentification($identification): self { $this->container['identification'] = $identification; @@ -368,7 +352,7 @@ public function getBotd() * * @return $this */ - public function setBotd($botd) + public function setBotd($botd): self { $this->container['botd'] = $botd; @@ -392,7 +376,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo($ip_info): self { $this->container['ip_info'] = $ip_info; @@ -416,7 +400,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -440,7 +424,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps($root_apps): self { $this->container['root_apps'] = $root_apps; @@ -464,7 +448,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator) + public function setEmulator($emulator): self { $this->container['emulator'] = $emulator; @@ -488,7 +472,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp($cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -512,7 +496,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset($factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -536,7 +520,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken($jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -560,7 +544,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida) + public function setFrida($frida): self { $this->container['frida'] = $frida; @@ -584,7 +568,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist($ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -608,7 +592,7 @@ public function getTor() * * @return $this */ - public function setTor($tor) + public function setTor($tor): self { $this->container['tor'] = $tor; @@ -632,7 +616,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings($privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -656,7 +640,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine($virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -680,7 +664,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn) + public function setVpn($vpn): self { $this->container['vpn'] = $vpn; @@ -704,7 +688,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy) + public function setProxy($proxy): self { $this->container['proxy'] = $proxy; @@ -728,7 +712,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering) + public function setTampering($tampering): self { $this->container['tampering'] = $tampering; @@ -752,7 +736,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity($high_activity): self { $this->container['high_activity'] = $high_activity; @@ -776,7 +760,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing($location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -800,7 +784,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore($suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -824,7 +808,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes($raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -835,11 +819,8 @@ public function setRawDeviceAttributes($raw_device_attributes) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -848,11 +829,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -863,8 +841,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -878,8 +855,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 3897e44a..1a5cca7a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -42,17 +42,15 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseBotd'; + protected static string $swaggerModelName = 'ProductsResponseBotd'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\BotdResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 11480f1c..47ef4eab 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -42,17 +42,15 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseIdentification'; + protected static string $swaggerModelName = 'ProductsResponseIdentification'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; @@ -61,7 +59,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 179e9557..825798c3 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -42,17 +42,15 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseIdentificationData'; + protected static string $swaggerModelName = 'ProductsResponseIdentificationData'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -74,7 +72,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -97,7 +95,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -119,7 +117,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -141,7 +139,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -163,7 +161,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -192,10 +190,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -209,20 +205,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -230,40 +222,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -273,7 +257,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -323,7 +307,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -345,7 +329,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -369,7 +353,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -393,7 +377,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -417,7 +401,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -441,7 +425,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -465,7 +449,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -489,7 +473,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -513,7 +497,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -537,7 +521,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -561,7 +545,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -585,7 +569,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -609,7 +593,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -633,7 +617,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -657,7 +641,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -681,7 +665,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -692,11 +676,8 @@ public function setVisitorId($visitor_id) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -705,11 +686,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -720,8 +698,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -735,8 +712,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 68db9d14..7f55eabd 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -42,17 +42,15 @@ class ProxyResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProxyResult'; + protected static string $swaggerModelName = 'ProxyResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 18c9ecd7..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -44,17 +44,15 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'RawDeviceAttributesResult'; + protected static string $swaggerModelName = 'RawDeviceAttributesResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ ]; /** @@ -62,7 +60,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ ]; /** @@ -71,7 +69,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ ]; /** @@ -79,7 +77,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ ]; /** @@ -87,7 +85,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ ]; /** @@ -95,7 +93,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -107,10 +105,8 @@ public function __construct(?array $data = null) {} /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -124,20 +120,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -145,40 +137,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -188,7 +172,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -199,7 +183,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -208,11 +192,8 @@ public function valid() * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -221,11 +202,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -236,8 +214,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -251,8 +228,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Response.php b/src/Model/Response.php index 1bb0e2e8..ba28cde0 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -44,17 +44,15 @@ class Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Response'; + protected static string $swaggerModelName = 'Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'visitor_id' => 'string', 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', 'last_timestamp' => 'int', @@ -65,7 +63,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'visitor_id' => null, 'visits' => null, 'last_timestamp' => 'int64', @@ -77,7 +75,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'visitor_id' => 'visitorId', 'visits' => 'visits', 'last_timestamp' => 'lastTimestamp', @@ -88,7 +86,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'visitor_id' => 'setVisitorId', 'visits' => 'setVisits', 'last_timestamp' => 'setLastTimestamp', @@ -99,7 +97,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'visitor_id' => 'getVisitorId', 'visits' => 'getVisits', 'last_timestamp' => 'getLastTimestamp', @@ -110,7 +108,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -128,10 +126,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -145,20 +141,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -166,40 +158,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -209,7 +193,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -229,7 +213,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -251,7 +235,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -275,7 +259,7 @@ public function getVisits() * * @return $this */ - public function setVisits($visits) + public function setVisits($visits): self { $this->container['visits'] = $visits; @@ -299,7 +283,7 @@ public function getLastTimestamp() * * @return $this */ - public function setLastTimestamp($last_timestamp) + public function setLastTimestamp($last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -323,7 +307,7 @@ public function getPaginationKey() * * @return $this */ - public function setPaginationKey($pagination_key) + public function setPaginationKey($pagination_key): self { $this->container['pagination_key'] = $pagination_key; @@ -334,11 +318,8 @@ public function setPaginationKey($pagination_key) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -347,11 +328,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -362,8 +340,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -377,8 +354,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 36789502..883abe97 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -42,17 +42,15 @@ class ResponseVisits implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ResponseVisits'; + protected static string $swaggerModelName = 'ResponseVisits'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -73,7 +71,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -95,7 +93,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -116,7 +114,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -137,7 +135,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -158,7 +156,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -186,10 +184,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -203,20 +199,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -224,40 +216,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -267,7 +251,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -314,7 +298,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -336,7 +320,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -360,7 +344,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -384,7 +368,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -408,7 +392,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -432,7 +416,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -456,7 +440,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -480,7 +464,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -504,7 +488,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -528,7 +512,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -552,7 +536,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -576,7 +560,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -600,7 +584,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -624,7 +608,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -648,7 +632,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +643,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -672,11 +653,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -687,8 +665,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -702,8 +679,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index b886abf7..dc3a61c4 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -42,17 +42,15 @@ class RootAppsResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'RootAppsResult'; + protected static string $swaggerModelName = 'RootAppsResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 0e26bd5a..9084fead 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -42,17 +42,15 @@ class SeenAt implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SeenAt'; + protected static string $swaggerModelName = 'SeenAt'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'global' => '\DateTime', 'subscription' => '\DateTime']; @@ -61,7 +59,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'global' => 'date-time', 'subscription' => 'date-time']; @@ -71,7 +69,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'global' => 'global', 'subscription' => 'subscription']; @@ -80,7 +78,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'global' => 'setGlobal', 'subscription' => 'setSubscription']; @@ -89,7 +87,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'global' => 'getGlobal', 'subscription' => 'getSubscription']; @@ -98,7 +96,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getGlobal() * * @return $this */ - public function setGlobal($global) + public function setGlobal($global): self { $this->container['global'] = $global; @@ -261,7 +245,7 @@ public function getSubscription() * * @return $this */ - public function setSubscription($subscription) + public function setSubscription($subscription): self { $this->container['subscription'] = $subscription; @@ -272,11 +256,8 @@ public function setSubscription($subscription) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index bab0095a..95f27ffe 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -42,17 +42,15 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseClonedApp'; + protected static string $swaggerModelName = 'SignalResponseClonedApp'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 3a985b4b..22fe1763 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -42,17 +42,15 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseEmulator'; + protected static string $swaggerModelName = 'SignalResponseEmulator'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\EmulatorResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 773d3c59..6be91f8f 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -42,17 +42,15 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseFactoryReset'; + protected static string $swaggerModelName = 'SignalResponseFactoryReset'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 944505f5..fa3d624a 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -42,17 +42,15 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseFrida'; + protected static string $swaggerModelName = 'SignalResponseFrida'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\FridaResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 8f59aac2..3efa9c30 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -42,17 +42,15 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseHighActivity'; + protected static string $swaggerModelName = 'SignalResponseHighActivity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\HighActivityResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 402abf6d..76d265e1 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -42,17 +42,15 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIncognito'; + protected static string $swaggerModelName = 'SignalResponseIncognito'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IncognitoResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 0106c05a..7716218d 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -42,17 +42,15 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIpBlocklist'; + protected static string $swaggerModelName = 'SignalResponseIpBlocklist'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 360fa531..9fad6670 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -42,17 +42,15 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIpInfo'; + protected static string $swaggerModelName = 'SignalResponseIpInfo'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IpInfoResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 287bd034..64882ebe 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -42,17 +42,15 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseJailbroken'; + protected static string $swaggerModelName = 'SignalResponseJailbroken'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 8e84399e..c09e19a8 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -42,17 +42,15 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseLocationSpoofing'; + protected static string $swaggerModelName = 'SignalResponseLocationSpoofing'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index eaa80457..79378ceb 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -42,17 +42,15 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponsePrivacySettings'; + protected static string $swaggerModelName = 'SignalResponsePrivacySettings'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 2a86019e..779c7d5e 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -42,17 +42,15 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseProxy'; + protected static string $swaggerModelName = 'SignalResponseProxy'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ProxyResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 18a15574..85457227 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -42,17 +42,15 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseRawDeviceAttributes'; + protected static string $swaggerModelName = 'SignalResponseRawDeviceAttributes'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index bfaacc84..a89406e5 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -42,17 +42,15 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseRootApps'; + protected static string $swaggerModelName = 'SignalResponseRootApps'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\RootAppsResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 470c7989..8497b239 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -42,17 +42,15 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseSuspectScore'; + protected static string $swaggerModelName = 'SignalResponseSuspectScore'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 4c529e74..37b2b0cb 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -42,17 +42,15 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseTampering'; + protected static string $swaggerModelName = 'SignalResponseTampering'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\TamperingResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 70b27080..7bfacdff 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -42,17 +42,15 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseTor'; + protected static string $swaggerModelName = 'SignalResponseTor'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\TorResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index ca6c2e45..9fa479e9 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -42,17 +42,15 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseVirtualMachine'; + protected static string $swaggerModelName = 'SignalResponseVirtualMachine'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index cb22f0e4..76eb851d 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -42,17 +42,15 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseVpn'; + protected static string $swaggerModelName = 'SignalResponseVpn'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\VpnResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 616a1e6d..78887fc4 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -42,17 +42,15 @@ class Subdivision implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Subdivision'; + protected static string $swaggerModelName = 'Subdivision'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'iso_code' => 'string', 'name' => 'string']; @@ -61,7 +59,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'iso_code' => null, 'name' => null]; @@ -71,7 +69,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'iso_code' => 'isoCode', 'name' => 'name']; @@ -80,7 +78,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'iso_code' => 'setIsoCode', 'name' => 'setName']; @@ -89,7 +87,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'iso_code' => 'getIsoCode', 'name' => 'getName']; @@ -98,7 +96,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getIsoCode() * * @return $this */ - public function setIsoCode($iso_code) + public function setIsoCode($iso_code): self { $this->container['iso_code'] = $iso_code; @@ -252,7 +236,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -263,11 +247,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 1b55d36c..78a40f5d 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -42,17 +42,15 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SuspectScoreResult'; + protected static string $swaggerModelName = 'SuspectScoreResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'int']; /** @@ -60,7 +58,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index c48b0f18..74a2ac26 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -42,17 +42,15 @@ class TamperingResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'TamperingResult'; + protected static string $swaggerModelName = 'TamperingResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'anomaly_score' => 'float']; @@ -61,7 +59,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'anomaly_score' => null]; @@ -71,7 +69,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'anomaly_score' => 'anomalyScore']; @@ -80,7 +78,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'anomaly_score' => 'setAnomalyScore']; @@ -89,7 +87,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'anomaly_score' => 'getAnomalyScore']; @@ -98,7 +96,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -261,7 +245,7 @@ public function getAnomalyScore() * * @return $this */ - public function setAnomalyScore($anomaly_score) + public function setAnomalyScore($anomaly_score): self { $this->container['anomaly_score'] = $anomaly_score; @@ -272,11 +256,8 @@ public function setAnomalyScore($anomaly_score) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 4a5cd84f..1f1fdfd0 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -42,17 +42,15 @@ class TorResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'TorResult'; + protected static string $swaggerModelName = 'TorResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index fda99fb1..9d457f1a 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -42,17 +42,15 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VirtualMachineResult'; + protected static string $swaggerModelName = 'VirtualMachineResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index f308038d..60889bbe 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -42,17 +42,15 @@ class Visit implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Visit'; + protected static string $swaggerModelName = 'Visit'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -73,7 +71,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -95,7 +93,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -116,7 +114,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -137,7 +135,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -158,7 +156,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -186,10 +184,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -203,20 +199,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -224,40 +216,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -267,7 +251,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -314,7 +298,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -336,7 +320,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -360,7 +344,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -384,7 +368,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -408,7 +392,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -432,7 +416,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -456,7 +440,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -480,7 +464,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -504,7 +488,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -528,7 +512,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -552,7 +536,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -576,7 +560,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -600,7 +584,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -624,7 +608,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -648,7 +632,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +643,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -672,11 +653,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -687,8 +665,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -702,8 +679,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index b318d1e7..aaeeecfe 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -42,17 +42,15 @@ class VpnResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VpnResult'; + protected static string $swaggerModelName = 'VpnResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'origin_timezone' => 'string', 'origin_country' => 'string', @@ -63,7 +61,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'origin_timezone' => null, 'origin_country' => null, @@ -75,7 +73,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'origin_timezone' => 'originTimezone', 'origin_country' => 'originCountry', @@ -86,7 +84,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'origin_timezone' => 'setOriginTimezone', 'origin_country' => 'setOriginCountry', @@ -97,7 +95,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'origin_timezone' => 'getOriginTimezone', 'origin_country' => 'getOriginCountry', @@ -108,7 +106,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -230,7 +214,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -252,7 +236,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -276,7 +260,7 @@ public function getOriginTimezone() * * @return $this */ - public function setOriginTimezone($origin_timezone) + public function setOriginTimezone($origin_timezone): self { $this->container['origin_timezone'] = $origin_timezone; @@ -300,7 +284,7 @@ public function getOriginCountry() * * @return $this */ - public function setOriginCountry($origin_country) + public function setOriginCountry($origin_country): self { $this->container['origin_country'] = $origin_country; @@ -324,7 +308,7 @@ public function getMethods() * * @return $this */ - public function setMethods($methods) + public function setMethods($methods): self { $this->container['methods'] = $methods; @@ -335,11 +319,8 @@ public function setMethods($methods) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -348,11 +329,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -363,8 +341,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -378,8 +355,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 50cb6c9a..7b341fec 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -42,17 +42,15 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VpnResult_methods'; + protected static string $swaggerModelName = 'VpnResult_methods'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'timezone_mismatch' => 'bool', 'public_vpn' => 'bool', 'auxiliary_mobile' => 'bool']; @@ -62,7 +60,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'timezone_mismatch' => null, 'public_vpn' => null, 'auxiliary_mobile' => null]; @@ -73,7 +71,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', 'public_vpn' => 'publicVPN', 'auxiliary_mobile' => 'auxiliaryMobile']; @@ -83,7 +81,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', 'public_vpn' => 'setPublicVpn', 'auxiliary_mobile' => 'setAuxiliaryMobile']; @@ -93,7 +91,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', 'public_vpn' => 'getPublicVpn', 'auxiliary_mobile' => 'getAuxiliaryMobile']; @@ -103,7 +101,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -224,7 +208,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -246,7 +230,7 @@ public function getTimezoneMismatch() * * @return $this */ - public function setTimezoneMismatch($timezone_mismatch) + public function setTimezoneMismatch($timezone_mismatch): self { $this->container['timezone_mismatch'] = $timezone_mismatch; @@ -270,7 +254,7 @@ public function getPublicVpn() * * @return $this */ - public function setPublicVpn($public_vpn) + public function setPublicVpn($public_vpn): self { $this->container['public_vpn'] = $public_vpn; @@ -294,7 +278,7 @@ public function getAuxiliaryMobile() * * @return $this */ - public function setAuxiliaryMobile($auxiliary_mobile) + public function setAuxiliaryMobile($auxiliary_mobile): self { $this->container['auxiliary_mobile'] = $auxiliary_mobile; @@ -305,11 +289,8 @@ public function setAuxiliaryMobile($auxiliary_mobile) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -318,11 +299,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -333,8 +311,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -348,8 +325,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 843ba581..57e00ed5 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -42,17 +42,15 @@ class WebhookVisit implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'WebhookVisit'; + protected static string $swaggerModelName = 'WebhookVisit'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'visitor_id' => 'string', 'client_referrer' => 'string', 'user_agent' => 'string', @@ -95,7 +93,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'visitor_id' => null, 'client_referrer' => null, 'user_agent' => null, @@ -139,7 +137,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'visitor_id' => 'visitorId', 'client_referrer' => 'clientReferrer', 'user_agent' => 'userAgent', @@ -182,7 +180,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'visitor_id' => 'setVisitorId', 'client_referrer' => 'setClientReferrer', 'user_agent' => 'setUserAgent', @@ -225,7 +223,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'visitor_id' => 'getVisitorId', 'client_referrer' => 'getClientReferrer', 'user_agent' => 'getUserAgent', @@ -268,7 +266,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -318,10 +316,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -335,20 +331,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -356,40 +348,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -399,7 +383,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -449,7 +433,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -471,7 +455,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -495,7 +479,7 @@ public function getClientReferrer() * * @return $this */ - public function setClientReferrer($client_referrer) + public function setClientReferrer($client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -519,7 +503,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -543,7 +527,7 @@ public function getBot() * * @return $this */ - public function setBot($bot) + public function setBot($bot): self { $this->container['bot'] = $bot; @@ -567,7 +551,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo($ip_info): self { $this->container['ip_info'] = $ip_info; @@ -591,7 +575,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -615,7 +599,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps($root_apps): self { $this->container['root_apps'] = $root_apps; @@ -639,7 +623,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator) + public function setEmulator($emulator): self { $this->container['emulator'] = $emulator; @@ -663,7 +647,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp($cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -687,7 +671,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset($factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -711,7 +695,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken($jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -735,7 +719,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida) + public function setFrida($frida): self { $this->container['frida'] = $frida; @@ -759,7 +743,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist($ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -783,7 +767,7 @@ public function getTor() * * @return $this */ - public function setTor($tor) + public function setTor($tor): self { $this->container['tor'] = $tor; @@ -807,7 +791,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings($privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -831,7 +815,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine($virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -855,7 +839,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn) + public function setVpn($vpn): self { $this->container['vpn'] = $vpn; @@ -879,7 +863,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy) + public function setProxy($proxy): self { $this->container['proxy'] = $proxy; @@ -903,7 +887,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering) + public function setTampering($tampering): self { $this->container['tampering'] = $tampering; @@ -927,7 +911,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes($raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -951,7 +935,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity($high_activity): self { $this->container['high_activity'] = $high_activity; @@ -975,7 +959,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing($location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -999,7 +983,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore($suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1023,7 +1007,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -1047,7 +1031,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1071,7 +1055,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -1095,7 +1079,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1119,7 +1103,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -1143,7 +1127,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -1167,7 +1151,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -1191,7 +1175,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -1215,7 +1199,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1239,7 +1223,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -1263,7 +1247,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -1287,7 +1271,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1311,7 +1295,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -1322,11 +1306,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -1335,11 +1316,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -1350,8 +1328,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -1365,8 +1342,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 214bb57a..5cd215b3 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -29,6 +29,8 @@ namespace Fingerprint\ServerAPI; +use DateTime; + /** * ObjectSerializer Class Doc Comment. * @@ -43,12 +45,12 @@ class ObjectSerializer /** * Serialize data. * - * @param mixed $data the data to serialize - * @param string $format the format of the Swagger type of the data + * @param mixed $data the data to serialize + * @param null|string $format the format of the Swagger type of the data * - * @return object|string serialized form of $data + * @return array|object|string serialized form of $data */ - public static function sanitizeForSerialization($data, $format = null) + public static function sanitizeForSerialization(mixed $data, ?string $format = null): array|object|string { if (is_scalar($data) || null === $data) { return $data; @@ -103,7 +105,7 @@ public static function sanitizeForSerialization($data, $format = null) * * @return string the sanitized filename */ - public static function sanitizeFilename($filename) + public static function sanitizeFilename(string $filename): string { if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { return $match[1]; @@ -120,7 +122,7 @@ public static function sanitizeFilename($filename) * * @return string the serialized object */ - public static function toPathValue($value) + public static function toPathValue(string $value): string { return rawurlencode(self::toString($value)); } @@ -136,7 +138,7 @@ public static function toPathValue($value) * * @return string the serialized object */ - public static function toQueryValue($object, $format = null) + public static function toQueryValue(array|\DateTime|string $object, ?string $format = null): string { if (is_array($object)) { return implode(',', $object); @@ -154,7 +156,7 @@ public static function toQueryValue($object, $format = null) * * @return string the header string */ - public static function toHeaderValue($value) + public static function toHeaderValue(string $value): string { return self::toString($value); } @@ -168,7 +170,7 @@ public static function toHeaderValue($value) * * @return string the form string */ - public static function toFormValue($value) + public static function toFormValue(\SplFileObject|string $value): string { if ($value instanceof \SplFileObject) { return $value->getRealPath(); @@ -188,7 +190,7 @@ public static function toFormValue($value) * * @return string the header string */ - public static function toString($value, $format = null) + public static function toString(\DateTime|string $value, ?string $format = null): string { if ($value instanceof \DateTime) { return ('date' === $format) ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); @@ -204,10 +206,8 @@ public static function toString($value, $format = null) * @param string $collectionFormat the format use for serialization (csv, * ssv, tsv, pipes, multi) * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * - * @return string */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + public static function serializeCollection(array $collection, string $collectionFormat, ?bool $allowCollectionFormatMulti = false): string { if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { // http_build_query() almost does the job for us. We just @@ -215,21 +215,12 @@ public static function serializeCollection(array $collection, $collectionFormat, return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); } - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); - - case 'tsv': - return implode("\t", $collection); - - case 'ssv': - return implode(' ', $collection); - - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); - } + return match ($collectionFormat) { + 'pipes' => implode('|', $collection), + 'tsv' => implode("\t", $collection), + 'ssv' => implode(' ', $collection), + default => implode(',', $collection), + }; } /** @@ -241,12 +232,12 @@ public static function serializeCollection(array $collection, $collectionFormat, * * @throws \Exception */ - public static function deserialize($data, $class, $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; } - if ('map[' === substr($class, 0, 4)) { // for associative array e.g. map[string,int] + if (str_starts_with($class, 'map[')) { // for associative array e.g. map[string,int] $inner = substr($class, 4, -1); $deserialized = []; if (false !== strrpos($inner, ',')) { diff --git a/template/ApiException.mustache b/template/ApiException.mustache index d8b983c9..091803f8 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -19,6 +19,7 @@ namespace {{invokerPackage}}; use \Exception; +use Psr\Http\Message\ResponseInterface; /** * ApiException Class Doc Comment @@ -30,45 +31,20 @@ use \Exception; */ class ApiException extends Exception { + protected ResponseInterface $responseObject; - /** - * The deserialized response object - * - * @var $responseObject; - */ - protected $responseObject; - - /** - * Constructor - * - * @param string $message Error message - * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header - * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string - */ - public function __construct($message = "", $code = 0) + public function __construct(?string $message = "", ?int $code = 0) { parent::__construct($message, $code); } - /** - * Sets the deseralized response object (during deserialization) - * - * @param mixed $obj Deserialized response object - * - * @return void - */ - public function setResponseObject($obj) + + public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; } - /** - * Gets the deseralized response object (during deserialization) - * - * @return mixed the deserialized response object - */ - public function getResponseObject() + public function getResponseObject(): ResponseInterface { return $this->responseObject; } diff --git a/template/Configuration.mustache b/template/Configuration.mustache index a4249245..d5a6215a 100644 --- a/template/Configuration.mustache +++ b/template/Configuration.mustache @@ -39,74 +39,55 @@ class Configuration * * @var string[] */ - protected $apiKeys = []; + protected array $apiKeys = []; /** * Associate array to store API prefix (e.g. Bearer) * * @var string[] */ - protected $apiKeyPrefixes = []; + protected array $apiKeyPrefixes = []; /** * Access token for OAuth - * - * @var string */ - protected $accessToken = '{{#x-token-example}}{{x-token-example}}{{/x-token-example}}'; + protected string $accessToken = '{{#x-token-example}}{{x-token-example}}{{/x-token-example}}'; /** * Username for HTTP basic authentication - * - * @var string */ - protected $username = ''; + protected string $username = ''; /** * Password for HTTP basic authentication - * - * @var string */ - protected $password = ''; + protected string $password = ''; /** * The host - * - * @var string */ - protected $host = '{{basePath}}'; + protected string $host = '{{basePath}}'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default - * - * @var string */ - protected $userAgent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{#artifactVersion}}{{{.}}}{{/artifactVersion}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/php{{/httpUserAgent}}'; + protected string $userAgent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{#artifactVersion}}{{{.}}}{{/artifactVersion}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/php{{/httpUserAgent}}'; /** * Debug switch (default set to false) - * - * @var bool */ - protected $debug = false; + protected bool $debug = false; /** * Debug file location (log to STDOUT by default) - * - * @var string */ - protected $debugFile = 'php://output'; + protected string $debugFile = 'php://output'; /** * Debug file location (log to STDOUT by default) - * - * @var string */ - protected $tempFolderPath; + protected string $tempFolderPath; - /** - * Constructor - */ public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); @@ -120,7 +101,7 @@ class Configuration * * @return $this */ - public function setApiKey($apiKeyIdentifier, $key) + public function setApiKey(string $apiKeyIdentifier, string $key): self { $this->apiKeys[$apiKeyIdentifier] = $key; return $this; @@ -131,9 +112,9 @@ class Configuration * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string API key or token + * @return string|null API key or token */ - public function getApiKey($apiKeyIdentifier) + public function getApiKey($apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } @@ -146,7 +127,7 @@ class Configuration * * @return $this */ - public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; return $this; @@ -157,9 +138,9 @@ class Configuration * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string + * @return string|null */ - public function getApiKeyPrefix($apiKeyIdentifier) + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; } @@ -171,7 +152,7 @@ class Configuration * * @return $this */ - public function setAccessToken($accessToken) + public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; return $this; @@ -182,7 +163,7 @@ class Configuration * * @return string Access token for OAuth */ - public function getAccessToken() + public function getAccessToken(): string { return $this->accessToken; } @@ -194,7 +175,7 @@ class Configuration * * @return $this */ - public function setUsername($username) + public function setUsername(string $username): self { $this->username = $username; return $this; @@ -205,7 +186,7 @@ class Configuration * * @return string Username for HTTP basic authentication */ - public function getUsername() + public function getUsername(): string { return $this->username; } @@ -217,7 +198,7 @@ class Configuration * * @return $this */ - public function setPassword($password) + public function setPassword(string $password): self { $this->password = $password; return $this; @@ -228,7 +209,7 @@ class Configuration * * @return string Password for HTTP basic authentication */ - public function getPassword() + public function getPassword(): string { return $this->password; } @@ -240,7 +221,7 @@ class Configuration * * @return $this */ - public function setHost($host) + public function setHost(string $host): self { $this->host = $host; return $this; @@ -251,7 +232,7 @@ class Configuration * * @return string Host */ - public function getHost() + public function getHost(): string { return $this->host; } @@ -260,7 +241,7 @@ class Configuration * @param $region * @return $this */ - public function setRegion($region = self::REGION_GLOBAL) + public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: @@ -291,7 +272,7 @@ class Configuration * @return $this * @throws \InvalidArgumentException */ - public function setUserAgent($userAgent) + public function setUserAgent(string $userAgent): self { if (!is_string($userAgent)) { throw new \InvalidArgumentException('User-agent must be a string.'); @@ -306,7 +287,7 @@ class Configuration * * @return string user agent */ - public function getUserAgent() + public function getUserAgent(): string { return $this->userAgent; } @@ -318,7 +299,7 @@ class Configuration * * @return $this */ - public function setDebug($debug) + public function setDebug(bool $debug): self { $this->debug = $debug; return $this; @@ -329,7 +310,7 @@ class Configuration * * @return bool */ - public function getDebug() + public function getDebug(): bool { return $this->debug; } @@ -341,7 +322,7 @@ class Configuration * * @return $this */ - public function setDebugFile($debugFile) + public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; return $this; @@ -352,7 +333,7 @@ class Configuration * * @return string */ - public function getDebugFile() + public function getDebugFile(): string { return $this->debugFile; } @@ -364,7 +345,7 @@ class Configuration * * @return $this */ - public function setTempFolderPath($tempFolderPath) + public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; return $this; @@ -375,7 +356,7 @@ class Configuration * * @return string Temp folder path */ - public function getTempFolderPath() + public function getTempFolderPath(): string { return $this->tempFolderPath; } @@ -387,7 +368,7 @@ class Configuration * @param $region * @return Configuration */ - public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) + public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { if (self::$defaultConfiguration === null) { self::$defaultConfiguration = new Configuration(); @@ -406,7 +387,7 @@ class Configuration * * @return void */ - public static function setDefaultConfiguration(Configuration $config) + public static function setDefaultConfiguration(Configuration $config): void { self::$defaultConfiguration = $config; } @@ -416,7 +397,7 @@ class Configuration * * @return string The report for debugging */ - public static function toDebugReport() + public static function toDebugReport(): string { $report = 'PHP SDK ({{invokerPackage}}) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; @@ -435,9 +416,9 @@ class Configuration * * @param string $apiKeyIdentifier name of apikey * - * @return string API key with the prefix + * @return string|null API key with the prefix */ - public function getApiKeyWithPrefix($apiKeyIdentifier) + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); diff --git a/template/api.mustache b/template/api.mustache index 9ef0a5b0..796b5652 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -43,12 +43,8 @@ use \GuzzleHttp\Exception\GuzzleException; protected ClientInterface $client; protected Configuration $config; - protected $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; + protected string $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; - /** - * @param ClientInterface $client - * @param Configuration $config - */ public function __construct( ClientInterface $client = null, Configuration $config = null @@ -57,10 +53,7 @@ use \GuzzleHttp\Exception\GuzzleException; $this->config = $config ?: new Configuration(); } - /** - * @return Configuration - */ - public function getConfig() + public function getConfig(): Configuration { return $this->config; } @@ -79,15 +72,12 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array + public function {{operationId}}({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -170,14 +160,10 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} - {{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/parameters}} * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface< array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } > */ - public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface + public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -246,9 +232,6 @@ use \GuzzleHttp\Exception\GuzzleException; /** * Create request for operation '{{{operationId}}}' * -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} * * @throws \InvalidArgumentException */ @@ -418,9 +401,8 @@ use \GuzzleHttp\Exception\GuzzleException; * Create http client option * * @throws \RuntimeException on file opening failure - * @return array of http client options */ - protected function createHttpClientOption() + protected function createHttpClientOption(): array { $options = []; if ($this->config->getDebug()) { diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 4604ec01..0f1a1d61 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -5,14 +5,14 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string */ - protected static $swaggerModelName = '{{name}}'; + protected static string $swaggerModelName = '{{name}}'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ {{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -22,27 +22,23 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ {{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}}, {{/hasMore}}{{/vars}} ]; /** * Array of property to type mappings. Used for (de)serialization - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes{{#parentSchema}} + parent::swaggerTypes(){{/parentSchema}}; } /** * Array of property to format mappings. Used for (de)serialization - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats{{#parentSchema}} + parent::swaggerFormats(){{/parentSchema}}; } @@ -53,7 +49,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ {{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -63,7 +59,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ {{#vars}}'{{name}}' => '{{setter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -73,7 +69,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ {{#vars}}'{{name}}' => '{{getter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -81,40 +77,32 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Array of attributes where the key is the local name, * and the value is the original name - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) - * - * @return array */ - public static function setters() + public static function setters(): array { return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) - * - * @return array */ - public static function getters() + public static function getters(): array { return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -128,7 +116,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return string[] */ - public function {{getter}}AllowableValues() + public function {{getter}}AllowableValues(): array { return [ {{#allowableValues}}{{#enumVars}}self::{{enumName}}_{{{name}}},{{^@last}} @@ -143,7 +131,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var mixed[] */ - protected $container = []; + protected array $container = []; {{/parentSchema}} /** @@ -168,7 +156,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { {{#parent}} $invalidProperties = parent::listInvalidProperties(); @@ -249,7 +237,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return count($this->listInvalidProperties()) === 0; } @@ -258,7 +246,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets {{name}} - * * @return {{datatype}} */ public function {{getter}}() @@ -273,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}(${{name}}) + public function {{setter}}(${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); @@ -342,11 +329,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Returns true if offset exists. False otherwise. * * @param integer $offset Offset - * - * @return boolean */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -355,11 +339,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets offset. * * @param integer $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -369,11 +350,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @param integer $offset Offset * @param mixed $value Value to be set - * - * @return void */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -386,11 +364,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Unsets offset. * * @param integer $offset Offset - * - * @return void */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -400,7 +375,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( From ee54f5bf787ccbb3c3493bfe8ccc2a5590c557dc Mon Sep 17 00:00:00 2001 From: Orkun Date: Sun, 4 Aug 2024 13:44:38 +0300 Subject: [PATCH 039/118] refactor: throw serialization exception from object serializer --- src/Api/FingerprintApi.php | 44 ++++++++++++++++++++++++---------- src/ObjectSerializer.php | 4 ++-- src/SerializationException.php | 13 ++++++---- template/api.mustache | 18 +++++++++----- 4 files changed, 55 insertions(+), 24 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index d3b451ef..fd799616 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -122,8 +122,10 @@ public function getEvent(string $request_id): array try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -174,7 +176,10 @@ public function getEvent(string $request_id): array } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $exception; } } } @@ -215,8 +220,10 @@ function ($response) use ($returnType, $request) { try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -268,7 +275,10 @@ function ($e) { } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $e; } } ); @@ -326,8 +336,10 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -378,7 +390,10 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $exception; } } } @@ -419,8 +434,10 @@ function ($response) use ($returnType, $request) { try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -472,7 +489,10 @@ function ($e) { } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $e; } } ); diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 5cd215b3..adcb378a 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -296,7 +296,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return (float) $originalData; } if ('string' === $normalizedClass && is_object($data)) { - throw new \Exception('Cannot convert object to string'); + throw new SerializationException(); } settype($data, $class); @@ -304,7 +304,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - throw new \Exception('Serialization error: Could not convert '.gettype($originalData).' to '.$class); + throw new SerializationException(); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); diff --git a/src/SerializationException.php b/src/SerializationException.php index 9c0fe867..51049575 100644 --- a/src/SerializationException.php +++ b/src/SerializationException.php @@ -6,15 +6,20 @@ final class SerializationException extends \Exception { - protected readonly ResponseInterface $response; + protected ?ResponseInterface $response; - public function __construct(ResponseInterface $response, \Exception $prev) + public function __construct(?ResponseInterface $response = null, ?\Exception $prev = null) { - parent::__construct("Response from the server couldn't be serialized", $prev->getCode(), $prev); + parent::__construct("Response from the server couldn't be serialized", $prev ? $prev->getCode() : 0, $prev); $this->response = $response; } - public function getResponse(): ResponseInterface + public function setResponse(ResponseInterface $response): void + { + $this->response = $response; + } + + public function getResponse(): ?ResponseInterface { return $this->response; } diff --git a/template/api.mustache b/template/api.mustache index 796b5652..2b9556f2 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -116,8 +116,9 @@ use \GuzzleHttp\Exception\GuzzleException; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + throw $e; } return [$serialized, $response]; @@ -147,7 +148,9 @@ use \GuzzleHttp\Exception\GuzzleException; {{/responses}} } throw $e; - } catch (\Exception $_) { + } catch(SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + throw $exception; } } } @@ -192,8 +195,9 @@ use \GuzzleHttp\Exception\GuzzleException; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + throw $e; } return [$serialized, $response]; @@ -223,7 +227,9 @@ use \GuzzleHttp\Exception\GuzzleException; {{/responses}} } throw $e; - } catch (\Exception $_) { + } catch(SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + throw $e; } } ); From 6a4cbd6e2a521a209806337d90ae8f7e291a534b Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 8 Aug 2024 11:46:27 +0300 Subject: [PATCH 040/118] feat: add support for validating webhook signatures inter-768 --- README.md | 30 +++++++++++++++++++ docs/Webhook.md | 16 +++++++++++ run_checks.php | 11 +++++++ scripts/generate.sh | 2 +- src/Webhook/WebhookVerifier.php | 29 +++++++++++++++++++ template/README.mustache | 30 +++++++++++++++++++ test/WebhookVerifierTest.php | 51 +++++++++++++++++++++++++++++++++ 7 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 docs/Webhook.md create mode 100644 src/Webhook/WebhookVerifier.php create mode 100644 test/WebhookVerifierTest.php diff --git a/README.md b/README.md index 0f198b1c..29f2a07c 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,32 @@ All URIs are relative to your region's base URL. | Europe | https://eu.api.fpjs.io | | Asia | https://ap.api.fpjs.io | +## Webhook Signing + +This SDK provides utility method for verifying the HMAC signature of the incoming webhook request. +You can use below code to verify signature: + +```php + Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader(string $header, string $data, string $secret): bool + +Verifies the HMAC signature extracted from the "fpjs-event-signature" header of the incoming request. This is a part of the webhook signing process, which is available only for enterprise customers. +If you wish to enable it, please [contact our support](https://fingerprint.com/support). + +### Required Parameters + +| Name | Type | Description | Notes | +|------------|------------|------------------------------------------------------------|-------| +| **header** | **string** | Value of the "fpjs-event-signature" header. | | +| **data** | **string** | Body of the request from which above header was extracted. | | +| **secret** | **string** | Your generated secret used to sign the request. | | diff --git a/run_checks.php b/run_checks.php index 4f5831f2..3815e5c8 100644 --- a/run_checks.php +++ b/run_checks.php @@ -57,6 +57,17 @@ exit(1); } +$webhookSecret = "secret"; +$webhookData = "data"; +$webhookHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; +$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader($webhookHeader, $webhookData, $webhookSecret); +if($isValidWebhookSign) { + fwrite(STDOUT, sprintf("\n\nVerified webhook signature\n")); +} else { + fwrite(STDERR, sprintf("\n\nWebhook signature verification failed\n")); + exit(1); +} + // Enable the deprecated ArrayAccess return type warning again if needed error_reporting(error_reporting() | E_DEPRECATED); diff --git a/scripts/generate.sh b/scripts/generate.sh index 7db1b68e..6dfff69c 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -65,7 +65,7 @@ java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/f mv -f src/README.md ./README.md mv -f src/composer.json composer.json -find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + +find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" ! -name "Webhook.md" -exec rm {} + mv -f src/docs/* ./docs if [ -z "$GITHUB_ACTIONS" ]; then diff --git a/src/Webhook/WebhookVerifier.php b/src/Webhook/WebhookVerifier.php new file mode 100644 index 00000000..4d70a2a5 --- /dev/null +++ b/src/Webhook/WebhookVerifier.php @@ -0,0 +1,29 @@ +data, $this->secret); + $this->assertTrue($result, "With valid signature"); + } + + public function testWithInvalidHeader() + { + $result = WebhookVerifier::checkHeader("v2=invalid", $this->data, $this->secret); + $this->assertFalse($result, "With invalid header"); + } + + public function testWithHeaderWithoutVersion() + { + $result = WebhookVerifier::checkHeader("invalid", $this->data, $this->secret); + $this->assertFalse($result, "With header without version"); + } + + public function testWithEmptyHeader() + { + $result = WebhookVerifier::checkHeader("", $this->data, $this->secret); + $this->assertFalse($result, "With empty header"); + } + + public function testWithEmptySecret() + { + $validHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; + $result = WebhookVerifier::checkHeader($validHeader, $this->data, ""); + $this->assertFalse($result, "With empty secret"); + } + + public function testWithEmptyData() + { + $validHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; + $result = WebhookVerifier::checkHeader($validHeader, "", $this->secret); + $this->assertFalse($result, "With empty data"); + } +} \ No newline at end of file From 1840ba64888b20a203f2cf824f565dcc11ce33f1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 11:56:06 +0300 Subject: [PATCH 041/118] refactor: new logic for serializer --- run_checks.php | 17 +- src/Api/FingerprintApi.php | 374 +++++++++++++----------------------- src/ObjectSerializer.php | 61 +++--- template/api.mustache | 90 +++------ test/FingerprintApiTest.php | 7 +- 5 files changed, 223 insertions(+), 326 deletions(-) diff --git a/run_checks.php b/run_checks.php index c676c1fb..689abfbe 100644 --- a/run_checks.php +++ b/run_checks.php @@ -43,6 +43,9 @@ try { list($result, $response) = $client->getVisits($visitor_id); + if($result->getVisitorId() !== $visitor_id) { + throw new Exception('Argument visitorId is not equal to deserialized getVisitorId'); + } fwrite(STDOUT, sprintf("Got visits: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); @@ -50,7 +53,11 @@ } try { + /** @var $result \Fingerprint\ServerAPI\Model\EventResponse */ list($result, $response) = $client->getEvent($request_id); + if($result->getProducts()->getIdentification()->getData()->getRequestId() !== $request_id) { + throw new Exception('Argument requestId is not equal to deserialized getRequestId'); + } fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); @@ -58,8 +65,11 @@ } $eventPromise = $client->getEventAsync($request_id); -$eventPromise->then(function ($tuple) { +$eventPromise->then(function ($tuple) use($request_id) { list($result, $response) = $tuple; + if($result->getProducts()->getIdentification()->getData()->getRequestId() !== $request_id) { + throw new Exception('Argument requestId is not equal to deserialized getRequestId'); + } fwrite(STDOUT, sprintf("\n\nGot async event: %s \n", $response->getBody()->getContents())); }, function($exception) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); @@ -67,8 +77,11 @@ })->wait(); $visitsPromise = $client->getVisitsAsync($visitor_id); -$visitsPromise->then(function($tuple) { +$visitsPromise->then(function($tuple) use($visitor_id) { list($result, $response) = $tuple; + if($result->getVisitorId() !== $visitor_id) { + throw new Exception('Argument visitorId is not equal to deserialized getVisitorId'); + } fwrite(STDOUT, sprintf("\n\nGot async visits: %s \n", $response->getBody()->getContents())); }, function ($exception) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index fd799616..d0597565 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -117,70 +117,43 @@ public function getEvent(string $request_id): array throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; } catch (ApiException $e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\EventResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 404: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $exception; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\EventResponse' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' + ); + $e->setResponseObject($data); + + break; + + case 404: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } } @@ -190,6 +163,7 @@ public function getEvent(string $request_id): array * Get event by requestId * * @throws \InvalidArgumentException + * @throws SerializationException */ public function getEventAsync(string $request_id): PromiseInterface { @@ -215,71 +189,45 @@ function ($response) use ($returnType, $request) { throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; }, function ($e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\EventResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 404: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\EventResponse' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' + ); + $e->setResponseObject($data); + + break; + + case 404: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } ); } @@ -331,70 +279,43 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; } catch (ApiException $e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 429: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $exception; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\Response' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorVisits403' + ); + $e->setResponseObject($data); + + break; + + case 429: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } } @@ -404,6 +325,7 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin * Get visits by visitorId * * @throws \InvalidArgumentException + * @throws SerializationException */ public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { @@ -429,71 +351,45 @@ function ($response) use ($returnType, $request) { throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; }, function ($e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 429: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\Response' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorVisits403' + ); + $e->setResponseObject($data); + + break; + + case 429: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } ); } @@ -502,6 +398,7 @@ function ($e) { * Create request for operation 'getEvent'. * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function getEventRequest(string $request_id): Request { @@ -566,6 +463,7 @@ protected function getEventRequest(string $request_id): Request * Create request for operation 'getVisits'. * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request { diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index adcb378a..1bed1992 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -30,6 +30,7 @@ namespace Fingerprint\ServerAPI; use DateTime; +use Psr\Http\Message\ResponseInterface; /** * ObjectSerializer Class Doc Comment. @@ -226,13 +227,41 @@ public static function serializeCollection(array $collection, string $collection /** * Deserialize a JSON string into an object. * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string $class class name is passed as a string * * @throws \Exception */ - public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed + public static function deserialize(ResponseInterface $response, string $class): mixed + { + $data = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + return self::mapToClass($data, $class, $response); + } + + protected static function mapToClass(mixed $data, string $class, ResponseInterface $response): mixed + { + if ('string' === gettype($data)) { + $data = json_decode($data, false); + } + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->{$propertySetter}(self::castData($propertyValue, $type, $response)); + } + } + + return $instance; + } + + protected static function castData(mixed $data, string $class, ResponseInterface $response): mixed { if (null === $data) { return null; @@ -244,7 +273,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade $subClass_array = explode(',', $inner, 2); $subClass = $subClass_array[1]; foreach ($data as $key => $value) { - $deserialized[$key] = self::deserialize($value, $subClass, null); + $deserialized[$key] = self::castData($value, $subClass, $response); } } @@ -254,7 +283,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade $subClass = substr($class, 0, -2); $values = []; foreach ($data as $key => $value) { - $values[] = self::deserialize($value, $subClass, null); + $values[] = self::castData($value, $subClass, $response); } return $values; @@ -296,7 +325,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return (float) $originalData; } if ('string' === $normalizedClass && is_object($data)) { - throw new SerializationException(); + throw new SerializationException($response); } settype($data, $class); @@ -304,7 +333,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - throw new SerializationException(); + throw new SerializationException($response); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); @@ -315,20 +344,6 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; - - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } - - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->{$propertySetter}(self::deserialize($propertyValue, $type, null)); - } - } - - return $instance; + return self::mapToClass($data, $class, $response); } } diff --git a/template/api.mustache b/template/api.mustache index 2b9556f2..3238a89d 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -111,15 +111,8 @@ use \GuzzleHttp\Exception\GuzzleException; } {{#returnType}} - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; {{/returnType}} @@ -128,30 +121,22 @@ use \GuzzleHttp\Exception\GuzzleException; {{/returnType}} } catch (ApiException $e) { - try { - switch ($e->getCode()) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + switch ($e->getCode()) { {{#responses}} {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '{{dataType}}', - $response->getHeaders() - ); - $e->setResponseObject($data); - break; + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $data = ObjectSerializer::deserialize( + $response, + '{{dataType}}' + ); + $e->setResponseObject($data); + break; {{/dataType}} {{/responses}} - } - throw $e; - } catch(SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - throw $exception; } + throw $e; } } @@ -165,6 +150,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{/description}} * * @throws \InvalidArgumentException + * @throws SerializationException */ public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface { @@ -190,15 +176,8 @@ use \GuzzleHttp\Exception\GuzzleException; throw $apiException; } {{#returnType}} - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - throw $e; - } + + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; {{/returnType}} @@ -207,30 +186,22 @@ use \GuzzleHttp\Exception\GuzzleException; {{/returnType}} }, function ($e) { - try { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '{{dataType}}', - $response->getHeaders() - ); - $e->setResponseObject($data); - break; - {{/dataType}} - {{/responses}} - } - throw $e; - } catch(SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $data = ObjectSerializer::deserialize( + $response, + '{{dataType}}' + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} } + throw $e; } ); } @@ -240,6 +211,7 @@ use \GuzzleHttp\Exception\GuzzleException; * * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request { diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 3ee91f78..e498b7d7 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -84,11 +84,10 @@ public function getEventWithHttpInfoMock($request_id): array } $file = file_get_contents(__DIR__ . "/mocks/$mock_name"); - $events_mock_data = \GuzzleHttp\json_decode($file); $response = new \GuzzleHttp\Psr7\Response(200, [], $file); try { - $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + $serialized = ObjectSerializer::deserialize($response, EventResponse::class); } catch (Exception $exception) { throw new SerializationException($response, $exception); } @@ -113,9 +112,9 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - $response = new \GuzzleHttp\Psr7\Response(200, [], $file); + $response = new \GuzzleHttp\Psr7\Response(200, [], json_encode($visits_mock_data)); try { - $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); + $serialized = ObjectSerializer::deserialize($response, Response::class); } catch (Exception $exception) { throw new SerializationException($response, $exception); } From 9f6f5311301392f8b9d61890ad9598d379c63e4d Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 11:59:46 +0300 Subject: [PATCH 042/118] refactor: check header to is valid webhook signature --- README.md | 2 +- docs/Webhook.md | 4 ++-- run_checks.php | 2 +- src/Webhook/WebhookVerifier.php | 2 +- template/README.mustache | 2 +- test/WebhookVerifierTest.php | 12 ++++++------ 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 29f2a07c..f03f829e 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ $webhookData = "data"; // Value of the "fpjs-event-signature" header. $webhookHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; -$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader($webhookHeader, $webhookData, $webhookSecret); +$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature($webhookHeader, $webhookData, $webhookSecret); if(!$isValidWebhookSign) { fwrite(STDERR, sprintf("Webhook signature verification failed\n")); diff --git a/docs/Webhook.md b/docs/Webhook.md index 898e56eb..fe925023 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -1,8 +1,8 @@ # Webhook -## **CheckHeader** +## **IsValidWebhookSignature** -> Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader(string $header, string $data, string $secret): bool +> Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature(string $header, string $data, string $secret): bool Verifies the HMAC signature extracted from the "fpjs-event-signature" header of the incoming request. This is a part of the webhook signing process, which is available only for enterprise customers. If you wish to enable it, please [contact our support](https://fingerprint.com/support). diff --git a/run_checks.php b/run_checks.php index 3815e5c8..5b890e7b 100644 --- a/run_checks.php +++ b/run_checks.php @@ -60,7 +60,7 @@ $webhookSecret = "secret"; $webhookData = "data"; $webhookHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; -$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader($webhookHeader, $webhookData, $webhookSecret); +$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature($webhookHeader, $webhookData, $webhookSecret); if($isValidWebhookSign) { fwrite(STDOUT, sprintf("\n\nVerified webhook signature\n")); } else { diff --git a/src/Webhook/WebhookVerifier.php b/src/Webhook/WebhookVerifier.php index 4d70a2a5..f8bb89a7 100644 --- a/src/Webhook/WebhookVerifier.php +++ b/src/Webhook/WebhookVerifier.php @@ -4,7 +4,7 @@ final class WebhookVerifier { - public static function checkHeader(string $header, string $data, string $secret): bool + public static function IsValidWebhookSignature(string $header, string $data, string $secret): bool { $signatures = explode(',', $header); foreach ($signatures as $signature) { diff --git a/template/README.mustache b/template/README.mustache index 3ccefb2d..de90ccda 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -201,7 +201,7 @@ $webhookData = "data"; // Value of the "fpjs-event-signature" header. $webhookHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; -$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::checkHeader($webhookHeader, $webhookData, $webhookSecret); +$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature($webhookHeader, $webhookData, $webhookSecret); if(!$isValidWebhookSign) { fwrite(STDERR, sprintf("Webhook signature verification failed\n")); diff --git a/test/WebhookVerifierTest.php b/test/WebhookVerifierTest.php index 4ae98db2..3c963bc1 100644 --- a/test/WebhookVerifierTest.php +++ b/test/WebhookVerifierTest.php @@ -13,39 +13,39 @@ class WebhookVerifierTest extends TestCase public function testWithValidSignature() { $validHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; - $result = WebhookVerifier::checkHeader($validHeader, $this->data, $this->secret); + $result = WebhookVerifier::IsValidWebhookSignature($validHeader, $this->data, $this->secret); $this->assertTrue($result, "With valid signature"); } public function testWithInvalidHeader() { - $result = WebhookVerifier::checkHeader("v2=invalid", $this->data, $this->secret); + $result = WebhookVerifier::IsValidWebhookSignature("v2=invalid", $this->data, $this->secret); $this->assertFalse($result, "With invalid header"); } public function testWithHeaderWithoutVersion() { - $result = WebhookVerifier::checkHeader("invalid", $this->data, $this->secret); + $result = WebhookVerifier::IsValidWebhookSignature("invalid", $this->data, $this->secret); $this->assertFalse($result, "With header without version"); } public function testWithEmptyHeader() { - $result = WebhookVerifier::checkHeader("", $this->data, $this->secret); + $result = WebhookVerifier::IsValidWebhookSignature("", $this->data, $this->secret); $this->assertFalse($result, "With empty header"); } public function testWithEmptySecret() { $validHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; - $result = WebhookVerifier::checkHeader($validHeader, $this->data, ""); + $result = WebhookVerifier::IsValidWebhookSignature($validHeader, $this->data, ""); $this->assertFalse($result, "With empty secret"); } public function testWithEmptyData() { $validHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; - $result = WebhookVerifier::checkHeader($validHeader, "", $this->secret); + $result = WebhookVerifier::IsValidWebhookSignature($validHeader, "", $this->secret); $this->assertFalse($result, "With empty data"); } } \ No newline at end of file From bb27cfcc4149bb8a580fbb52a71f9a89be1b43bd Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 18:59:48 +0300 Subject: [PATCH 043/118] docs(webhook): use symbol in desc --- docs/Webhook.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Webhook.md b/docs/Webhook.md index fe925023..004780dd 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -9,8 +9,8 @@ If you wish to enable it, please [contact our support](https://fingerprint.com/s ### Required Parameters -| Name | Type | Description | Notes | -|------------|------------|------------------------------------------------------------|-------| -| **header** | **string** | Value of the "fpjs-event-signature" header. | | +| Name | Type | Description | Notes | +|------------|------------|-----------------------------------------------------------|-------| +| **header** | **string** | Value of the `fpjs-event-signature` header. | | | **data** | **string** | Body of the request from which above header was extracted. | | -| **secret** | **string** | Your generated secret used to sign the request. | | +| **secret** | **string** | Your generated secret used to sign the request. | | From 7a209f8063cbadaa22ccf89887f58c3c80f28183 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 19:10:23 +0300 Subject: [PATCH 044/118] refactor: add descriptions to methods and properties --- src/Api/FingerprintApi.php | 18 ++++++++++++++++++ src/ApiException.php | 3 +++ src/Configuration.php | 2 +- template/ApiException.mustache | 3 +++ template/Configuration.mustache | 2 +- template/api.mustache | 6 ++++++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index d0597565..f04e8ce6 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -75,6 +75,8 @@ public function getConfig(): Configuration * * Get event by requestId * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException @@ -162,6 +164,8 @@ public function getEvent(string $request_id): array * * Get event by requestId * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * * @throws \InvalidArgumentException * @throws SerializationException */ @@ -237,6 +241,13 @@ function ($e) { * * Get visits by visitorId * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException @@ -324,6 +335,13 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin * * Get visits by visitorId * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * * @throws \InvalidArgumentException * @throws SerializationException */ diff --git a/src/ApiException.php b/src/ApiException.php index 8d5e8d70..fa79afad 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -48,6 +48,9 @@ public function __construct(?string $message = '', ?int $code = 0) parent::__construct($message, $code); } + /** + * Sets the deseralized response object (during deserialization). + */ public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; diff --git a/src/Configuration.php b/src/Configuration.php index 54098a4c..0cf80b52 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -126,7 +126,7 @@ public function setApiKey(string $apiKeyIdentifier, string $key): self * * @return null|string API key or token */ - public function getApiKey($apiKeyIdentifier): ?string + public function getApiKey(string $apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } diff --git a/template/ApiException.mustache b/template/ApiException.mustache index 091803f8..31872493 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -39,6 +39,9 @@ class ApiException extends Exception } + /** + * Sets the deseralized response object (during deserialization) + */ public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; diff --git a/template/Configuration.mustache b/template/Configuration.mustache index d5a6215a..f2690a18 100644 --- a/template/Configuration.mustache +++ b/template/Configuration.mustache @@ -114,7 +114,7 @@ class Configuration * * @return string|null API key or token */ - public function getApiKey($apiKeyIdentifier): ?string + public function getApiKey(string $apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } diff --git a/template/api.mustache b/template/api.mustache index 3238a89d..d5c2cd5d 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -72,6 +72,9 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} +{{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} +{{/parameters}} * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException @@ -148,6 +151,9 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} + {{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/parameters}} * * @throws \InvalidArgumentException * @throws SerializationException From 5b821b65ce75a3fad9dead5710181ac9d52cf6ad Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 12 Aug 2024 12:59:52 +0300 Subject: [PATCH 045/118] refactor: remove redundant methods from object serializer --- src/ObjectSerializer.php | 74 ---------------------------------------- 1 file changed, 74 deletions(-) diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 1bed1992..6eaa1a32 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -29,7 +29,6 @@ namespace Fingerprint\ServerAPI; -use DateTime; use Psr\Http\Message\ResponseInterface; /** @@ -98,23 +97,6 @@ public static function sanitizeForSerialization(mixed $data, ?string $format = n return (string) $data; } - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif. - * - * @param string $filename filename to be sanitized - * - * @return string the sanitized filename - */ - public static function sanitizeFilename(string $filename): string - { - if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { - return $match[1]; - } - - return $filename; - } - /** * Take value and turn it into a string suitable for inclusion in * the path, by url-encoding. @@ -148,38 +130,6 @@ public static function toQueryValue(array|\DateTime|string $object, ?string $for return self::toString($object, $format); } - /** - * Take value and turn it into a string suitable for inclusion in - * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339. - * - * @param string $value a string which will be part of the header - * - * @return string the header string - */ - public static function toHeaderValue(string $value): string - { - return self::toString($value); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339. - * - * @param \SplFileObject|string $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue(\SplFileObject|string $value): string - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } - - return self::toString($value); - } - /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged @@ -200,30 +150,6 @@ public static function toString(\DateTime|string $value, ?string $format = null) return $value; } - /** - * Serialize an array to a string. - * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - */ - public static function serializeCollection(array $collection, string $collectionFormat, ?bool $allowCollectionFormatMulti = false): string - { - if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { - // http_build_query() almost does the job for us. We just - // need to fix the result of multidimensional arrays. - return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); - } - - return match ($collectionFormat) { - 'pipes' => implode('|', $collection), - 'tsv' => implode("\t", $collection), - 'ssv' => implode(' ', $collection), - default => implode(',', $collection), - }; - } - /** * Deserialize a JSON string into an object. * From ec412c6dc67eae296a23416f4432fb5f8027a19a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 12 Aug 2024 13:01:19 +0300 Subject: [PATCH 046/118] refactor: remove data from set response object --- src/Api/FingerprintApi.php | 72 +++++++------------------------------- template/api.mustache | 12 ++----- 2 files changed, 14 insertions(+), 70 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index f04e8ce6..03a52e4f 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -128,29 +128,17 @@ public function getEvent(string $request_id): array switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\EventResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 404: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -204,29 +192,17 @@ function ($e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\EventResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 404: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -299,29 +275,17 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorVisits403' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 429: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -380,29 +344,17 @@ function ($e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorVisits403' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 429: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } diff --git a/template/api.mustache b/template/api.mustache index d5c2cd5d..0577f146 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -130,11 +130,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $response, - '{{dataType}}' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; {{/dataType}} {{/responses}} @@ -198,11 +194,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $response, - '{{dataType}}' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; {{/dataType}} {{/responses}} From 66fe10ded19d80c0e605d76e4b2ab7b27995ac3c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 13 Aug 2024 17:30:44 +0300 Subject: [PATCH 047/118] refactor: inline types for all getters and setters and more code readability --- README.md | 4 +- run_checks.php | 3 +- scripts/generate.sh | 20 +- src/Api/FingerprintApi.php | 24 ++ src/ApiException.php | 12 + src/Model/ASN.php | 18 +- src/Model/BotdDetectionResult.php | 12 +- src/Model/BotdResult.php | 42 ++-- src/Model/BrowserDetails.php | 48 ++-- src/Model/ClonedAppResult.php | 6 +- src/Model/Confidence.php | 6 +- src/Model/DataCenter.php | 12 +- src/Model/DeprecatedIPLocation.php | 52 ++--- src/Model/DeprecatedIPLocationCity.php | 6 +- src/Model/EmulatorResult.php | 6 +- src/Model/ErrorEvent403Response.php | 6 +- src/Model/ErrorEvent403ResponseError.php | 12 +- src/Model/ErrorEvent404Response.php | 6 +- src/Model/ErrorEvent404ResponseError.php | 12 +- src/Model/ErrorVisits403.php | 6 +- src/Model/EventResponse.php | 12 +- src/Model/FactoryResetResult.php | 12 +- src/Model/FridaResult.php | 6 +- src/Model/HighActivityResult.php | 12 +- src/Model/IPLocation.php | 52 ++--- src/Model/IPLocationCity.php | 6 +- src/Model/IdentificationError.php | 12 +- src/Model/IncognitoResult.php | 6 +- src/Model/IpBlockListResult.php | 12 +- src/Model/IpBlockListResultDetails.php | 12 +- src/Model/IpInfoResult.php | 12 +- src/Model/IpInfoResultV4.php | 24 +- src/Model/IpInfoResultV6.php | 24 +- src/Model/JailbrokenResult.php | 6 +- src/Model/Location.php | 12 +- src/Model/LocationSpoofingResult.php | 6 +- src/Model/ManyRequestsResponse.php | 6 +- src/Model/PrivacySettingsResult.php | 6 +- src/Model/ProductError.php | 12 +- src/Model/ProductsResponse.php | 126 ++++------- src/Model/ProductsResponseBotd.php | 12 +- src/Model/ProductsResponseIdentification.php | 12 +- .../ProductsResponseIdentificationData.php | 88 +++---- src/Model/ProxyResult.php | 6 +- src/Model/RawDeviceAttributesResult.php | 2 +- src/Model/Response.php | 22 +- src/Model/ResponseVisits.php | 82 +++---- src/Model/RootAppsResult.php | 6 +- src/Model/SeenAt.php | 12 +- src/Model/SignalResponseClonedApp.php | 12 +- src/Model/SignalResponseEmulator.php | 12 +- src/Model/SignalResponseFactoryReset.php | 12 +- src/Model/SignalResponseFrida.php | 12 +- src/Model/SignalResponseHighActivity.php | 12 +- src/Model/SignalResponseIncognito.php | 12 +- src/Model/SignalResponseIpBlocklist.php | 12 +- src/Model/SignalResponseIpInfo.php | 12 +- src/Model/SignalResponseJailbroken.php | 12 +- src/Model/SignalResponseLocationSpoofing.php | 12 +- src/Model/SignalResponsePrivacySettings.php | 12 +- src/Model/SignalResponseProxy.php | 12 +- .../SignalResponseRawDeviceAttributes.php | 12 +- src/Model/SignalResponseRootApps.php | 12 +- src/Model/SignalResponseSuspectScore.php | 12 +- src/Model/SignalResponseTampering.php | 12 +- src/Model/SignalResponseTor.php | 12 +- src/Model/SignalResponseVirtualMachine.php | 12 +- src/Model/SignalResponseVpn.php | 12 +- src/Model/Subdivision.php | 12 +- src/Model/SuspectScoreResult.php | 6 +- src/Model/TamperingResult.php | 12 +- src/Model/TorResult.php | 6 +- src/Model/VirtualMachineResult.php | 6 +- src/Model/Visit.php | 82 +++---- src/Model/VpnResult.php | 24 +- src/Model/VpnResultMethods.php | 18 +- src/Model/WebhookVisit.php | 214 ++++++------------ template/ApiException.mustache | 12 + template/README.mustache | 4 +- template/api.mustache | 4 + template/model_generic.mustache | 4 +- 81 files changed, 575 insertions(+), 988 deletions(-) diff --git a/README.md b/README.md index f03f829e..197331ae 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,8 @@ You can use below code to verify signature: ```php getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -192,16 +198,22 @@ function ($e) { switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -275,16 +287,22 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -344,16 +362,22 @@ function ($e) { switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; diff --git a/src/ApiException.php b/src/ApiException.php index fa79afad..a31ebdff 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -28,6 +28,7 @@ namespace Fingerprint\ServerAPI; +use Fingerprint\ServerAPI\Model\ModelInterface; use Psr\Http\Message\ResponseInterface; /** @@ -42,6 +43,7 @@ class ApiException extends \Exception { protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; public function __construct(?string $message = '', ?int $code = 0) { @@ -60,4 +62,14 @@ public function getResponseObject(): ResponseInterface { return $this->responseObject; } + + public function getErrorDetails(): ModelInterface + { + return $this->errorDetails; + } + + public function setErrorDetails(ModelInterface $errorDetails): void + { + $this->errorDetails = $errorDetails; + } } diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 39b08230..0b8b9c00 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -212,10 +212,8 @@ public function valid(): bool /** * Gets asn. - * - * @return string */ - public function getAsn() + public function getAsn(): string { return $this->container['asn']; } @@ -227,7 +225,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(string $asn): self { $this->container['asn'] = $asn; @@ -236,10 +234,8 @@ public function setAsn($asn): self /** * Gets network. - * - * @return string */ - public function getNetwork() + public function getNetwork(): string { return $this->container['network']; } @@ -251,7 +247,7 @@ public function getNetwork() * * @return $this */ - public function setNetwork($network): self + public function setNetwork(string $network): self { $this->container['network'] = $network; @@ -260,10 +256,8 @@ public function setNetwork($network): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -275,7 +269,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index e04a377a..cb5fee4b 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets result. - * - * @return string */ - public function getResult() + public function getResult(): string { return $this->container['result']; } @@ -244,7 +242,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(string $result): self { $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setResult($result): self /** * Gets type. - * - * @return string */ - public function getType() + public function getType(): string { return $this->container['type']; } @@ -277,7 +273,7 @@ public function getType() * * @return $this */ - public function setType($type): self + public function setType(string $type): self { $this->container['type'] = $type; diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index b0d054a6..dd5b413a 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -250,10 +250,8 @@ public function valid(): bool /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -265,7 +263,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -274,10 +272,8 @@ public function setIp($ip): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -289,7 +285,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -298,10 +294,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -313,7 +307,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -322,10 +316,8 @@ public function setUrl($url): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -337,7 +329,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -346,10 +338,8 @@ public function setUserAgent($user_agent): self /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -361,7 +351,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -370,10 +360,8 @@ public function setRequestId($request_id): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -385,7 +373,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -394,10 +382,8 @@ public function setLinkedId($linked_id): self /** * Gets bot. - * - * @return BotdDetectionResult */ - public function getBot() + public function getBot(): BotdDetectionResult { return $this->container['bot']; } @@ -409,7 +395,7 @@ public function getBot() * * @return $this */ - public function setBot($bot): self + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 4c6436be..818888fc 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -257,10 +257,8 @@ public function valid(): bool /** * Gets browser_name. - * - * @return string */ - public function getBrowserName() + public function getBrowserName(): string { return $this->container['browser_name']; } @@ -272,7 +270,7 @@ public function getBrowserName() * * @return $this */ - public function setBrowserName($browser_name): self + public function setBrowserName(string $browser_name): self { $this->container['browser_name'] = $browser_name; @@ -281,10 +279,8 @@ public function setBrowserName($browser_name): self /** * Gets browser_major_version. - * - * @return string */ - public function getBrowserMajorVersion() + public function getBrowserMajorVersion(): string { return $this->container['browser_major_version']; } @@ -296,7 +292,7 @@ public function getBrowserMajorVersion() * * @return $this */ - public function setBrowserMajorVersion($browser_major_version): self + public function setBrowserMajorVersion(string $browser_major_version): self { $this->container['browser_major_version'] = $browser_major_version; @@ -305,10 +301,8 @@ public function setBrowserMajorVersion($browser_major_version): self /** * Gets browser_full_version. - * - * @return string */ - public function getBrowserFullVersion() + public function getBrowserFullVersion(): string { return $this->container['browser_full_version']; } @@ -320,7 +314,7 @@ public function getBrowserFullVersion() * * @return $this */ - public function setBrowserFullVersion($browser_full_version): self + public function setBrowserFullVersion(string $browser_full_version): self { $this->container['browser_full_version'] = $browser_full_version; @@ -329,10 +323,8 @@ public function setBrowserFullVersion($browser_full_version): self /** * Gets os. - * - * @return string */ - public function getOs() + public function getOs(): string { return $this->container['os']; } @@ -344,7 +336,7 @@ public function getOs() * * @return $this */ - public function setOs($os): self + public function setOs(string $os): self { $this->container['os'] = $os; @@ -353,10 +345,8 @@ public function setOs($os): self /** * Gets os_version. - * - * @return string */ - public function getOsVersion() + public function getOsVersion(): string { return $this->container['os_version']; } @@ -368,7 +358,7 @@ public function getOsVersion() * * @return $this */ - public function setOsVersion($os_version): self + public function setOsVersion(string $os_version): self { $this->container['os_version'] = $os_version; @@ -377,10 +367,8 @@ public function setOsVersion($os_version): self /** * Gets device. - * - * @return string */ - public function getDevice() + public function getDevice(): string { return $this->container['device']; } @@ -392,7 +380,7 @@ public function getDevice() * * @return $this */ - public function setDevice($device): self + public function setDevice(string $device): self { $this->container['device'] = $device; @@ -401,10 +389,8 @@ public function setDevice($device): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -416,7 +402,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -425,10 +411,8 @@ public function setUserAgent($user_agent): self /** * Gets bot_probability. - * - * @return int */ - public function getBotProbability() + public function getBotProbability(): int { return $this->container['bot_probability']; } @@ -440,7 +424,7 @@ public function getBotProbability() * * @return $this */ - public function setBotProbability($bot_probability): self + public function setBotProbability(int $bot_probability): self { $this->container['bot_probability'] = $bot_probability; diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 15fae901..61fd7c2d 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 84db4fd0..ac489b0d 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets score. - * - * @return float */ - public function getScore() + public function getScore(): float { return $this->container['score']; } @@ -212,7 +210,7 @@ public function getScore() * * @return $this */ - public function setScore($score): self + public function setScore(float $score): self { $this->container['score'] = $score; diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index e44d4ced..ae0b650d 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -203,10 +203,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -218,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -227,10 +225,8 @@ public function setResult($result): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -242,7 +238,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 7ea9beb2..8eddef0b 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -241,10 +241,8 @@ public function valid(): bool /** * Gets accuracy_radius. - * - * @return int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): int { return $this->container['accuracy_radius']; } @@ -256,7 +254,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius): self + public function setAccuracyRadius(int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -265,10 +263,8 @@ public function setAccuracyRadius($accuracy_radius): self /** * Gets latitude. - * - * @return float */ - public function getLatitude() + public function getLatitude(): float { return $this->container['latitude']; } @@ -280,7 +276,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude): self + public function setLatitude(float $latitude): self { $this->container['latitude'] = $latitude; @@ -289,10 +285,8 @@ public function setLatitude($latitude): self /** * Gets longitude. - * - * @return float */ - public function getLongitude() + public function getLongitude(): float { return $this->container['longitude']; } @@ -304,7 +298,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude): self + public function setLongitude(float $longitude): self { $this->container['longitude'] = $longitude; @@ -313,10 +307,8 @@ public function setLongitude($longitude): self /** * Gets postal_code. - * - * @return string */ - public function getPostalCode() + public function getPostalCode(): string { return $this->container['postal_code']; } @@ -328,7 +320,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code): self + public function setPostalCode(string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -337,10 +329,8 @@ public function setPostalCode($postal_code): self /** * Gets timezone. - * - * @return string */ - public function getTimezone() + public function getTimezone(): string { return $this->container['timezone']; } @@ -352,7 +342,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone): self + public function setTimezone(string $timezone): self { $this->container['timezone'] = $timezone; @@ -361,10 +351,8 @@ public function setTimezone($timezone): self /** * Gets city. - * - * @return DeprecatedIPLocationCity */ - public function getCity() + public function getCity(): DeprecatedIPLocationCity { return $this->container['city']; } @@ -376,7 +364,7 @@ public function getCity() * * @return $this */ - public function setCity($city): self + public function setCity(DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -385,10 +373,8 @@ public function setCity($city): self /** * Gets country. - * - * @return Location */ - public function getCountry() + public function getCountry(): Location { return $this->container['country']; } @@ -400,7 +386,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country): self + public function setCountry(Location $country): self { $this->container['country'] = $country; @@ -409,10 +395,8 @@ public function setCountry($country): self /** * Gets continent. - * - * @return Location */ - public function getContinent() + public function getContinent(): Location { return $this->container['continent']; } @@ -424,7 +408,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent): self + public function setContinent(Location $continent): self { $this->container['continent'] = $continent; @@ -436,7 +420,7 @@ public function setContinent($continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): array { return $this->container['subdivisions']; } @@ -448,7 +432,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions): self + public function setSubdivisions(array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 7025cd42..6f485667 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -206,7 +204,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index f6bb7ed7..0a4398fd 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index ba116f62..32d1a764 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets error. - * - * @return ErrorEvent403ResponseError */ - public function getError() + public function getError(): ErrorEvent403ResponseError { return $this->container['error']; } @@ -206,7 +204,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ErrorEvent403ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index aea1a345..702c754c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -233,10 +233,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -248,7 +246,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -266,10 +264,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -281,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index b3358e43..a6fbbb19 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets error. - * - * @return ErrorEvent404ResponseError */ - public function getError() + public function getError(): ErrorEvent404ResponseError { return $this->container['error']; } @@ -206,7 +204,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 88142d91..607b1924 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -227,10 +227,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -242,7 +240,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -260,10 +258,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -275,7 +271,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 318c8060..297998f3 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -212,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(string $error): self { $this->container['error'] = $error; diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 243ef3dc..2f525355 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -205,10 +205,8 @@ public function valid(): bool /** * Gets products. - * - * @return ProductsResponse */ - public function getProducts() + public function getProducts(): ProductsResponse { return $this->container['products']; } @@ -220,7 +218,7 @@ public function getProducts() * * @return $this */ - public function setProducts($products): self + public function setProducts(ProductsResponse $products): self { $this->container['products'] = $products; @@ -229,10 +227,8 @@ public function setProducts($products): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -244,7 +240,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 83f8617a..fbf1834d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -221,7 +219,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -230,10 +228,8 @@ public function setTime($time): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -245,7 +241,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 32b5887f..ad511bad 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 9047bc79..43ff8284 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -203,10 +203,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -218,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -227,10 +225,8 @@ public function setResult($result): self /** * Gets daily_requests. - * - * @return float */ - public function getDailyRequests() + public function getDailyRequests(): float { return $this->container['daily_requests']; } @@ -242,7 +238,7 @@ public function getDailyRequests() * * @return $this */ - public function setDailyRequests($daily_requests): self + public function setDailyRequests(float $daily_requests): self { $this->container['daily_requests'] = $daily_requests; diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 5310c895..0adebf00 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -239,10 +239,8 @@ public function valid(): bool /** * Gets accuracy_radius. - * - * @return int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): int { return $this->container['accuracy_radius']; } @@ -254,7 +252,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius): self + public function setAccuracyRadius(int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -263,10 +261,8 @@ public function setAccuracyRadius($accuracy_radius): self /** * Gets latitude. - * - * @return float */ - public function getLatitude() + public function getLatitude(): float { return $this->container['latitude']; } @@ -278,7 +274,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude): self + public function setLatitude(float $latitude): self { $this->container['latitude'] = $latitude; @@ -287,10 +283,8 @@ public function setLatitude($latitude): self /** * Gets longitude. - * - * @return float */ - public function getLongitude() + public function getLongitude(): float { return $this->container['longitude']; } @@ -302,7 +296,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude): self + public function setLongitude(float $longitude): self { $this->container['longitude'] = $longitude; @@ -311,10 +305,8 @@ public function setLongitude($longitude): self /** * Gets postal_code. - * - * @return string */ - public function getPostalCode() + public function getPostalCode(): string { return $this->container['postal_code']; } @@ -326,7 +318,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code): self + public function setPostalCode(string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -335,10 +327,8 @@ public function setPostalCode($postal_code): self /** * Gets timezone. - * - * @return string */ - public function getTimezone() + public function getTimezone(): string { return $this->container['timezone']; } @@ -350,7 +340,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone): self + public function setTimezone(string $timezone): self { $this->container['timezone'] = $timezone; @@ -359,10 +349,8 @@ public function setTimezone($timezone): self /** * Gets city. - * - * @return IPLocationCity */ - public function getCity() + public function getCity(): IPLocationCity { return $this->container['city']; } @@ -374,7 +362,7 @@ public function getCity() * * @return $this */ - public function setCity($city): self + public function setCity(IPLocationCity $city): self { $this->container['city'] = $city; @@ -383,10 +371,8 @@ public function setCity($city): self /** * Gets country. - * - * @return Location */ - public function getCountry() + public function getCountry(): Location { return $this->container['country']; } @@ -398,7 +384,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country): self + public function setCountry(Location $country): self { $this->container['country'] = $country; @@ -407,10 +393,8 @@ public function setCountry($country): self /** * Gets continent. - * - * @return Location */ - public function getContinent() + public function getContinent(): Location { return $this->container['continent']; } @@ -422,7 +406,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent): self + public function setContinent(Location $continent): self { $this->container['continent'] = $continent; @@ -434,7 +418,7 @@ public function setContinent($continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): array { return $this->container['subdivisions']; } @@ -446,7 +430,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions): self + public function setSubdivisions(array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index be5c2707..daba3d17 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -206,7 +204,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index a100c8b3..c8890cc4 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -244,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -277,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 15325b69..6299cc93 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index e16568b2..c6131829 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -221,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -230,10 +228,8 @@ public function setResult($result): self /** * Gets details. - * - * @return IpBlockListResultDetails */ - public function getDetails() + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } @@ -245,7 +241,7 @@ public function getDetails() * * @return $this */ - public function setDetails($details): self + public function setDetails(IpBlockListResultDetails $details): self { $this->container['details'] = $details; diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 15427c7b..0695fbc1 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets email_spam. - * - * @return bool */ - public function getEmailSpam() + public function getEmailSpam(): bool { return $this->container['email_spam']; } @@ -221,7 +219,7 @@ public function getEmailSpam() * * @return $this */ - public function setEmailSpam($email_spam): self + public function setEmailSpam(bool $email_spam): self { $this->container['email_spam'] = $email_spam; @@ -230,10 +228,8 @@ public function setEmailSpam($email_spam): self /** * Gets attack_source. - * - * @return bool */ - public function getAttackSource() + public function getAttackSource(): bool { return $this->container['attack_source']; } @@ -245,7 +241,7 @@ public function getAttackSource() * * @return $this */ - public function setAttackSource($attack_source): self + public function setAttackSource(bool $attack_source): self { $this->container['attack_source'] = $attack_source; diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 5b7130ec..b4db3099 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -199,10 +199,8 @@ public function valid(): bool /** * Gets v4. - * - * @return IpInfoResultV4 */ - public function getV4() + public function getV4(): IpInfoResultV4 { return $this->container['v4']; } @@ -214,7 +212,7 @@ public function getV4() * * @return $this */ - public function setV4($v4): self + public function setV4(IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -223,10 +221,8 @@ public function setV4($v4): self /** * Gets v6. - * - * @return IpInfoResultV6 */ - public function getV6() + public function getV6(): IpInfoResultV6 { return $this->container['v6']; } @@ -238,7 +234,7 @@ public function getV6() * * @return $this */ - public function setV6($v6): self + public function setV6(IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index f26007c1..039d34f4 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -218,10 +218,8 @@ public function valid(): bool /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -233,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address): self + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -242,10 +240,8 @@ public function setAddress($address): self /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -257,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -266,10 +262,8 @@ public function setGeolocation($geolocation): self /** * Gets asn. - * - * @return ASN */ - public function getAsn() + public function getAsn(): ASN { return $this->container['asn']; } @@ -281,7 +275,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(ASN $asn): self { $this->container['asn'] = $asn; @@ -290,10 +284,8 @@ public function setAsn($asn): self /** * Gets datacenter. - * - * @return DataCenter */ - public function getDatacenter() + public function getDatacenter(): DataCenter { return $this->container['datacenter']; } @@ -305,7 +297,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter): self + public function setDatacenter(DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index f4ce13f9..22e5ad29 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -218,10 +218,8 @@ public function valid(): bool /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -233,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address): self + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -242,10 +240,8 @@ public function setAddress($address): self /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -257,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -266,10 +262,8 @@ public function setGeolocation($geolocation): self /** * Gets asn. - * - * @return ASN */ - public function getAsn() + public function getAsn(): ASN { return $this->container['asn']; } @@ -281,7 +275,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(ASN $asn): self { $this->container['asn'] = $asn; @@ -290,10 +284,8 @@ public function setAsn($asn): self /** * Gets datacenter. - * - * @return DataCenter */ - public function getDatacenter() + public function getDatacenter(): DataCenter { return $this->container['datacenter']; } @@ -305,7 +297,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter): self + public function setDatacenter(DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index acee0e24..fa94ca4d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Location.php b/src/Model/Location.php index f544a828..10af00e7 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -221,7 +219,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $this->container['code'] = $code; @@ -230,10 +228,8 @@ public function setCode($code): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -245,7 +241,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index e74b634a..fb7e697c 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 7e8b0608..f2c782c5 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -212,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(string $error): self { $this->container['error'] = $error; diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index b0867854..28bcb9a6 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index c5f19ab3..5a0879e9 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -244,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -277,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 8a98ff3e..227618bd 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -313,10 +313,8 @@ public function valid(): bool /** * Gets identification. - * - * @return ProductsResponseIdentification */ - public function getIdentification() + public function getIdentification(): ProductsResponseIdentification { return $this->container['identification']; } @@ -328,7 +326,7 @@ public function getIdentification() * * @return $this */ - public function setIdentification($identification): self + public function setIdentification(ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -337,10 +335,8 @@ public function setIdentification($identification): self /** * Gets botd. - * - * @return ProductsResponseBotd */ - public function getBotd() + public function getBotd(): ProductsResponseBotd { return $this->container['botd']; } @@ -352,7 +348,7 @@ public function getBotd() * * @return $this */ - public function setBotd($botd): self + public function setBotd(ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -361,10 +357,8 @@ public function setBotd($botd): self /** * Gets ip_info. - * - * @return SignalResponseIpInfo */ - public function getIpInfo() + public function getIpInfo(): SignalResponseIpInfo { return $this->container['ip_info']; } @@ -376,7 +370,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info): self + public function setIpInfo(SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -385,10 +379,8 @@ public function setIpInfo($ip_info): self /** * Gets incognito. - * - * @return SignalResponseIncognito */ - public function getIncognito() + public function getIncognito(): SignalResponseIncognito { return $this->container['incognito']; } @@ -400,7 +392,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -409,10 +401,8 @@ public function setIncognito($incognito): self /** * Gets root_apps. - * - * @return SignalResponseRootApps */ - public function getRootApps() + public function getRootApps(): SignalResponseRootApps { return $this->container['root_apps']; } @@ -424,7 +414,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps): self + public function setRootApps(SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -433,10 +423,8 @@ public function setRootApps($root_apps): self /** * Gets emulator. - * - * @return SignalResponseEmulator */ - public function getEmulator() + public function getEmulator(): SignalResponseEmulator { return $this->container['emulator']; } @@ -448,7 +436,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator): self + public function setEmulator(SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -457,10 +445,8 @@ public function setEmulator($emulator): self /** * Gets cloned_app. - * - * @return SignalResponseClonedApp */ - public function getClonedApp() + public function getClonedApp(): SignalResponseClonedApp { return $this->container['cloned_app']; } @@ -472,7 +458,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app): self + public function setClonedApp(SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -481,10 +467,8 @@ public function setClonedApp($cloned_app): self /** * Gets factory_reset. - * - * @return SignalResponseFactoryReset */ - public function getFactoryReset() + public function getFactoryReset(): SignalResponseFactoryReset { return $this->container['factory_reset']; } @@ -496,7 +480,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset): self + public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -505,10 +489,8 @@ public function setFactoryReset($factory_reset): self /** * Gets jailbroken. - * - * @return SignalResponseJailbroken */ - public function getJailbroken() + public function getJailbroken(): SignalResponseJailbroken { return $this->container['jailbroken']; } @@ -520,7 +502,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken): self + public function setJailbroken(SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -529,10 +511,8 @@ public function setJailbroken($jailbroken): self /** * Gets frida. - * - * @return SignalResponseFrida */ - public function getFrida() + public function getFrida(): SignalResponseFrida { return $this->container['frida']; } @@ -544,7 +524,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida): self + public function setFrida(SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -553,10 +533,8 @@ public function setFrida($frida): self /** * Gets ip_blocklist. - * - * @return SignalResponseIpBlocklist */ - public function getIpBlocklist() + public function getIpBlocklist(): SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } @@ -568,7 +546,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist): self + public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -577,10 +555,8 @@ public function setIpBlocklist($ip_blocklist): self /** * Gets tor. - * - * @return SignalResponseTor */ - public function getTor() + public function getTor(): SignalResponseTor { return $this->container['tor']; } @@ -592,7 +568,7 @@ public function getTor() * * @return $this */ - public function setTor($tor): self + public function setTor(SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -601,10 +577,8 @@ public function setTor($tor): self /** * Gets privacy_settings. - * - * @return SignalResponsePrivacySettings */ - public function getPrivacySettings() + public function getPrivacySettings(): SignalResponsePrivacySettings { return $this->container['privacy_settings']; } @@ -616,7 +590,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings): self + public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -625,10 +599,8 @@ public function setPrivacySettings($privacy_settings): self /** * Gets virtual_machine. - * - * @return SignalResponseVirtualMachine */ - public function getVirtualMachine() + public function getVirtualMachine(): SignalResponseVirtualMachine { return $this->container['virtual_machine']; } @@ -640,7 +612,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine): self + public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -649,10 +621,8 @@ public function setVirtualMachine($virtual_machine): self /** * Gets vpn. - * - * @return SignalResponseVpn */ - public function getVpn() + public function getVpn(): SignalResponseVpn { return $this->container['vpn']; } @@ -664,7 +634,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn): self + public function setVpn(SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -673,10 +643,8 @@ public function setVpn($vpn): self /** * Gets proxy. - * - * @return SignalResponseProxy */ - public function getProxy() + public function getProxy(): SignalResponseProxy { return $this->container['proxy']; } @@ -688,7 +656,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy): self + public function setProxy(SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -697,10 +665,8 @@ public function setProxy($proxy): self /** * Gets tampering. - * - * @return SignalResponseTampering */ - public function getTampering() + public function getTampering(): SignalResponseTampering { return $this->container['tampering']; } @@ -712,7 +678,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering): self + public function setTampering(SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -721,10 +687,8 @@ public function setTampering($tampering): self /** * Gets high_activity. - * - * @return SignalResponseHighActivity */ - public function getHighActivity() + public function getHighActivity(): SignalResponseHighActivity { return $this->container['high_activity']; } @@ -736,7 +700,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity): self + public function setHighActivity(SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -745,10 +709,8 @@ public function setHighActivity($high_activity): self /** * Gets location_spoofing. - * - * @return SignalResponseLocationSpoofing */ - public function getLocationSpoofing() + public function getLocationSpoofing(): SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } @@ -760,7 +722,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing): self + public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -769,10 +731,8 @@ public function setLocationSpoofing($location_spoofing): self /** * Gets suspect_score. - * - * @return SignalResponseSuspectScore */ - public function getSuspectScore() + public function getSuspectScore(): SignalResponseSuspectScore { return $this->container['suspect_score']; } @@ -784,7 +744,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score): self + public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -793,10 +753,8 @@ public function setSuspectScore($suspect_score): self /** * Gets raw_device_attributes. - * - * @return SignalResponseRawDeviceAttributes */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } @@ -808,7 +766,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes): self + public function setRawDeviceAttributes(SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 1a5cca7a..8fa43a4d 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return BotdResult */ - public function getData() + public function getData(): BotdResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(BotdResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 47ef4eab..43906044 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ProductsResponseIdentificationData */ - public function getData() + public function getData(): ProductsResponseIdentificationData { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return IdentificationError */ - public function getError() + public function getError(): IdentificationError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 825798c3..c79885d8 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -314,10 +314,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -329,7 +327,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -338,10 +336,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -353,7 +349,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -362,10 +358,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -377,7 +371,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -386,10 +380,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -401,7 +393,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -410,10 +402,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -425,7 +415,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -434,10 +424,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -449,7 +437,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -458,10 +446,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -473,7 +459,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -482,10 +468,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -497,7 +481,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -509,7 +493,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -521,7 +505,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -530,10 +514,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -545,7 +527,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -554,10 +536,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -569,7 +549,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -578,10 +558,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -593,7 +571,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -602,10 +580,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -617,7 +593,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -626,10 +602,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -641,7 +615,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -650,10 +624,8 @@ public function setLastSeenAt($last_seen_at): self /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -665,7 +637,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 7f55eabd..0ba7fc50 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1e560cb3..233734d2 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + return parent::listInvalidProperties(); } /** diff --git a/src/Model/Response.php b/src/Model/Response.php index ba28cde0..1573ddd6 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -220,10 +220,8 @@ public function valid(): bool /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -235,7 +233,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -247,7 +245,7 @@ public function setVisitorId($visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits() + public function getVisits(): array { return $this->container['visits']; } @@ -259,7 +257,7 @@ public function getVisits() * * @return $this */ - public function setVisits($visits): self + public function setVisits(array $visits): self { $this->container['visits'] = $visits; @@ -268,10 +266,8 @@ public function setVisits($visits): self /** * Gets last_timestamp. - * - * @return int */ - public function getLastTimestamp() + public function getLastTimestamp(): int { return $this->container['last_timestamp']; } @@ -283,7 +279,7 @@ public function getLastTimestamp() * * @return $this */ - public function setLastTimestamp($last_timestamp): self + public function setLastTimestamp(int $last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -292,10 +288,8 @@ public function setLastTimestamp($last_timestamp): self /** * Gets pagination_key. - * - * @return string */ - public function getPaginationKey() + public function getPaginationKey(): string { return $this->container['pagination_key']; } @@ -307,7 +301,7 @@ public function getPaginationKey() * * @return $this */ - public function setPaginationKey($pagination_key): self + public function setPaginationKey(string $pagination_key): self { $this->container['pagination_key'] = $pagination_key; diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 883abe97..e464db9b 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -305,10 +305,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -320,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -329,10 +327,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -344,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -353,10 +349,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -368,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -377,10 +371,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -392,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -401,10 +393,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +406,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -425,10 +415,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -440,7 +428,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -449,10 +437,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -464,7 +450,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -473,10 +459,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -488,7 +472,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -500,7 +484,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -512,7 +496,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -521,10 +505,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -536,7 +518,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -545,10 +527,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -560,7 +540,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -569,10 +549,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -584,7 +562,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -593,10 +571,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -608,7 +584,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -617,10 +593,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -632,7 +606,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index dc3a61c4..6c1c82cf 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 9084fead..29de802d 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets global. - * - * @return \DateTime */ - public function getGlobal() + public function getGlobal(): \DateTime { return $this->container['global']; } @@ -221,7 +219,7 @@ public function getGlobal() * * @return $this */ - public function setGlobal($global): self + public function setGlobal(\DateTime $global): self { $this->container['global'] = $global; @@ -230,10 +228,8 @@ public function setGlobal($global): self /** * Gets subscription. - * - * @return \DateTime */ - public function getSubscription() + public function getSubscription(): \DateTime { return $this->container['subscription']; } @@ -245,7 +241,7 @@ public function getSubscription() * * @return $this */ - public function setSubscription($subscription): self + public function setSubscription(\DateTime $subscription): self { $this->container['subscription'] = $subscription; diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 95f27ffe..66bc4085 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ClonedAppResult */ - public function getData() + public function getData(): ClonedAppResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ClonedAppResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 22fe1763..a87a13bc 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return EmulatorResult */ - public function getData() + public function getData(): EmulatorResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(EmulatorResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 6be91f8f..2271eb8d 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return FactoryResetResult */ - public function getData() + public function getData(): FactoryResetResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(FactoryResetResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index fa3d624a..e1e6069c 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return FridaResult */ - public function getData() + public function getData(): FridaResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(FridaResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 3efa9c30..d8cee703 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return HighActivityResult */ - public function getData() + public function getData(): HighActivityResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(HighActivityResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 76d265e1..63532391 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IncognitoResult */ - public function getData() + public function getData(): IncognitoResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IncognitoResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 7716218d..edf0c8b3 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IpBlockListResult */ - public function getData() + public function getData(): IpBlockListResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IpBlockListResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 9fad6670..a92d2c8e 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IpInfoResult */ - public function getData() + public function getData(): IpInfoResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IpInfoResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 64882ebe..2552af44 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return JailbrokenResult */ - public function getData() + public function getData(): JailbrokenResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(JailbrokenResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index c09e19a8..d6331aa5 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return LocationSpoofingResult */ - public function getData() + public function getData(): LocationSpoofingResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 79378ceb..e39bcce4 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return PrivacySettingsResult */ - public function getData() + public function getData(): PrivacySettingsResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 779c7d5e..436479c1 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ProxyResult */ - public function getData() + public function getData(): ProxyResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ProxyResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 85457227..fe3aab0e 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return RawDeviceAttributesResult */ - public function getData() + public function getData(): array { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(array $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index a89406e5..896e6484 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return RootAppsResult */ - public function getData() + public function getData(): RootAppsResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(RootAppsResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 8497b239..0c136c51 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return SuspectScoreResult */ - public function getData() + public function getData(): SuspectScoreResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 37b2b0cb..e90e1c49 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return TamperingResult */ - public function getData() + public function getData(): TamperingResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(TamperingResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 7bfacdff..1a1e6078 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return TorResult */ - public function getData() + public function getData(): TorResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(TorResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 9fa479e9..5bb17656 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return VirtualMachineResult */ - public function getData() + public function getData(): VirtualMachineResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 76eb851d..17f231be 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return VpnResult */ - public function getData() + public function getData(): VpnResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(VpnResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 78887fc4..ef9a3576 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets iso_code. - * - * @return string */ - public function getIsoCode() + public function getIsoCode(): string { return $this->container['iso_code']; } @@ -212,7 +210,7 @@ public function getIsoCode() * * @return $this */ - public function setIsoCode($iso_code): self + public function setIsoCode(string $iso_code): self { $this->container['iso_code'] = $iso_code; @@ -221,10 +219,8 @@ public function setIsoCode($iso_code): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -236,7 +232,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 78a40f5d..3225bda1 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return int */ - public function getResult() + public function getResult(): int { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(int $result): self { $this->container['result'] = $result; diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 74a2ac26..e642bcd4 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -221,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -230,10 +228,8 @@ public function setResult($result): self /** * Gets anomaly_score. - * - * @return float */ - public function getAnomalyScore() + public function getAnomalyScore(): float { return $this->container['anomaly_score']; } @@ -245,7 +241,7 @@ public function getAnomalyScore() * * @return $this */ - public function setAnomalyScore($anomaly_score): self + public function setAnomalyScore(float $anomaly_score): self { $this->container['anomaly_score'] = $anomaly_score; diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 1f1fdfd0..c09aeaaf 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 9d457f1a..644f9144 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 60889bbe..30d8926d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -305,10 +305,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -320,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -329,10 +327,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -344,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -353,10 +349,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -368,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -377,10 +371,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -392,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -401,10 +393,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +406,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -425,10 +415,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -440,7 +428,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -449,10 +437,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -464,7 +450,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -473,10 +459,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -488,7 +472,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -500,7 +484,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -512,7 +496,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -521,10 +505,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -536,7 +518,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -545,10 +527,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -560,7 +540,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -569,10 +549,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -584,7 +562,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -593,10 +571,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -608,7 +584,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -617,10 +593,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -632,7 +606,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index aaeeecfe..5e9f88a6 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -221,10 +221,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -236,7 +234,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -245,10 +243,8 @@ public function setResult($result): self /** * Gets origin_timezone. - * - * @return string */ - public function getOriginTimezone() + public function getOriginTimezone(): string { return $this->container['origin_timezone']; } @@ -260,7 +256,7 @@ public function getOriginTimezone() * * @return $this */ - public function setOriginTimezone($origin_timezone): self + public function setOriginTimezone(string $origin_timezone): self { $this->container['origin_timezone'] = $origin_timezone; @@ -269,10 +265,8 @@ public function setOriginTimezone($origin_timezone): self /** * Gets origin_country. - * - * @return string */ - public function getOriginCountry() + public function getOriginCountry(): string { return $this->container['origin_country']; } @@ -284,7 +278,7 @@ public function getOriginCountry() * * @return $this */ - public function setOriginCountry($origin_country): self + public function setOriginCountry(string $origin_country): self { $this->container['origin_country'] = $origin_country; @@ -293,10 +287,8 @@ public function setOriginCountry($origin_country): self /** * Gets methods. - * - * @return VpnResultMethods */ - public function getMethods() + public function getMethods(): VpnResultMethods { return $this->container['methods']; } @@ -308,7 +300,7 @@ public function getMethods() * * @return $this */ - public function setMethods($methods): self + public function setMethods(VpnResultMethods $methods): self { $this->container['methods'] = $methods; diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 7b341fec..3c4f1f36 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -215,10 +215,8 @@ public function valid(): bool /** * Gets timezone_mismatch. - * - * @return bool */ - public function getTimezoneMismatch() + public function getTimezoneMismatch(): bool { return $this->container['timezone_mismatch']; } @@ -230,7 +228,7 @@ public function getTimezoneMismatch() * * @return $this */ - public function setTimezoneMismatch($timezone_mismatch): self + public function setTimezoneMismatch(bool $timezone_mismatch): self { $this->container['timezone_mismatch'] = $timezone_mismatch; @@ -239,10 +237,8 @@ public function setTimezoneMismatch($timezone_mismatch): self /** * Gets public_vpn. - * - * @return bool */ - public function getPublicVpn() + public function getPublicVpn(): bool { return $this->container['public_vpn']; } @@ -254,7 +250,7 @@ public function getPublicVpn() * * @return $this */ - public function setPublicVpn($public_vpn): self + public function setPublicVpn(bool $public_vpn): self { $this->container['public_vpn'] = $public_vpn; @@ -263,10 +259,8 @@ public function setPublicVpn($public_vpn): self /** * Gets auxiliary_mobile. - * - * @return bool */ - public function getAuxiliaryMobile() + public function getAuxiliaryMobile(): bool { return $this->container['auxiliary_mobile']; } @@ -278,7 +272,7 @@ public function getAuxiliaryMobile() * * @return $this */ - public function setAuxiliaryMobile($auxiliary_mobile): self + public function setAuxiliaryMobile(bool $auxiliary_mobile): self { $this->container['auxiliary_mobile'] = $auxiliary_mobile; diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 57e00ed5..6ed34e9c 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -440,10 +440,8 @@ public function valid(): bool /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -455,7 +453,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -464,10 +462,8 @@ public function setVisitorId($visitor_id): self /** * Gets client_referrer. - * - * @return string */ - public function getClientReferrer() + public function getClientReferrer(): string { return $this->container['client_referrer']; } @@ -479,7 +475,7 @@ public function getClientReferrer() * * @return $this */ - public function setClientReferrer($client_referrer): self + public function setClientReferrer(string $client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -488,10 +484,8 @@ public function setClientReferrer($client_referrer): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -503,7 +497,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -512,10 +506,8 @@ public function setUserAgent($user_agent): self /** * Gets bot. - * - * @return BotdDetectionResult */ - public function getBot() + public function getBot(): BotdDetectionResult { return $this->container['bot']; } @@ -527,7 +519,7 @@ public function getBot() * * @return $this */ - public function setBot($bot): self + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -536,10 +528,8 @@ public function setBot($bot): self /** * Gets ip_info. - * - * @return IpInfoResult */ - public function getIpInfo() + public function getIpInfo(): IpInfoResult { return $this->container['ip_info']; } @@ -551,7 +541,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info): self + public function setIpInfo(IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -560,10 +550,8 @@ public function setIpInfo($ip_info): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -575,7 +563,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -584,10 +572,8 @@ public function setIncognito($incognito): self /** * Gets root_apps. - * - * @return RootAppsResult */ - public function getRootApps() + public function getRootApps(): RootAppsResult { return $this->container['root_apps']; } @@ -599,7 +585,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps): self + public function setRootApps(RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -608,10 +594,8 @@ public function setRootApps($root_apps): self /** * Gets emulator. - * - * @return EmulatorResult */ - public function getEmulator() + public function getEmulator(): EmulatorResult { return $this->container['emulator']; } @@ -623,7 +607,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator): self + public function setEmulator(EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -632,10 +616,8 @@ public function setEmulator($emulator): self /** * Gets cloned_app. - * - * @return ClonedAppResult */ - public function getClonedApp() + public function getClonedApp(): ClonedAppResult { return $this->container['cloned_app']; } @@ -647,7 +629,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app): self + public function setClonedApp(ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -656,10 +638,8 @@ public function setClonedApp($cloned_app): self /** * Gets factory_reset. - * - * @return FactoryResetResult */ - public function getFactoryReset() + public function getFactoryReset(): FactoryResetResult { return $this->container['factory_reset']; } @@ -671,7 +651,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset): self + public function setFactoryReset(FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -680,10 +660,8 @@ public function setFactoryReset($factory_reset): self /** * Gets jailbroken. - * - * @return JailbrokenResult */ - public function getJailbroken() + public function getJailbroken(): JailbrokenResult { return $this->container['jailbroken']; } @@ -695,7 +673,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken): self + public function setJailbroken(JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -704,10 +682,8 @@ public function setJailbroken($jailbroken): self /** * Gets frida. - * - * @return FridaResult */ - public function getFrida() + public function getFrida(): FridaResult { return $this->container['frida']; } @@ -719,7 +695,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida): self + public function setFrida(FridaResult $frida): self { $this->container['frida'] = $frida; @@ -728,10 +704,8 @@ public function setFrida($frida): self /** * Gets ip_blocklist. - * - * @return IpBlockListResult */ - public function getIpBlocklist() + public function getIpBlocklist(): IpBlockListResult { return $this->container['ip_blocklist']; } @@ -743,7 +717,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist): self + public function setIpBlocklist(IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -752,10 +726,8 @@ public function setIpBlocklist($ip_blocklist): self /** * Gets tor. - * - * @return TorResult */ - public function getTor() + public function getTor(): TorResult { return $this->container['tor']; } @@ -767,7 +739,7 @@ public function getTor() * * @return $this */ - public function setTor($tor): self + public function setTor(TorResult $tor): self { $this->container['tor'] = $tor; @@ -776,10 +748,8 @@ public function setTor($tor): self /** * Gets privacy_settings. - * - * @return PrivacySettingsResult */ - public function getPrivacySettings() + public function getPrivacySettings(): PrivacySettingsResult { return $this->container['privacy_settings']; } @@ -791,7 +761,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings): self + public function setPrivacySettings(PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -800,10 +770,8 @@ public function setPrivacySettings($privacy_settings): self /** * Gets virtual_machine. - * - * @return VirtualMachineResult */ - public function getVirtualMachine() + public function getVirtualMachine(): VirtualMachineResult { return $this->container['virtual_machine']; } @@ -815,7 +783,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine): self + public function setVirtualMachine(VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -824,10 +792,8 @@ public function setVirtualMachine($virtual_machine): self /** * Gets vpn. - * - * @return VpnResult */ - public function getVpn() + public function getVpn(): VpnResult { return $this->container['vpn']; } @@ -839,7 +805,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn): self + public function setVpn(VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -848,10 +814,8 @@ public function setVpn($vpn): self /** * Gets proxy. - * - * @return ProxyResult */ - public function getProxy() + public function getProxy(): ProxyResult { return $this->container['proxy']; } @@ -863,7 +827,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy): self + public function setProxy(ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -872,10 +836,8 @@ public function setProxy($proxy): self /** * Gets tampering. - * - * @return TamperingResult */ - public function getTampering() + public function getTampering(): TamperingResult { return $this->container['tampering']; } @@ -887,7 +849,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering): self + public function setTampering(TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -896,10 +858,8 @@ public function setTampering($tampering): self /** * Gets raw_device_attributes. - * - * @return RawDeviceAttributesResult */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } @@ -911,7 +871,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes): self + public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -920,10 +880,8 @@ public function setRawDeviceAttributes($raw_device_attributes): self /** * Gets high_activity. - * - * @return HighActivityResult */ - public function getHighActivity() + public function getHighActivity(): HighActivityResult { return $this->container['high_activity']; } @@ -935,7 +893,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity): self + public function setHighActivity(HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -944,10 +902,8 @@ public function setHighActivity($high_activity): self /** * Gets location_spoofing. - * - * @return LocationSpoofingResult */ - public function getLocationSpoofing() + public function getLocationSpoofing(): LocationSpoofingResult { return $this->container['location_spoofing']; } @@ -959,7 +915,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing): self + public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -968,10 +924,8 @@ public function setLocationSpoofing($location_spoofing): self /** * Gets suspect_score. - * - * @return SuspectScoreResult */ - public function getSuspectScore() + public function getSuspectScore(): SuspectScoreResult { return $this->container['suspect_score']; } @@ -983,7 +937,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score): self + public function setSuspectScore(SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -992,10 +946,8 @@ public function setSuspectScore($suspect_score): self /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -1007,7 +959,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -1016,10 +968,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -1031,7 +981,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1040,10 +990,8 @@ public function setBrowserDetails($browser_details): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -1055,7 +1003,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -1064,10 +1012,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -1079,7 +1025,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1088,10 +1034,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -1103,7 +1047,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -1112,10 +1056,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -1127,7 +1069,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -1136,10 +1078,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -1151,7 +1091,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -1163,7 +1103,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -1175,7 +1115,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -1184,10 +1124,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -1199,7 +1137,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1208,10 +1146,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -1223,7 +1159,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -1232,10 +1168,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -1247,7 +1181,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -1256,10 +1190,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -1271,7 +1203,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1280,10 +1212,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -1295,7 +1225,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/template/ApiException.mustache b/template/ApiException.mustache index 31872493..fe6fd54d 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -19,6 +19,7 @@ namespace {{invokerPackage}}; use \Exception; +use Fingerprint\ServerAPI\Model\ModelInterface; use Psr\Http\Message\ResponseInterface; /** @@ -32,6 +33,7 @@ use Psr\Http\Message\ResponseInterface; class ApiException extends Exception { protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; public function __construct(?string $message = "", ?int $code = 0) { @@ -51,4 +53,14 @@ class ApiException extends Exception { return $this->responseObject; } + + public function getErrorDetails(): ModelInterface + { + return $this->errorDetails; + } + + public function setErrorDetails(ModelInterface $errorDetails): void + { + $this->errorDetails = $errorDetails; + } } \ No newline at end of file diff --git a/template/README.mustache b/template/README.mustache index de90ccda..3154a0e0 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -192,6 +192,8 @@ You can use below code to verify signature: ```php setErrorDetails($errorDetail); $e->setResponseObject($response); break; {{/dataType}} @@ -194,6 +196,8 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $errorDetail = ObjectSerializer::deserialize($response, '{{dataType}}'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; {{/dataType}} diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0f1a1d61..52337e29 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}() + public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { return $this->container['{{name}}']; } @@ -260,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}(${{name}}): self + public function {{setter}}({{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); From 29cb26c3f50bfa035ca750948bb92a2299f579bd Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 11:56:37 +0300 Subject: [PATCH 048/118] fix: serializaiton problem on sealed results --- scripts/generate.sh | 4 +- sealed_results_example.php | 3 + src/Model/ASN.php | 6 +- src/Model/BotdDetectionResult.php | 4 +- src/Model/BotdResult.php | 14 ++-- src/Model/BrowserDetails.php | 16 ++--- src/Model/ClonedAppResult.php | 2 +- src/Model/Confidence.php | 2 +- src/Model/DataCenter.php | 4 +- src/Model/DeprecatedIPLocation.php | 18 ++--- src/Model/DeprecatedIPLocationCity.php | 2 +- src/Model/EmulatorResult.php | 2 +- src/Model/ErrorEvent403Response.php | 2 +- src/Model/ErrorEvent403ResponseError.php | 4 +- src/Model/ErrorEvent404Response.php | 2 +- src/Model/ErrorEvent404ResponseError.php | 4 +- src/Model/ErrorVisits403.php | 2 +- src/Model/EventResponse.php | 4 +- src/Model/FactoryResetResult.php | 4 +- src/Model/FridaResult.php | 2 +- src/Model/HighActivityResult.php | 4 +- src/Model/IPLocation.php | 18 ++--- src/Model/IPLocationCity.php | 2 +- src/Model/IdentificationError.php | 4 +- src/Model/IncognitoResult.php | 2 +- src/Model/IpBlockListResult.php | 4 +- src/Model/IpBlockListResultDetails.php | 4 +- src/Model/IpInfoResult.php | 4 +- src/Model/IpInfoResultV4.php | 8 +-- src/Model/IpInfoResultV6.php | 8 +-- src/Model/JailbrokenResult.php | 2 +- src/Model/Location.php | 4 +- src/Model/LocationSpoofingResult.php | 2 +- src/Model/ManyRequestsResponse.php | 2 +- src/Model/PrivacySettingsResult.php | 2 +- src/Model/ProductError.php | 4 +- src/Model/ProductsResponse.php | 42 +++++------ src/Model/ProductsResponseBotd.php | 4 +- src/Model/ProductsResponseIdentification.php | 4 +- .../ProductsResponseIdentificationData.php | 30 ++++---- src/Model/ProxyResult.php | 2 +- src/Model/Response.php | 8 +-- src/Model/ResponseVisits.php | 28 ++++---- src/Model/RootAppsResult.php | 2 +- src/Model/SeenAt.php | 4 +- src/Model/SignalResponseClonedApp.php | 4 +- src/Model/SignalResponseEmulator.php | 4 +- src/Model/SignalResponseFactoryReset.php | 4 +- src/Model/SignalResponseFrida.php | 4 +- src/Model/SignalResponseHighActivity.php | 4 +- src/Model/SignalResponseIncognito.php | 4 +- src/Model/SignalResponseIpBlocklist.php | 4 +- src/Model/SignalResponseIpInfo.php | 4 +- src/Model/SignalResponseJailbroken.php | 4 +- src/Model/SignalResponseLocationSpoofing.php | 4 +- src/Model/SignalResponsePrivacySettings.php | 4 +- src/Model/SignalResponseProxy.php | 4 +- .../SignalResponseRawDeviceAttributes.php | 2 +- src/Model/SignalResponseRootApps.php | 4 +- src/Model/SignalResponseSuspectScore.php | 4 +- src/Model/SignalResponseTampering.php | 4 +- src/Model/SignalResponseTor.php | 4 +- src/Model/SignalResponseVirtualMachine.php | 4 +- src/Model/SignalResponseVpn.php | 4 +- src/Model/Subdivision.php | 4 +- src/Model/SuspectScoreResult.php | 2 +- src/Model/TamperingResult.php | 4 +- src/Model/TorResult.php | 2 +- src/Model/VirtualMachineResult.php | 2 +- src/Model/Visit.php | 28 ++++---- src/Model/VpnResult.php | 8 +-- src/Model/VpnResultMethods.php | 6 +- src/Model/WebhookVisit.php | 72 +++++++++---------- src/Sealed/Sealed.php | 8 ++- template/model_generic.mustache | 2 +- test/Sealed/SealedTest.php | 6 +- 76 files changed, 265 insertions(+), 252 deletions(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index b6ac699e..4a0d5237 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -59,10 +59,10 @@ fi # Model file fix if [ "$platform" = "Darwin" ]; then sed -i '' 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php - sed -i '' 's/public function getData(): RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i '' 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php else sed -i 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php - sed -i 's/public function getData(): RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php fi ) diff --git a/sealed_results_example.php b/sealed_results_example.php index 7a8189b7..7db66137 100644 --- a/sealed_results_example.php +++ b/sealed_results_example.php @@ -6,6 +6,9 @@ require_once(__DIR__ . '/vendor/autoload.php'); +$dotenv = Dotenv\Dotenv::createImmutable(__DIR__); +$dotenv->safeLoad(); + $sealed_result = base64_decode($_ENV['BASE64_SEALED_RESULT'] ?? getenv('BASE64_SEALED_RESULT') ?? ""); $sealed_key = base64_decode($_ENV['BASE64_KEY'] ?? getenv('BASE64_KEY') ?? ""); diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 0b8b9c00..530505cb 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -213,7 +213,7 @@ public function valid(): bool /** * Gets asn. */ - public function getAsn(): string + public function getAsn(): ?string { return $this->container['asn']; } @@ -235,7 +235,7 @@ public function setAsn(string $asn): self /** * Gets network. */ - public function getNetwork(): string + public function getNetwork(): ?string { return $this->container['network']; } @@ -257,7 +257,7 @@ public function setNetwork(string $network): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index cb5fee4b..f6bea206 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): string + public function getResult(): ?string { return $this->container['result']; } @@ -261,7 +261,7 @@ public function setResult(string $result): self /** * Gets type. */ - public function getType(): string + public function getType(): ?string { return $this->container['type']; } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index dd5b413a..f39e516f 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -251,7 +251,7 @@ public function valid(): bool /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -273,7 +273,7 @@ public function setIp(string $ip): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -295,7 +295,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -317,7 +317,7 @@ public function setUrl(string $url): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -339,7 +339,7 @@ public function setUserAgent(string $user_agent): self /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -361,7 +361,7 @@ public function setRequestId(string $request_id): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -383,7 +383,7 @@ public function setLinkedId(string $linked_id): self /** * Gets bot. */ - public function getBot(): BotdDetectionResult + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 818888fc..bfd50fb0 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -258,7 +258,7 @@ public function valid(): bool /** * Gets browser_name. */ - public function getBrowserName(): string + public function getBrowserName(): ?string { return $this->container['browser_name']; } @@ -280,7 +280,7 @@ public function setBrowserName(string $browser_name): self /** * Gets browser_major_version. */ - public function getBrowserMajorVersion(): string + public function getBrowserMajorVersion(): ?string { return $this->container['browser_major_version']; } @@ -302,7 +302,7 @@ public function setBrowserMajorVersion(string $browser_major_version): self /** * Gets browser_full_version. */ - public function getBrowserFullVersion(): string + public function getBrowserFullVersion(): ?string { return $this->container['browser_full_version']; } @@ -324,7 +324,7 @@ public function setBrowserFullVersion(string $browser_full_version): self /** * Gets os. */ - public function getOs(): string + public function getOs(): ?string { return $this->container['os']; } @@ -346,7 +346,7 @@ public function setOs(string $os): self /** * Gets os_version. */ - public function getOsVersion(): string + public function getOsVersion(): ?string { return $this->container['os_version']; } @@ -368,7 +368,7 @@ public function setOsVersion(string $os_version): self /** * Gets device. */ - public function getDevice(): string + public function getDevice(): ?string { return $this->container['device']; } @@ -390,7 +390,7 @@ public function setDevice(string $device): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -412,7 +412,7 @@ public function setUserAgent(string $user_agent): self /** * Gets bot_probability. */ - public function getBotProbability(): int + public function getBotProbability(): ?int { return $this->container['bot_probability']; } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 61fd7c2d..e09b176a 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index ac489b0d..a66a2d90 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets score. */ - public function getScore(): float + public function getScore(): ?float { return $this->container['score']; } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index ae0b650d..b8565a33 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -226,7 +226,7 @@ public function setResult(bool $result): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 8eddef0b..ec436a63 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -242,7 +242,7 @@ public function valid(): bool /** * Gets accuracy_radius. */ - public function getAccuracyRadius(): int + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -264,7 +264,7 @@ public function setAccuracyRadius(int $accuracy_radius): self /** * Gets latitude. */ - public function getLatitude(): float + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -286,7 +286,7 @@ public function setLatitude(float $latitude): self /** * Gets longitude. */ - public function getLongitude(): float + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -308,7 +308,7 @@ public function setLongitude(float $longitude): self /** * Gets postal_code. */ - public function getPostalCode(): string + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -330,7 +330,7 @@ public function setPostalCode(string $postal_code): self /** * Gets timezone. */ - public function getTimezone(): string + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -352,7 +352,7 @@ public function setTimezone(string $timezone): self /** * Gets city. */ - public function getCity(): DeprecatedIPLocationCity + public function getCity(): ?DeprecatedIPLocationCity { return $this->container['city']; } @@ -374,7 +374,7 @@ public function setCity(DeprecatedIPLocationCity $city): self /** * Gets country. */ - public function getCountry(): Location + public function getCountry(): ?Location { return $this->container['country']; } @@ -396,7 +396,7 @@ public function setCountry(Location $country): self /** * Gets continent. */ - public function getContinent(): Location + public function getContinent(): ?Location { return $this->container['continent']; } @@ -420,7 +420,7 @@ public function setContinent(Location $continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions(): array + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 6f485667..9a1b4416 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 0a4398fd..eb39b047 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 32d1a764..7a1bc6d0 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ErrorEvent403ResponseError + public function getError(): ?ErrorEvent403ResponseError { return $this->container['error']; } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 702c754c..e714bd2c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -234,7 +234,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -265,7 +265,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index a6fbbb19..b6be0ba3 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ErrorEvent404ResponseError + public function getError(): ?ErrorEvent404ResponseError { return $this->container['error']; } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 607b1924..1993400b 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -228,7 +228,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -259,7 +259,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 297998f3..97f37869 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): string + public function getError(): ?string { return $this->container['error']; } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 2f525355..6ecd6eec 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -206,7 +206,7 @@ public function valid(): bool /** * Gets products. */ - public function getProducts(): ProductsResponse + public function getProducts(): ?ProductsResponse { return $this->container['products']; } @@ -228,7 +228,7 @@ public function setProducts(ProductsResponse $products): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index fbf1834d..f06871d0 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -229,7 +229,7 @@ public function setTime(\DateTime $time): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index ad511bad..29fdb492 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 43ff8284..e381e1ce 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -226,7 +226,7 @@ public function setResult(bool $result): self /** * Gets daily_requests. */ - public function getDailyRequests(): float + public function getDailyRequests(): ?float { return $this->container['daily_requests']; } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 0adebf00..a292b156 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -240,7 +240,7 @@ public function valid(): bool /** * Gets accuracy_radius. */ - public function getAccuracyRadius(): int + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -262,7 +262,7 @@ public function setAccuracyRadius(int $accuracy_radius): self /** * Gets latitude. */ - public function getLatitude(): float + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -284,7 +284,7 @@ public function setLatitude(float $latitude): self /** * Gets longitude. */ - public function getLongitude(): float + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -306,7 +306,7 @@ public function setLongitude(float $longitude): self /** * Gets postal_code. */ - public function getPostalCode(): string + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -328,7 +328,7 @@ public function setPostalCode(string $postal_code): self /** * Gets timezone. */ - public function getTimezone(): string + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -350,7 +350,7 @@ public function setTimezone(string $timezone): self /** * Gets city. */ - public function getCity(): IPLocationCity + public function getCity(): ?IPLocationCity { return $this->container['city']; } @@ -372,7 +372,7 @@ public function setCity(IPLocationCity $city): self /** * Gets country. */ - public function getCountry(): Location + public function getCountry(): ?Location { return $this->container['country']; } @@ -394,7 +394,7 @@ public function setCountry(Location $country): self /** * Gets continent. */ - public function getContinent(): Location + public function getContinent(): ?Location { return $this->container['continent']; } @@ -418,7 +418,7 @@ public function setContinent(Location $continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions(): array + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index daba3d17..b9e2adc6 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c8890cc4..47d5157e 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 6299cc93..27db01f7 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index c6131829..8c5435e2 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets details. */ - public function getDetails(): IpBlockListResultDetails + public function getDetails(): ?IpBlockListResultDetails { return $this->container['details']; } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 0695fbc1..cc3823ae 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets email_spam. */ - public function getEmailSpam(): bool + public function getEmailSpam(): ?bool { return $this->container['email_spam']; } @@ -229,7 +229,7 @@ public function setEmailSpam(bool $email_spam): self /** * Gets attack_source. */ - public function getAttackSource(): bool + public function getAttackSource(): ?bool { return $this->container['attack_source']; } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index b4db3099..e2d8919c 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -200,7 +200,7 @@ public function valid(): bool /** * Gets v4. */ - public function getV4(): IpInfoResultV4 + public function getV4(): ?IpInfoResultV4 { return $this->container['v4']; } @@ -222,7 +222,7 @@ public function setV4(IpInfoResultV4 $v4): self /** * Gets v6. */ - public function getV6(): IpInfoResultV6 + public function getV6(): ?IpInfoResultV6 { return $this->container['v6']; } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 039d34f4..53e0e16b 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): string + public function getAddress(): ?string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): IPLocation + public function getGeolocation(): ?IPLocation { return $this->container['geolocation']; } @@ -263,7 +263,7 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. */ - public function getAsn(): ASN + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -285,7 +285,7 @@ public function setAsn(ASN $asn): self /** * Gets datacenter. */ - public function getDatacenter(): DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 22e5ad29..f28f7929 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): string + public function getAddress(): ?string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): IPLocation + public function getGeolocation(): ?IPLocation { return $this->container['geolocation']; } @@ -263,7 +263,7 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. */ - public function getAsn(): ASN + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -285,7 +285,7 @@ public function setAsn(ASN $asn): self /** * Gets datacenter. */ - public function getDatacenter(): DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index fa94ca4d..6e7190d7 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Location.php b/src/Model/Location.php index 10af00e7..ffdd5597 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -229,7 +229,7 @@ public function setCode(string $code): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index fb7e697c..5da5bf66 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index f2c782c5..9fe7fc0d 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): string + public function getError(): ?string { return $this->container['error']; } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 28bcb9a6..db425e5e 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 5a0879e9..3dfc1c36 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 227618bd..1a368e31 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -314,7 +314,7 @@ public function valid(): bool /** * Gets identification. */ - public function getIdentification(): ProductsResponseIdentification + public function getIdentification(): ?ProductsResponseIdentification { return $this->container['identification']; } @@ -336,7 +336,7 @@ public function setIdentification(ProductsResponseIdentification $identification /** * Gets botd. */ - public function getBotd(): ProductsResponseBotd + public function getBotd(): ?ProductsResponseBotd { return $this->container['botd']; } @@ -358,7 +358,7 @@ public function setBotd(ProductsResponseBotd $botd): self /** * Gets ip_info. */ - public function getIpInfo(): SignalResponseIpInfo + public function getIpInfo(): ?SignalResponseIpInfo { return $this->container['ip_info']; } @@ -380,7 +380,7 @@ public function setIpInfo(SignalResponseIpInfo $ip_info): self /** * Gets incognito. */ - public function getIncognito(): SignalResponseIncognito + public function getIncognito(): ?SignalResponseIncognito { return $this->container['incognito']; } @@ -402,7 +402,7 @@ public function setIncognito(SignalResponseIncognito $incognito): self /** * Gets root_apps. */ - public function getRootApps(): SignalResponseRootApps + public function getRootApps(): ?SignalResponseRootApps { return $this->container['root_apps']; } @@ -424,7 +424,7 @@ public function setRootApps(SignalResponseRootApps $root_apps): self /** * Gets emulator. */ - public function getEmulator(): SignalResponseEmulator + public function getEmulator(): ?SignalResponseEmulator { return $this->container['emulator']; } @@ -446,7 +446,7 @@ public function setEmulator(SignalResponseEmulator $emulator): self /** * Gets cloned_app. */ - public function getClonedApp(): SignalResponseClonedApp + public function getClonedApp(): ?SignalResponseClonedApp { return $this->container['cloned_app']; } @@ -468,7 +468,7 @@ public function setClonedApp(SignalResponseClonedApp $cloned_app): self /** * Gets factory_reset. */ - public function getFactoryReset(): SignalResponseFactoryReset + public function getFactoryReset(): ?SignalResponseFactoryReset { return $this->container['factory_reset']; } @@ -490,7 +490,7 @@ public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self /** * Gets jailbroken. */ - public function getJailbroken(): SignalResponseJailbroken + public function getJailbroken(): ?SignalResponseJailbroken { return $this->container['jailbroken']; } @@ -512,7 +512,7 @@ public function setJailbroken(SignalResponseJailbroken $jailbroken): self /** * Gets frida. */ - public function getFrida(): SignalResponseFrida + public function getFrida(): ?SignalResponseFrida { return $this->container['frida']; } @@ -534,7 +534,7 @@ public function setFrida(SignalResponseFrida $frida): self /** * Gets ip_blocklist. */ - public function getIpBlocklist(): SignalResponseIpBlocklist + public function getIpBlocklist(): ?SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } @@ -556,7 +556,7 @@ public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self /** * Gets tor. */ - public function getTor(): SignalResponseTor + public function getTor(): ?SignalResponseTor { return $this->container['tor']; } @@ -578,7 +578,7 @@ public function setTor(SignalResponseTor $tor): self /** * Gets privacy_settings. */ - public function getPrivacySettings(): SignalResponsePrivacySettings + public function getPrivacySettings(): ?SignalResponsePrivacySettings { return $this->container['privacy_settings']; } @@ -600,7 +600,7 @@ public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settin /** * Gets virtual_machine. */ - public function getVirtualMachine(): SignalResponseVirtualMachine + public function getVirtualMachine(): ?SignalResponseVirtualMachine { return $this->container['virtual_machine']; } @@ -622,7 +622,7 @@ public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine) /** * Gets vpn. */ - public function getVpn(): SignalResponseVpn + public function getVpn(): ?SignalResponseVpn { return $this->container['vpn']; } @@ -644,7 +644,7 @@ public function setVpn(SignalResponseVpn $vpn): self /** * Gets proxy. */ - public function getProxy(): SignalResponseProxy + public function getProxy(): ?SignalResponseProxy { return $this->container['proxy']; } @@ -666,7 +666,7 @@ public function setProxy(SignalResponseProxy $proxy): self /** * Gets tampering. */ - public function getTampering(): SignalResponseTampering + public function getTampering(): ?SignalResponseTampering { return $this->container['tampering']; } @@ -688,7 +688,7 @@ public function setTampering(SignalResponseTampering $tampering): self /** * Gets high_activity. */ - public function getHighActivity(): SignalResponseHighActivity + public function getHighActivity(): ?SignalResponseHighActivity { return $this->container['high_activity']; } @@ -710,7 +710,7 @@ public function setHighActivity(SignalResponseHighActivity $high_activity): self /** * Gets location_spoofing. */ - public function getLocationSpoofing(): SignalResponseLocationSpoofing + public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } @@ -732,7 +732,7 @@ public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spo /** * Gets suspect_score. */ - public function getSuspectScore(): SignalResponseSuspectScore + public function getSuspectScore(): ?SignalResponseSuspectScore { return $this->container['suspect_score']; } @@ -754,7 +754,7 @@ public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self /** * Gets raw_device_attributes. */ - public function getRawDeviceAttributes(): SignalResponseRawDeviceAttributes + public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 8fa43a4d..6d04a535 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): BotdResult + public function getData(): ?BotdResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(BotdResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 43906044..de7010cd 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ProductsResponseIdentificationData + public function getData(): ?ProductsResponseIdentificationData { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ProductsResponseIdentificationData $data): self /** * Gets error. */ - public function getError(): IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index c79885d8..9fa2101d 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -315,7 +315,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -337,7 +337,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -359,7 +359,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -381,7 +381,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -403,7 +403,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -425,7 +425,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -447,7 +447,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -469,7 +469,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -493,7 +493,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -515,7 +515,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -537,7 +537,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -559,7 +559,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -581,7 +581,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -603,7 +603,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } @@ -625,7 +625,7 @@ public function setLastSeenAt(SeenAt $last_seen_at): self /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 0ba7fc50..9d6c88b1 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Response.php b/src/Model/Response.php index 1573ddd6..46f63c1d 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -221,7 +221,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } @@ -245,7 +245,7 @@ public function setVisitorId(string $visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits(): array + public function getVisits(): ?array { return $this->container['visits']; } @@ -267,7 +267,7 @@ public function setVisits(array $visits): self /** * Gets last_timestamp. */ - public function getLastTimestamp(): int + public function getLastTimestamp(): ?int { return $this->container['last_timestamp']; } @@ -289,7 +289,7 @@ public function setLastTimestamp(int $last_timestamp): self /** * Gets pagination_key. */ - public function getPaginationKey(): string + public function getPaginationKey(): ?string { return $this->container['pagination_key']; } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index e464db9b..b1871685 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -394,7 +394,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -506,7 +506,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -528,7 +528,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 6c1c82cf..0c0fe279 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 29de802d..0d5fe032 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets global. */ - public function getGlobal(): \DateTime + public function getGlobal(): ?\DateTime { return $this->container['global']; } @@ -229,7 +229,7 @@ public function setGlobal(\DateTime $global): self /** * Gets subscription. */ - public function getSubscription(): \DateTime + public function getSubscription(): ?\DateTime { return $this->container['subscription']; } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 66bc4085..85eab68e 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ClonedAppResult + public function getData(): ?ClonedAppResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ClonedAppResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index a87a13bc..92bfaa0e 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): EmulatorResult + public function getData(): ?EmulatorResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(EmulatorResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 2271eb8d..2f13a181 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): FactoryResetResult + public function getData(): ?FactoryResetResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(FactoryResetResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index e1e6069c..95da9699 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): FridaResult + public function getData(): ?FridaResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(FridaResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index d8cee703..23a67629 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): HighActivityResult + public function getData(): ?HighActivityResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(HighActivityResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 63532391..a4cee05c 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IncognitoResult + public function getData(): ?IncognitoResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IncognitoResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index edf0c8b3..292102ea 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IpBlockListResult + public function getData(): ?IpBlockListResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IpBlockListResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index a92d2c8e..952c0eed 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IpInfoResult + public function getData(): ?IpInfoResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IpInfoResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 2552af44..b05c3baf 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): JailbrokenResult + public function getData(): ?JailbrokenResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(JailbrokenResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index d6331aa5..d492ea52 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): LocationSpoofingResult + public function getData(): ?LocationSpoofingResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(LocationSpoofingResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index e39bcce4..55a85f9b 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): PrivacySettingsResult + public function getData(): ?PrivacySettingsResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(PrivacySettingsResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 436479c1..aac706d6 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ProxyResult + public function getData(): ?ProxyResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ProxyResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index fe3aab0e..24fe783e 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -220,7 +220,7 @@ public function setData(array $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 896e6484..11dbd25c 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): RootAppsResult + public function getData(): ?RootAppsResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(RootAppsResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 0c136c51..a91a75b0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): SuspectScoreResult + public function getData(): ?SuspectScoreResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(SuspectScoreResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index e90e1c49..5a3a99e7 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): TamperingResult + public function getData(): ?TamperingResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(TamperingResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 1a1e6078..b6c87ed6 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): TorResult + public function getData(): ?TorResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(TorResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 5bb17656..040c3b06 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): VirtualMachineResult + public function getData(): ?VirtualMachineResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(VirtualMachineResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 17f231be..d53ddab5 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): VpnResult + public function getData(): ?VpnResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(VpnResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index ef9a3576..4ffa743c 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets iso_code. */ - public function getIsoCode(): string + public function getIsoCode(): ?string { return $this->container['iso_code']; } @@ -220,7 +220,7 @@ public function setIsoCode(string $iso_code): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 3225bda1..dfcc6b63 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): int + public function getResult(): ?int { return $this->container['result']; } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index e642bcd4..a6504cf5 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets anomaly_score. */ - public function getAnomalyScore(): float + public function getAnomalyScore(): ?float { return $this->container['anomaly_score']; } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index c09aeaaf..55bad9d6 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 644f9144..b4ab2899 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 30d8926d..1705250d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -394,7 +394,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -506,7 +506,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -528,7 +528,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 5e9f88a6..f809b168 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -222,7 +222,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -244,7 +244,7 @@ public function setResult(bool $result): self /** * Gets origin_timezone. */ - public function getOriginTimezone(): string + public function getOriginTimezone(): ?string { return $this->container['origin_timezone']; } @@ -266,7 +266,7 @@ public function setOriginTimezone(string $origin_timezone): self /** * Gets origin_country. */ - public function getOriginCountry(): string + public function getOriginCountry(): ?string { return $this->container['origin_country']; } @@ -288,7 +288,7 @@ public function setOriginCountry(string $origin_country): self /** * Gets methods. */ - public function getMethods(): VpnResultMethods + public function getMethods(): ?VpnResultMethods { return $this->container['methods']; } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 3c4f1f36..2426ecae 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -216,7 +216,7 @@ public function valid(): bool /** * Gets timezone_mismatch. */ - public function getTimezoneMismatch(): bool + public function getTimezoneMismatch(): ?bool { return $this->container['timezone_mismatch']; } @@ -238,7 +238,7 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self /** * Gets public_vpn. */ - public function getPublicVpn(): bool + public function getPublicVpn(): ?bool { return $this->container['public_vpn']; } @@ -260,7 +260,7 @@ public function setPublicVpn(bool $public_vpn): self /** * Gets auxiliary_mobile. */ - public function getAuxiliaryMobile(): bool + public function getAuxiliaryMobile(): ?bool { return $this->container['auxiliary_mobile']; } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 6ed34e9c..4ef9337a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -441,7 +441,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } @@ -463,7 +463,7 @@ public function setVisitorId(string $visitor_id): self /** * Gets client_referrer. */ - public function getClientReferrer(): string + public function getClientReferrer(): ?string { return $this->container['client_referrer']; } @@ -485,7 +485,7 @@ public function setClientReferrer(string $client_referrer): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -507,7 +507,7 @@ public function setUserAgent(string $user_agent): self /** * Gets bot. */ - public function getBot(): BotdDetectionResult + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } @@ -529,7 +529,7 @@ public function setBot(BotdDetectionResult $bot): self /** * Gets ip_info. */ - public function getIpInfo(): IpInfoResult + public function getIpInfo(): ?IpInfoResult { return $this->container['ip_info']; } @@ -551,7 +551,7 @@ public function setIpInfo(IpInfoResult $ip_info): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -573,7 +573,7 @@ public function setIncognito(bool $incognito): self /** * Gets root_apps. */ - public function getRootApps(): RootAppsResult + public function getRootApps(): ?RootAppsResult { return $this->container['root_apps']; } @@ -595,7 +595,7 @@ public function setRootApps(RootAppsResult $root_apps): self /** * Gets emulator. */ - public function getEmulator(): EmulatorResult + public function getEmulator(): ?EmulatorResult { return $this->container['emulator']; } @@ -617,7 +617,7 @@ public function setEmulator(EmulatorResult $emulator): self /** * Gets cloned_app. */ - public function getClonedApp(): ClonedAppResult + public function getClonedApp(): ?ClonedAppResult { return $this->container['cloned_app']; } @@ -639,7 +639,7 @@ public function setClonedApp(ClonedAppResult $cloned_app): self /** * Gets factory_reset. */ - public function getFactoryReset(): FactoryResetResult + public function getFactoryReset(): ?FactoryResetResult { return $this->container['factory_reset']; } @@ -661,7 +661,7 @@ public function setFactoryReset(FactoryResetResult $factory_reset): self /** * Gets jailbroken. */ - public function getJailbroken(): JailbrokenResult + public function getJailbroken(): ?JailbrokenResult { return $this->container['jailbroken']; } @@ -683,7 +683,7 @@ public function setJailbroken(JailbrokenResult $jailbroken): self /** * Gets frida. */ - public function getFrida(): FridaResult + public function getFrida(): ?FridaResult { return $this->container['frida']; } @@ -705,7 +705,7 @@ public function setFrida(FridaResult $frida): self /** * Gets ip_blocklist. */ - public function getIpBlocklist(): IpBlockListResult + public function getIpBlocklist(): ?IpBlockListResult { return $this->container['ip_blocklist']; } @@ -727,7 +727,7 @@ public function setIpBlocklist(IpBlockListResult $ip_blocklist): self /** * Gets tor. */ - public function getTor(): TorResult + public function getTor(): ?TorResult { return $this->container['tor']; } @@ -749,7 +749,7 @@ public function setTor(TorResult $tor): self /** * Gets privacy_settings. */ - public function getPrivacySettings(): PrivacySettingsResult + public function getPrivacySettings(): ?PrivacySettingsResult { return $this->container['privacy_settings']; } @@ -771,7 +771,7 @@ public function setPrivacySettings(PrivacySettingsResult $privacy_settings): sel /** * Gets virtual_machine. */ - public function getVirtualMachine(): VirtualMachineResult + public function getVirtualMachine(): ?VirtualMachineResult { return $this->container['virtual_machine']; } @@ -793,7 +793,7 @@ public function setVirtualMachine(VirtualMachineResult $virtual_machine): self /** * Gets vpn. */ - public function getVpn(): VpnResult + public function getVpn(): ?VpnResult { return $this->container['vpn']; } @@ -815,7 +815,7 @@ public function setVpn(VpnResult $vpn): self /** * Gets proxy. */ - public function getProxy(): ProxyResult + public function getProxy(): ?ProxyResult { return $this->container['proxy']; } @@ -837,7 +837,7 @@ public function setProxy(ProxyResult $proxy): self /** * Gets tampering. */ - public function getTampering(): TamperingResult + public function getTampering(): ?TamperingResult { return $this->container['tampering']; } @@ -859,7 +859,7 @@ public function setTampering(TamperingResult $tampering): self /** * Gets raw_device_attributes. */ - public function getRawDeviceAttributes(): RawDeviceAttributesResult + public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } @@ -881,7 +881,7 @@ public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_att /** * Gets high_activity. */ - public function getHighActivity(): HighActivityResult + public function getHighActivity(): ?HighActivityResult { return $this->container['high_activity']; } @@ -903,7 +903,7 @@ public function setHighActivity(HighActivityResult $high_activity): self /** * Gets location_spoofing. */ - public function getLocationSpoofing(): LocationSpoofingResult + public function getLocationSpoofing(): ?LocationSpoofingResult { return $this->container['location_spoofing']; } @@ -925,7 +925,7 @@ public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): /** * Gets suspect_score. */ - public function getSuspectScore(): SuspectScoreResult + public function getSuspectScore(): ?SuspectScoreResult { return $this->container['suspect_score']; } @@ -947,7 +947,7 @@ public function setSuspectScore(SuspectScoreResult $suspect_score): self /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -969,7 +969,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -991,7 +991,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -1013,7 +1013,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -1035,7 +1035,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -1057,7 +1057,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -1079,7 +1079,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -1103,7 +1103,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -1125,7 +1125,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -1147,7 +1147,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -1169,7 +1169,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -1191,7 +1191,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -1213,7 +1213,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 5bd26c57..89cb06b2 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -3,6 +3,9 @@ namespace Fingerprint\ServerAPI\Sealed; use Fingerprint\ServerAPI\Model\EventResponse; +use Fingerprint\ServerAPI\ObjectSerializer; +use Fingerprint\ServerAPI\SerializationException; +use GuzzleHttp\Psr7\Response; class Sealed { @@ -14,6 +17,7 @@ class Sealed * @param DecryptionKey[] $keys * * @throws UnsealAggregateException + * @throws SerializationException */ public static function unsealEventResponse(string $sealed, array $keys): EventResponse { @@ -25,7 +29,9 @@ public static function unsealEventResponse(string $sealed, array $keys): EventRe throw new InvalidSealedDataException(); } - return new EventResponse($data); + $response = new Response(200, [], $unsealed); + + return ObjectSerializer::deserialize($response, EventResponse::class); } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 52337e29..c16a71fd 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} + public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}}|null { return $this->container['{{name}}']; } diff --git a/test/Sealed/SealedTest.php b/test/Sealed/SealedTest.php index 608394de..a110d84d 100644 --- a/test/Sealed/SealedTest.php +++ b/test/Sealed/SealedTest.php @@ -3,6 +3,8 @@ namespace Fingerprint\ServerAPI\Sealed; use Fingerprint\ServerAPI\Model\EventResponse; +use Fingerprint\ServerAPI\ObjectSerializer; +use GuzzleHttp\Psr7\Response; use PHPUnit\Framework\TestCase; class SealedTest extends TestCase @@ -37,7 +39,9 @@ public function testUnsealEventResponse() { $sealedResult = base64_decode("noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="); - $expectedResponse = new EventResponse(json_decode("{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}", true)); + $response = new Response(200, [], "{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}"); + + $expectedResponse = ObjectSerializer::deserialize($response, EventResponse::class); $eventResponse = Sealed::unsealEventResponse( $sealedResult, From 950a3184c94b39ee8660dbd1ed337f73a29fdaa5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 12:36:02 +0300 Subject: [PATCH 049/118] refactor: use required annotation for model getters --- src/Model/ASN.php | 4 ++-- src/Model/BotdDetectionResult.php | 2 +- src/Model/BotdResult.php | 12 +++++----- src/Model/BrowserDetails.php | 14 +++++------ src/Model/ClonedAppResult.php | 2 +- src/Model/Confidence.php | 2 +- src/Model/DataCenter.php | 2 +- src/Model/EmulatorResult.php | 2 +- src/Model/ErrorEvent403ResponseError.php | 4 ++-- src/Model/ErrorEvent404ResponseError.php | 4 ++-- src/Model/ErrorVisits403.php | 2 +- src/Model/EventResponse.php | 2 +- src/Model/FactoryResetResult.php | 4 ++-- src/Model/FridaResult.php | 2 +- src/Model/HighActivityResult.php | 2 +- src/Model/IdentificationError.php | 4 ++-- src/Model/IncognitoResult.php | 2 +- src/Model/IpBlockListResult.php | 4 ++-- src/Model/IpBlockListResultDetails.php | 4 ++-- src/Model/IpInfoResultV4.php | 4 ++-- src/Model/IpInfoResultV6.php | 4 ++-- src/Model/JailbrokenResult.php | 2 +- src/Model/Location.php | 4 ++-- src/Model/LocationSpoofingResult.php | 2 +- src/Model/ManyRequestsResponse.php | 2 +- src/Model/PrivacySettingsResult.php | 2 +- src/Model/ProductError.php | 4 ++-- .../ProductsResponseIdentificationData.php | 24 +++++++++---------- src/Model/ProxyResult.php | 2 +- src/Model/Response.php | 4 ++-- src/Model/ResponseVisits.php | 22 ++++++++--------- src/Model/RootAppsResult.php | 2 +- src/Model/SeenAt.php | 4 ++-- src/Model/SuspectScoreResult.php | 2 +- src/Model/TamperingResult.php | 4 ++-- src/Model/TorResult.php | 2 +- src/Model/VirtualMachineResult.php | 2 +- src/Model/Visit.php | 22 ++++++++--------- src/Model/VpnResult.php | 6 ++--- src/Model/VpnResultMethods.php | 6 ++--- src/Model/WebhookVisit.php | 24 +++++++++---------- template/model_generic.mustache | 2 +- 42 files changed, 113 insertions(+), 113 deletions(-) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 530505cb..216f7923 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -213,7 +213,7 @@ public function valid(): bool /** * Gets asn. */ - public function getAsn(): ?string + public function getAsn(): string { return $this->container['asn']; } @@ -235,7 +235,7 @@ public function setAsn(string $asn): self /** * Gets network. */ - public function getNetwork(): ?string + public function getNetwork(): string { return $this->container['network']; } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index f6bea206..bc2c4524 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?string + public function getResult(): string { return $this->container['result']; } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index f39e516f..a5d0ccf6 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -251,7 +251,7 @@ public function valid(): bool /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -273,7 +273,7 @@ public function setIp(string $ip): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -295,7 +295,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -317,7 +317,7 @@ public function setUrl(string $url): self /** * Gets user_agent. */ - public function getUserAgent(): ?string + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -339,7 +339,7 @@ public function setUserAgent(string $user_agent): self /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -383,7 +383,7 @@ public function setLinkedId(string $linked_id): self /** * Gets bot. */ - public function getBot(): ?BotdDetectionResult + public function getBot(): BotdDetectionResult { return $this->container['bot']; } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index bfd50fb0..e5190554 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -258,7 +258,7 @@ public function valid(): bool /** * Gets browser_name. */ - public function getBrowserName(): ?string + public function getBrowserName(): string { return $this->container['browser_name']; } @@ -280,7 +280,7 @@ public function setBrowserName(string $browser_name): self /** * Gets browser_major_version. */ - public function getBrowserMajorVersion(): ?string + public function getBrowserMajorVersion(): string { return $this->container['browser_major_version']; } @@ -302,7 +302,7 @@ public function setBrowserMajorVersion(string $browser_major_version): self /** * Gets browser_full_version. */ - public function getBrowserFullVersion(): ?string + public function getBrowserFullVersion(): string { return $this->container['browser_full_version']; } @@ -324,7 +324,7 @@ public function setBrowserFullVersion(string $browser_full_version): self /** * Gets os. */ - public function getOs(): ?string + public function getOs(): string { return $this->container['os']; } @@ -346,7 +346,7 @@ public function setOs(string $os): self /** * Gets os_version. */ - public function getOsVersion(): ?string + public function getOsVersion(): string { return $this->container['os_version']; } @@ -368,7 +368,7 @@ public function setOsVersion(string $os_version): self /** * Gets device. */ - public function getDevice(): ?string + public function getDevice(): string { return $this->container['device']; } @@ -390,7 +390,7 @@ public function setDevice(string $device): self /** * Gets user_agent. */ - public function getUserAgent(): ?string + public function getUserAgent(): string { return $this->container['user_agent']; } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index e09b176a..61fd7c2d 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index a66a2d90..ac489b0d 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets score. */ - public function getScore(): ?float + public function getScore(): float { return $this->container['score']; } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index b8565a33..d3f65818 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index eb39b047..0a4398fd 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index e714bd2c..702c754c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -234,7 +234,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -265,7 +265,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 1993400b..607b1924 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -228,7 +228,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -259,7 +259,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 97f37869..297998f3 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ?string + public function getError(): string { return $this->container['error']; } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 6ecd6eec..cceb4a49 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -206,7 +206,7 @@ public function valid(): bool /** * Gets products. */ - public function getProducts(): ?ProductsResponse + public function getProducts(): ProductsResponse { return $this->container['products']; } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index f06871d0..fbf1834d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -229,7 +229,7 @@ public function setTime(\DateTime $time): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 29fdb492..ad511bad 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index e381e1ce..503dc337 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 47d5157e..c8890cc4 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 27db01f7..6299cc93 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 8c5435e2..c6131829 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets details. */ - public function getDetails(): ?IpBlockListResultDetails + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index cc3823ae..0695fbc1 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets email_spam. */ - public function getEmailSpam(): ?bool + public function getEmailSpam(): bool { return $this->container['email_spam']; } @@ -229,7 +229,7 @@ public function setEmailSpam(bool $email_spam): self /** * Gets attack_source. */ - public function getAttackSource(): ?bool + public function getAttackSource(): bool { return $this->container['attack_source']; } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 53e0e16b..e78f3f23 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): ?string + public function getAddress(): string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): ?IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index f28f7929..e19214f2 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): ?string + public function getAddress(): string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): ?IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 6e7190d7..fa94ca4d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Location.php b/src/Model/Location.php index ffdd5597..10af00e7 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -229,7 +229,7 @@ public function setCode(string $code): self /** * Gets name. */ - public function getName(): ?string + public function getName(): string { return $this->container['name']; } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 5da5bf66..fb7e697c 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 9fe7fc0d..f2c782c5 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ?string + public function getError(): string { return $this->container['error']; } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index db425e5e..28bcb9a6 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 3dfc1c36..5a0879e9 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 9fa2101d..07762091 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -315,7 +315,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -337,7 +337,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -359,7 +359,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -381,7 +381,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -425,7 +425,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -447,7 +447,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -469,7 +469,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -493,7 +493,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -559,7 +559,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -581,7 +581,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -603,7 +603,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -625,7 +625,7 @@ public function setLastSeenAt(SeenAt $last_seen_at): self /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 9d6c88b1..0ba7fc50 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Response.php b/src/Model/Response.php index 46f63c1d..b054c409 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -221,7 +221,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -245,7 +245,7 @@ public function setVisitorId(string $visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits(): ?array + public function getVisits(): array { return $this->container['visits']; } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index b1871685..63c7135e 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 0c0fe279..6c1c82cf 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 0d5fe032..29de802d 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets global. */ - public function getGlobal(): ?\DateTime + public function getGlobal(): \DateTime { return $this->container['global']; } @@ -229,7 +229,7 @@ public function setGlobal(\DateTime $global): self /** * Gets subscription. */ - public function getSubscription(): ?\DateTime + public function getSubscription(): \DateTime { return $this->container['subscription']; } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index dfcc6b63..3225bda1 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?int + public function getResult(): int { return $this->container['result']; } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index a6504cf5..e642bcd4 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets anomaly_score. */ - public function getAnomalyScore(): ?float + public function getAnomalyScore(): float { return $this->container['anomaly_score']; } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 55bad9d6..c09aeaaf 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index b4ab2899..644f9144 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 1705250d..72c306a6 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index f809b168..e320c874 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -222,7 +222,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -244,7 +244,7 @@ public function setResult(bool $result): self /** * Gets origin_timezone. */ - public function getOriginTimezone(): ?string + public function getOriginTimezone(): string { return $this->container['origin_timezone']; } @@ -288,7 +288,7 @@ public function setOriginCountry(string $origin_country): self /** * Gets methods. */ - public function getMethods(): ?VpnResultMethods + public function getMethods(): VpnResultMethods { return $this->container['methods']; } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 2426ecae..3c4f1f36 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -216,7 +216,7 @@ public function valid(): bool /** * Gets timezone_mismatch. */ - public function getTimezoneMismatch(): ?bool + public function getTimezoneMismatch(): bool { return $this->container['timezone_mismatch']; } @@ -238,7 +238,7 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self /** * Gets public_vpn. */ - public function getPublicVpn(): ?bool + public function getPublicVpn(): bool { return $this->container['public_vpn']; } @@ -260,7 +260,7 @@ public function setPublicVpn(bool $public_vpn): self /** * Gets auxiliary_mobile. */ - public function getAuxiliaryMobile(): ?bool + public function getAuxiliaryMobile(): bool { return $this->container['auxiliary_mobile']; } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 4ef9337a..fe15564a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -441,7 +441,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -551,7 +551,7 @@ public function setIpInfo(IpInfoResult $ip_info): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -947,7 +947,7 @@ public function setSuspectScore(SuspectScoreResult $suspect_score): self /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -969,7 +969,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -991,7 +991,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -1035,7 +1035,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -1057,7 +1057,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -1079,7 +1079,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -1103,7 +1103,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -1169,7 +1169,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -1191,7 +1191,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -1213,7 +1213,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/template/model_generic.mustache b/template/model_generic.mustache index c16a71fd..c4dc68cc 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}}|null + public function {{getter}}(): {{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { return $this->container['{{name}}']; } From e7627df49ae7a99c5611c97fd8b4456c305cab79 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 12:46:50 +0300 Subject: [PATCH 050/118] refactor: use required annotation for model setters --- scripts/generate.sh | 4 +- src/Model/ASN.php | 2 +- src/Model/BotdDetectionResult.php | 2 +- src/Model/BotdResult.php | 2 +- src/Model/BrowserDetails.php | 2 +- src/Model/DataCenter.php | 2 +- src/Model/DeprecatedIPLocation.php | 18 +++---- src/Model/DeprecatedIPLocationCity.php | 2 +- src/Model/ErrorEvent403Response.php | 2 +- src/Model/ErrorEvent404Response.php | 2 +- src/Model/EventResponse.php | 2 +- src/Model/HighActivityResult.php | 2 +- src/Model/IPLocation.php | 18 +++---- src/Model/IPLocationCity.php | 2 +- src/Model/IpInfoResult.php | 4 +- src/Model/IpInfoResultV4.php | 4 +- src/Model/IpInfoResultV6.php | 4 +- src/Model/ProductsResponse.php | 42 ++++++++-------- src/Model/ProductsResponseBotd.php | 4 +- src/Model/ProductsResponseIdentification.php | 4 +- .../ProductsResponseIdentificationData.php | 6 +-- src/Model/Response.php | 4 +- src/Model/ResponseVisits.php | 6 +-- src/Model/SignalResponseClonedApp.php | 4 +- src/Model/SignalResponseEmulator.php | 4 +- src/Model/SignalResponseFactoryReset.php | 4 +- src/Model/SignalResponseFrida.php | 4 +- src/Model/SignalResponseHighActivity.php | 4 +- src/Model/SignalResponseIncognito.php | 4 +- src/Model/SignalResponseIpBlocklist.php | 4 +- src/Model/SignalResponseIpInfo.php | 4 +- src/Model/SignalResponseJailbroken.php | 4 +- src/Model/SignalResponseLocationSpoofing.php | 4 +- src/Model/SignalResponsePrivacySettings.php | 4 +- src/Model/SignalResponseProxy.php | 4 +- .../SignalResponseRawDeviceAttributes.php | 4 +- src/Model/SignalResponseRootApps.php | 4 +- src/Model/SignalResponseSuspectScore.php | 4 +- src/Model/SignalResponseTampering.php | 4 +- src/Model/SignalResponseTor.php | 4 +- src/Model/SignalResponseVirtualMachine.php | 4 +- src/Model/SignalResponseVpn.php | 4 +- src/Model/Subdivision.php | 4 +- src/Model/Visit.php | 6 +-- src/Model/VpnResult.php | 2 +- src/Model/WebhookVisit.php | 48 +++++++++---------- template/model_generic.mustache | 2 +- 47 files changed, 139 insertions(+), 139 deletions(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index 4a0d5237..90e9d983 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -58,10 +58,10 @@ fi ( # Model file fix if [ "$platform" = "Darwin" ]; then - sed -i '' 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i '' 's/public function setData(?RawDeviceAttributesResult $data): self/public function setData(?array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php sed -i '' 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php else - sed -i 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i 's/public function setData(?RawDeviceAttributesResult $data): self/public function setData(?array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php sed -i 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php fi ) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 216f7923..3cdd4601 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -269,7 +269,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index bc2c4524..89ef69c4 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -273,7 +273,7 @@ public function getType(): ?string * * @return $this */ - public function setType(string $type): self + public function setType(?string $type): self { $this->container['type'] = $type; diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index a5d0ccf6..871ca617 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -373,7 +373,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index e5190554..ce20254f 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -424,7 +424,7 @@ public function getBotProbability(): ?int * * @return $this */ - public function setBotProbability(int $bot_probability): self + public function setBotProbability(?int $bot_probability): self { $this->container['bot_probability'] = $bot_probability; diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index d3f65818..a817ca57 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -238,7 +238,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index ec436a63..78062c3e 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -254,7 +254,7 @@ public function getAccuracyRadius(): ?int * * @return $this */ - public function setAccuracyRadius(int $accuracy_radius): self + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -276,7 +276,7 @@ public function getLatitude(): ?float * * @return $this */ - public function setLatitude(float $latitude): self + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -298,7 +298,7 @@ public function getLongitude(): ?float * * @return $this */ - public function setLongitude(float $longitude): self + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -320,7 +320,7 @@ public function getPostalCode(): ?string * * @return $this */ - public function setPostalCode(string $postal_code): self + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -342,7 +342,7 @@ public function getTimezone(): ?string * * @return $this */ - public function setTimezone(string $timezone): self + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -364,7 +364,7 @@ public function getCity(): ?DeprecatedIPLocationCity * * @return $this */ - public function setCity(DeprecatedIPLocationCity $city): self + public function setCity(?DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -386,7 +386,7 @@ public function getCountry(): ?Location * * @return $this */ - public function setCountry(Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -408,7 +408,7 @@ public function getContinent(): ?Location * * @return $this */ - public function setContinent(Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -432,7 +432,7 @@ public function getSubdivisions(): ?array * * @return $this */ - public function setSubdivisions(array $subdivisions): self + public function setSubdivisions(?array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 9a1b4416..8374fd5a 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -204,7 +204,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 7a1bc6d0..f4922f99 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -204,7 +204,7 @@ public function getError(): ?ErrorEvent403ResponseError * * @return $this */ - public function setError(ErrorEvent403ResponseError $error): self + public function setError(?ErrorEvent403ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index b6be0ba3..247baa79 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -204,7 +204,7 @@ public function getError(): ?ErrorEvent404ResponseError * * @return $this */ - public function setError(ErrorEvent404ResponseError $error): self + public function setError(?ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index cceb4a49..d167078e 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -240,7 +240,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 503dc337..9c0a4201 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -238,7 +238,7 @@ public function getDailyRequests(): ?float * * @return $this */ - public function setDailyRequests(float $daily_requests): self + public function setDailyRequests(?float $daily_requests): self { $this->container['daily_requests'] = $daily_requests; diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index a292b156..617effab 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -252,7 +252,7 @@ public function getAccuracyRadius(): ?int * * @return $this */ - public function setAccuracyRadius(int $accuracy_radius): self + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -274,7 +274,7 @@ public function getLatitude(): ?float * * @return $this */ - public function setLatitude(float $latitude): self + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -296,7 +296,7 @@ public function getLongitude(): ?float * * @return $this */ - public function setLongitude(float $longitude): self + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -318,7 +318,7 @@ public function getPostalCode(): ?string * * @return $this */ - public function setPostalCode(string $postal_code): self + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -340,7 +340,7 @@ public function getTimezone(): ?string * * @return $this */ - public function setTimezone(string $timezone): self + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -362,7 +362,7 @@ public function getCity(): ?IPLocationCity * * @return $this */ - public function setCity(IPLocationCity $city): self + public function setCity(?IPLocationCity $city): self { $this->container['city'] = $city; @@ -384,7 +384,7 @@ public function getCountry(): ?Location * * @return $this */ - public function setCountry(Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -406,7 +406,7 @@ public function getContinent(): ?Location * * @return $this */ - public function setContinent(Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -430,7 +430,7 @@ public function getSubdivisions(): ?array * * @return $this */ - public function setSubdivisions(array $subdivisions): self + public function setSubdivisions(?array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index b9e2adc6..10899728 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -204,7 +204,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index e2d8919c..3eee0292 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -212,7 +212,7 @@ public function getV4(): ?IpInfoResultV4 * * @return $this */ - public function setV4(IpInfoResultV4 $v4): self + public function setV4(?IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -234,7 +234,7 @@ public function getV6(): ?IpInfoResultV6 * * @return $this */ - public function setV6(IpInfoResultV6 $v6): self + public function setV6(?IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index e78f3f23..4c32dff8 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -275,7 +275,7 @@ public function getAsn(): ?ASN * * @return $this */ - public function setAsn(ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -297,7 +297,7 @@ public function getDatacenter(): ?DataCenter * * @return $this */ - public function setDatacenter(DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index e19214f2..808ec4be 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -275,7 +275,7 @@ public function getAsn(): ?ASN * * @return $this */ - public function setAsn(ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -297,7 +297,7 @@ public function getDatacenter(): ?DataCenter * * @return $this */ - public function setDatacenter(DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 1a368e31..d2526c91 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -326,7 +326,7 @@ public function getIdentification(): ?ProductsResponseIdentification * * @return $this */ - public function setIdentification(ProductsResponseIdentification $identification): self + public function setIdentification(?ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -348,7 +348,7 @@ public function getBotd(): ?ProductsResponseBotd * * @return $this */ - public function setBotd(ProductsResponseBotd $botd): self + public function setBotd(?ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -370,7 +370,7 @@ public function getIpInfo(): ?SignalResponseIpInfo * * @return $this */ - public function setIpInfo(SignalResponseIpInfo $ip_info): self + public function setIpInfo(?SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -392,7 +392,7 @@ public function getIncognito(): ?SignalResponseIncognito * * @return $this */ - public function setIncognito(SignalResponseIncognito $incognito): self + public function setIncognito(?SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -414,7 +414,7 @@ public function getRootApps(): ?SignalResponseRootApps * * @return $this */ - public function setRootApps(SignalResponseRootApps $root_apps): self + public function setRootApps(?SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -436,7 +436,7 @@ public function getEmulator(): ?SignalResponseEmulator * * @return $this */ - public function setEmulator(SignalResponseEmulator $emulator): self + public function setEmulator(?SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -458,7 +458,7 @@ public function getClonedApp(): ?SignalResponseClonedApp * * @return $this */ - public function setClonedApp(SignalResponseClonedApp $cloned_app): self + public function setClonedApp(?SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -480,7 +480,7 @@ public function getFactoryReset(): ?SignalResponseFactoryReset * * @return $this */ - public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self + public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -502,7 +502,7 @@ public function getJailbroken(): ?SignalResponseJailbroken * * @return $this */ - public function setJailbroken(SignalResponseJailbroken $jailbroken): self + public function setJailbroken(?SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -524,7 +524,7 @@ public function getFrida(): ?SignalResponseFrida * * @return $this */ - public function setFrida(SignalResponseFrida $frida): self + public function setFrida(?SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -546,7 +546,7 @@ public function getIpBlocklist(): ?SignalResponseIpBlocklist * * @return $this */ - public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self + public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -568,7 +568,7 @@ public function getTor(): ?SignalResponseTor * * @return $this */ - public function setTor(SignalResponseTor $tor): self + public function setTor(?SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -590,7 +590,7 @@ public function getPrivacySettings(): ?SignalResponsePrivacySettings * * @return $this */ - public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settings): self + public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -612,7 +612,7 @@ public function getVirtualMachine(): ?SignalResponseVirtualMachine * * @return $this */ - public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine): self + public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -634,7 +634,7 @@ public function getVpn(): ?SignalResponseVpn * * @return $this */ - public function setVpn(SignalResponseVpn $vpn): self + public function setVpn(?SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -656,7 +656,7 @@ public function getProxy(): ?SignalResponseProxy * * @return $this */ - public function setProxy(SignalResponseProxy $proxy): self + public function setProxy(?SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -678,7 +678,7 @@ public function getTampering(): ?SignalResponseTampering * * @return $this */ - public function setTampering(SignalResponseTampering $tampering): self + public function setTampering(?SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -700,7 +700,7 @@ public function getHighActivity(): ?SignalResponseHighActivity * * @return $this */ - public function setHighActivity(SignalResponseHighActivity $high_activity): self + public function setHighActivity(?SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -722,7 +722,7 @@ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing * * @return $this */ - public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spoofing): self + public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -744,7 +744,7 @@ public function getSuspectScore(): ?SignalResponseSuspectScore * * @return $this */ - public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self + public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -766,7 +766,7 @@ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes * * @return $this */ - public function setRawDeviceAttributes(SignalResponseRawDeviceAttributes $raw_device_attributes): self + public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 6d04a535..05b6ab5a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -210,7 +210,7 @@ public function getData(): ?BotdResult * * @return $this */ - public function setData(BotdResult $data): self + public function setData(?BotdResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index de7010cd..d9d0022a 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -210,7 +210,7 @@ public function getData(): ?ProductsResponseIdentificationData * * @return $this */ - public function setData(ProductsResponseIdentificationData $data): self + public function setData(?ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?IdentificationError * * @return $this */ - public function setError(IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 07762091..5e6294d2 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -415,7 +415,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -527,7 +527,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -549,7 +549,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/Response.php b/src/Model/Response.php index b054c409..b8e54550 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -279,7 +279,7 @@ public function getLastTimestamp(): ?int * * @return $this */ - public function setLastTimestamp(int $last_timestamp): self + public function setLastTimestamp(?int $last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -301,7 +301,7 @@ public function getPaginationKey(): ?string * * @return $this */ - public function setPaginationKey(string $pagination_key): self + public function setPaginationKey(?string $pagination_key): self { $this->container['pagination_key'] = $pagination_key; diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 63c7135e..383134e5 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -406,7 +406,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -518,7 +518,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -540,7 +540,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 85eab68e..94b5e5c5 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -210,7 +210,7 @@ public function getData(): ?ClonedAppResult * * @return $this */ - public function setData(ClonedAppResult $data): self + public function setData(?ClonedAppResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 92bfaa0e..7d276ca0 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -210,7 +210,7 @@ public function getData(): ?EmulatorResult * * @return $this */ - public function setData(EmulatorResult $data): self + public function setData(?EmulatorResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 2f13a181..4604cc6a 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -210,7 +210,7 @@ public function getData(): ?FactoryResetResult * * @return $this */ - public function setData(FactoryResetResult $data): self + public function setData(?FactoryResetResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 95da9699..1ffb8297 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -210,7 +210,7 @@ public function getData(): ?FridaResult * * @return $this */ - public function setData(FridaResult $data): self + public function setData(?FridaResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 23a67629..6bccfd1a 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -210,7 +210,7 @@ public function getData(): ?HighActivityResult * * @return $this */ - public function setData(HighActivityResult $data): self + public function setData(?HighActivityResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index a4cee05c..cf0e38dc 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -210,7 +210,7 @@ public function getData(): ?IncognitoResult * * @return $this */ - public function setData(IncognitoResult $data): self + public function setData(?IncognitoResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 292102ea..34e14b10 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -210,7 +210,7 @@ public function getData(): ?IpBlockListResult * * @return $this */ - public function setData(IpBlockListResult $data): self + public function setData(?IpBlockListResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 952c0eed..29ccda62 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -210,7 +210,7 @@ public function getData(): ?IpInfoResult * * @return $this */ - public function setData(IpInfoResult $data): self + public function setData(?IpInfoResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index b05c3baf..80f630af 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -210,7 +210,7 @@ public function getData(): ?JailbrokenResult * * @return $this */ - public function setData(JailbrokenResult $data): self + public function setData(?JailbrokenResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index d492ea52..ed6dfee7 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -210,7 +210,7 @@ public function getData(): ?LocationSpoofingResult * * @return $this */ - public function setData(LocationSpoofingResult $data): self + public function setData(?LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 55a85f9b..a5b03b89 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -210,7 +210,7 @@ public function getData(): ?PrivacySettingsResult * * @return $this */ - public function setData(PrivacySettingsResult $data): self + public function setData(?PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index aac706d6..a58f07e0 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -210,7 +210,7 @@ public function getData(): ?ProxyResult * * @return $this */ - public function setData(ProxyResult $data): self + public function setData(?ProxyResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 24fe783e..820bdac3 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -210,7 +210,7 @@ public function getData(): array * * @return $this */ - public function setData(array $data): self + public function setData(?array $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 11dbd25c..0a01e9f3 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -210,7 +210,7 @@ public function getData(): ?RootAppsResult * * @return $this */ - public function setData(RootAppsResult $data): self + public function setData(?RootAppsResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index a91a75b0..e20baa97 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -210,7 +210,7 @@ public function getData(): ?SuspectScoreResult * * @return $this */ - public function setData(SuspectScoreResult $data): self + public function setData(?SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 5a3a99e7..2753a81e 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -210,7 +210,7 @@ public function getData(): ?TamperingResult * * @return $this */ - public function setData(TamperingResult $data): self + public function setData(?TamperingResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index b6c87ed6..619c632b 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -210,7 +210,7 @@ public function getData(): ?TorResult * * @return $this */ - public function setData(TorResult $data): self + public function setData(?TorResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 040c3b06..f22f1aba 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -210,7 +210,7 @@ public function getData(): ?VirtualMachineResult * * @return $this */ - public function setData(VirtualMachineResult $data): self + public function setData(?VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index d53ddab5..2f1a193f 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -210,7 +210,7 @@ public function getData(): ?VpnResult * * @return $this */ - public function setData(VpnResult $data): self + public function setData(?VpnResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 4ffa743c..fb950e9c 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -210,7 +210,7 @@ public function getIsoCode(): ?string * * @return $this */ - public function setIsoCode(string $iso_code): self + public function setIsoCode(?string $iso_code): self { $this->container['iso_code'] = $iso_code; @@ -232,7 +232,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 72c306a6..f6724fdc 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -406,7 +406,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -518,7 +518,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -540,7 +540,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index e320c874..117dba4b 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -278,7 +278,7 @@ public function getOriginCountry(): ?string * * @return $this */ - public function setOriginCountry(string $origin_country): self + public function setOriginCountry(?string $origin_country): self { $this->container['origin_country'] = $origin_country; diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index fe15564a..6009a49b 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -475,7 +475,7 @@ public function getClientReferrer(): ?string * * @return $this */ - public function setClientReferrer(string $client_referrer): self + public function setClientReferrer(?string $client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -497,7 +497,7 @@ public function getUserAgent(): ?string * * @return $this */ - public function setUserAgent(string $user_agent): self + public function setUserAgent(?string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -519,7 +519,7 @@ public function getBot(): ?BotdDetectionResult * * @return $this */ - public function setBot(BotdDetectionResult $bot): self + public function setBot(?BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -541,7 +541,7 @@ public function getIpInfo(): ?IpInfoResult * * @return $this */ - public function setIpInfo(IpInfoResult $ip_info): self + public function setIpInfo(?IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -585,7 +585,7 @@ public function getRootApps(): ?RootAppsResult * * @return $this */ - public function setRootApps(RootAppsResult $root_apps): self + public function setRootApps(?RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -607,7 +607,7 @@ public function getEmulator(): ?EmulatorResult * * @return $this */ - public function setEmulator(EmulatorResult $emulator): self + public function setEmulator(?EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -629,7 +629,7 @@ public function getClonedApp(): ?ClonedAppResult * * @return $this */ - public function setClonedApp(ClonedAppResult $cloned_app): self + public function setClonedApp(?ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -651,7 +651,7 @@ public function getFactoryReset(): ?FactoryResetResult * * @return $this */ - public function setFactoryReset(FactoryResetResult $factory_reset): self + public function setFactoryReset(?FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -673,7 +673,7 @@ public function getJailbroken(): ?JailbrokenResult * * @return $this */ - public function setJailbroken(JailbrokenResult $jailbroken): self + public function setJailbroken(?JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -695,7 +695,7 @@ public function getFrida(): ?FridaResult * * @return $this */ - public function setFrida(FridaResult $frida): self + public function setFrida(?FridaResult $frida): self { $this->container['frida'] = $frida; @@ -717,7 +717,7 @@ public function getIpBlocklist(): ?IpBlockListResult * * @return $this */ - public function setIpBlocklist(IpBlockListResult $ip_blocklist): self + public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -739,7 +739,7 @@ public function getTor(): ?TorResult * * @return $this */ - public function setTor(TorResult $tor): self + public function setTor(?TorResult $tor): self { $this->container['tor'] = $tor; @@ -761,7 +761,7 @@ public function getPrivacySettings(): ?PrivacySettingsResult * * @return $this */ - public function setPrivacySettings(PrivacySettingsResult $privacy_settings): self + public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -783,7 +783,7 @@ public function getVirtualMachine(): ?VirtualMachineResult * * @return $this */ - public function setVirtualMachine(VirtualMachineResult $virtual_machine): self + public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -805,7 +805,7 @@ public function getVpn(): ?VpnResult * * @return $this */ - public function setVpn(VpnResult $vpn): self + public function setVpn(?VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -827,7 +827,7 @@ public function getProxy(): ?ProxyResult * * @return $this */ - public function setProxy(ProxyResult $proxy): self + public function setProxy(?ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -849,7 +849,7 @@ public function getTampering(): ?TamperingResult * * @return $this */ - public function setTampering(TamperingResult $tampering): self + public function setTampering(?TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -871,7 +871,7 @@ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult * * @return $this */ - public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_attributes): self + public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -893,7 +893,7 @@ public function getHighActivity(): ?HighActivityResult * * @return $this */ - public function setHighActivity(HighActivityResult $high_activity): self + public function setHighActivity(?HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -915,7 +915,7 @@ public function getLocationSpoofing(): ?LocationSpoofingResult * * @return $this */ - public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): self + public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -937,7 +937,7 @@ public function getSuspectScore(): ?SuspectScoreResult * * @return $this */ - public function setSuspectScore(SuspectScoreResult $suspect_score): self + public function setSuspectScore(?SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1025,7 +1025,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1137,7 +1137,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1159,7 +1159,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/template/model_generic.mustache b/template/model_generic.mustache index c4dc68cc..321cf0bb 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -260,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}({{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self + public function {{setter}}({{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); From bdfb252eb7a2c72b875f74457a06f58e8cfe635e Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 13:29:34 +0300 Subject: [PATCH 051/118] refactor: use required annotation for php doc --- template/model_generic.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 321cf0bb..0b480bf6 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -246,7 +246,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets {{name}} - * @return {{datatype}} + * @return {{^required}}?{{/required}}{{datatype}} */ public function {{getter}}(): {{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { @@ -256,7 +256,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Sets {{name}} * - * @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} + * @param {{^required}}?{{/required}}{{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} * * @return $this */ From 123f0391f14eef98bfc9757025ca116d5aed3ade Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 20 Aug 2024 12:37:34 +0300 Subject: [PATCH 052/118] chore: add test cases for returning types of unsealed results --- src/Model/ASN.php | 4 +- src/Model/BotdDetectionResult.php | 4 +- src/Model/BotdResult.php | 4 +- src/Model/BrowserDetails.php | 4 +- src/Model/DataCenter.php | 4 +- src/Model/DeprecatedIPLocation.php | 36 +++++-- src/Model/DeprecatedIPLocationCity.php | 4 +- src/Model/ErrorEvent403Response.php | 4 +- src/Model/ErrorEvent404Response.php | 4 +- src/Model/EventResponse.php | 4 +- src/Model/HighActivityResult.php | 4 +- src/Model/IPLocation.php | 36 +++++-- src/Model/IPLocationCity.php | 4 +- src/Model/IpInfoResult.php | 8 +- src/Model/IpInfoResultV4.php | 8 +- src/Model/IpInfoResultV6.php | 8 +- src/Model/ProductsResponse.php | 84 ++++++++++++---- src/Model/ProductsResponseBotd.php | 8 +- src/Model/ProductsResponseIdentification.php | 8 +- .../ProductsResponseIdentificationData.php | 12 ++- src/Model/RawDeviceAttributesResult.php | 2 +- src/Model/Response.php | 8 +- src/Model/ResponseVisits.php | 12 ++- src/Model/SignalResponseClonedApp.php | 8 +- src/Model/SignalResponseEmulator.php | 8 +- src/Model/SignalResponseFactoryReset.php | 8 +- src/Model/SignalResponseFrida.php | 8 +- src/Model/SignalResponseHighActivity.php | 8 +- src/Model/SignalResponseIncognito.php | 8 +- src/Model/SignalResponseIpBlocklist.php | 8 +- src/Model/SignalResponseIpInfo.php | 8 +- src/Model/SignalResponseJailbroken.php | 8 +- src/Model/SignalResponseLocationSpoofing.php | 8 +- src/Model/SignalResponsePrivacySettings.php | 8 +- src/Model/SignalResponseProxy.php | 8 +- .../SignalResponseRawDeviceAttributes.php | 8 +- src/Model/SignalResponseRootApps.php | 8 +- src/Model/SignalResponseSuspectScore.php | 8 +- src/Model/SignalResponseTampering.php | 8 +- src/Model/SignalResponseTor.php | 8 +- src/Model/SignalResponseVirtualMachine.php | 8 +- src/Model/SignalResponseVpn.php | 8 +- src/Model/Subdivision.php | 8 +- src/Model/Visit.php | 12 ++- src/Model/VpnResult.php | 4 +- src/Model/WebhookVisit.php | 96 ++++++++++++++----- template/model_generic.mustache | 8 +- test/Sealed/SealedTest.php | 32 ++++++- 48 files changed, 440 insertions(+), 146 deletions(-) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 3cdd4601..6e544e45 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -256,6 +256,8 @@ public function setNetwork(string $network): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -265,7 +267,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 89ef69c4..27120931 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -260,6 +260,8 @@ public function setResult(string $result): self /** * Gets type. + * + * @return ?string */ public function getType(): ?string { @@ -269,7 +271,7 @@ public function getType(): ?string /** * Sets type. * - * @param string $type type + * @param ?string $type type * * @return $this */ diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 871ca617..178a37d2 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -360,6 +360,8 @@ public function setRequestId(string $request_id): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -369,7 +371,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id linked_id + * @param ?string $linked_id linked_id * * @return $this */ diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index ce20254f..d04d9bc8 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -411,6 +411,8 @@ public function setUserAgent(string $user_agent): self /** * Gets bot_probability. + * + * @return ?int */ public function getBotProbability(): ?int { @@ -420,7 +422,7 @@ public function getBotProbability(): ?int /** * Sets bot_probability. * - * @param int $bot_probability bot_probability + * @param ?int $bot_probability bot_probability * * @return $this */ diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index a817ca57..1b8c9294 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -225,6 +225,8 @@ public function setResult(bool $result): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -234,7 +236,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 78062c3e..9739584c 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -241,6 +241,8 @@ public function valid(): bool /** * Gets accuracy_radius. + * + * @return ?int */ public function getAccuracyRadius(): ?int { @@ -250,7 +252,7 @@ public function getAccuracyRadius(): ?int /** * Sets accuracy_radius. * - * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -263,6 +265,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self /** * Gets latitude. + * + * @return ?double */ public function getLatitude(): ?float { @@ -272,7 +276,7 @@ public function getLatitude(): ?float /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ @@ -285,6 +289,8 @@ public function setLatitude(?float $latitude): self /** * Gets longitude. + * + * @return ?double */ public function getLongitude(): ?float { @@ -294,7 +300,7 @@ public function getLongitude(): ?float /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ @@ -307,6 +313,8 @@ public function setLongitude(?float $longitude): self /** * Gets postal_code. + * + * @return ?string */ public function getPostalCode(): ?string { @@ -316,7 +324,7 @@ public function getPostalCode(): ?string /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ @@ -329,6 +337,8 @@ public function setPostalCode(?string $postal_code): self /** * Gets timezone. + * + * @return ?string */ public function getTimezone(): ?string { @@ -338,7 +348,7 @@ public function getTimezone(): ?string /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ @@ -351,6 +361,8 @@ public function setTimezone(?string $timezone): self /** * Gets city. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity */ public function getCity(): ?DeprecatedIPLocationCity { @@ -360,7 +372,7 @@ public function getCity(): ?DeprecatedIPLocationCity /** * Sets city. * - * @param DeprecatedIPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city * * @return $this */ @@ -373,6 +385,8 @@ public function setCity(?DeprecatedIPLocationCity $city): self /** * Gets country. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getCountry(): ?Location { @@ -382,7 +396,7 @@ public function getCountry(): ?Location /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ @@ -395,6 +409,8 @@ public function setCountry(?Location $country): self /** * Gets continent. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getContinent(): ?Location { @@ -404,7 +420,7 @@ public function getContinent(): ?Location /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ @@ -418,7 +434,7 @@ public function setContinent(?Location $continent): self /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array { @@ -428,7 +444,7 @@ public function getSubdivisions(): ?array /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 8374fd5a..fdffb4e1 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -200,7 +202,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index f4922f99..b8093804 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError */ public function getError(): ?ErrorEvent403ResponseError { @@ -200,7 +202,7 @@ public function getError(): ?ErrorEvent403ResponseError /** * Sets error. * - * @param ErrorEvent403ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error * * @return $this */ diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 247baa79..b03ce283 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError */ public function getError(): ?ErrorEvent404ResponseError { @@ -200,7 +202,7 @@ public function getError(): ?ErrorEvent404ResponseError /** * Sets error. * - * @param ErrorEvent404ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error * * @return $this */ diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index d167078e..ee5b3fbe 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -227,6 +227,8 @@ public function setProducts(ProductsResponse $products): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -236,7 +238,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 9c0a4201..20879925 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -225,6 +225,8 @@ public function setResult(bool $result): self /** * Gets daily_requests. + * + * @return ?float */ public function getDailyRequests(): ?float { @@ -234,7 +236,7 @@ public function getDailyRequests(): ?float /** * Sets daily_requests. * - * @param float $daily_requests number of requests from the same visitor in the previous day + * @param ?float $daily_requests number of requests from the same visitor in the previous day * * @return $this */ diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 617effab..6f769e05 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -239,6 +239,8 @@ public function valid(): bool /** * Gets accuracy_radius. + * + * @return ?int */ public function getAccuracyRadius(): ?int { @@ -248,7 +250,7 @@ public function getAccuracyRadius(): ?int /** * Sets accuracy_radius. * - * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -261,6 +263,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self /** * Gets latitude. + * + * @return ?double */ public function getLatitude(): ?float { @@ -270,7 +274,7 @@ public function getLatitude(): ?float /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ @@ -283,6 +287,8 @@ public function setLatitude(?float $latitude): self /** * Gets longitude. + * + * @return ?double */ public function getLongitude(): ?float { @@ -292,7 +298,7 @@ public function getLongitude(): ?float /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ @@ -305,6 +311,8 @@ public function setLongitude(?float $longitude): self /** * Gets postal_code. + * + * @return ?string */ public function getPostalCode(): ?string { @@ -314,7 +322,7 @@ public function getPostalCode(): ?string /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ @@ -327,6 +335,8 @@ public function setPostalCode(?string $postal_code): self /** * Gets timezone. + * + * @return ?string */ public function getTimezone(): ?string { @@ -336,7 +346,7 @@ public function getTimezone(): ?string /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ @@ -349,6 +359,8 @@ public function setTimezone(?string $timezone): self /** * Gets city. + * + * @return ?\Fingerprint\ServerAPI\Model\IPLocationCity */ public function getCity(): ?IPLocationCity { @@ -358,7 +370,7 @@ public function getCity(): ?IPLocationCity /** * Sets city. * - * @param IPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\IPLocationCity $city city * * @return $this */ @@ -371,6 +383,8 @@ public function setCity(?IPLocationCity $city): self /** * Gets country. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getCountry(): ?Location { @@ -380,7 +394,7 @@ public function getCountry(): ?Location /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ @@ -393,6 +407,8 @@ public function setCountry(?Location $country): self /** * Gets continent. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getContinent(): ?Location { @@ -402,7 +418,7 @@ public function getContinent(): ?Location /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ @@ -416,7 +432,7 @@ public function setContinent(?Location $continent): self /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array { @@ -426,7 +442,7 @@ public function getSubdivisions(): ?array /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 10899728..c0637bf3 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -200,7 +202,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 3eee0292..2a6a7d98 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -199,6 +199,8 @@ public function valid(): bool /** * Gets v4. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 */ public function getV4(): ?IpInfoResultV4 { @@ -208,7 +210,7 @@ public function getV4(): ?IpInfoResultV4 /** * Sets v4. * - * @param IpInfoResultV4 $v4 v4 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 * * @return $this */ @@ -221,6 +223,8 @@ public function setV4(?IpInfoResultV4 $v4): self /** * Gets v6. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 */ public function getV6(): ?IpInfoResultV6 { @@ -230,7 +234,7 @@ public function getV6(): ?IpInfoResultV6 /** * Sets v6. * - * @param IpInfoResultV6 $v6 v6 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 * * @return $this */ diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 4c32dff8..8a2f36d3 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. + * + * @return ?\Fingerprint\ServerAPI\Model\ASN */ public function getAsn(): ?ASN { @@ -271,7 +273,7 @@ public function getAsn(): ?ASN /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self /** * Gets datacenter. + * + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ public function getDatacenter(): ?DataCenter { @@ -293,7 +297,7 @@ public function getDatacenter(): ?DataCenter /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 808ec4be..0774ae9c 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. + * + * @return ?\Fingerprint\ServerAPI\Model\ASN */ public function getAsn(): ?ASN { @@ -271,7 +273,7 @@ public function getAsn(): ?ASN /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self /** * Gets datacenter. + * + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ public function getDatacenter(): ?DataCenter { @@ -293,7 +297,7 @@ public function getDatacenter(): ?DataCenter /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index d2526c91..dffaf631 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -313,6 +313,8 @@ public function valid(): bool /** * Gets identification. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification */ public function getIdentification(): ?ProductsResponseIdentification { @@ -322,7 +324,7 @@ public function getIdentification(): ?ProductsResponseIdentification /** * Sets identification. * - * @param ProductsResponseIdentification $identification identification + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification * * @return $this */ @@ -335,6 +337,8 @@ public function setIdentification(?ProductsResponseIdentification $identificatio /** * Gets botd. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd */ public function getBotd(): ?ProductsResponseBotd { @@ -344,7 +348,7 @@ public function getBotd(): ?ProductsResponseBotd /** * Sets botd. * - * @param ProductsResponseBotd $botd botd + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd * * @return $this */ @@ -357,6 +361,8 @@ public function setBotd(?ProductsResponseBotd $botd): self /** * Gets ip_info. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo */ public function getIpInfo(): ?SignalResponseIpInfo { @@ -366,7 +372,7 @@ public function getIpInfo(): ?SignalResponseIpInfo /** * Sets ip_info. * - * @param SignalResponseIpInfo $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info * * @return $this */ @@ -379,6 +385,8 @@ public function setIpInfo(?SignalResponseIpInfo $ip_info): self /** * Gets incognito. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito */ public function getIncognito(): ?SignalResponseIncognito { @@ -388,7 +396,7 @@ public function getIncognito(): ?SignalResponseIncognito /** * Sets incognito. * - * @param SignalResponseIncognito $incognito incognito + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito * * @return $this */ @@ -401,6 +409,8 @@ public function setIncognito(?SignalResponseIncognito $incognito): self /** * Gets root_apps. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps */ public function getRootApps(): ?SignalResponseRootApps { @@ -410,7 +420,7 @@ public function getRootApps(): ?SignalResponseRootApps /** * Sets root_apps. * - * @param SignalResponseRootApps $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps * * @return $this */ @@ -423,6 +433,8 @@ public function setRootApps(?SignalResponseRootApps $root_apps): self /** * Gets emulator. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator */ public function getEmulator(): ?SignalResponseEmulator { @@ -432,7 +444,7 @@ public function getEmulator(): ?SignalResponseEmulator /** * Sets emulator. * - * @param SignalResponseEmulator $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator * * @return $this */ @@ -445,6 +457,8 @@ public function setEmulator(?SignalResponseEmulator $emulator): self /** * Gets cloned_app. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp */ public function getClonedApp(): ?SignalResponseClonedApp { @@ -454,7 +468,7 @@ public function getClonedApp(): ?SignalResponseClonedApp /** * Sets cloned_app. * - * @param SignalResponseClonedApp $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ @@ -467,6 +481,8 @@ public function setClonedApp(?SignalResponseClonedApp $cloned_app): self /** * Gets factory_reset. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset */ public function getFactoryReset(): ?SignalResponseFactoryReset { @@ -476,7 +492,7 @@ public function getFactoryReset(): ?SignalResponseFactoryReset /** * Sets factory_reset. * - * @param SignalResponseFactoryReset $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ @@ -489,6 +505,8 @@ public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): sel /** * Gets jailbroken. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken */ public function getJailbroken(): ?SignalResponseJailbroken { @@ -498,7 +516,7 @@ public function getJailbroken(): ?SignalResponseJailbroken /** * Sets jailbroken. * - * @param SignalResponseJailbroken $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ @@ -511,6 +529,8 @@ public function setJailbroken(?SignalResponseJailbroken $jailbroken): self /** * Gets frida. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFrida */ public function getFrida(): ?SignalResponseFrida { @@ -520,7 +540,7 @@ public function getFrida(): ?SignalResponseFrida /** * Sets frida. * - * @param SignalResponseFrida $frida frida + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida * * @return $this */ @@ -533,6 +553,8 @@ public function setFrida(?SignalResponseFrida $frida): self /** * Gets ip_blocklist. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist */ public function getIpBlocklist(): ?SignalResponseIpBlocklist { @@ -542,7 +564,7 @@ public function getIpBlocklist(): ?SignalResponseIpBlocklist /** * Sets ip_blocklist. * - * @param SignalResponseIpBlocklist $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ @@ -555,6 +577,8 @@ public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self /** * Gets tor. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTor */ public function getTor(): ?SignalResponseTor { @@ -564,7 +588,7 @@ public function getTor(): ?SignalResponseTor /** * Sets tor. * - * @param SignalResponseTor $tor tor + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor * * @return $this */ @@ -577,6 +601,8 @@ public function setTor(?SignalResponseTor $tor): self /** * Gets privacy_settings. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings */ public function getPrivacySettings(): ?SignalResponsePrivacySettings { @@ -586,7 +612,7 @@ public function getPrivacySettings(): ?SignalResponsePrivacySettings /** * Sets privacy_settings. * - * @param SignalResponsePrivacySettings $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ @@ -599,6 +625,8 @@ public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_setti /** * Gets virtual_machine. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine */ public function getVirtualMachine(): ?SignalResponseVirtualMachine { @@ -608,7 +636,7 @@ public function getVirtualMachine(): ?SignalResponseVirtualMachine /** * Sets virtual_machine. * - * @param SignalResponseVirtualMachine $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ @@ -621,6 +649,8 @@ public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine /** * Gets vpn. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVpn */ public function getVpn(): ?SignalResponseVpn { @@ -630,7 +660,7 @@ public function getVpn(): ?SignalResponseVpn /** * Sets vpn. * - * @param SignalResponseVpn $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn * * @return $this */ @@ -643,6 +673,8 @@ public function setVpn(?SignalResponseVpn $vpn): self /** * Gets proxy. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseProxy */ public function getProxy(): ?SignalResponseProxy { @@ -652,7 +684,7 @@ public function getProxy(): ?SignalResponseProxy /** * Sets proxy. * - * @param SignalResponseProxy $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy * * @return $this */ @@ -665,6 +697,8 @@ public function setProxy(?SignalResponseProxy $proxy): self /** * Gets tampering. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTampering */ public function getTampering(): ?SignalResponseTampering { @@ -674,7 +708,7 @@ public function getTampering(): ?SignalResponseTampering /** * Sets tampering. * - * @param SignalResponseTampering $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering * * @return $this */ @@ -687,6 +721,8 @@ public function setTampering(?SignalResponseTampering $tampering): self /** * Gets high_activity. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity */ public function getHighActivity(): ?SignalResponseHighActivity { @@ -696,7 +732,7 @@ public function getHighActivity(): ?SignalResponseHighActivity /** * Sets high_activity. * - * @param SignalResponseHighActivity $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity * * @return $this */ @@ -709,6 +745,8 @@ public function setHighActivity(?SignalResponseHighActivity $high_activity): sel /** * Gets location_spoofing. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing */ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { @@ -718,7 +756,7 @@ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing /** * Sets location_spoofing. * - * @param SignalResponseLocationSpoofing $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ @@ -731,6 +769,8 @@ public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_sp /** * Gets suspect_score. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore */ public function getSuspectScore(): ?SignalResponseSuspectScore { @@ -740,7 +780,7 @@ public function getSuspectScore(): ?SignalResponseSuspectScore /** * Sets suspect_score. * - * @param SignalResponseSuspectScore $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ @@ -753,6 +793,8 @@ public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): sel /** * Gets raw_device_attributes. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes */ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { @@ -762,7 +804,7 @@ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes /** * Sets raw_device_attributes. * - * @param SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 05b6ab5a..7d8255c1 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\BotdResult */ public function getData(): ?BotdResult { @@ -206,7 +208,7 @@ public function getData(): ?BotdResult /** * Sets data. * - * @param BotdResult $data data + * @param ?\Fingerprint\ServerAPI\Model\BotdResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?BotdResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index d9d0022a..dfec88dc 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData */ public function getData(): ?ProductsResponseIdentificationData { @@ -206,7 +208,7 @@ public function getData(): ?ProductsResponseIdentificationData /** * Sets data. * - * @param ProductsResponseIdentificationData $data data + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ProductsResponseIdentificationData $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ public function getError(): ?IdentificationError { @@ -228,7 +232,7 @@ public function getError(): ?IdentificationError /** * Sets error. * - * @param IdentificationError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 5e6294d2..1bf397fc 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -402,6 +402,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -411,7 +413,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -514,6 +516,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -523,7 +527,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -536,6 +540,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -545,7 +551,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 233734d2..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return parent::listInvalidProperties(); + return []; } /** diff --git a/src/Model/Response.php b/src/Model/Response.php index b8e54550..2aa4f347 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -266,6 +266,8 @@ public function setVisits(array $visits): self /** * Gets last_timestamp. + * + * @return ?int */ public function getLastTimestamp(): ?int { @@ -275,7 +277,7 @@ public function getLastTimestamp(): ?int /** * Sets last_timestamp. * - * @param int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. + * @param ?int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. * * @return $this */ @@ -288,6 +290,8 @@ public function setLastTimestamp(?int $last_timestamp): self /** * Gets pagination_key. + * + * @return ?string */ public function getPaginationKey(): ?string { @@ -297,7 +301,7 @@ public function getPaginationKey(): ?string /** * Sets pagination_key. * - * @param string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. + * @param ?string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. * * @return $this */ diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 383134e5..e3b67f55 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -393,6 +393,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -402,7 +404,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -505,6 +507,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -514,7 +518,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -527,6 +531,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -536,7 +542,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 94b5e5c5..0edbcaf2 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ public function getData(): ?ClonedAppResult { @@ -206,7 +208,7 @@ public function getData(): ?ClonedAppResult /** * Sets data. * - * @param ClonedAppResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ClonedAppResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 7d276ca0..15d6b196 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ public function getData(): ?EmulatorResult { @@ -206,7 +208,7 @@ public function getData(): ?EmulatorResult /** * Sets data. * - * @param EmulatorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?EmulatorResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 4604cc6a..95f0737a 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ public function getData(): ?FactoryResetResult { @@ -206,7 +208,7 @@ public function getData(): ?FactoryResetResult /** * Sets data. * - * @param FactoryResetResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?FactoryResetResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 1ffb8297..86aba169 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ public function getData(): ?FridaResult { @@ -206,7 +208,7 @@ public function getData(): ?FridaResult /** * Sets data. * - * @param FridaResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?FridaResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 6bccfd1a..9a1e755a 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ public function getData(): ?HighActivityResult { @@ -206,7 +208,7 @@ public function getData(): ?HighActivityResult /** * Sets data. * - * @param HighActivityResult $data data + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?HighActivityResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index cf0e38dc..561c0eba 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IncognitoResult */ public function getData(): ?IncognitoResult { @@ -206,7 +208,7 @@ public function getData(): ?IncognitoResult /** * Sets data. * - * @param IncognitoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IncognitoResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IncognitoResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 34e14b10..00a37d29 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ public function getData(): ?IpBlockListResult { @@ -206,7 +208,7 @@ public function getData(): ?IpBlockListResult /** * Sets data. * - * @param IpBlockListResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IpBlockListResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 29ccda62..48e5fa40 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ public function getData(): ?IpInfoResult { @@ -206,7 +208,7 @@ public function getData(): ?IpInfoResult /** * Sets data. * - * @param IpInfoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IpInfoResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 80f630af..5d33f2fe 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ public function getData(): ?JailbrokenResult { @@ -206,7 +208,7 @@ public function getData(): ?JailbrokenResult /** * Sets data. * - * @param JailbrokenResult $data data + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?JailbrokenResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index ed6dfee7..aef5b071 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ public function getData(): ?LocationSpoofingResult { @@ -206,7 +208,7 @@ public function getData(): ?LocationSpoofingResult /** * Sets data. * - * @param LocationSpoofingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?LocationSpoofingResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index a5b03b89..a97c78aa 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ public function getData(): ?PrivacySettingsResult { @@ -206,7 +208,7 @@ public function getData(): ?PrivacySettingsResult /** * Sets data. * - * @param PrivacySettingsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?PrivacySettingsResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index a58f07e0..0f354989 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ public function getData(): ?ProxyResult { @@ -206,7 +208,7 @@ public function getData(): ?ProxyResult /** * Sets data. * - * @param ProxyResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ProxyResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 820bdac3..b079b123 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ public function getData(): array { @@ -206,7 +208,7 @@ public function getData(): array /** * Sets data. * - * @param RawDeviceAttributesResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?array $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 0a01e9f3..d5ed6c79 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ public function getData(): ?RootAppsResult { @@ -206,7 +208,7 @@ public function getData(): ?RootAppsResult /** * Sets data. * - * @param RootAppsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?RootAppsResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index e20baa97..3614acf0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ public function getData(): ?SuspectScoreResult { @@ -206,7 +208,7 @@ public function getData(): ?SuspectScoreResult /** * Sets data. * - * @param SuspectScoreResult $data data + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?SuspectScoreResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 2753a81e..4efe22d6 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ public function getData(): ?TamperingResult { @@ -206,7 +208,7 @@ public function getData(): ?TamperingResult /** * Sets data. * - * @param TamperingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?TamperingResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 619c632b..06ac9768 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ public function getData(): ?TorResult { @@ -206,7 +208,7 @@ public function getData(): ?TorResult /** * Sets data. * - * @param TorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TorResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?TorResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index f22f1aba..906eedd2 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ public function getData(): ?VirtualMachineResult { @@ -206,7 +208,7 @@ public function getData(): ?VirtualMachineResult /** * Sets data. * - * @param VirtualMachineResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?VirtualMachineResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 2f1a193f..b96d13c5 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ public function getData(): ?VpnResult { @@ -206,7 +208,7 @@ public function getData(): ?VpnResult /** * Sets data. * - * @param VpnResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?VpnResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index fb950e9c..0c2835d8 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets iso_code. + * + * @return ?string */ public function getIsoCode(): ?string { @@ -206,7 +208,7 @@ public function getIsoCode(): ?string /** * Sets iso_code. * - * @param string $iso_code iso_code + * @param ?string $iso_code iso_code * * @return $this */ @@ -219,6 +221,8 @@ public function setIsoCode(?string $iso_code): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -228,7 +232,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/Visit.php b/src/Model/Visit.php index f6724fdc..dc2e5461 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -393,6 +393,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -402,7 +404,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -505,6 +507,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -514,7 +518,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -527,6 +531,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -536,7 +542,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 117dba4b..2b5651e8 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -265,6 +265,8 @@ public function setOriginTimezone(string $origin_timezone): self /** * Gets origin_country. + * + * @return ?string */ public function getOriginCountry(): ?string { @@ -274,7 +276,7 @@ public function getOriginCountry(): ?string /** * Sets origin_country. * - * @param string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). + * @param ?string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * * @return $this */ diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 6009a49b..a71cabf8 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -462,6 +462,8 @@ public function setVisitorId(string $visitor_id): self /** * Gets client_referrer. + * + * @return ?string */ public function getClientReferrer(): ?string { @@ -471,7 +473,7 @@ public function getClientReferrer(): ?string /** * Sets client_referrer. * - * @param string $client_referrer client_referrer + * @param ?string $client_referrer client_referrer * * @return $this */ @@ -484,6 +486,8 @@ public function setClientReferrer(?string $client_referrer): self /** * Gets user_agent. + * + * @return ?string */ public function getUserAgent(): ?string { @@ -493,7 +497,7 @@ public function getUserAgent(): ?string /** * Sets user_agent. * - * @param string $user_agent user_agent + * @param ?string $user_agent user_agent * * @return $this */ @@ -506,6 +510,8 @@ public function setUserAgent(?string $user_agent): self /** * Gets bot. + * + * @return ?\Fingerprint\ServerAPI\Model\BotdDetectionResult */ public function getBot(): ?BotdDetectionResult { @@ -515,7 +521,7 @@ public function getBot(): ?BotdDetectionResult /** * Sets bot. * - * @param BotdDetectionResult $bot bot + * @param ?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ @@ -528,6 +534,8 @@ public function setBot(?BotdDetectionResult $bot): self /** * Gets ip_info. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ public function getIpInfo(): ?IpInfoResult { @@ -537,7 +545,7 @@ public function getIpInfo(): ?IpInfoResult /** * Sets ip_info. * - * @param IpInfoResult $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info * * @return $this */ @@ -572,6 +580,8 @@ public function setIncognito(bool $incognito): self /** * Gets root_apps. + * + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ public function getRootApps(): ?RootAppsResult { @@ -581,7 +591,7 @@ public function getRootApps(): ?RootAppsResult /** * Sets root_apps. * - * @param RootAppsResult $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps * * @return $this */ @@ -594,6 +604,8 @@ public function setRootApps(?RootAppsResult $root_apps): self /** * Gets emulator. + * + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ public function getEmulator(): ?EmulatorResult { @@ -603,7 +615,7 @@ public function getEmulator(): ?EmulatorResult /** * Sets emulator. * - * @param EmulatorResult $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator * * @return $this */ @@ -616,6 +628,8 @@ public function setEmulator(?EmulatorResult $emulator): self /** * Gets cloned_app. + * + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ public function getClonedApp(): ?ClonedAppResult { @@ -625,7 +639,7 @@ public function getClonedApp(): ?ClonedAppResult /** * Sets cloned_app. * - * @param ClonedAppResult $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app * * @return $this */ @@ -638,6 +652,8 @@ public function setClonedApp(?ClonedAppResult $cloned_app): self /** * Gets factory_reset. + * + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ public function getFactoryReset(): ?FactoryResetResult { @@ -647,7 +663,7 @@ public function getFactoryReset(): ?FactoryResetResult /** * Sets factory_reset. * - * @param FactoryResetResult $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset * * @return $this */ @@ -660,6 +676,8 @@ public function setFactoryReset(?FactoryResetResult $factory_reset): self /** * Gets jailbroken. + * + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ public function getJailbroken(): ?JailbrokenResult { @@ -669,7 +687,7 @@ public function getJailbroken(): ?JailbrokenResult /** * Sets jailbroken. * - * @param JailbrokenResult $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken * * @return $this */ @@ -682,6 +700,8 @@ public function setJailbroken(?JailbrokenResult $jailbroken): self /** * Gets frida. + * + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ public function getFrida(): ?FridaResult { @@ -691,7 +711,7 @@ public function getFrida(): ?FridaResult /** * Sets frida. * - * @param FridaResult $frida frida + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $frida frida * * @return $this */ @@ -704,6 +724,8 @@ public function setFrida(?FridaResult $frida): self /** * Gets ip_blocklist. + * + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ public function getIpBlocklist(): ?IpBlockListResult { @@ -713,7 +735,7 @@ public function getIpBlocklist(): ?IpBlockListResult /** * Sets ip_blocklist. * - * @param IpBlockListResult $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ @@ -726,6 +748,8 @@ public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self /** * Gets tor. + * + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ public function getTor(): ?TorResult { @@ -735,7 +759,7 @@ public function getTor(): ?TorResult /** * Sets tor. * - * @param TorResult $tor tor + * @param ?\Fingerprint\ServerAPI\Model\TorResult $tor tor * * @return $this */ @@ -748,6 +772,8 @@ public function setTor(?TorResult $tor): self /** * Gets privacy_settings. + * + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ public function getPrivacySettings(): ?PrivacySettingsResult { @@ -757,7 +783,7 @@ public function getPrivacySettings(): ?PrivacySettingsResult /** * Sets privacy_settings. * - * @param PrivacySettingsResult $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ @@ -770,6 +796,8 @@ public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): se /** * Gets virtual_machine. + * + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ public function getVirtualMachine(): ?VirtualMachineResult { @@ -779,7 +807,7 @@ public function getVirtualMachine(): ?VirtualMachineResult /** * Sets virtual_machine. * - * @param VirtualMachineResult $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ @@ -792,6 +820,8 @@ public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self /** * Gets vpn. + * + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ public function getVpn(): ?VpnResult { @@ -801,7 +831,7 @@ public function getVpn(): ?VpnResult /** * Sets vpn. * - * @param VpnResult $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $vpn vpn * * @return $this */ @@ -814,6 +844,8 @@ public function setVpn(?VpnResult $vpn): self /** * Gets proxy. + * + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ public function getProxy(): ?ProxyResult { @@ -823,7 +855,7 @@ public function getProxy(): ?ProxyResult /** * Sets proxy. * - * @param ProxyResult $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy * * @return $this */ @@ -836,6 +868,8 @@ public function setProxy(?ProxyResult $proxy): self /** * Gets tampering. + * + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ public function getTampering(): ?TamperingResult { @@ -845,7 +879,7 @@ public function getTampering(): ?TamperingResult /** * Sets tampering. * - * @param TamperingResult $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering * * @return $this */ @@ -858,6 +892,8 @@ public function setTampering(?TamperingResult $tampering): self /** * Gets raw_device_attributes. + * + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { @@ -867,7 +903,7 @@ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult /** * Sets raw_device_attributes. * - * @param RawDeviceAttributesResult $raw_device_attributes raw_device_attributes + * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ @@ -880,6 +916,8 @@ public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_at /** * Gets high_activity. + * + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ public function getHighActivity(): ?HighActivityResult { @@ -889,7 +927,7 @@ public function getHighActivity(): ?HighActivityResult /** * Sets high_activity. * - * @param HighActivityResult $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity * * @return $this */ @@ -902,6 +940,8 @@ public function setHighActivity(?HighActivityResult $high_activity): self /** * Gets location_spoofing. + * + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ public function getLocationSpoofing(): ?LocationSpoofingResult { @@ -911,7 +951,7 @@ public function getLocationSpoofing(): ?LocationSpoofingResult /** * Sets location_spoofing. * - * @param LocationSpoofingResult $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ @@ -924,6 +964,8 @@ public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): /** * Gets suspect_score. + * + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ public function getSuspectScore(): ?SuspectScoreResult { @@ -933,7 +975,7 @@ public function getSuspectScore(): ?SuspectScoreResult /** * Sets suspect_score. * - * @param SuspectScoreResult $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score * * @return $this */ @@ -1012,6 +1054,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -1021,7 +1065,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -1124,6 +1168,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -1133,7 +1179,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -1146,6 +1192,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -1155,7 +1203,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0b480bf6..a0786595 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parent}} + {{#parentSchema}} $invalidProperties = parent::listInvalidProperties(); - {{/parent}} - {{^parent}} + {{/parentSchema}} + {{^parentSchema}} $invalidProperties = []; - {{/parent}} + {{/parentSchema}} {{#vars}} {{#required}} diff --git a/test/Sealed/SealedTest.php b/test/Sealed/SealedTest.php index a110d84d..6c9dedb7 100644 --- a/test/Sealed/SealedTest.php +++ b/test/Sealed/SealedTest.php @@ -2,6 +2,11 @@ namespace Fingerprint\ServerAPI\Sealed; +use DateTime; +use Fingerprint\ServerAPI\Model\BotdDetectionResult; +use Fingerprint\ServerAPI\Model\BrowserDetails; +use Fingerprint\ServerAPI\Model\Confidence; +use Fingerprint\ServerAPI\Model\DeprecatedIPLocation; use Fingerprint\ServerAPI\Model\EventResponse; use Fingerprint\ServerAPI\ObjectSerializer; use GuzzleHttp\Psr7\Response; @@ -9,6 +14,9 @@ class SealedTest extends TestCase { + public const VALID_KEY = "p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq53="; + public const INVALID_KEY = "p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq54="; + public const SEALED_RESULT = "noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="; /** * @var string */ @@ -26,8 +34,8 @@ class SealedTest extends TestCase protected function setUp(): void { - $this->validKey = base64_decode("p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq53="); - $this->invalidKey = base64_decode("p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq54="); + $this->validKey = base64_decode(self::VALID_KEY); + $this->invalidKey = base64_decode(self::INVALID_KEY); $this->keys = [ new DecryptionKey($this->invalidKey, DecryptionAlgorithm::AES_256_GCM), @@ -37,7 +45,7 @@ protected function setUp(): void public function testUnsealEventResponse() { - $sealedResult = base64_decode("noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="); + $sealedResult = base64_decode(self::SEALED_RESULT); $response = new Response(200, [], "{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}"); @@ -144,4 +152,22 @@ public function testUnsealEventResponseWithInvalidNonce() $this->keys ); } + + public function testTypesAreDefinedCorrect() + { + $sealed = base64_decode(self::SEALED_RESULT); + $unsealed = Sealed::unsealEventResponse($sealed, $this->keys); + $ipLocation = $unsealed->getProducts()->getIdentification()->getData()->getIpLocation(); + $identificationTime = $unsealed->getProducts()->getIdentification()->getData()->getTime(); + $botTime = $unsealed->getProducts()->getBotd()->getData()->getTime(); + $browserDetails = $unsealed->getProducts()->getIdentification()->getData()->getBrowserDetails(); + $confidence = $unsealed->getProducts()->getIdentification()->getData()->getConfidence(); + $botResult = $unsealed->getProducts()->getBotd()->getData()->getBot(); + $this->assertEquals(DeprecatedIPLocation::class, get_class($ipLocation)); + $this->assertEquals(DateTime::class, get_class($identificationTime)); + $this->assertEquals(DateTime::class, get_class($botTime)); + $this->assertEquals(BrowserDetails::class, get_class($browserDetails)); + $this->assertEquals(Confidence::class, get_class($confidence)); + $this->assertEquals(BotdDetectionResult::class, get_class($botResult)); + } } From 9f489ef588141e4e701574a932aa0b6e2ba7cd12 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 21 Aug 2024 12:52:10 +0300 Subject: [PATCH 053/118] refactor: use parentschema instead of parent on model template --- src/Model/RawDeviceAttributesResult.php | 2 +- template/model_generic.mustache | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1e560cb3..233734d2 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + return parent::listInvalidProperties(); } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index a0786595..0b480bf6 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parentSchema}} + {{#parent}} $invalidProperties = parent::listInvalidProperties(); - {{/parentSchema}} - {{^parentSchema}} + {{/parent}} + {{^parent}} $invalidProperties = []; - {{/parentSchema}} + {{/parent}} {{#vars}} {{#required}} From c46f668727505f1d7eb9dbb3a9d61586f8a1f4a4 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 23 Aug 2024 11:25:41 +0300 Subject: [PATCH 054/118] chore: add test cases for new endpoints --- scripts/sync.sh | 31 ++- test/FingerprintApiTest.php | 201 +++++++++++++++- test/mocks/400_error_empty_visitor_id.json | 6 + .../mocks/400_error_incorrect_visitor_id.json | 6 + test/mocks/403_error_feature_not_enabled.json | 6 + test/mocks/403_error_token_not_found.json | 6 + test/mocks/403_error_token_required.json | 6 + test/mocks/403_error_wrong_region.json | 6 + test/mocks/404_error_visitor_not_found.json | 6 + test/mocks/429_error_too_many_requests.json | 6 + .../get_event_200_botd_failed_error.json | 68 ++++++ ...vent_200_botd_too_many_requests_error.json | 68 ++++++ ...event_200_identification_failed_error.json | 23 ++ ...dentification_too_many_requests_error.json | 23 ++ test/mocks/get_event_403_error.json | 6 + test/mocks/get_event_404_error.json | 6 + test/mocks/get_visits_200_limit_1.json | 62 +++++ test/mocks/get_visits_403_error.json | 3 + ...et_visits_429_too_many_requests_error.json | 3 + test/mocks/update_event_400_error.json | 6 + test/mocks/update_event_403_error.json | 6 + test/mocks/update_event_404_error.json | 6 + test/mocks/update_event_409_error.json | 6 + test/mocks/webhook.json | 222 ++++++++++++++++++ 24 files changed, 777 insertions(+), 11 deletions(-) create mode 100644 test/mocks/400_error_empty_visitor_id.json create mode 100644 test/mocks/400_error_incorrect_visitor_id.json create mode 100644 test/mocks/403_error_feature_not_enabled.json create mode 100644 test/mocks/403_error_token_not_found.json create mode 100644 test/mocks/403_error_token_required.json create mode 100644 test/mocks/403_error_wrong_region.json create mode 100644 test/mocks/404_error_visitor_not_found.json create mode 100644 test/mocks/429_error_too_many_requests.json create mode 100644 test/mocks/get_event_200_botd_failed_error.json create mode 100644 test/mocks/get_event_200_botd_too_many_requests_error.json create mode 100644 test/mocks/get_event_200_identification_failed_error.json create mode 100644 test/mocks/get_event_200_identification_too_many_requests_error.json create mode 100644 test/mocks/get_event_403_error.json create mode 100644 test/mocks/get_event_404_error.json create mode 100644 test/mocks/get_visits_200_limit_1.json create mode 100644 test/mocks/get_visits_403_error.json create mode 100644 test/mocks/get_visits_429_too_many_requests_error.json create mode 100644 test/mocks/update_event_400_error.json create mode 100644 test/mocks/update_event_403_error.json create mode 100644 test/mocks/update_event_404_error.json create mode 100644 test/mocks/update_event_409_error.json create mode 100644 test/mocks/webhook.json diff --git a/scripts/sync.sh b/scripts/sync.sh index 781ed46e..ae3378c4 100644 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -3,18 +3,45 @@ curl -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-compact.yaml examplesList=( + 'get_visits_200_limit_1.json' 'get_visits_200_limit_500.json' + 'get_visits_403_error.json' + 'get_visits_429_too_many_requests_error.json' + 'webhook.json' 'get_event_200.json' 'get_event_200_all_errors.json' 'get_event_200_extra_fields.json' + 'get_event_403_error.json' + 'get_event_404_error.json' + 'get_event_200_botd_failed_error.json' + 'get_event_200_botd_too_many_requests_error.json' + 'get_event_200_identification_failed_error.json' + 'get_event_200_identification_too_many_requests_error.json' + 'update_event_400_error.json' + 'update_event_403_error.json' + 'update_event_404_error.json' + 'update_event_409_error.json' +) + +sharedExamplesList=( + '400_error_empty_visitor_id.json' + '400_error_incorrect_visitor_id.json' + '403_error_feature_not_enabled.json' + '403_error_token_not_found.json' + '403_error_token_required.json' + '403_error_wrong_region.json' + '404_error_visitor_not_found.json' + '429_error_too_many_requests.json' ) for example in ${examplesList[*]}; do curl -o ./test/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" done -# PHP function names are case insensitive, so we can just ignore wrong DataCenter value from INTER-481 bug. -# this command looks between IpInfoResult and IpBlockListResult strings and deletes the line with "dataCenter:" and next one if found +for example in ${sharedExamplesList[*]}; do + curl -o ./test/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/shared/"$example" +done + sed -i '' '/IpInfoResult:/,/IpBlockListResult:/ { /dataCenter:/ { N; d; }; }' ./res/fingerprint-server-api.yaml ./scripts/generate.sh diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index e498b7d7..afcc60f9 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -5,6 +5,7 @@ use Exception; use Fingerprint\ServerAPI\Api\FingerprintApi; use Fingerprint\ServerAPI\Model\EventResponse; +use Fingerprint\ServerAPI\Model\EventUpdateRequest; use Fingerprint\ServerAPI\Model\IdentificationError; use Fingerprint\ServerAPI\Model\ProductError; use Fingerprint\ServerAPI\Model\Response; @@ -24,6 +25,15 @@ class FingerprintApiTest extends TestCase public const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; public const MOCK_VISITOR_ID = 'AcxioeQKffpXF8iGQK3P'; public const MOCK_VISITOR_REQUEST_ID = '1655373780901.HhjRFX'; + public const MOCK_VISITOR_ID_403_ERROR = 'VISITOR_ID_403_ERROR'; + public const MOCK_VISITOR_ID_429_ERROR = 'VISITOR_ID_429_ERROR'; + public const MOCK_EVENT_ID_403_ERROR = 'EVENT_ID_403_ERROR'; + public const MOCK_EVENT_ID_404_ERROR = 'EVENT_ID_404_ERROR'; + public const MOCK_VISITOR_ID_400_ERROR = 'VISITOR_ID_400_ERROR'; + public const MOCK_VISITOR_ID_404_ERROR = 'VISITOR_ID_404_ERROR'; + public const MOCK_EVENT_ID_409_ERROR = 'EVENT_ID_409_ERROR'; + public const MOCK_EVENT_ID = 'MOCK_EVENT_ID'; + public const MOCK_EVENT_ID_400_ERROR = 'EVENT_ID_400_ERROR'; protected function getMethod($method_name) { @@ -51,6 +61,8 @@ public function setUp(): void $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); + $this->fingerprint_api->method('deleteVisitorData')->will($this->returnCallback([$this, 'deleteVisitorDataWithHttpInfoMock'])); + $this->fingerprint_api->method('updateEvent')->will($this->returnCallback([$this, 'updateEventWithHttpInfoMock'])); } /** @@ -65,6 +77,7 @@ public function getEventWithHttpInfoMock($request_id): array $query = $event_request->getUri()->getQuery(); $this->assertStringContainsString("ii=" . urlencode("fingerprint-pro-server-php-sdk/" . $this->getVersion()), $query); $mock_name = ""; + $status = 200; switch ($request_id) { case self::MOCK_REQUEST_ID: $mock_name = 'get_event_200.json'; @@ -81,10 +94,22 @@ public function getEventWithHttpInfoMock($request_id): array case self::MOCK_REQUEST_ID_WITH_BROKEN: $mock_name = 'get_event_200_with_broken_format.json'; break; + case self::MOCK_EVENT_ID_403_ERROR: + $mock_name = 'get_event_403_error.json'; + $status = 403; + break; + case self::MOCK_EVENT_ID_404_ERROR: + $mock_name = 'get_event_404_error.json'; + $status = 404; + break; } $file = file_get_contents(__DIR__ . "/mocks/$mock_name"); - $response = new \GuzzleHttp\Psr7\Response(200, [], $file); + $response = new \GuzzleHttp\Psr7\Response($status, [], $file); + + if ($status !== 200) { + throw new ApiException("Error Processing Request", $status); + } try { $serialized = ObjectSerializer::deserialize($response, EventResponse::class); @@ -100,11 +125,19 @@ public function getEventWithHttpInfoMock($request_id): array */ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null): array { - $file = file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json'); + $mockFileMap = [ + self::MOCK_VISITOR_ID => ['file' => 'get_visits_200_limit_500.json', 'status' => 200], + self::MOCK_VISITOR_ID_403_ERROR => ['file' => 'get_visits_403_error.json', 'status' => 403], + self::MOCK_VISITOR_ID_429_ERROR => ['file' => 'get_visits_429_too_many_requests_error.json', 'status' => 429], + ]; + + $mock = $mockFileMap[$visitor_id]; + $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); $visits_mock_data = \GuzzleHttp\json_decode($file); + if ($request_id) { $visits_mock_data->visits = array_filter($visits_mock_data->visits, function ($item) use ($request_id) { - return $item->requestId = $request_id; + return isset($item->requestId) && $item->requestId === $request_id; }); } @@ -112,13 +145,62 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - $response = new \GuzzleHttp\Psr7\Response(200, [], json_encode($visits_mock_data)); - try { - $serialized = ObjectSerializer::deserialize($response, Response::class); - } catch (Exception $exception) { - throw new SerializationException($response, $exception); + $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], json_encode($visits_mock_data)); + + if ($mock['status'] !== 200) { + throw new ApiException("Error Processing Request", $mock['status']); } + $serialized = ObjectSerializer::deserialize($response, Response::class); + return [$serialized, $response]; + } + + public function deleteVisitorDataWithHttpInfoMock($visitor_id): array + { + $mockFileMap = [ + self::MOCK_VISITOR_ID_400_ERROR => ['file' => '400_error_empty_visitor_id.json', 'status' => 400], + self::MOCK_VISITOR_ID_403_ERROR => ['file' => '403_error_feature_not_enabled.json', 'status' => 403], + self::MOCK_VISITOR_ID_404_ERROR => ['file' => '404_error_visitor_not_found.json', 'status' => 404], + self::MOCK_VISITOR_ID_429_ERROR => ['file' => '429_error_too_many_requests.json', 'status' => 429], + self::MOCK_VISITOR_ID => ['file' => 'delete_visitor.json', 'status' => 200], + ]; + + $mock = $mockFileMap[$visitor_id]; + $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); + $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], $file); + + if ($mock['status'] !== 200) { + throw new ApiException("Error Processing Request", $mock['status']); + } + + $serialized = ObjectSerializer::deserialize($response, Response::class); + return [$serialized, $response]; + } + + /** + * Mock PUT /events/{event_id} endpoint + * + * @throws SerializationException + */ + public function updateEventWithHttpInfoMock($updateRequest, $event_id): array + { + $mockFileMap = [ + self::MOCK_EVENT_ID_400_ERROR => ['file' => 'update_event_400_error.json', 'status' => 400], + self::MOCK_EVENT_ID_403_ERROR => ['file' => 'update_event_403_error.json', 'status' => 403], + self::MOCK_EVENT_ID_404_ERROR => ['file' => 'update_event_404_error.json', 'status' => 404], + self::MOCK_EVENT_ID_409_ERROR => ['file' => 'update_event_409_error.json', 'status' => 409], + self::MOCK_EVENT_ID => ['file' => 'update_event.json', 'status' => 200], + ]; + + $mock = $mockFileMap[$event_id]; + $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); + $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], $file); + + if ($mock['status'] !== 200) { + throw new ApiException("Error Processing Request", $mock['status']); + } + + $serialized = ObjectSerializer::deserialize($response, Response::class); return [$serialized, $response]; } @@ -225,7 +307,7 @@ public function testGetVisitsByRequestId() { list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); foreach ($visits->getVisits() as $visit) { - $this->assertEquals(self::MOCK_VISITOR_REQUEST_ID, $visit->getRequestId()); + $this->assertEquals($visit->getRequestId(), self::MOCK_VISITOR_REQUEST_ID); } } @@ -280,4 +362,105 @@ public function testGetBrokenFormatEvent() $this->assertNotNull($responseBody); $this->assertEquals("format", $responseBody->products->identification->data->linkedId->broken); } + + public function testDeleteVisitorData() { + list($result, $response) = $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID); + $this->assertEquals(200, $response->getStatusCode()); + } + + public function testGetVisits403Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(403); + + $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_403_ERROR); + } + + public function testGetVisits429Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(429); + + $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_429_ERROR); + } + + public function testGetEvent403Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(403); + + $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_403_ERROR); + } + + public function testGetEvent404Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(404); + + $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_404_ERROR); + } + + public function testDeleteVisitorData400Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(400); + + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_400_ERROR); + } + + public function testDeleteVisitorData403Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(403); + + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_403_ERROR); + } + + public function testDeleteVisitorData404Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(404); + + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_404_ERROR); + } + + public function testDeleteVisitorData429Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(429); + + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_429_ERROR); + } + + public function testUpdateEvent400Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(400); + + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_400_ERROR); + } + + public function testUpdateEvent403Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(403); + + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_403_ERROR); + } + + public function testUpdateEvent404Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(404); + + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_404_ERROR); + } + + public function testUpdateEvent409Error() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(409); + + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_409_ERROR); + } } diff --git a/test/mocks/400_error_empty_visitor_id.json b/test/mocks/400_error_empty_visitor_id.json new file mode 100644 index 00000000..6c5801a0 --- /dev/null +++ b/test/mocks/400_error_empty_visitor_id.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "visitor id is required" + } +} diff --git a/test/mocks/400_error_incorrect_visitor_id.json b/test/mocks/400_error_incorrect_visitor_id.json new file mode 100644 index 00000000..c204c568 --- /dev/null +++ b/test/mocks/400_error_incorrect_visitor_id.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid visitor id" + } +} diff --git a/test/mocks/403_error_feature_not_enabled.json b/test/mocks/403_error_feature_not_enabled.json new file mode 100644 index 00000000..9820a568 --- /dev/null +++ b/test/mocks/403_error_feature_not_enabled.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "FeatureNotEnabled", + "message": "feature not enabled" + } +} diff --git a/test/mocks/403_error_token_not_found.json b/test/mocks/403_error_token_not_found.json new file mode 100644 index 00000000..3936b530 --- /dev/null +++ b/test/mocks/403_error_token_not_found.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenNotFound", + "message": "secret key is not found" + } +} diff --git a/test/mocks/403_error_token_required.json b/test/mocks/403_error_token_required.json new file mode 100644 index 00000000..544d8714 --- /dev/null +++ b/test/mocks/403_error_token_required.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenRequired", + "message": "secret key is required" + } +} diff --git a/test/mocks/403_error_wrong_region.json b/test/mocks/403_error_wrong_region.json new file mode 100644 index 00000000..8acc9e01 --- /dev/null +++ b/test/mocks/403_error_wrong_region.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "WrongRegion", + "message": "wrong region" + } +} diff --git a/test/mocks/404_error_visitor_not_found.json b/test/mocks/404_error_visitor_not_found.json new file mode 100644 index 00000000..11da4f3d --- /dev/null +++ b/test/mocks/404_error_visitor_not_found.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "VisitorNotFound", + "message": "visitor not found" + } +} diff --git a/test/mocks/429_error_too_many_requests.json b/test/mocks/429_error_too_many_requests.json new file mode 100644 index 00000000..e38639aa --- /dev/null +++ b/test/mocks/429_error_too_many_requests.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TooManyRequests", + "message": "too many requests" + } +} diff --git a/test/mocks/get_event_200_botd_failed_error.json b/test/mocks/get_event_200_botd_failed_error.json new file mode 100644 index 00000000..f142f7b3 --- /dev/null +++ b/test/mocks/get_event_200_botd_failed_error.json @@ -0,0 +1,68 @@ +{ + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "0KSh65EnVoB85JBmloQK", + "incognito": true, + "linkedId": "somelinkedId", + "time": "2019-05-21T16:40:13Z", + "tag": {}, + "timestamp": 1582299576512, + "url": "https://www.example.com/login", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": true, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": null + } + } + }, + "botd": { + "error": { + "code": "Failed", + "message": "internal server error" + } + } + } +} diff --git a/test/mocks/get_event_200_botd_too_many_requests_error.json b/test/mocks/get_event_200_botd_too_many_requests_error.json new file mode 100644 index 00000000..79288281 --- /dev/null +++ b/test/mocks/get_event_200_botd_too_many_requests_error.json @@ -0,0 +1,68 @@ +{ + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "0KSh65EnVoB85JBmloQK", + "incognito": true, + "linkedId": "somelinkedId", + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": true, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": null + } + } + }, + "botd": { + "error": { + "code": "TooManyRequests", + "message": "too many requests" + } + } + } +} diff --git a/test/mocks/get_event_200_identification_failed_error.json b/test/mocks/get_event_200_identification_failed_error.json new file mode 100644 index 00000000..5b42c579 --- /dev/null +++ b/test/mocks/get_event_200_identification_failed_error.json @@ -0,0 +1,23 @@ +{ + "products": { + "identification": { + "error": { + "code": "Failed", + "message": "failed" + } + }, + "botd": { + "data": { + "bot": { + "result": "bad", + "type": "headlessChrome" + }, + "url": "https://example.com/login", + "ip": "94.60.143.223", + "time": "2024-02-23T10:20:25.287Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/121.0.6167.57 Safari/537.36", + "requestId": "1708683625245.tuJ4nD" + } + } + } +} diff --git a/test/mocks/get_event_200_identification_too_many_requests_error.json b/test/mocks/get_event_200_identification_too_many_requests_error.json new file mode 100644 index 00000000..deacdcad --- /dev/null +++ b/test/mocks/get_event_200_identification_too_many_requests_error.json @@ -0,0 +1,23 @@ +{ + "products": { + "identification": { + "error": { + "code": "429 Too Many Requests", + "message": "too many requests" + } + }, + "botd": { + "data": { + "bot": { + "result": "bad", + "type": "headlessChrome" + }, + "url": "https://example.com/login", + "ip": "94.60.143.223", + "time": "2024-02-23T10:20:25.287Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/121.0.6167.57 Safari/537.36", + "requestId": "1708683625245.tuJ4nD" + } + } + } +} diff --git a/test/mocks/get_event_403_error.json b/test/mocks/get_event_403_error.json new file mode 100644 index 00000000..544d8714 --- /dev/null +++ b/test/mocks/get_event_403_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenRequired", + "message": "secret key is required" + } +} diff --git a/test/mocks/get_event_404_error.json b/test/mocks/get_event_404_error.json new file mode 100644 index 00000000..389b351c --- /dev/null +++ b/test/mocks/get_event_404_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestNotFound", + "message": "request id is not found" + } +} diff --git a/test/mocks/get_visits_200_limit_1.json b/test/mocks/get_visits_200_limit_1.json new file mode 100644 index 00000000..c5bbeedf --- /dev/null +++ b/test/mocks/get_visits_200_limit_1.json @@ -0,0 +1,62 @@ +{ + "visitorId": "AcxioeQKffpXF8iGQK3P", + "visits": [ + { + "requestId": "1655373953086.DDlfmP", + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "102", + "browserFullVersion": "102.0.5005", + "os": "Mac OS X", + "osVersion": "10.15.7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36", + "botProbability": 0 + }, + "incognito": false, + "ip": "82.118.30.68", + "ipLocation": { + "accuracyRadius": 1000, + "latitude": 50.0805, + "longitude": 14.467, + "postalCode": "130 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "timestamp": 1655373953094, + "time": "2022-06-16T10:05:53Z", + "url": "https://dashboard.fingerprint.com/", + "tag": {}, + "confidence": { + "score": 1 + }, + "visitorFound": true, + "firstSeenAt": { + "global": "2022-02-04T11:31:20Z", + "subscription": "2022-02-04T11:31:20Z" + }, + "lastSeenAt": { + "global": "2022-06-16T10:03:00.912Z", + "subscription": "2022-06-16T10:03:00.912Z" + } + } + ], + "lastTimestamp": 1655373953086, + "paginationKey": "1655373953086.DDlfmP" +} diff --git a/test/mocks/get_visits_403_error.json b/test/mocks/get_visits_403_error.json new file mode 100644 index 00000000..8a886d18 --- /dev/null +++ b/test/mocks/get_visits_403_error.json @@ -0,0 +1,3 @@ +{ + "error": "Forbidden (HTTP 403)" +} diff --git a/test/mocks/get_visits_429_too_many_requests_error.json b/test/mocks/get_visits_429_too_many_requests_error.json new file mode 100644 index 00000000..00d00f2e --- /dev/null +++ b/test/mocks/get_visits_429_too_many_requests_error.json @@ -0,0 +1,3 @@ +{ + "error": "too many requests" +} diff --git a/test/mocks/update_event_400_error.json b/test/mocks/update_event_400_error.json new file mode 100644 index 00000000..78568329 --- /dev/null +++ b/test/mocks/update_event_400_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code":"RequestCannotBeParsed", + "message":"request body is not valid" + } +} diff --git a/test/mocks/update_event_403_error.json b/test/mocks/update_event_403_error.json new file mode 100644 index 00000000..544d8714 --- /dev/null +++ b/test/mocks/update_event_403_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenRequired", + "message": "secret key is required" + } +} diff --git a/test/mocks/update_event_404_error.json b/test/mocks/update_event_404_error.json new file mode 100644 index 00000000..389b351c --- /dev/null +++ b/test/mocks/update_event_404_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestNotFound", + "message": "request id is not found" + } +} diff --git a/test/mocks/update_event_409_error.json b/test/mocks/update_event_409_error.json new file mode 100644 index 00000000..16ad29ae --- /dev/null +++ b/test/mocks/update_event_409_error.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "StateNotReady", + "message": "resource is not mutable yet, try again" + } +} diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json new file mode 100644 index 00000000..15332a06 --- /dev/null +++ b/test/mocks/webhook.json @@ -0,0 +1,222 @@ +{ + "requestId": "Px6VxbRC6WBkA39yeNH3", + "tag": { + "requestType": "signup", + "yourCustomId": 45321 + }, + "linkedId": "any-string", + "visitorId": "3HNey93AkBW6CRbxV6xP", + "visitorFound": true, + "timestamp": 1554910997788, + "time": "2019-10-12T07:20:50.52Z", + "incognito": false, + "url": "https://banking.example.com/signup", + "clientReferrer": "https://google.com?search=banking+services", + "ip": "216.3.128.12", + "ipLocation": { + "accuracyRadius": 1, + "city": { + "name": "Bolingbrook" + }, + "continent": { + "code": "NA", + "name": "North America" + }, + "country": { + "code": "US", + "name": "United States" + }, + "latitude": 41.12933, + "longitude": -88.9954, + "postalCode": "60547", + "subdivisions": [ + { + "isoCode": "IL", + "name": "Illinois" + } + ], + "timezone": "America/Chicago" + }, + "browserDetails": { + "browserName": "Chrome", + "browserFullVersion": "73.0.3683.86", + "browserMajorVersion": "73", + "os": "Mac OS X", + "osVersion": "10.14.3", + "device": "Other", + "userAgent": "(Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86" + }, + "confidence": { + "score": 0.97 + }, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": "2022-03-16T11:28:34.023Z", + "subscription": null + }, + "bot": { + "result": "bad", + "type": "selenium" + }, + "userAgent": "(Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86", + "ipInfo": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + } + }, + "rootApps": { + "result": false + }, + "emulator": { + "result": false + }, + "ipBlocklist": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + }, + "tor": { + "result": false + }, + "vpn": { + "result": false, + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false, + "osMismatch": false + } + }, + "proxy": { + "result": false + }, + "tampering": { + "result": false, + "anomalyScore": 0 + }, + "clonedApp": { + "result": false + }, + "factoryReset": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + }, + "jailbroken": { + "result": false + }, + "frida": { + "result": false + }, + "privacySettings": { + "result": false + }, + "virtualMachine": { + "result": false + }, + "rawDeviceAttributes": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "srgb" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + } + }, + "highActivity": { + "result": false + }, + "locationSpoofing": { + "result": true + }, + "suspectScore": { + "result": 0 + }, + "remoteControl": { + "result": false + }, + "velocity": { + "distinctIp": { + "intervals": { + "5m": 1, + "1h": 1, + "24h": 1 + } + }, + "distinctLinkedId": {}, + "distinctCountry": { + "intervals": { + "5m": 1, + "1h": 2, + "24h": 2 + } + }, + "events": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + } + }, + "developerTools": { + "result": false + } +} From e2c1479c9f747436a06f772ee3b59c03deee91db Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 27 Aug 2024 02:13:15 +0300 Subject: [PATCH 055/118] docs(readme): add usage for new endpoints --- README.md | 40 +++++++++++++++++++++++++++++++++------- template/README.mustache | 40 +++++++++++++++++++++++++++++++++------- 2 files changed, 66 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 197331ae..0b30def6 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ const PAGINATION_KEY = "1683900801733.Ogvu1j"; // Import Fingerprint Pro Classes and Guzzle Http Client use Fingerprint\ServerAPI\Api\FingerprintApi; use Fingerprint\ServerAPI\Configuration; +use Fingerprint\ServerAPI\Model\EventUpdateRequest; use GuzzleHttp\Client; // Create a new Configuration instance with your Fingerprint Pro Server API Key and your Fingerprint Pro Server API Region. @@ -104,7 +105,7 @@ $client = new FingerprintApi( // Get an event with a given requestId try { // Fetch the event with a given requestId - $response = $client->getEvent(FPJS_REQUEST_ID); + list($model, $response) = $client->getEvent(FPJS_REQUEST_ID); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; @@ -113,31 +114,56 @@ try { // Get a specific visitor's all visits try { // Fetch all visits with a given visitorId, with a page limit - $response = $client->getVisits(FPJS_VISITOR_ID, null, null, LIMIT); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, null, LIMIT); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } // Get a specific visitor's all visits with a linkedId try { // Fetch all visits with a given visitorId, with a page limit, skipping the first visit - $response = $client->getVisits(FPJS_VISITOR_ID, null, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } // Use all the parameters on getVisits try { // Fetch the visitor's all visits with a given requestId and linkedId with a page limit while skipping the first visit - $response = $client->getVisits(FPJS_VISITOR_ID, FPJS_REQUEST_ID, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, FPJS_REQUEST_ID, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; +} + +// Update Event +try { + $body = new EventUpdateRequest([ + 'linked_id' => 'new linked id', + 'tag' => json_encode(['new_property' => 'new value']), + 'suspect' => true, + ]); + list($model, $response) = $client->updateEvent($body, FPJS_REQUEST_ID); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->updateEvent: ', $e->getMessage(), PHP_EOL; +} + +// Delete by visitor ID +try { + list($model, $response) = $client->deleteVisitorData(FPJS_VISITOR_ID); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->deleteVisitorData: ', $e->getMessage(), PHP_EOL; } ``` +> ⚠️ Warning It's not possible to update events older than 10 days. + +> ⚠️ If you are interested in using `deleteVisitorData` API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. + ## Sealed results This SDK provides utility methods for decoding [sealed results](https://dev.fingerprint.com/docs/sealed-client-results). diff --git a/template/README.mustache b/template/README.mustache index 3154a0e0..f4aeade8 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -94,6 +94,7 @@ const PAGINATION_KEY = "1683900801733.Ogvu1j"; // Import Fingerprint Pro Classes and Guzzle Http Client use Fingerprint\ServerAPI\Api\FingerprintApi; use Fingerprint\ServerAPI\Configuration; +use Fingerprint\ServerAPI\Model\EventUpdateRequest; use GuzzleHttp\Client; // Create a new Configuration instance with your Fingerprint Pro Server API Key and your Fingerprint Pro Server API Region. @@ -114,7 +115,7 @@ $client = new FingerprintApi( // Get an event with a given requestId try { // Fetch the event with a given requestId - $response = $client->getEvent(FPJS_REQUEST_ID); + list($model, $response) = $client->getEvent(FPJS_REQUEST_ID); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; @@ -123,31 +124,56 @@ try { // Get a specific visitor's all visits try { // Fetch all visits with a given visitorId, with a page limit - $response = $client->getVisits(FPJS_VISITOR_ID, null, null, LIMIT); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, null, LIMIT); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } // Get a specific visitor's all visits with a linkedId try { // Fetch all visits with a given visitorId, with a page limit, skipping the first visit - $response = $client->getVisits(FPJS_VISITOR_ID, null, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } // Use all the parameters on getVisits try { // Fetch the visitor's all visits with a given requestId and linkedId with a page limit while skipping the first visit - $response = $client->getVisits(FPJS_VISITOR_ID, FPJS_REQUEST_ID, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); + list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, FPJS_REQUEST_ID, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY); echo "
" . $response->__toString() . "
"; } catch (Exception $e) { - echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; +} + +// Update Event +try { + $body = new EventUpdateRequest([ + 'linked_id' => 'new linked id', + 'tag' => json_encode(['new_property' => 'new value']), + 'suspect' => true, + ]); + list($model, $response) = $client->updateEvent($body, FPJS_REQUEST_ID); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->updateEvent: ', $e->getMessage(), PHP_EOL; +} + +// Delete by visitor ID +try { + list($model, $response) = $client->deleteVisitorData(FPJS_VISITOR_ID); + echo "
" . $response->__toString() . "
"; +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->deleteVisitorData: ', $e->getMessage(), PHP_EOL; } ``` +> ⚠️ Warning It's not possible to update events older than 10 days. + +> ⚠️ If you are interested in using `deleteVisitorData` API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. + ## Sealed results This SDK provides utility methods for decoding [sealed results](https://dev.fingerprint.com/docs/sealed-client-results). From 5bf9368fb1bb5abbfa72366fe6c66fe32352ad54 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 27 Aug 2024 02:30:48 +0300 Subject: [PATCH 056/118] feat: add `remoteControl`, `velocity` and `developerTools` signals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: Renamed Error Response Model Names `ErrorEvent403ResponseError` → `Common403ErrorResponse` `ManyRequestsResponse` → `TooManyRequestsResponse` BREAKING CHANGE: Webhook `tag` field is now optional --- README.md | 29 +- docs/Api/FingerprintApi.md | 20 +- ...onseError.md => Common403ErrorResponse.md} | 4 +- docs/Model/Confidence.md | 1 + docs/Model/DeveloperToolsResult.md | 9 + ...3Response.md => ErrorCommon403Response.md} | 4 +- docs/Model/ErrorCommon429Response.md | 9 + docs/Model/ErrorCommon429ResponseError.md | 10 + docs/Model/ErrorEvent404ResponseError.md | 2 +- docs/Model/ErrorUpdateEvent400Response.md | 9 + .../Model/ErrorUpdateEvent400ResponseError.md | 10 + docs/Model/ErrorUpdateEvent409Response.md | 9 + .../Model/ErrorUpdateEvent409ResponseError.md | 10 + docs/Model/ErrorVisitor400Response.md | 9 + docs/Model/ErrorVisitor400ResponseError.md | 10 + docs/Model/ErrorVisitor404Response.md | 9 + docs/Model/ErrorVisitor404ResponseError.md | 10 + docs/Model/EventUpdateRequest.md | 11 + docs/Model/FactoryResetResult.md | 4 +- docs/Model/ProductsResponse.md | 3 + docs/Model/RemoteControlResult.md | 9 + docs/Model/SignalResponseDeveloperTools.md | 10 + docs/Model/SignalResponseIncognito.md | 2 +- .../SignalResponseRawDeviceAttributes.md | 2 +- docs/Model/SignalResponseRemoteControl.md | 10 + docs/Model/SignalResponseTampering.md | 2 +- docs/Model/SignalResponseVelocity.md | 10 + ...Response.md => TooManyRequestsResponse.md} | 2 +- docs/Model/VelocityIntervalResult.md | 13 + docs/Model/VelocityIntervals.md | 9 + docs/Model/VelocityResult.md | 14 + docs/Model/Visit.md | 2 +- docs/Model/VpnResultMethods.md | 3 +- docs/Model/WebhookVisit.md | 5 +- res/fingerprint-server-api.yaml | 371 ++++++++++++++++-- scripts/sync.sh | 0 src/Api/FingerprintApi.php | 24 +- ...seError.php => Common403ErrorResponse.php} | 14 +- src/Model/Confidence.php | 40 +- src/Model/DeveloperToolsResult.php | 264 +++++++++++++ ...esponse.php => ErrorCommon403Response.php} | 18 +- src/Model/ErrorCommon429Response.php | 260 ++++++++++++ src/Model/ErrorCommon429ResponseError.php | 325 +++++++++++++++ src/Model/ErrorEvent404ResponseError.php | 2 +- src/Model/ErrorUpdateEvent400Response.php | 260 ++++++++++++ .../ErrorUpdateEvent400ResponseError.php | 327 +++++++++++++++ src/Model/ErrorUpdateEvent409Response.php | 260 ++++++++++++ .../ErrorUpdateEvent409ResponseError.php | 325 +++++++++++++++ src/Model/ErrorVisitor400Response.php | 260 ++++++++++++ src/Model/ErrorVisitor400ResponseError.php | 325 +++++++++++++++ src/Model/ErrorVisitor404Response.php | 260 ++++++++++++ src/Model/ErrorVisitor404ResponseError.php | 325 +++++++++++++++ src/Model/EventUpdateRequest.php | 320 +++++++++++++++ src/Model/FactoryResetResult.php | 4 +- src/Model/ProductsResponse.php | 100 ++++- src/Model/RemoteControlResult.php | 264 +++++++++++++ src/Model/SignalResponseDeveloperTools.php | 290 ++++++++++++++ src/Model/SignalResponseIncognito.php | 10 +- .../SignalResponseRawDeviceAttributes.php | 10 +- src/Model/SignalResponseRemoteControl.php | 290 ++++++++++++++ src/Model/SignalResponseTampering.php | 10 +- src/Model/SignalResponseVelocity.php | 290 ++++++++++++++ ...sponse.php => TooManyRequestsResponse.php} | 8 +- src/Model/VelocityIntervalResult.php | 327 +++++++++++++++ src/Model/VelocityIntervals.php | 260 ++++++++++++ src/Model/VelocityResult.php | 359 +++++++++++++++++ src/Model/Visit.php | 11 +- src/Model/VpnResultMethods.php | 43 +- src/Model/WebhookVisit.php | 101 ++++- test/mocks/get_event_200.json | 46 ++- test/mocks/get_event_200_all_errors.json | 18 + test/mocks/get_event_200_extra_fields.json | 6 +- 72 files changed, 6549 insertions(+), 153 deletions(-) rename docs/Model/{ErrorEvent403ResponseError.md => Common403ErrorResponse.md} (50%) create mode 100644 docs/Model/DeveloperToolsResult.md rename docs/Model/{ErrorEvent403Response.md => ErrorCommon403Response.md} (65%) create mode 100644 docs/Model/ErrorCommon429Response.md create mode 100644 docs/Model/ErrorCommon429ResponseError.md create mode 100644 docs/Model/ErrorUpdateEvent400Response.md create mode 100644 docs/Model/ErrorUpdateEvent400ResponseError.md create mode 100644 docs/Model/ErrorUpdateEvent409Response.md create mode 100644 docs/Model/ErrorUpdateEvent409ResponseError.md create mode 100644 docs/Model/ErrorVisitor400Response.md create mode 100644 docs/Model/ErrorVisitor400ResponseError.md create mode 100644 docs/Model/ErrorVisitor404Response.md create mode 100644 docs/Model/ErrorVisitor404ResponseError.md create mode 100644 docs/Model/EventUpdateRequest.md create mode 100644 docs/Model/RemoteControlResult.md create mode 100644 docs/Model/SignalResponseDeveloperTools.md create mode 100644 docs/Model/SignalResponseRemoteControl.md create mode 100644 docs/Model/SignalResponseVelocity.md rename docs/Model/{ManyRequestsResponse.md => TooManyRequestsResponse.md} (92%) create mode 100644 docs/Model/VelocityIntervalResult.md create mode 100644 docs/Model/VelocityIntervals.md create mode 100644 docs/Model/VelocityResult.md mode change 100644 => 100755 scripts/sync.sh rename src/Model/{ErrorEvent403ResponseError.php => Common403ErrorResponse.php} (91%) create mode 100644 src/Model/DeveloperToolsResult.php rename src/Model/{ErrorEvent403Response.php => ErrorCommon403Response.php} (90%) create mode 100644 src/Model/ErrorCommon429Response.php create mode 100644 src/Model/ErrorCommon429ResponseError.php create mode 100644 src/Model/ErrorUpdateEvent400Response.php create mode 100644 src/Model/ErrorUpdateEvent400ResponseError.php create mode 100644 src/Model/ErrorUpdateEvent409Response.php create mode 100644 src/Model/ErrorUpdateEvent409ResponseError.php create mode 100644 src/Model/ErrorVisitor400Response.php create mode 100644 src/Model/ErrorVisitor400ResponseError.php create mode 100644 src/Model/ErrorVisitor404Response.php create mode 100644 src/Model/ErrorVisitor404ResponseError.php create mode 100644 src/Model/EventUpdateRequest.php create mode 100644 src/Model/RemoteControlResult.php create mode 100644 src/Model/SignalResponseDeveloperTools.php create mode 100644 src/Model/SignalResponseRemoteControl.php create mode 100644 src/Model/SignalResponseVelocity.php rename src/Model/{ManyRequestsResponse.php => TooManyRequestsResponse.php} (96%) create mode 100644 src/Model/VelocityIntervalResult.php create mode 100644 src/Model/VelocityIntervals.php create mode 100644 src/Model/VelocityResult.php diff --git a/README.md b/README.md index 0b30def6..a9f00b37 100644 --- a/README.md +++ b/README.md @@ -233,8 +233,8 @@ if(!$isValidWebhookSign) { Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by requestId -*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId +*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by request ID +*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID ## Documentation for Models @@ -243,17 +243,29 @@ Class | Method | HTTP request | Description - [BotdResult](docs/Model/BotdResult.md) - [BrowserDetails](docs/Model/BrowserDetails.md) - [ClonedAppResult](docs/Model/ClonedAppResult.md) + - [Common403ErrorResponse](docs/Model/Common403ErrorResponse.md) - [Confidence](docs/Model/Confidence.md) - [DataCenter](docs/Model/DataCenter.md) - [DeprecatedIPLocation](docs/Model/DeprecatedIPLocation.md) - [DeprecatedIPLocationCity](docs/Model/DeprecatedIPLocationCity.md) + - [DeveloperToolsResult](docs/Model/DeveloperToolsResult.md) - [EmulatorResult](docs/Model/EmulatorResult.md) - - [ErrorEvent403Response](docs/Model/ErrorEvent403Response.md) - - [ErrorEvent403ResponseError](docs/Model/ErrorEvent403ResponseError.md) + - [ErrorCommon403Response](docs/Model/ErrorCommon403Response.md) + - [ErrorCommon429Response](docs/Model/ErrorCommon429Response.md) + - [ErrorCommon429ResponseError](docs/Model/ErrorCommon429ResponseError.md) - [ErrorEvent404Response](docs/Model/ErrorEvent404Response.md) - [ErrorEvent404ResponseError](docs/Model/ErrorEvent404ResponseError.md) + - [ErrorUpdateEvent400Response](docs/Model/ErrorUpdateEvent400Response.md) + - [ErrorUpdateEvent400ResponseError](docs/Model/ErrorUpdateEvent400ResponseError.md) + - [ErrorUpdateEvent409Response](docs/Model/ErrorUpdateEvent409Response.md) + - [ErrorUpdateEvent409ResponseError](docs/Model/ErrorUpdateEvent409ResponseError.md) + - [ErrorVisitor400Response](docs/Model/ErrorVisitor400Response.md) + - [ErrorVisitor400ResponseError](docs/Model/ErrorVisitor400ResponseError.md) + - [ErrorVisitor404Response](docs/Model/ErrorVisitor404Response.md) + - [ErrorVisitor404ResponseError](docs/Model/ErrorVisitor404ResponseError.md) - [ErrorVisits403](docs/Model/ErrorVisits403.md) - [EventResponse](docs/Model/EventResponse.md) + - [EventUpdateRequest](docs/Model/EventUpdateRequest.md) - [FactoryResetResult](docs/Model/FactoryResetResult.md) - [FridaResult](docs/Model/FridaResult.md) - [HighActivityResult](docs/Model/HighActivityResult.md) @@ -269,7 +281,6 @@ Class | Method | HTTP request | Description - [JailbrokenResult](docs/Model/JailbrokenResult.md) - [Location](docs/Model/Location.md) - [LocationSpoofingResult](docs/Model/LocationSpoofingResult.md) - - [ManyRequestsResponse](docs/Model/ManyRequestsResponse.md) - [PrivacySettingsResult](docs/Model/PrivacySettingsResult.md) - [ProductError](docs/Model/ProductError.md) - [ProductsResponse](docs/Model/ProductsResponse.md) @@ -278,11 +289,13 @@ Class | Method | HTTP request | Description - [ProductsResponseIdentificationData](docs/Model/ProductsResponseIdentificationData.md) - [ProxyResult](docs/Model/ProxyResult.md) - [RawDeviceAttributesResult](docs/Model/RawDeviceAttributesResult.md) + - [RemoteControlResult](docs/Model/RemoteControlResult.md) - [Response](docs/Model/Response.md) - [ResponseVisits](docs/Model/ResponseVisits.md) - [RootAppsResult](docs/Model/RootAppsResult.md) - [SeenAt](docs/Model/SeenAt.md) - [SignalResponseClonedApp](docs/Model/SignalResponseClonedApp.md) + - [SignalResponseDeveloperTools](docs/Model/SignalResponseDeveloperTools.md) - [SignalResponseEmulator](docs/Model/SignalResponseEmulator.md) - [SignalResponseFactoryReset](docs/Model/SignalResponseFactoryReset.md) - [SignalResponseFrida](docs/Model/SignalResponseFrida.md) @@ -295,16 +308,22 @@ Class | Method | HTTP request | Description - [SignalResponsePrivacySettings](docs/Model/SignalResponsePrivacySettings.md) - [SignalResponseProxy](docs/Model/SignalResponseProxy.md) - [SignalResponseRawDeviceAttributes](docs/Model/SignalResponseRawDeviceAttributes.md) + - [SignalResponseRemoteControl](docs/Model/SignalResponseRemoteControl.md) - [SignalResponseRootApps](docs/Model/SignalResponseRootApps.md) - [SignalResponseSuspectScore](docs/Model/SignalResponseSuspectScore.md) - [SignalResponseTampering](docs/Model/SignalResponseTampering.md) - [SignalResponseTor](docs/Model/SignalResponseTor.md) + - [SignalResponseVelocity](docs/Model/SignalResponseVelocity.md) - [SignalResponseVirtualMachine](docs/Model/SignalResponseVirtualMachine.md) - [SignalResponseVpn](docs/Model/SignalResponseVpn.md) - [Subdivision](docs/Model/Subdivision.md) - [SuspectScoreResult](docs/Model/SuspectScoreResult.md) - [TamperingResult](docs/Model/TamperingResult.md) + - [TooManyRequestsResponse](docs/Model/TooManyRequestsResponse.md) - [TorResult](docs/Model/TorResult.md) + - [VelocityIntervalResult](docs/Model/VelocityIntervalResult.md) + - [VelocityIntervals](docs/Model/VelocityIntervals.md) + - [VelocityResult](docs/Model/VelocityResult.md) - [VirtualMachineResult](docs/Model/VirtualMachineResult.md) - [Visit](docs/Model/Visit.md) - [VpnResult](docs/Model/VpnResult.md) diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index 14da8e99..d083e655 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.fpjs.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId -[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId +[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID +[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID # **getEvent** > [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id) -Get event by requestId +Get event by request ID -This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. +Get a detailed analysis of an individual identification event, including Smart Signals. Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`. ### Example ```php @@ -34,7 +34,7 @@ $client = new FingerprintApi( $config ); -$request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. +$request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. try { list($model, $httpResponse) = $client->getEvent($request_id); @@ -49,7 +49,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. | + **request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. | ### Return type @@ -72,9 +72,9 @@ Array: # **getVisits** > [ \Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface ] getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) -Get visits by visitorId +Get visits by visitor ID -This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. +Get a history of visits (identification events) for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received. ### Example ```php @@ -96,7 +96,7 @@ $client = new FingerprintApi( $config ); -$visitor_id = "visitor_id_example"; // string | Unique identifier of the visitor issued by Fingerprint Pro. +$visitor_id = "visitor_id_example"; // string | Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. $request_id = "request_id_example"; // string | Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. $linked_id = "linked_id_example"; // string | Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. $limit = 56; // int | Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. @@ -116,7 +116,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. | + **visitor_id** | **string**| Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. | **request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional] **linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] **limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional] diff --git a/docs/Model/ErrorEvent403ResponseError.md b/docs/Model/Common403ErrorResponse.md similarity index 50% rename from docs/Model/ErrorEvent403ResponseError.md rename to docs/Model/Common403ErrorResponse.md index 5345b43e..e3addf80 100644 --- a/docs/Model/ErrorEvent403ResponseError.md +++ b/docs/Model/Common403ErrorResponse.md @@ -1,9 +1,9 @@ -# ErrorEvent403ResponseError +# Common403ErrorResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **string** | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ | +**code** | **string** | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - No Fingerprint application found for specified secret key * `SubscriptionNotActive` - Fingerprint application is not active * `WrongRegion` - server and application region differ * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application | **message** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Confidence.md b/docs/Model/Confidence.md index 4dac7913..43d3b8ba 100644 --- a/docs/Model/Confidence.md +++ b/docs/Model/Confidence.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **score** | **float** | The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. | +**revision** | **string** | The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeveloperToolsResult.md b/docs/Model/DeveloperToolsResult.md new file mode 100644 index 00000000..18009671 --- /dev/null +++ b/docs/Model/DeveloperToolsResult.md @@ -0,0 +1,9 @@ +# DeveloperToolsResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorEvent403Response.md b/docs/Model/ErrorCommon403Response.md similarity index 65% rename from docs/Model/ErrorEvent403Response.md rename to docs/Model/ErrorCommon403Response.md index b7ec39ad..77357404 100644 --- a/docs/Model/ErrorEvent403Response.md +++ b/docs/Model/ErrorCommon403Response.md @@ -1,9 +1,9 @@ -# ErrorEvent403Response +# ErrorCommon403Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | [**\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError**](ErrorEvent403ResponseError.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\Common403ErrorResponse**](Common403ErrorResponse.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ErrorCommon429Response.md b/docs/Model/ErrorCommon429Response.md new file mode 100644 index 00000000..dd294594 --- /dev/null +++ b/docs/Model/ErrorCommon429Response.md @@ -0,0 +1,9 @@ +# ErrorCommon429Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError**](ErrorCommon429ResponseError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorCommon429ResponseError.md b/docs/Model/ErrorCommon429ResponseError.md new file mode 100644 index 00000000..d08585c8 --- /dev/null +++ b/docs/Model/ErrorCommon429ResponseError.md @@ -0,0 +1,10 @@ +# ErrorCommon429ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code: * `TooManyRequests` - The request is throttled. | +**message** | **string** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorEvent404ResponseError.md b/docs/Model/ErrorEvent404ResponseError.md index 63aa21af..34bb77e6 100644 --- a/docs/Model/ErrorEvent404ResponseError.md +++ b/docs/Model/ErrorEvent404ResponseError.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **string** | Error code: * `RequestNotFound` - request not found for specified id | +**code** | **string** | Error code: * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. | **message** | **string** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ErrorUpdateEvent400Response.md b/docs/Model/ErrorUpdateEvent400Response.md new file mode 100644 index 00000000..475e5550 --- /dev/null +++ b/docs/Model/ErrorUpdateEvent400Response.md @@ -0,0 +1,9 @@ +# ErrorUpdateEvent400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError**](ErrorUpdateEvent400ResponseError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorUpdateEvent400ResponseError.md b/docs/Model/ErrorUpdateEvent400ResponseError.md new file mode 100644 index 00000000..ac9c40be --- /dev/null +++ b/docs/Model/ErrorUpdateEvent400ResponseError.md @@ -0,0 +1,10 @@ +# ErrorUpdateEvent400ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code: * `RequestCannotBeParsed` - the JSON content of the request contains some errors that prevented us from parsing it (wrong type/surpassed limits) * `Failed` - the event is more than 10 days old and cannot be updated | +**message** | **string** | Details about the underlying issue with the input payload | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorUpdateEvent409Response.md b/docs/Model/ErrorUpdateEvent409Response.md new file mode 100644 index 00000000..7d42bd68 --- /dev/null +++ b/docs/Model/ErrorUpdateEvent409Response.md @@ -0,0 +1,9 @@ +# ErrorUpdateEvent409Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError**](ErrorUpdateEvent409ResponseError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorUpdateEvent409ResponseError.md b/docs/Model/ErrorUpdateEvent409ResponseError.md new file mode 100644 index 00000000..e5398089 --- /dev/null +++ b/docs/Model/ErrorUpdateEvent409ResponseError.md @@ -0,0 +1,10 @@ +# ErrorUpdateEvent409ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code: * `StateNotReady` - The event specified with request id is not ready for updates yet. Try again. This error happens in rare cases when update API is called immediately after receiving the request id on the client. In case you need to send information right away, we recommend using the JS agent API instead. | +**message** | **string** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorVisitor400Response.md b/docs/Model/ErrorVisitor400Response.md new file mode 100644 index 00000000..bd6a48d9 --- /dev/null +++ b/docs/Model/ErrorVisitor400Response.md @@ -0,0 +1,9 @@ +# ErrorVisitor400Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError**](ErrorVisitor400ResponseError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorVisitor400ResponseError.md b/docs/Model/ErrorVisitor400ResponseError.md new file mode 100644 index 00000000..656349f8 --- /dev/null +++ b/docs/Model/ErrorVisitor400ResponseError.md @@ -0,0 +1,10 @@ +# ErrorVisitor400ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format. | +**message** | **string** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorVisitor404Response.md b/docs/Model/ErrorVisitor404Response.md new file mode 100644 index 00000000..0cf67550 --- /dev/null +++ b/docs/Model/ErrorVisitor404Response.md @@ -0,0 +1,9 @@ +# ErrorVisitor404Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError**](ErrorVisitor404ResponseError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ErrorVisitor404ResponseError.md b/docs/Model/ErrorVisitor404ResponseError.md new file mode 100644 index 00000000..95638b31 --- /dev/null +++ b/docs/Model/ErrorVisitor404ResponseError.md @@ -0,0 +1,10 @@ +# ErrorVisitor404ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Error code: * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. | +**message** | **string** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/EventUpdateRequest.md b/docs/Model/EventUpdateRequest.md new file mode 100644 index 00000000..fd2bc2ec --- /dev/null +++ b/docs/Model/EventUpdateRequest.md @@ -0,0 +1,11 @@ +# EventUpdateRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**linked_id** | **string** | LinkedID value to assign to the existing event | [optional] +**tag** | **object** | Full `tag` value to be set to the existing event. Replaces any existing `tag` payload completely. | [optional] +**suspect** | **bool** | Suspect flag indicating observed suspicious or fraudulent event | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/FactoryResetResult.md b/docs/Model/FactoryResetResult.md index a34b21a3..90f74510 100644 --- a/docs/Model/FactoryResetResult.md +++ b/docs/Model/FactoryResetResult.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | [**\DateTime**](\DateTime.md) | Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. | -**timestamp** | **int** | Same value as it's in the `time` field but represented in timestamp format. | +**time** | [**\DateTime**](\DateTime.md) | Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. | +**timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProductsResponse.md b/docs/Model/ProductsResponse.md index d7e1101b..8ac08ff8 100644 --- a/docs/Model/ProductsResponse.md +++ b/docs/Model/ProductsResponse.md @@ -26,6 +26,9 @@ Name | Type | Description | Notes **location_spoofing** | [**\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing**](SignalResponseLocationSpoofing.md) | | [optional] **suspect_score** | [**\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore**](SignalResponseSuspectScore.md) | | [optional] **raw_device_attributes** | [**\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes**](SignalResponseRawDeviceAttributes.md) | | [optional] +**remote_control** | [**\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl**](SignalResponseRemoteControl.md) | | [optional] +**velocity** | [**\Fingerprint\ServerAPI\Model\SignalResponseVelocity**](SignalResponseVelocity.md) | | [optional] +**developer_tools** | [**\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools**](SignalResponseDeveloperTools.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RemoteControlResult.md b/docs/Model/RemoteControlResult.md new file mode 100644 index 00000000..537bffce --- /dev/null +++ b/docs/Model/RemoteControlResult.md @@ -0,0 +1,9 @@ +# RemoteControlResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/SignalResponseDeveloperTools.md b/docs/Model/SignalResponseDeveloperTools.md new file mode 100644 index 00000000..c293e285 --- /dev/null +++ b/docs/Model/SignalResponseDeveloperTools.md @@ -0,0 +1,10 @@ +# SignalResponseDeveloperTools + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fingerprint\ServerAPI\Model\DeveloperToolsResult**](DeveloperToolsResult.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/SignalResponseIncognito.md b/docs/Model/SignalResponseIncognito.md index 5df868ed..53e226a2 100644 --- a/docs/Model/SignalResponseIncognito.md +++ b/docs/Model/SignalResponseIncognito.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**\Fingerprint\ServerAPI\Model\IncognitoResult**](IncognitoResult.md) | | [optional] -**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\IdentificationError**](IdentificationError.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignalResponseRawDeviceAttributes.md b/docs/Model/SignalResponseRawDeviceAttributes.md index c12d8772..479188d3 100644 --- a/docs/Model/SignalResponseRawDeviceAttributes.md +++ b/docs/Model/SignalResponseRawDeviceAttributes.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult**](RawDeviceAttributesResult.md) | | [optional] -**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\IdentificationError**](IdentificationError.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignalResponseRemoteControl.md b/docs/Model/SignalResponseRemoteControl.md new file mode 100644 index 00000000..c26787ac --- /dev/null +++ b/docs/Model/SignalResponseRemoteControl.md @@ -0,0 +1,10 @@ +# SignalResponseRemoteControl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fingerprint\ServerAPI\Model\RemoteControlResult**](RemoteControlResult.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/SignalResponseTampering.md b/docs/Model/SignalResponseTampering.md index 380db57c..c9fdb5ae 100644 --- a/docs/Model/SignalResponseTampering.md +++ b/docs/Model/SignalResponseTampering.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**\Fingerprint\ServerAPI\Model\TamperingResult**](TamperingResult.md) | | [optional] -**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\IdentificationError**](IdentificationError.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignalResponseVelocity.md b/docs/Model/SignalResponseVelocity.md new file mode 100644 index 00000000..d86f7986 --- /dev/null +++ b/docs/Model/SignalResponseVelocity.md @@ -0,0 +1,10 @@ +# SignalResponseVelocity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fingerprint\ServerAPI\Model\VelocityResult**](VelocityResult.md) | | [optional] +**error** | [**\Fingerprint\ServerAPI\Model\ProductError**](ProductError.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/ManyRequestsResponse.md b/docs/Model/TooManyRequestsResponse.md similarity index 92% rename from docs/Model/ManyRequestsResponse.md rename to docs/Model/TooManyRequestsResponse.md index 83cceb45..ad069ea0 100644 --- a/docs/Model/ManyRequestsResponse.md +++ b/docs/Model/TooManyRequestsResponse.md @@ -1,4 +1,4 @@ -# ManyRequestsResponse +# TooManyRequestsResponse ## Properties Name | Type | Description | Notes diff --git a/docs/Model/VelocityIntervalResult.md b/docs/Model/VelocityIntervalResult.md new file mode 100644 index 00000000..fc14a4ec --- /dev/null +++ b/docs/Model/VelocityIntervalResult.md @@ -0,0 +1,13 @@ +# VelocityIntervalResult +Is absent if the velocity data could not be generated for the visitor ID. + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_5m** | **int** | | +**_1h** | **int** | | +**_24h** | **int** | The `24h` interval of `distinctIp`, `distinctLinkedId`, and `distinctCountry` will be omitted if the number of `events`` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/VelocityIntervals.md b/docs/Model/VelocityIntervals.md new file mode 100644 index 00000000..a68bbe0c --- /dev/null +++ b/docs/Model/VelocityIntervals.md @@ -0,0 +1,9 @@ +# VelocityIntervals + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**intervals** | [**\Fingerprint\ServerAPI\Model\VelocityIntervalResult**](VelocityIntervalResult.md) | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/VelocityResult.md b/docs/Model/VelocityResult.md new file mode 100644 index 00000000..0b45b8a3 --- /dev/null +++ b/docs/Model/VelocityResult.md @@ -0,0 +1,14 @@ +# VelocityResult +Sums key data points for a specific `visitorId` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of identification events attributed to the visitor ID - Number of distinct IP addresses associated to the visitor ID. - Number of distinct countries associated with the visitor ID. - Number of distinct `linkedId`s associated with the visitor ID. The `24h` interval of `distinctIp`, `distinctLinkedId`, and `distinctCountry` will be omitted if the number of `events` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**distinct_ip** | [**\Fingerprint\ServerAPI\Model\VelocityIntervals**](VelocityIntervals.md) | | +**distinct_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityIntervals**](VelocityIntervals.md) | | +**distinct_country** | [**\Fingerprint\ServerAPI\Model\VelocityIntervals**](VelocityIntervals.md) | | +**events** | [**\Fingerprint\ServerAPI\Model\VelocityIntervals**](VelocityIntervals.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Model/Visit.md b/docs/Model/Visit.md index 3c81e230..a2fe21c9 100644 --- a/docs/Model/Visit.md +++ b/docs/Model/Visit.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | **time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format. | **url** | **string** | Page URL from which the identification request was sent. | -**tag** | **map[string,object]** | A customer-provided value or an object that was sent with identification request. | +**tag** | **map[string,object]** | A customer-provided value or an object that was sent with identification request. | [optional] **linked_id** | **string** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**\Fingerprint\ServerAPI\Model\Confidence**](Confidence.md) | | [optional] **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | diff --git a/docs/Model/VpnResultMethods.md b/docs/Model/VpnResultMethods.md index d70e5965..7762605c 100644 --- a/docs/Model/VpnResultMethods.md +++ b/docs/Model/VpnResultMethods.md @@ -3,9 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timezone_mismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. | +**timezone_mismatch** | **bool** | The browser timezone doesn't match the timezone inferred from the request IP address. | **public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | **auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | +**os_mismatch** | **bool** | The browser runs on a different operating system than the operating system inferred from the request network signature. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookVisit.md b/docs/Model/WebhookVisit.md index 00652490..83351586 100644 --- a/docs/Model/WebhookVisit.md +++ b/docs/Model/WebhookVisit.md @@ -26,6 +26,9 @@ Name | Type | Description | Notes **high_activity** | [**\Fingerprint\ServerAPI\Model\HighActivityResult**](HighActivityResult.md) | | [optional] **location_spoofing** | [**\Fingerprint\ServerAPI\Model\LocationSpoofingResult**](LocationSpoofingResult.md) | | [optional] **suspect_score** | [**\Fingerprint\ServerAPI\Model\SuspectScoreResult**](SuspectScoreResult.md) | | [optional] +**remote_control** | [**\Fingerprint\ServerAPI\Model\RemoteControlResult**](RemoteControlResult.md) | | [optional] +**velocity** | [**\Fingerprint\ServerAPI\Model\VelocityResult**](VelocityResult.md) | | [optional] +**developer_tools** | [**\Fingerprint\ServerAPI\Model\DeveloperToolsResult**](DeveloperToolsResult.md) | | [optional] **request_id** | **string** | Unique identifier of the user's identification request. | **browser_details** | [**\Fingerprint\ServerAPI\Model\BrowserDetails**](BrowserDetails.md) | | **ip** | **string** | | @@ -33,7 +36,7 @@ Name | Type | Description | Notes **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | **time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format. | **url** | **string** | Page URL from which the identification request was sent. | -**tag** | **map[string,object]** | A customer-provided value or an object that was sent with identification request. | +**tag** | **map[string,object]** | A customer-provided value or an object that was sent with identification request. | [optional] **linked_id** | **string** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**\Fingerprint\ServerAPI\Model\Confidence**](Confidence.md) | | [optional] **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 792ce049..de3f289a 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -36,14 +36,13 @@ paths: tags: - Fingerprint operationId: getEvent - summary: Get event by requestId + summary: Get event by request ID description: > - This endpoint allows you to get a detailed analysis of an individual - request. + Get a detailed analysis of an individual identification event, including + Smart Signals. - **Only for Enterprise customers:** Please note that the response - includes mobile signals (e.g. `rootApps`) even if the request originated - from a non-mobile platform. + Please note that the response includes mobile signals (e.g. `rootApps`) + even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. @@ -57,7 +56,7 @@ paths: description: >- The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of - each analysis request. + each identification request. required: true schema: type: string @@ -73,7 +72,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorEvent403Response' + $ref: '#/components/schemas/ErrorCommon403Response' '404': description: Not found content: @@ -85,9 +84,9 @@ paths: tags: - Fingerprint operationId: getVisits - summary: Get visits by visitorId + summary: Get visits by visitor ID description: > - This endpoint allows you to get a history of visits for a specific + Get a history of visits (identification events) for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. @@ -102,7 +101,10 @@ paths: response is received. parameters: - name: visitor_id - description: Unique identifier of the visitor issued by Fingerprint Pro. + description: >- + Unique [visitor + identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) + issued by Fingerprint Pro. in: path required: true schema: @@ -210,8 +212,8 @@ paths: headers: Retry-After: description: >- - Indicates how long you should wait before attempting the next - request. + Indicates how many seconds you should wait before attempting the + next request. schema: type: integer format: int32 @@ -219,7 +221,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ManyRequestsResponse' + $ref: '#/components/schemas/TooManyRequestsResponse' /webhook: trace: tags: @@ -346,6 +348,7 @@ paths: timezoneMismatch: false publicVPN: false auxiliaryMobile: false + osMismatch: false proxy: result: false tampering: @@ -388,6 +391,27 @@ paths: result: true suspectScore: result: 0 + remoteControl: + result: false + velocity: + distinctIp: + intervals: + 5m: 1 + 1h: 1 + 24h: 1 + distinctLinkedId: {} + distinctCountry: + intervals: + 5m: 1 + 1h: 2 + 24h: 2 + events: + intervals: + 5m: 1 + 1h: 5 + 24h: 5 + developerTools: + result: false responses: default: description: The server doesn't validate the answer. @@ -524,8 +548,8 @@ components: - time - timestamp - url - - tag - visitorFound + - tag lastTimestamp: description: > ⚠️ Deprecated paging attribute, please use `paginationKey` instead. @@ -547,28 +571,30 @@ components: description: >- Fields `lastTimestamp` and `paginationKey` added when `limit` or `before` parameter provided and there is more data to show - ErrorEvent403Response: + ErrorCommon403Response: type: object additionalProperties: false properties: error: type: object additionalProperties: false - title: ErrorEvent403ResponseError + title: Common403ErrorResponse properties: code: type: string description: | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty - * `TokenNotFound` - subscription not found for specified secret key - * `SubscriptionNotActive` - subscription is not active - * `WrongRegion` - server and subscription region differ + * `TokenNotFound` - No Fingerprint application found for specified secret key + * `SubscriptionNotActive` - Fingerprint application is not active + * `WrongRegion` - server and application region differ + * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application enum: - TokenRequired - TokenNotFound - SubscriptionNotActive - WrongRegion + - FeatureNotEnabled example: TokenRequired message: type: string @@ -576,6 +602,27 @@ components: required: - code - message + ErrorCommon429Response: + type: object + additionalProperties: false + properties: + error: + type: object + additionalProperties: false + properties: + code: + type: string + description: | + Error code: * `TooManyRequests` - The request is throttled. + enum: + - TooManyRequests + example: TooManyRequests + message: + type: string + example: request throttled + required: + - code + - message ErrorEvent404Response: type: object additionalProperties: false @@ -589,7 +636,7 @@ components: type: string description: | Error code: - * `RequestNotFound` - request not found for specified id + * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. enum: - RequestNotFound example: RequestNotFound @@ -609,7 +656,7 @@ components: example: Forbidden (HTTP 403) required: - error - ManyRequestsResponse: + TooManyRequestsResponse: type: object additionalProperties: false properties: @@ -619,6 +666,51 @@ components: example: request throttled required: - error + ErrorVisitor404Response: + type: object + additionalProperties: false + properties: + error: + type: object + additionalProperties: false + title: ErrorVisitor404ResponseError + properties: + code: + type: string + description: > + Error code: * `VisitorNotFound` - The specified visitor ID was + not found. It never existed or it may have already been deleted. + enum: + - VisitorNotFound + example: VisitorNotFound + message: + type: string + example: visitor not found + required: + - code + - message + ErrorVisitor400Response: + type: object + additionalProperties: false + properties: + error: + type: object + additionalProperties: false + properties: + code: + type: string + description: > + Error code: * `RequestCannotBeParsed` - The visitor ID parameter + is missing or in the wrong format. + enum: + - RequestCannotBeParsed + example: RequestCannotBeParsed + message: + type: string + example: invalid visitor id + required: + - code + - message WebhookVisit: type: object properties: @@ -674,6 +766,12 @@ components: $ref: '#/components/schemas/LocationSpoofingResult' suspectScore: $ref: '#/components/schemas/SuspectScoreResult' + remoteControl: + $ref: '#/components/schemas/RemoteControlResult' + velocity: + $ref: '#/components/schemas/VelocityResult' + developerTools: + $ref: '#/components/schemas/DeveloperToolsResult' requestId: description: Unique identifier of the user's identification request. type: string @@ -778,7 +876,6 @@ components: - time - timestamp - url - - tag - visitorFound Visit: type: object @@ -889,7 +986,6 @@ components: - time - timestamp - url - - tag - visitorFound title: Visit BrowserDetails: @@ -942,6 +1038,12 @@ components: format: float minimum: 0 maximum: 1 + revision: + description: >- + The revision name of the method used to calculate the Confidence + score. This field is only present for customers who opted in to an + alternative calculation method. + type: string required: - score title: Confidence @@ -1203,9 +1305,9 @@ components: - time - timestamp - url - - tag - visitorFound - visitorId + - tag error: $ref: '#/components/schemas/IdentificationError' botd: @@ -1234,7 +1336,7 @@ components: data: $ref: '#/components/schemas/IncognitoResult' error: - $ref: '#/components/schemas/ProductError' + $ref: '#/components/schemas/IdentificationError' rootApps: title: SignalResponseRootApps type: object @@ -1351,7 +1453,7 @@ components: data: $ref: '#/components/schemas/TamperingResult' error: - $ref: '#/components/schemas/ProductError' + $ref: '#/components/schemas/IdentificationError' highActivity: title: SignalResponseHighActivity type: object @@ -1386,6 +1488,33 @@ components: properties: data: $ref: '#/components/schemas/RawDeviceAttributesResult' + error: + $ref: '#/components/schemas/IdentificationError' + remoteControl: + title: SignalResponseRemoteControl + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/RemoteControlResult' + error: + $ref: '#/components/schemas/ProductError' + velocity: + title: SignalResponseVelocity + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/VelocityResult' + error: + $ref: '#/components/schemas/ProductError' + developerTools: + title: SignalResponseDeveloperTools + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/DeveloperToolsResult' error: $ref: '#/components/schemas/ProductError' EventResponse: @@ -1582,8 +1711,8 @@ components: timezoneMismatch: type: boolean description: >- - User's browser timezone doesn't match the timezone from which - the request was originally made. + The browser timezone doesn't match the timezone inferred from + the request IP address. example: false publicVPN: type: boolean @@ -1597,10 +1726,17 @@ components: This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. example: false + osMismatch: + type: boolean + description: >- + The browser runs on a different operating system than the + operating system inferred from the request network signature. + example: false required: - timezoneMismatch - publicVPN - auxiliaryMobile + - osMismatch required: - result - originTimezone @@ -1672,6 +1808,36 @@ components: example: 0 required: - result + VelocityResult: + type: object + description: > + Sums key data points for a specific `visitorId` at three distinct time + intervals: 5 minutes, 1 hour, and 24 hours as follows: + + - Number of identification events attributed to the visitor ID - Number + of distinct IP addresses associated to the visitor ID. - Number of + distinct countries associated with the visitor ID. - Number of distinct + `linkedId`s associated with the visitor ID. + + The `24h` interval of `distinctIp`, `distinctLinkedId`, and + `distinctCountry` will be omitted if the number of `events` for the + visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher + than 20.000. + additionalProperties: false + properties: + distinctIp: + $ref: '#/components/schemas/VelocityIntervals' + distinctLinkedId: + $ref: '#/components/schemas/VelocityIntervals' + distinctCountry: + $ref: '#/components/schemas/VelocityIntervals' + events: + $ref: '#/components/schemas/VelocityIntervals' + required: + - distinctIp + - distinctLinkedId + - distinctCountry + - events RawDeviceAttributesResult: type: object description: > @@ -1709,19 +1875,27 @@ components: additionalProperties: false properties: time: - title: Time description: > - Time in UTC when the most recent factory reset of the Android or iOS - device was done. If there is no sign of factory reset or the client - is not a mobile device, the field will contain the epoch time (1 - January 1970) in UTC. + Indicates the time (in UTC) of the most recent factory reset that + happened on the **mobile device**. + + When a factory reset cannot be detected on the mobile device or when + the request is initiated from a browser, this field will correspond + to the *epoch* time (i.e 1 Jan 1970 UTC). + + See [Factory Reset + Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) + to learn more about this Smart Signal. type: string format: date-time example: '2022-06-09T22:58:36Z' timestamp: - description: >- - Same value as it's in the `time` field but represented in timestamp - format. + description: > + This field is just another representation of the value in the `time` + field. + + The time of the most recent factory reset that happened on the + **mobile device** is expressed as Unix epoch time. type: integer format: int64 example: 1654815517198 @@ -1877,3 +2051,126 @@ components: required: - code - message + RemoteControlResult: + type: object + additionalProperties: false + properties: + result: + type: boolean + description: > + `true` if the request came from a machine being remotely controlled + (e.g. TeamViewer), `false` otherwise. + example: false + required: + - result + DeveloperToolsResult: + type: object + additionalProperties: false + properties: + result: + type: boolean + description: > + `true` if the browser is Chrome with DevTools open or Firefox with + Developer Tools open, `false` otherwise. + example: false + required: + - result + EventUpdateRequest: + type: object + properties: + linkedId: + type: string + description: LinkedID value to assign to the existing event + tag: + type: object + description: >- + Full `tag` value to be set to the existing event. Replaces any + existing `tag` payload completely. + suspect: + type: boolean + description: Suspect flag indicating observed suspicious or fraudulent event + ErrorUpdateEvent400Response: + type: object + additionalProperties: false + properties: + error: + type: object + additionalProperties: false + title: ErrorUpdateEvent400ResponseError + properties: + code: + type: string + description: > + Error code: * `RequestCannotBeParsed` - the JSON content of the + request contains some errors that prevented us from parsing it + (wrong type/surpassed limits) * `Failed` - the event is more + than 10 days old and cannot be updated + enum: + - RequestCannotBeParsed + - Failed + example: RequestCannotBeParsed + message: + type: string + description: Details about the underlying issue with the input payload + example: suspect flag must be a boolean + required: + - code + - message + ErrorUpdateEvent409Response: + type: object + additionalProperties: false + properties: + error: + type: object + additionalProperties: false + title: ErrorUpdateEvent409ResponseError + properties: + code: + type: string + description: > + Error code: * `StateNotReady` - The event specified with request + id is not ready for updates yet. Try again. + + This error happens in rare cases when update API is called + immediately after receiving the request id on the client. In + case you need to send information right away, we recommend using + the JS agent API instead. + enum: + - StateNotReady + example: StateNotReady + message: + type: string + example: resource is not mutable yet, try again + required: + - code + - message + VelocityIntervals: + type: object + additionalProperties: false + properties: + intervals: + $ref: '#/components/schemas/VelocityIntervalResult' + VelocityIntervalResult: + type: object + description: > + Is absent if the velocity data could not be generated for the visitor + ID. + additionalProperties: false + properties: + 5m: + type: integer + example: 1 + 1h: + type: integer + example: 1 + 24h: + type: integer + description: > + The `24h` interval of `distinctIp`, `distinctLinkedId`, and + `distinctCountry` will be omitted if the number of `events`` for the + visitor ID in the last 24 hours (`events.intervals.['24h']`) is + higher than 20.000. + example: 1 + required: + - 5m + - 1h diff --git a/scripts/sync.sh b/scripts/sync.sh old mode 100644 new mode 100755 diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index e2413418..1be0f18e 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -73,9 +73,9 @@ public function getConfig(): Configuration /** * Operation getEvent. * - * Get event by requestId + * Get event by request ID * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * @@ -135,7 +135,7 @@ public function getEvent(string $request_id): array break; case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); @@ -156,9 +156,9 @@ public function getEvent(string $request_id): array /** * Operation getEventAsync. * - * Get event by requestId + * Get event by request ID * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) * * @throws \InvalidArgumentException * @throws SerializationException @@ -205,7 +205,7 @@ function ($e) { break; case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); @@ -227,9 +227,9 @@ function ($e) { /** * Operation getVisits. * - * Get visits by visitorId + * Get visits by visitor ID * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) @@ -301,7 +301,7 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin break; case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); @@ -315,9 +315,9 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin /** * Operation getVisitsAsync. * - * Get visits by visitorId + * Get visits by visitor ID * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) @@ -376,7 +376,7 @@ function ($e) { break; case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/Common403ErrorResponse.php similarity index 91% rename from src/Model/ErrorEvent403ResponseError.php rename to src/Model/Common403ErrorResponse.php index 702c754c..f8e5fd06 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/Common403ErrorResponse.php @@ -1,6 +1,6 @@ 'float']; + 'score' => 'float', + 'revision' => 'string']; /** * Array of property to format mappings. Used for (de)serialization. @@ -59,7 +60,8 @@ class Confidence implements ModelInterface, \ArrayAccess * @var string[] */ protected static array $swaggerFormats = [ - 'score' => 'float']; + 'score' => 'float', + 'revision' => null]; /** * Array of attributes where the key is the local name, @@ -68,7 +70,8 @@ class Confidence implements ModelInterface, \ArrayAccess * @var string[] */ protected static array $attributeMap = [ - 'score' => 'score']; + 'score' => 'score', + 'revision' => 'revision']; /** * Array of attributes to setter functions (for deserialization of responses). @@ -76,7 +79,8 @@ class Confidence implements ModelInterface, \ArrayAccess * @var string[] */ protected static array $setters = [ - 'score' => 'setScore']; + 'score' => 'setScore', + 'revision' => 'setRevision']; /** * Array of attributes to getter functions (for serialization of requests). @@ -84,7 +88,8 @@ class Confidence implements ModelInterface, \ArrayAccess * @var string[] */ protected static array $getters = [ - 'score' => 'getScore']; + 'score' => 'getScore', + 'revision' => 'getRevision']; /** * Associative array for storing property values. @@ -102,6 +107,7 @@ class Confidence implements ModelInterface, \ArrayAccess public function __construct(?array $data = null) { $this->container['score'] = isset($data['score']) ? $data['score'] : null; + $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; } /** @@ -217,6 +223,30 @@ public function setScore(float $score): self return $this; } + /** + * Gets revision. + * + * @return ?string + */ + public function getRevision(): ?string + { + return $this->container['revision']; + } + + /** + * Sets revision. + * + * @param ?string $revision The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. + * + * @return $this + */ + public function setRevision(?string $revision): self + { + $this->container['revision'] = $revision; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DeveloperToolsResult.php b/src/Model/DeveloperToolsResult.php new file mode 100644 index 00000000..2047bf72 --- /dev/null +++ b/src/Model/DeveloperToolsResult.php @@ -0,0 +1,264 @@ + 'bool']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'result' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'result' => 'result']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['result']) { + $invalidProperties[] = "'result' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets result. + */ + public function getResult(): bool + { + return $this->container['result']; + } + + /** + * Sets result. + * + * @param bool $result `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise + * + * @return $this + */ + public function setResult(bool $result): self + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorCommon403Response.php similarity index 90% rename from src/Model/ErrorEvent403Response.php rename to src/Model/ErrorCommon403Response.php index b8093804..1afa5e6e 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorCommon403Response.php @@ -1,6 +1,6 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\Common403ErrorResponse']; /** * Array of property to format mappings. Used for (de)serialization. @@ -192,9 +192,9 @@ public function valid(): bool /** * Gets error. * - * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError + * @return ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse */ - public function getError(): ?ErrorEvent403ResponseError + public function getError(): ?Common403ErrorResponse { return $this->container['error']; } @@ -202,11 +202,11 @@ public function getError(): ?ErrorEvent403ResponseError /** * Sets error. * - * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse $error error * * @return $this */ - public function setError(?ErrorEvent403ResponseError $error): self + public function setError(?Common403ErrorResponse $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorCommon429Response.php b/src/Model/ErrorCommon429Response.php new file mode 100644 index 00000000..d2dc070d --- /dev/null +++ b/src/Model/ErrorCommon429Response.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError + */ + public function getError(): ?ErrorCommon429ResponseError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError $error error + * + * @return $this + */ + public function setError(?ErrorCommon429ResponseError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorCommon429ResponseError.php b/src/Model/ErrorCommon429ResponseError.php new file mode 100644 index 00000000..f214c931 --- /dev/null +++ b/src/Model/ErrorCommon429ResponseError.php @@ -0,0 +1,325 @@ + 'string', + 'message' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'code' => null, + 'message' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'message' => 'message']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Gets allowable values of the enum. + * + * @return string[] + */ + public function getCodeAllowableValues(): array + { + return [ + self::CODE_TOO_MANY_REQUESTS, ]; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['code']) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (null === $this->container['message']) { + $invalidProperties[] = "'message' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code. + * + * @param string $code error code: * `TooManyRequests` - The request is throttled + * + * @return $this + */ + public function setCode(string $code): self + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string $message message + * + * @return $this + */ + public function setMessage(string $message): self + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 607b1924..0337f0bd 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -236,7 +236,7 @@ public function getCode(): string /** * Sets code. * - * @param string $code Error code: * `RequestNotFound` - request not found for specified id + * @param string $code Error code: * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. * * @return $this */ diff --git a/src/Model/ErrorUpdateEvent400Response.php b/src/Model/ErrorUpdateEvent400Response.php new file mode 100644 index 00000000..06737e39 --- /dev/null +++ b/src/Model/ErrorUpdateEvent400Response.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError + */ + public function getError(): ?ErrorUpdateEvent400ResponseError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError $error error + * + * @return $this + */ + public function setError(?ErrorUpdateEvent400ResponseError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorUpdateEvent400ResponseError.php b/src/Model/ErrorUpdateEvent400ResponseError.php new file mode 100644 index 00000000..ec5eedb8 --- /dev/null +++ b/src/Model/ErrorUpdateEvent400ResponseError.php @@ -0,0 +1,327 @@ + 'string', + 'message' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'code' => null, + 'message' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'message' => 'message']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Gets allowable values of the enum. + * + * @return string[] + */ + public function getCodeAllowableValues(): array + { + return [ + self::CODE_REQUEST_CANNOT_BE_PARSED, + self::CODE_FAILED, ]; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['code']) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (null === $this->container['message']) { + $invalidProperties[] = "'message' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code. + * + * @param string $code Error code: * `RequestCannotBeParsed` - the JSON content of the request contains some errors that prevented us from parsing it (wrong type/surpassed limits) * `Failed` - the event is more than 10 days old and cannot be updated + * + * @return $this + */ + public function setCode(string $code): self + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string $message Details about the underlying issue with the input payload + * + * @return $this + */ + public function setMessage(string $message): self + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorUpdateEvent409Response.php b/src/Model/ErrorUpdateEvent409Response.php new file mode 100644 index 00000000..5e1a0590 --- /dev/null +++ b/src/Model/ErrorUpdateEvent409Response.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError + */ + public function getError(): ?ErrorUpdateEvent409ResponseError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError $error error + * + * @return $this + */ + public function setError(?ErrorUpdateEvent409ResponseError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorUpdateEvent409ResponseError.php b/src/Model/ErrorUpdateEvent409ResponseError.php new file mode 100644 index 00000000..7104bb91 --- /dev/null +++ b/src/Model/ErrorUpdateEvent409ResponseError.php @@ -0,0 +1,325 @@ + 'string', + 'message' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'code' => null, + 'message' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'message' => 'message']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Gets allowable values of the enum. + * + * @return string[] + */ + public function getCodeAllowableValues(): array + { + return [ + self::CODE_STATE_NOT_READY, ]; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['code']) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (null === $this->container['message']) { + $invalidProperties[] = "'message' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code. + * + * @param string $code Error code: * `StateNotReady` - The event specified with request id is not ready for updates yet. Try again. This error happens in rare cases when update API is called immediately after receiving the request id on the client. In case you need to send information right away, we recommend using the JS agent API instead. + * + * @return $this + */ + public function setCode(string $code): self + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string $message message + * + * @return $this + */ + public function setMessage(string $message): self + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorVisitor400Response.php b/src/Model/ErrorVisitor400Response.php new file mode 100644 index 00000000..8add5b42 --- /dev/null +++ b/src/Model/ErrorVisitor400Response.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError + */ + public function getError(): ?ErrorVisitor400ResponseError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError $error error + * + * @return $this + */ + public function setError(?ErrorVisitor400ResponseError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorVisitor400ResponseError.php b/src/Model/ErrorVisitor400ResponseError.php new file mode 100644 index 00000000..f3a7511d --- /dev/null +++ b/src/Model/ErrorVisitor400ResponseError.php @@ -0,0 +1,325 @@ + 'string', + 'message' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'code' => null, + 'message' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'message' => 'message']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Gets allowable values of the enum. + * + * @return string[] + */ + public function getCodeAllowableValues(): array + { + return [ + self::CODE_REQUEST_CANNOT_BE_PARSED, ]; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['code']) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (null === $this->container['message']) { + $invalidProperties[] = "'message' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code. + * + * @param string $code error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format + * + * @return $this + */ + public function setCode(string $code): self + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string $message message + * + * @return $this + */ + public function setMessage(string $message): self + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorVisitor404Response.php b/src/Model/ErrorVisitor404Response.php new file mode 100644 index 00000000..d0eac080 --- /dev/null +++ b/src/Model/ErrorVisitor404Response.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError + */ + public function getError(): ?ErrorVisitor404ResponseError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError $error error + * + * @return $this + */ + public function setError(?ErrorVisitor404ResponseError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ErrorVisitor404ResponseError.php b/src/Model/ErrorVisitor404ResponseError.php new file mode 100644 index 00000000..6365d384 --- /dev/null +++ b/src/Model/ErrorVisitor404ResponseError.php @@ -0,0 +1,325 @@ + 'string', + 'message' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'code' => null, + 'message' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'message' => 'message']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Gets allowable values of the enum. + * + * @return string[] + */ + public function getCodeAllowableValues(): array + { + return [ + self::CODE_VISITOR_NOT_FOUND, ]; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['code']) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (null === $this->container['message']) { + $invalidProperties[] = "'message' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets code. + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code. + * + * @param string $code Error code: * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. + * + * @return $this + */ + public function setCode(string $code): self + { + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'code', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message. + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string $message message + * + * @return $this + */ + public function setMessage(string $message): self + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/EventUpdateRequest.php b/src/Model/EventUpdateRequest.php new file mode 100644 index 00000000..ebcd6941 --- /dev/null +++ b/src/Model/EventUpdateRequest.php @@ -0,0 +1,320 @@ + 'string', + 'tag' => 'object', + 'suspect' => 'bool']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'linked_id' => null, + 'tag' => null, + 'suspect' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'linked_id' => 'linkedId', + 'tag' => 'tag', + 'suspect' => 'suspect']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'linked_id' => 'setLinkedId', + 'tag' => 'setTag', + 'suspect' => 'setSuspect']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'linked_id' => 'getLinkedId', + 'tag' => 'getTag', + 'suspect' => 'getSuspect']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets linked_id. + * + * @return ?string + */ + public function getLinkedId(): ?string + { + return $this->container['linked_id']; + } + + /** + * Sets linked_id. + * + * @param ?string $linked_id LinkedID value to assign to the existing event + * + * @return $this + */ + public function setLinkedId(?string $linked_id): self + { + $this->container['linked_id'] = $linked_id; + + return $this; + } + + /** + * Gets tag. + * + * @return ?object + */ + public function getTag(): ?object + { + return $this->container['tag']; + } + + /** + * Sets tag. + * + * @param ?object $tag Full `tag` value to be set to the existing event. Replaces any existing `tag` payload completely. + * + * @return $this + */ + public function setTag(?object $tag): self + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets suspect. + * + * @return ?bool + */ + public function getSuspect(): ?bool + { + return $this->container['suspect']; + } + + /** + * Sets suspect. + * + * @param ?bool $suspect Suspect flag indicating observed suspicious or fraudulent event + * + * @return $this + */ + public function setSuspect(?bool $suspect): self + { + $this->container['suspect'] = $suspect; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index fbf1834d..8d6872fa 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -215,7 +215,7 @@ public function getTime(): \DateTime /** * Sets time. * - * @param \DateTime $time Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. + * @param \DateTime $time Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. * * @return $this */ @@ -237,7 +237,7 @@ public function getTimestamp(): int /** * Sets timestamp. * - * @param int $timestamp same value as it's in the `time` field but represented in timestamp format + * @param int $timestamp This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. * * @return $this */ diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index dffaf631..16649fd8 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -73,7 +73,10 @@ class ProductsResponse implements ModelInterface, \ArrayAccess 'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', 'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', 'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', - 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes']; + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes', + 'remote_control' => '\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl', + 'velocity' => '\Fingerprint\ServerAPI\Model\SignalResponseVelocity', + 'developer_tools' => '\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools']; /** * Array of property to format mappings. Used for (de)serialization. @@ -101,7 +104,10 @@ class ProductsResponse implements ModelInterface, \ArrayAccess 'high_activity' => null, 'location_spoofing' => null, 'suspect_score' => null, - 'raw_device_attributes' => null]; + 'raw_device_attributes' => null, + 'remote_control' => null, + 'velocity' => null, + 'developer_tools' => null]; /** * Array of attributes where the key is the local name, @@ -130,7 +136,10 @@ class ProductsResponse implements ModelInterface, \ArrayAccess 'high_activity' => 'highActivity', 'location_spoofing' => 'locationSpoofing', 'suspect_score' => 'suspectScore', - 'raw_device_attributes' => 'rawDeviceAttributes']; + 'raw_device_attributes' => 'rawDeviceAttributes', + 'remote_control' => 'remoteControl', + 'velocity' => 'velocity', + 'developer_tools' => 'developerTools']; /** * Array of attributes to setter functions (for deserialization of responses). @@ -158,7 +167,10 @@ class ProductsResponse implements ModelInterface, \ArrayAccess 'high_activity' => 'setHighActivity', 'location_spoofing' => 'setLocationSpoofing', 'suspect_score' => 'setSuspectScore', - 'raw_device_attributes' => 'setRawDeviceAttributes']; + 'raw_device_attributes' => 'setRawDeviceAttributes', + 'remote_control' => 'setRemoteControl', + 'velocity' => 'setVelocity', + 'developer_tools' => 'setDeveloperTools']; /** * Array of attributes to getter functions (for serialization of requests). @@ -186,7 +198,10 @@ class ProductsResponse implements ModelInterface, \ArrayAccess 'high_activity' => 'getHighActivity', 'location_spoofing' => 'getLocationSpoofing', 'suspect_score' => 'getSuspectScore', - 'raw_device_attributes' => 'getRawDeviceAttributes']; + 'raw_device_attributes' => 'getRawDeviceAttributes', + 'remote_control' => 'getRemoteControl', + 'velocity' => 'getVelocity', + 'developer_tools' => 'getDeveloperTools']; /** * Associative array for storing property values. @@ -224,6 +239,9 @@ public function __construct(?array $data = null) $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; $this->container['raw_device_attributes'] = isset($data['raw_device_attributes']) ? $data['raw_device_attributes'] : null; + $this->container['remote_control'] = isset($data['remote_control']) ? $data['remote_control'] : null; + $this->container['velocity'] = isset($data['velocity']) ? $data['velocity'] : null; + $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; } /** @@ -815,6 +833,78 @@ public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_d return $this; } + /** + * Gets remote_control. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl + */ + public function getRemoteControl(): ?SignalResponseRemoteControl + { + return $this->container['remote_control']; + } + + /** + * Sets remote_control. + * + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl $remote_control remote_control + * + * @return $this + */ + public function setRemoteControl(?SignalResponseRemoteControl $remote_control): self + { + $this->container['remote_control'] = $remote_control; + + return $this; + } + + /** + * Gets velocity. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity + */ + public function getVelocity(): ?SignalResponseVelocity + { + return $this->container['velocity']; + } + + /** + * Sets velocity. + * + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity $velocity velocity + * + * @return $this + */ + public function setVelocity(?SignalResponseVelocity $velocity): self + { + $this->container['velocity'] = $velocity; + + return $this; + } + + /** + * Gets developer_tools. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools + */ + public function getDeveloperTools(): ?SignalResponseDeveloperTools + { + return $this->container['developer_tools']; + } + + /** + * Sets developer_tools. + * + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools $developer_tools developer_tools + * + * @return $this + */ + public function setDeveloperTools(?SignalResponseDeveloperTools $developer_tools): self + { + $this->container['developer_tools'] = $developer_tools; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/RemoteControlResult.php b/src/Model/RemoteControlResult.php new file mode 100644 index 00000000..125baf85 --- /dev/null +++ b/src/Model/RemoteControlResult.php @@ -0,0 +1,264 @@ + 'bool']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'result' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'result' => 'result']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['result']) { + $invalidProperties[] = "'result' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets result. + */ + public function getResult(): bool + { + return $this->container['result']; + } + + /** + * Sets result. + * + * @param bool $result `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. + * + * @return $this + */ + public function setResult(bool $result): self + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/SignalResponseDeveloperTools.php b/src/Model/SignalResponseDeveloperTools.php new file mode 100644 index 00000000..d25d3207 --- /dev/null +++ b/src/Model/SignalResponseDeveloperTools.php @@ -0,0 +1,290 @@ + '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'data' => null, + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'data' => 'data', + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'data' => 'setData', + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'data' => 'getData', + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult + */ + public function getData(): ?DeveloperToolsResult + { + return $this->container['data']; + } + + /** + * Sets data. + * + * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data data + * + * @return $this + */ + public function setData(?DeveloperToolsResult $data): self + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError + */ + public function getError(): ?ProductError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * + * @return $this + */ + public function setError(?ProductError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 561c0eba..e8e87138 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -52,7 +52,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess */ protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IncognitoResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** * Array of property to format mappings. Used for (de)serialization. @@ -222,9 +222,9 @@ public function setData(?IncognitoResult $data): self /** * Gets error. * - * @return ?\Fingerprint\ServerAPI\Model\ProductError + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?ProductError + public function getError(): ?IdentificationError { return $this->container['error']; } @@ -232,11 +232,11 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index b079b123..68a20adc 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -52,7 +52,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess */ protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** * Array of property to format mappings. Used for (de)serialization. @@ -222,9 +222,9 @@ public function setData(?array $data): self /** * Gets error. * - * @return ?\Fingerprint\ServerAPI\Model\ProductError + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?ProductError + public function getError(): ?IdentificationError { return $this->container['error']; } @@ -232,11 +232,11 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRemoteControl.php b/src/Model/SignalResponseRemoteControl.php new file mode 100644 index 00000000..afec1f39 --- /dev/null +++ b/src/Model/SignalResponseRemoteControl.php @@ -0,0 +1,290 @@ + '\Fingerprint\ServerAPI\Model\RemoteControlResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'data' => null, + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'data' => 'data', + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'data' => 'setData', + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'data' => 'getData', + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult + */ + public function getData(): ?RemoteControlResult + { + return $this->container['data']; + } + + /** + * Sets data. + * + * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $data data + * + * @return $this + */ + public function setData(?RemoteControlResult $data): self + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError + */ + public function getError(): ?ProductError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * + * @return $this + */ + public function setError(?ProductError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 4efe22d6..68c818ea 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -52,7 +52,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess */ protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\TamperingResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** * Array of property to format mappings. Used for (de)serialization. @@ -222,9 +222,9 @@ public function setData(?TamperingResult $data): self /** * Gets error. * - * @return ?\Fingerprint\ServerAPI\Model\ProductError + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?ProductError + public function getError(): ?IdentificationError { return $this->container['error']; } @@ -232,11 +232,11 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVelocity.php b/src/Model/SignalResponseVelocity.php new file mode 100644 index 00000000..3ccfbdbe --- /dev/null +++ b/src/Model/SignalResponseVelocity.php @@ -0,0 +1,290 @@ + '\Fingerprint\ServerAPI\Model\VelocityResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'data' => null, + 'error' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'data' => 'data', + 'error' => 'error']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'data' => 'setData', + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'data' => 'getData', + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\VelocityResult + */ + public function getData(): ?VelocityResult + { + return $this->container['data']; + } + + /** + * Sets data. + * + * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $data data + * + * @return $this + */ + public function setData(?VelocityResult $data): self + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError + */ + public function getError(): ?ProductError + { + return $this->container['error']; + } + + /** + * Sets error. + * + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error + * + * @return $this + */ + public function setError(?ProductError $error): self + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/TooManyRequestsResponse.php similarity index 96% rename from src/Model/ManyRequestsResponse.php rename to src/Model/TooManyRequestsResponse.php index f2c782c5..6034721b 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/TooManyRequestsResponse.php @@ -1,6 +1,6 @@ 'int', + '_1h' => 'int', + '_24h' => 'int']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + '_5m' => null, + '_1h' => null, + '_24h' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + '_5m' => '5m', + '_1h' => '1h', + '_24h' => '24h']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + '_5m' => 'set5m', + '_1h' => 'set1h', + '_24h' => 'set24h']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + '_5m' => 'get5m', + '_1h' => 'get1h', + '_24h' => 'get24h']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; + $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; + $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['_5m']) { + $invalidProperties[] = "'_5m' can't be null"; + } + if (null === $this->container['_1h']) { + $invalidProperties[] = "'_1h' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets _5m. + */ + public function get5m(): int + { + return $this->container['_5m']; + } + + /** + * Sets _5m. + * + * @param int $_5m _5m + * + * @return $this + */ + public function set5m(int $_5m): self + { + $this->container['_5m'] = $_5m; + + return $this; + } + + /** + * Gets _1h. + */ + public function get1h(): int + { + return $this->container['_1h']; + } + + /** + * Sets _1h. + * + * @param int $_1h _1h + * + * @return $this + */ + public function set1h(int $_1h): self + { + $this->container['_1h'] = $_1h; + + return $this; + } + + /** + * Gets _24h. + * + * @return ?int + */ + public function get24h(): ?int + { + return $this->container['_24h']; + } + + /** + * Sets _24h. + * + * @param ?int $_24h The `24h` interval of `distinctIp`, `distinctLinkedId`, and `distinctCountry` will be omitted if the number of `events`` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. + * + * @return $this + */ + public function set24h(?int $_24h): self + { + $this->container['_24h'] = $_24h; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/VelocityIntervals.php b/src/Model/VelocityIntervals.php new file mode 100644 index 00000000..f2a84395 --- /dev/null +++ b/src/Model/VelocityIntervals.php @@ -0,0 +1,260 @@ + '\Fingerprint\ServerAPI\Model\VelocityIntervalResult']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'intervals' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'intervals' => 'intervals']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'intervals' => 'setIntervals']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'intervals' => 'getIntervals']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['intervals'] = isset($data['intervals']) ? $data['intervals'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets intervals. + * + * @return ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult + */ + public function getIntervals(): ?VelocityIntervalResult + { + return $this->container['intervals']; + } + + /** + * Sets intervals. + * + * @param ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult $intervals intervals + * + * @return $this + */ + public function setIntervals(?VelocityIntervalResult $intervals): self + { + $this->container['intervals'] = $intervals; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/VelocityResult.php b/src/Model/VelocityResult.php new file mode 100644 index 00000000..5e2a665e --- /dev/null +++ b/src/Model/VelocityResult.php @@ -0,0 +1,359 @@ + '\Fingerprint\ServerAPI\Model\VelocityIntervals', + 'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', + 'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', + 'events' => '\Fingerprint\ServerAPI\Model\VelocityIntervals']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'distinct_ip' => null, + 'distinct_linked_id' => null, + 'distinct_country' => null, + 'events' => null]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static array $attributeMap = [ + 'distinct_ip' => 'distinctIp', + 'distinct_linked_id' => 'distinctLinkedId', + 'distinct_country' => 'distinctCountry', + 'events' => 'events']; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static array $setters = [ + 'distinct_ip' => 'setDistinctIp', + 'distinct_linked_id' => 'setDistinctLinkedId', + 'distinct_country' => 'setDistinctCountry', + 'events' => 'setEvents']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static array $getters = [ + 'distinct_ip' => 'getDistinctIp', + 'distinct_linked_id' => 'getDistinctLinkedId', + 'distinct_country' => 'getDistinctCountry', + 'events' => 'getEvents']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null; + $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null; + $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (null === $this->container['distinct_ip']) { + $invalidProperties[] = "'distinct_ip' can't be null"; + } + if (null === $this->container['distinct_linked_id']) { + $invalidProperties[] = "'distinct_linked_id' can't be null"; + } + if (null === $this->container['distinct_country']) { + $invalidProperties[] = "'distinct_country' can't be null"; + } + if (null === $this->container['events']) { + $invalidProperties[] = "'events' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid(): bool + { + return 0 === count($this->listInvalidProperties()); + } + + /** + * Gets distinct_ip. + */ + public function getDistinctIp(): VelocityIntervals + { + return $this->container['distinct_ip']; + } + + /** + * Sets distinct_ip. + * + * @param VelocityIntervals $distinct_ip distinct_ip + * + * @return $this + */ + public function setDistinctIp(VelocityIntervals $distinct_ip): self + { + $this->container['distinct_ip'] = $distinct_ip; + + return $this; + } + + /** + * Gets distinct_linked_id. + */ + public function getDistinctLinkedId(): VelocityIntervals + { + return $this->container['distinct_linked_id']; + } + + /** + * Sets distinct_linked_id. + * + * @param VelocityIntervals $distinct_linked_id distinct_linked_id + * + * @return $this + */ + public function setDistinctLinkedId(VelocityIntervals $distinct_linked_id): self + { + $this->container['distinct_linked_id'] = $distinct_linked_id; + + return $this; + } + + /** + * Gets distinct_country. + */ + public function getDistinctCountry(): VelocityIntervals + { + return $this->container['distinct_country']; + } + + /** + * Sets distinct_country. + * + * @param VelocityIntervals $distinct_country distinct_country + * + * @return $this + */ + public function setDistinctCountry(VelocityIntervals $distinct_country): self + { + $this->container['distinct_country'] = $distinct_country; + + return $this; + } + + /** + * Gets events. + */ + public function getEvents(): VelocityIntervals + { + return $this->container['events']; + } + + /** + * Sets events. + * + * @param VelocityIntervals $events events + * + * @return $this + */ + public function setEvents(VelocityIntervals $events): self + { + $this->container['events'] = $events; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + */ + public function offsetGet($offset): mixed + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param int $offset Offset + * @param mixed $value Value to be set + */ + public function offsetSet($offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } +} diff --git a/src/Model/Visit.php b/src/Model/Visit.php index dc2e5461..63ad75b2 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -276,9 +276,6 @@ public function listInvalidProperties(): array if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['tag']) { - $invalidProperties[] = "'tag' can't be null"; - } if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } @@ -484,9 +481,9 @@ public function setUrl(string $url): self /** * Gets tag. * - * @return map[string,object] + * @return ?map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -494,11 +491,11 @@ public function getTag(): array /** * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ - public function setTag(array $tag): self + public function setTag(?array $tag): self { $this->container['tag'] = $tag; diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 3c4f1f36..36f39b53 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -53,7 +53,8 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess protected static array $swaggerTypes = [ 'timezone_mismatch' => 'bool', 'public_vpn' => 'bool', - 'auxiliary_mobile' => 'bool']; + 'auxiliary_mobile' => 'bool', + 'os_mismatch' => 'bool']; /** * Array of property to format mappings. Used for (de)serialization. @@ -63,7 +64,8 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess protected static array $swaggerFormats = [ 'timezone_mismatch' => null, 'public_vpn' => null, - 'auxiliary_mobile' => null]; + 'auxiliary_mobile' => null, + 'os_mismatch' => null]; /** * Array of attributes where the key is the local name, @@ -74,7 +76,8 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess protected static array $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', 'public_vpn' => 'publicVPN', - 'auxiliary_mobile' => 'auxiliaryMobile']; + 'auxiliary_mobile' => 'auxiliaryMobile', + 'os_mismatch' => 'osMismatch']; /** * Array of attributes to setter functions (for deserialization of responses). @@ -84,7 +87,8 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess protected static array $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', 'public_vpn' => 'setPublicVpn', - 'auxiliary_mobile' => 'setAuxiliaryMobile']; + 'auxiliary_mobile' => 'setAuxiliaryMobile', + 'os_mismatch' => 'setOsMismatch']; /** * Array of attributes to getter functions (for serialization of requests). @@ -94,7 +98,8 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess protected static array $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', 'public_vpn' => 'getPublicVpn', - 'auxiliary_mobile' => 'getAuxiliaryMobile']; + 'auxiliary_mobile' => 'getAuxiliaryMobile', + 'os_mismatch' => 'getOsMismatch']; /** * Associative array for storing property values. @@ -114,6 +119,7 @@ public function __construct(?array $data = null) $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; + $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; } /** @@ -198,6 +204,9 @@ public function listInvalidProperties(): array if (null === $this->container['auxiliary_mobile']) { $invalidProperties[] = "'auxiliary_mobile' can't be null"; } + if (null === $this->container['os_mismatch']) { + $invalidProperties[] = "'os_mismatch' can't be null"; + } return $invalidProperties; } @@ -224,7 +233,7 @@ public function getTimezoneMismatch(): bool /** * Sets timezone_mismatch. * - * @param bool $timezone_mismatch user's browser timezone doesn't match the timezone from which the request was originally made + * @param bool $timezone_mismatch the browser timezone doesn't match the timezone inferred from the request IP address * * @return $this */ @@ -279,6 +288,28 @@ public function setAuxiliaryMobile(bool $auxiliary_mobile): self return $this; } + /** + * Gets os_mismatch. + */ + public function getOsMismatch(): bool + { + return $this->container['os_mismatch']; + } + + /** + * Sets os_mismatch. + * + * @param bool $os_mismatch the browser runs on a different operating system than the operating system inferred from the request network signature + * + * @return $this + */ + public function setOsMismatch(bool $os_mismatch): self + { + $this->container['os_mismatch'] = $os_mismatch; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index a71cabf8..585c084a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -74,6 +74,9 @@ class WebhookVisit implements ModelInterface, \ArrayAccess 'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', 'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', 'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'remote_control' => '\Fingerprint\ServerAPI\Model\RemoteControlResult', + 'velocity' => '\Fingerprint\ServerAPI\Model\VelocityResult', + 'developer_tools' => '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'ip' => 'string', @@ -117,6 +120,9 @@ class WebhookVisit implements ModelInterface, \ArrayAccess 'high_activity' => null, 'location_spoofing' => null, 'suspect_score' => null, + 'remote_control' => null, + 'velocity' => null, + 'developer_tools' => null, 'request_id' => null, 'browser_details' => null, 'ip' => 'ipv4', @@ -161,6 +167,9 @@ class WebhookVisit implements ModelInterface, \ArrayAccess 'high_activity' => 'highActivity', 'location_spoofing' => 'locationSpoofing', 'suspect_score' => 'suspectScore', + 'remote_control' => 'remoteControl', + 'velocity' => 'velocity', + 'developer_tools' => 'developerTools', 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'ip' => 'ip', @@ -204,6 +213,9 @@ class WebhookVisit implements ModelInterface, \ArrayAccess 'high_activity' => 'setHighActivity', 'location_spoofing' => 'setLocationSpoofing', 'suspect_score' => 'setSuspectScore', + 'remote_control' => 'setRemoteControl', + 'velocity' => 'setVelocity', + 'developer_tools' => 'setDeveloperTools', 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'ip' => 'setIp', @@ -247,6 +259,9 @@ class WebhookVisit implements ModelInterface, \ArrayAccess 'high_activity' => 'getHighActivity', 'location_spoofing' => 'getLocationSpoofing', 'suspect_score' => 'getSuspectScore', + 'remote_control' => 'getRemoteControl', + 'velocity' => 'getVelocity', + 'developer_tools' => 'getDeveloperTools', 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'ip' => 'getIp', @@ -299,6 +314,9 @@ public function __construct(?array $data = null) $this->container['high_activity'] = isset($data['high_activity']) ? $data['high_activity'] : null; $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; + $this->container['remote_control'] = isset($data['remote_control']) ? $data['remote_control'] : null; + $this->container['velocity'] = isset($data['velocity']) ? $data['velocity'] : null; + $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; @@ -411,9 +429,6 @@ public function listInvalidProperties(): array if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['tag']) { - $invalidProperties[] = "'tag' can't be null"; - } if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } @@ -986,6 +1001,78 @@ public function setSuspectScore(?SuspectScoreResult $suspect_score): self return $this; } + /** + * Gets remote_control. + * + * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult + */ + public function getRemoteControl(): ?RemoteControlResult + { + return $this->container['remote_control']; + } + + /** + * Sets remote_control. + * + * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $remote_control remote_control + * + * @return $this + */ + public function setRemoteControl(?RemoteControlResult $remote_control): self + { + $this->container['remote_control'] = $remote_control; + + return $this; + } + + /** + * Gets velocity. + * + * @return ?\Fingerprint\ServerAPI\Model\VelocityResult + */ + public function getVelocity(): ?VelocityResult + { + return $this->container['velocity']; + } + + /** + * Sets velocity. + * + * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $velocity velocity + * + * @return $this + */ + public function setVelocity(?VelocityResult $velocity): self + { + $this->container['velocity'] = $velocity; + + return $this; + } + + /** + * Gets developer_tools. + * + * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult + */ + public function getDeveloperTools(): ?DeveloperToolsResult + { + return $this->container['developer_tools']; + } + + /** + * Sets developer_tools. + * + * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $developer_tools developer_tools + * + * @return $this + */ + public function setDeveloperTools(?DeveloperToolsResult $developer_tools): self + { + $this->container['developer_tools'] = $developer_tools; + + return $this; + } + /** * Gets request_id. */ @@ -1145,9 +1232,9 @@ public function setUrl(string $url): self /** * Gets tag. * - * @return map[string,object] + * @return ?map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -1155,11 +1242,11 @@ public function getTag(): array /** * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ - public function setTag(array $tag): self + public function setTag(?array $tag): self { $this->container['tag'] = $tag; diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index 06333763..6361db17 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -178,7 +178,8 @@ "methods": { "timezoneMismatch": false, "publicVPN": false, - "auxiliaryMobile": false + "auxiliaryMobile": false, + "osMismatch": false } } }, @@ -258,12 +259,7 @@ }, "cpuClass": {}, "fonts": { - "value": [ - "Arial Unicode MS", - "Gill Sans", - "Helvetica Neue", - "Menlo" - ] + "value": ["Arial Unicode MS", "Gill Sans", "Helvetica Neue", "Menlo"] } } }, @@ -276,6 +272,42 @@ "data": { "result": false } + }, + "remoteControl": { + "data": { + "result": false + } + }, + "velocity": { + "data": { + "distinctIp": { + "intervals": { + "5m": 1, + "1h": 1, + "24h": 1 + } + }, + "distinctLinkedId": {}, + "distinctCountry": { + "intervals": { + "5m": 1, + "1h": 2, + "24h": 2 + } + }, + "events": { + "intervals": { + "5m": 1, + "1h": 5, + "24h": 5 + } + } + } + }, + "developerTools": { + "data": { + "result": false + } } } } diff --git a/test/mocks/get_event_200_all_errors.json b/test/mocks/get_event_200_all_errors.json index 8245e5d2..2fe90ccb 100644 --- a/test/mocks/get_event_200_all_errors.json +++ b/test/mocks/get_event_200_all_errors.json @@ -135,6 +135,24 @@ "code": "Failed", "message": "internal server error" } + }, + "remoteControl": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "velocity": { + "error": { + "code": "Failed", + "message": "internal server error" + } + }, + "developerTools": { + "error": { + "code": "Failed", + "message": "internal server error" + } } } } diff --git a/test/mocks/get_event_200_extra_fields.json b/test/mocks/get_event_200_extra_fields.json index 03e50c01..c15eb568 100644 --- a/test/mocks/get_event_200_extra_fields.json +++ b/test/mocks/get_event_200_extra_fields.json @@ -6,6 +6,7 @@ "requestId": "0KSh65EnVoB85JBmloQK", "incognito": true, "linkedId": "somelinkedId", + "tag": {}, "time": "2019-05-21T16:40:13Z", "timestamp": 1582299576512, "url": "https://www.example.com/login", @@ -44,7 +45,8 @@ "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." }, "confidence": { - "score": 0.97 + "score": 0.97, + "revision": "v1.1" }, "visitorFound": true, "firstSeenAt": { @@ -59,6 +61,8 @@ }, "botd": { "data": { + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg", "bot": { "result": "notDetected" }, From cb21d0b4c48b7b94f4e9a7de1ab74313fe339e5f Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 27 Aug 2024 02:32:39 +0300 Subject: [PATCH 057/118] feat: add update event endpoint (PUT) --- README.md | 1 + docs/Api/FingerprintApi.md | 64 ++++++++ res/fingerprint-server-api.yaml | 59 ++++++++ src/Api/FingerprintApi.php | 249 ++++++++++++++++++++++++++++++++ 4 files changed, 373 insertions(+) diff --git a/README.md b/README.md index a9f00b37..8008cc0a 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by request ID *FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID +*FingerprintApi* | [**updateEvent**](docs/Api/FingerprintApi.md#updateevent) | **PUT** /events/{request_id} | Update an event with a given request ID ## Documentation for Models diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index d083e655..e7cfc5e5 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID +[**updateEvent**](FingerprintApi.md#updateEvent) | **PUT** /events/{request_id} | Update an event with a given request ID # **getEvent** > [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id) @@ -141,3 +142,66 @@ Array: [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) +# **updateEvent** +> updateEvent($body, $request_id) + +Update an event with a given request ID + +Change information in existing events specified by `requestId` or *flag suspicious events*. When an event is created, it is assigned `linkedId` and `tag` submitted through the JS agent parameters. This information might not be available on the client so the Server API allows for updating the attributes after the fact. **Warning** It's not possible to update events older than 10 days. + +### Example +```php +updateEvent($body, $request_id); +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->updateEvent: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**\Fingerprint\ServerAPI\Model\EventUpdateRequest**](../Model/EventUpdateRequest.md)| | + **request_id** | **string**| The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). | + +### Return type + +Array: +0. null, +1. \Psr\Http\Message\ResponseInterface + + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index de3f289a..65b6f346 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -79,6 +79,65 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorEvent404Response' + put: + tags: + - Fingerprint + operationId: updateEvent + summary: Update an event with a given request ID + description: > + Change information in existing events specified by `requestId` or *flag + suspicious events*. + + + When an event is created, it is assigned `linkedId` and `tag` submitted + through the JS agent parameters. This information might not be available + on the client so the Server API allows for updating the attributes after + the fact. + + + **Warning** It's not possible to update events older than 10 days. + parameters: + - name: request_id + in: path + description: >- + The unique event + [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EventUpdateRequest' + responses: + '200': + description: OK + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorUpdateEvent400Response' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorCommon403Response' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorEvent404Response' + '409': + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorUpdateEvent409Response' /visitors/{visitor_id}: get: tags: diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 1be0f18e..97c60e1f 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -30,6 +30,7 @@ use Fingerprint\ServerAPI\ApiException; use Fingerprint\ServerAPI\Configuration; +use Fingerprint\ServerAPI\Model\EventUpdateRequest; use Fingerprint\ServerAPI\ObjectSerializer; use Fingerprint\ServerAPI\SerializationException; use GuzzleHttp\Client; @@ -388,6 +389,172 @@ function ($e) { ); } + /** + * Operation updateEvent. + * + * Update an event with a given request ID + * + * @param EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) + * + * @return array{ null, \Psr\Http\Message\ResponseInterface } + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + */ + public function updateEvent(EventUpdateRequest $body, string $request_id): array + { + $returnType = ''; + $request = $this->updateEventRequest($body, $request_id); + + try { + $options = $this->createHttpClientOption(); + + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + $apiException = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode() + ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + return [null, $response]; + } catch (ApiException $e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 409: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + throw $e; + } + } + + /** + * Operation updateEventAsync. + * + * Update an event with a given request ID + * + * @param EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + */ + public function updateEventAsync(EventUpdateRequest $body, string $request_id): PromiseInterface + { + $returnType = ''; + $request = $this->updateEventRequest($body, $request_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + return [null, $response]; + }, + function ($e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 409: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + throw $e; + } + ); + } + /** * Create request for operation 'getEvent'. * @@ -539,6 +706,88 @@ protected function getVisitsRequest(string $visitor_id, ?string $request_id = nu ); } + /** + * Create request for operation 'updateEvent'. + * + * @throws \InvalidArgumentException + * @throws SerializationException + */ + protected function updateEventRequest(EventUpdateRequest $body, string $request_id): Request + { + // verify the required parameter 'body' is set + if (null === $body || (is_array($body) && 0 === count($body))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling updateEvent' + ); + } + // verify the required parameter 'request_id' is set + if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $request_id when calling updateEvent' + ); + } + + $resourcePath = '/events/{request_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // path params + if (null !== $request_id) { + $resourcePath = str_replace( + '{request_id}', + ObjectSerializer::toPathValue($request_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = json_encode($_tempBody); + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if (null !== $apiKey) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if (null !== $apiKey) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + + return new Request( + 'PUT', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option. * From a00f325706af38cc20e4c387db44dfa83c7a7a22 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 27 Aug 2024 02:33:32 +0300 Subject: [PATCH 058/118] feat: add delete visitor data endpoint --- README.md | 1 + docs/Api/FingerprintApi.md | 62 +++++++++ res/fingerprint-server-api.yaml | 63 +++++++++ src/Api/FingerprintApi.php | 229 ++++++++++++++++++++++++++++++++ 4 files changed, 355 insertions(+) diff --git a/README.md b/README.md index 8008cc0a..812daa4b 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ if(!$isValidWebhookSign) { Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*FingerprintApi* | [**deleteVisitorData**](docs/Api/FingerprintApi.md#deletevisitordata) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID *FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by request ID *FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID *FingerprintApi* | [**updateEvent**](docs/Api/FingerprintApi.md#updateevent) | **PUT** /events/{request_id} | Update an event with a given request ID diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index e7cfc5e5..7f367e17 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -4,10 +4,72 @@ All URIs are relative to *https://api.fpjs.io* Method | HTTP request | Description ------------- | ------------- | ------------- +[**deleteVisitorData**](FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID [**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID [**updateEvent**](FingerprintApi.md#updateEvent) | **PUT** /events/{request_id} | Update an event with a given request ID +# **deleteVisitorData** +> deleteVisitorData($visitor_id) + +Delete data by visitor ID + +Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. All delete requests are queued: * Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. * Data from older (11 days or more) identification events will be deleted after 90 days. If you are interested in using this API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. + +### Example +```php +deleteVisitorData($visitor_id); +} catch (Exception $e) { + echo 'Exception when calling FingerprintApi->deleteVisitorData: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **visitor_id** | **string**| The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. | + +### Return type + +Array: +0. null, +1. \Psr\Http\Message\ResponseInterface + + +### Authorization + +[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **getEvent** > [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id) diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 65b6f346..f6e6d701 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -281,6 +281,69 @@ paths: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' + delete: + tags: + - Fingerprint + operationId: deleteVisitorData + summary: Delete data by visitor ID + description: > + Request deleting all data associated with the specified visitor ID. This + API is useful for compliance with privacy regulations. + + All delete requests are queued: + + + * Recent data (10 days or newer) belonging to the specified visitor will + be deleted within 24 hours. + + * Data from older (11 days or more) identification events will be + deleted after 90 days. + + + If you are interested in using this API, please [contact our support + team](https://fingerprint.com/support/) to enable it for you. Otherwise, + you will receive a 403. + parameters: + - name: visitor_id + in: path + description: >- + The [visitor + ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to + delete. + required: true + schema: + type: string + responses: + '200': + description: OK. The visitor ID is scheduled for deletion. + '400': + description: >- + Bad request. The visitor ID parameter is missing or in the wrong + format. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorVisitor400Response' + '403': + description: Forbidden. Access to this API is denied. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorCommon403Response' + '404': + description: >- + Not found. The visitor ID cannot be found in this application's + data. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorVisitor404Response' + '429': + description: Too Many Requests. The request is throttled. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorCommon429Response' /webhook: trace: tags: diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 97c60e1f..8c055290 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -71,6 +71,170 @@ public function getConfig(): Configuration return $this->config; } + /** + * Operation deleteVisitorData. + * + * Delete data by visitor ID + * + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * + * @return array{ null, \Psr\Http\Message\ResponseInterface } + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + */ + public function deleteVisitorData(string $visitor_id): array + { + $returnType = ''; + $request = $this->deleteVisitorDataRequest($visitor_id); + + try { + $options = $this->createHttpClientOption(); + + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + $apiException = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode() + ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + return [null, $response]; + } catch (ApiException $e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + throw $e; + } + } + + /** + * Operation deleteVisitorDataAsync. + * + * Delete data by visitor ID + * + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + */ + public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface + { + $returnType = ''; + $request = $this->deleteVisitorDataRequest($visitor_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + return [null, $response]; + }, + function ($e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + throw $e; + } + ); + } + /** * Operation getEvent. * @@ -555,6 +719,71 @@ function ($e) { ); } + /** + * Create request for operation 'deleteVisitorData'. + * + * @throws \InvalidArgumentException + * @throws SerializationException + */ + protected function deleteVisitorDataRequest(string $visitor_id): Request + { + // verify the required parameter 'visitor_id' is set + if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $visitor_id when calling deleteVisitorData' + ); + } + + $resourcePath = '/visitors/{visitor_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // path params + if (null !== $visitor_id) { + $resourcePath = str_replace( + '{visitor_id}', + ObjectSerializer::toPathValue($visitor_id), + $resourcePath + ); + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if (null !== $apiKey) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if (null !== $apiKey) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + + return new Request( + 'DELETE', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create request for operation 'getEvent'. * From 467f185998a74287e35a4f77d9c8be92bcdd52dc Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 27 Aug 2024 15:43:31 +0300 Subject: [PATCH 059/118] chore: update test logic --- src/Api/FingerprintApi.php | 20 +++ template/api.mustache | 5 + test/FingerprintApiTest.php | 316 +++++++++++++++++++----------------- 3 files changed, 193 insertions(+), 148 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 8c055290..ac492994 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -83,6 +83,7 @@ public function getConfig(): Configuration * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException + * @throws ApiException */ public function deleteVisitorData(string $visitor_id): array { @@ -168,6 +169,8 @@ public function deleteVisitorData(string $visitor_id): array * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface { @@ -247,6 +250,7 @@ function ($e) { * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException + * @throws ApiException */ public function getEvent(string $request_id): array { @@ -327,6 +331,8 @@ public function getEvent(string $request_id): array * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ public function getEventAsync(string $request_id): PromiseInterface { @@ -406,6 +412,7 @@ function ($e) { * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException + * @throws ApiException */ public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array { @@ -491,6 +498,8 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { @@ -566,6 +575,7 @@ function ($e) { * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException + * @throws ApiException */ public function updateEvent(EventUpdateRequest $body, string $request_id): array { @@ -652,6 +662,8 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ public function updateEventAsync(EventUpdateRequest $body, string $request_id): PromiseInterface { @@ -724,6 +736,8 @@ function ($e) { * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ protected function deleteVisitorDataRequest(string $visitor_id): Request { @@ -789,6 +803,8 @@ protected function deleteVisitorDataRequest(string $visitor_id): Request * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ protected function getEventRequest(string $request_id): Request { @@ -854,6 +870,8 @@ protected function getEventRequest(string $request_id): Request * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request { @@ -940,6 +958,8 @@ protected function getVisitsRequest(string $visitor_id, ?string $request_id = nu * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ protected function updateEventRequest(EventUpdateRequest $body, string $request_id): Request { diff --git a/template/api.mustache b/template/api.mustache index 9a631e5f..14334b84 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -78,6 +78,7 @@ use \GuzzleHttp\Exception\GuzzleException; * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException + * @throws ApiException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ public function {{operationId}}({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array @@ -155,6 +156,8 @@ use \GuzzleHttp\Exception\GuzzleException; * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface { @@ -214,6 +217,8 @@ use \GuzzleHttp\Exception\GuzzleException; * * @throws \InvalidArgumentException * @throws SerializationException + * @throws GuzzleException + * @throws ApiException */ protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request { diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index afcc60f9..499da140 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -2,15 +2,16 @@ namespace Fingerprint\ServerAPI; -use Exception; use Fingerprint\ServerAPI\Api\FingerprintApi; -use Fingerprint\ServerAPI\Model\EventResponse; use Fingerprint\ServerAPI\Model\EventUpdateRequest; use Fingerprint\ServerAPI\Model\IdentificationError; use Fingerprint\ServerAPI\Model\ProductError; -use Fingerprint\ServerAPI\Model\Response; +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Handler\MockHandler; +use GuzzleHttp\HandlerStack; +use GuzzleHttp\Psr7\Response; use PHPUnit\Framework\TestCase; -use ReflectionClass; class FingerprintApiTest extends TestCase { @@ -35,13 +36,8 @@ class FingerprintApiTest extends TestCase public const MOCK_EVENT_ID = 'MOCK_EVENT_ID'; public const MOCK_EVENT_ID_400_ERROR = 'EVENT_ID_400_ERROR'; - protected function getMethod($method_name) - { - $class = new ReflectionClass(FingerprintApi::class); - $get_event_request_method = $class->getMethod($method_name); - $get_event_request_method->setAccessible(true); - return $get_event_request_method; - } + protected ClientInterface $client; + protected MockHandler $mockHandler; protected function getVersion() { @@ -53,159 +49,112 @@ protected function getVersion() public function setUp(): void { - $config = new Configuration(); - $config->setHost(getenv('FP_API_HOST')); - $config->setApiKey('api_key', getenv('FP_PRIVATE_API_KEY')); - $this->fingerprint_api = $this->getMockBuilder(FingerprintApi::class) - ->getMock(); - - $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); - $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); - $this->fingerprint_api->method('deleteVisitorData')->will($this->returnCallback([$this, 'deleteVisitorDataWithHttpInfoMock'])); - $this->fingerprint_api->method('updateEvent')->will($this->returnCallback([$this, 'updateEventWithHttpInfoMock'])); + $this->mockHandler = new MockHandler(); + $this->client = new Client(['handler' => HandlerStack::create($this->mockHandler)]); + $this->fingerprint_api = new FingerprintApi($this->client); } - /** - * @throws \ReflectionException - * @throws SerializationException - */ - public function getEventWithHttpInfoMock($request_id): array + protected function getMockResponse(string $mockId, string $method = "GET", ?string $operationId = null): Response { - $event_request_method = $this->getMethod('getEventRequest'); - /** @var \GuzzleHttp\Psr7\Request $event_request */ - $event_request = $event_request_method->invokeArgs($this->fingerprint_api, [self::MOCK_REQUEST_ID]); - $query = $event_request->getUri()->getQuery(); - $this->assertStringContainsString("ii=" . urlencode("fingerprint-pro-server-php-sdk/" . $this->getVersion()), $query); $mock_name = ""; $status = 200; - switch ($request_id) { - case self::MOCK_REQUEST_ID: - $mock_name = 'get_event_200.json'; - break; - case self::MOCK_REQUEST_ALL_ERRORS: - $mock_name = 'get_event_200_all_errors.json'; - break; - case self::MOCK_REQUEST_EXTRA_FIELDS: - $mock_name = 'get_event_200_extra_fields.json'; - break; - case self::MOCK_REQUEST_ID_WITH_UNKNOWN: - $mock_name = 'get_event_200_with_unknown_field.json'; - break; - case self::MOCK_REQUEST_ID_WITH_BROKEN: - $mock_name = 'get_event_200_with_broken_format.json'; - break; - case self::MOCK_EVENT_ID_403_ERROR: - $mock_name = 'get_event_403_error.json'; - $status = 403; - break; - case self::MOCK_EVENT_ID_404_ERROR: - $mock_name = 'get_event_404_error.json'; - $status = 404; - break; - } - - $file = file_get_contents(__DIR__ . "/mocks/$mock_name"); - $response = new \GuzzleHttp\Psr7\Response($status, [], $file); - if ($status !== 200) { - throw new ApiException("Error Processing Request", $status); + if ($method === "GET" || $method === "DELETE") { + switch ($mockId) { + case self::MOCK_REQUEST_ID: + $mock_name = 'get_event_200.json'; + break; + case self::MOCK_REQUEST_ALL_ERRORS: + $mock_name = 'get_event_200_all_errors.json'; + break; + case self::MOCK_REQUEST_EXTRA_FIELDS: + $mock_name = 'get_event_200_extra_fields.json'; + break; + case self::MOCK_REQUEST_ID_WITH_UNKNOWN: + $mock_name = 'get_event_200_with_unknown_field.json'; + break; + case self::MOCK_REQUEST_ID_WITH_BROKEN: + $mock_name = 'get_event_200_with_broken_format.json'; + break; + case self::MOCK_EVENT_ID_403_ERROR: + $mock_name = 'get_event_403_error.json'; + $status = 403; + break; + case self::MOCK_EVENT_ID_404_ERROR: + $mock_name = 'get_event_404_error.json'; + $status = 404; + break; + case self::MOCK_EVENT_ID_400_ERROR: + $mock_name = 'update_event_400_error.json'; + $status = 400; + break; + case self::MOCK_VISITOR_ID: + $mock_name = 'get_visits_200_limit_500.json'; + break; + case self::MOCK_VISITOR_REQUEST_ID: + $mock_name = "get_visits_200_limit_1.json"; + break; + case self::MOCK_VISITOR_ID_403_ERROR: + $mock_name = 'get_visits_403_error.json'; + $status = 403; + break; + case self::MOCK_VISITOR_ID_429_ERROR: + $mock_name = 'get_visits_429_too_many_requests_error.json'; + $status = 429; + break; + case self::MOCK_VISITOR_ID_400_ERROR: + $mock_name = "400_error_incorrect_visitor_id.json"; + $status = 400; + break; + case self::MOCK_VISITOR_ID_404_ERROR: + $mock_name = "404_error_visitor_not_found.json"; + $status = 404; + break; + } } - try { - $serialized = ObjectSerializer::deserialize($response, EventResponse::class); - } catch (Exception $exception) { - throw new SerializationException($response, $exception); + if ($method === "PUT") { + switch ($mockId) { + case self::MOCK_EVENT_ID: + default: + $mock_name = "update_event.json"; + break; + case self::MOCK_EVENT_ID_409_ERROR: + $status = 409; + $mock_name = "update_event_409_error.json"; + break; + case self::MOCK_EVENT_ID_404_ERROR: + $status = 404; + $mock_name = "update_event_404_error.json"; + break; + case self::MOCK_EVENT_ID_403_ERROR: + $status = 403; + $mock_name = "update_event_403_error.json"; + break; + case self::MOCK_EVENT_ID_400_ERROR: + $status = 400; + $mock_name = "update_event_400_error.json"; + break; + } } - return [$serialized, $response]; - } - - /** - * @throws SerializationException - */ - public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null): array - { - $mockFileMap = [ - self::MOCK_VISITOR_ID => ['file' => 'get_visits_200_limit_500.json', 'status' => 200], - self::MOCK_VISITOR_ID_403_ERROR => ['file' => 'get_visits_403_error.json', 'status' => 403], - self::MOCK_VISITOR_ID_429_ERROR => ['file' => 'get_visits_429_too_many_requests_error.json', 'status' => 429], - ]; - - $mock = $mockFileMap[$visitor_id]; - $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); - $visits_mock_data = \GuzzleHttp\json_decode($file); - - if ($request_id) { - $visits_mock_data->visits = array_filter($visits_mock_data->visits, function ($item) use ($request_id) { - return isset($item->requestId) && $item->requestId === $request_id; + $contents = file_get_contents(__DIR__ . "/mocks/$mock_name"); + if ($operationId) { + $visits_mock_data = json_decode($contents); + $visits_mock_data->visits = array_filter($visits_mock_data->visits, function ($item) use ($operationId) { + return isset($item->requestId) && $item->requestId === $operationId; }); + $contents = json_encode($visits_mock_data); } - if ($limit && is_numeric($limit)) { - $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); - } - - $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], json_encode($visits_mock_data)); - - if ($mock['status'] !== 200) { - throw new ApiException("Error Processing Request", $mock['status']); - } - - $serialized = ObjectSerializer::deserialize($response, Response::class); - return [$serialized, $response]; - } - - public function deleteVisitorDataWithHttpInfoMock($visitor_id): array - { - $mockFileMap = [ - self::MOCK_VISITOR_ID_400_ERROR => ['file' => '400_error_empty_visitor_id.json', 'status' => 400], - self::MOCK_VISITOR_ID_403_ERROR => ['file' => '403_error_feature_not_enabled.json', 'status' => 403], - self::MOCK_VISITOR_ID_404_ERROR => ['file' => '404_error_visitor_not_found.json', 'status' => 404], - self::MOCK_VISITOR_ID_429_ERROR => ['file' => '429_error_too_many_requests.json', 'status' => 429], - self::MOCK_VISITOR_ID => ['file' => 'delete_visitor.json', 'status' => 200], - ]; - - $mock = $mockFileMap[$visitor_id]; - $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); - $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], $file); - - if ($mock['status'] !== 200) { - throw new ApiException("Error Processing Request", $mock['status']); - } - - $serialized = ObjectSerializer::deserialize($response, Response::class); - return [$serialized, $response]; - } - - /** - * Mock PUT /events/{event_id} endpoint - * - * @throws SerializationException - */ - public function updateEventWithHttpInfoMock($updateRequest, $event_id): array - { - $mockFileMap = [ - self::MOCK_EVENT_ID_400_ERROR => ['file' => 'update_event_400_error.json', 'status' => 400], - self::MOCK_EVENT_ID_403_ERROR => ['file' => 'update_event_403_error.json', 'status' => 403], - self::MOCK_EVENT_ID_404_ERROR => ['file' => 'update_event_404_error.json', 'status' => 404], - self::MOCK_EVENT_ID_409_ERROR => ['file' => 'update_event_409_error.json', 'status' => 409], - self::MOCK_EVENT_ID => ['file' => 'update_event.json', 'status' => 200], - ]; - - $mock = $mockFileMap[$event_id]; - $file = file_get_contents(__DIR__ . "/mocks/" . $mock['file']); - $response = new \GuzzleHttp\Psr7\Response($mock['status'], [], $file); - - if ($mock['status'] !== 200) { - throw new ApiException("Error Processing Request", $mock['status']); - } - - $serialized = ObjectSerializer::deserialize($response, Response::class); - return [$serialized, $response]; + return new Response($status, [], $contents); } public function testGetEvent() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ID)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); $products = $event->getProducts(); $identification_product = $products->getIdentification(); @@ -246,6 +195,9 @@ public function testGetEvent() public function testGetEventWithExtraFields() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_EXTRA_FIELDS)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_EXTRA_FIELDS); $products = $event->getProducts(); $identification_product = $products->getIdentification(); @@ -255,6 +207,9 @@ public function testGetEventWithExtraFields() public function testGetEventWithAllErrors() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ALL_ERRORS)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ALL_ERRORS); $products = $event->getProducts(); $identification_error = $products->getIdentification()->getError(); @@ -299,12 +254,18 @@ public function testGetEventWithAllErrors() public function testGetVisits() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID)); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); $this->assertEquals($visits->getVisitorId(), self::MOCK_VISITOR_ID); } public function testGetVisitsByRequestId() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID, "GET", self::MOCK_VISITOR_REQUEST_ID)); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); foreach ($visits->getVisits() as $visit) { $this->assertEquals($visit->getRequestId(), self::MOCK_VISITOR_REQUEST_ID); @@ -313,6 +274,9 @@ public function testGetVisitsByRequestId() public function testGetVisitsWithLimit() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID)); + $limit = 100; list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, null, $limit); $count = count($visits->getVisits()); @@ -321,6 +285,9 @@ public function testGetVisitsWithLimit() public function testGetEventRawResponse() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ID)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_event_200.json")); $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); @@ -328,6 +295,9 @@ public function testGetEventRawResponse() public function testGetVisitsRawResponse() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID)); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); @@ -335,12 +305,18 @@ public function testGetVisitsRawResponse() public function testGetEventParsedModelWithUnknownField() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ID_WITH_UNKNOWN)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $this->assertEquals(false, $event->getProducts()->getIncognito()->getData()->getResult()); } public function testGetUnknownFieldFromEvent() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ID_WITH_UNKNOWN)); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); $this->assertEquals("field", $responseBody->unknown); @@ -351,6 +327,9 @@ public function testGetUnknownFieldFromEvent() public function testGetBrokenFormatEvent() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_REQUEST_ID_WITH_BROKEN)); + try { list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); } catch (SerializationException $exception) { @@ -363,13 +342,20 @@ public function testGetBrokenFormatEvent() $this->assertEquals("format", $responseBody->products->identification->data->linkedId->broken); } - public function testDeleteVisitorData() { + public function testDeleteVisitorData() + { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID, "DELETE")); + list($result, $response) = $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID); $this->assertEquals(200, $response->getStatusCode()); } public function testGetVisits403Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_403_ERROR)); + $this->expectException(ApiException::class); $this->expectExceptionCode(403); @@ -378,6 +364,9 @@ public function testGetVisits403Error() public function testGetVisits429Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_429_ERROR)); + $this->expectException(ApiException::class); $this->expectExceptionCode(429); @@ -386,6 +375,9 @@ public function testGetVisits429Error() public function testGetEvent403Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_403_ERROR)); + $this->expectException(ApiException::class); $this->expectExceptionCode(403); @@ -394,6 +386,9 @@ public function testGetEvent403Error() public function testGetEvent404Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_404_ERROR)); + $this->expectException(ApiException::class); $this->expectExceptionCode(404); @@ -402,6 +397,9 @@ public function testGetEvent404Error() public function testDeleteVisitorData400Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_400_ERROR, "DELETE")); + $this->expectException(ApiException::class); $this->expectExceptionCode(400); @@ -410,6 +408,9 @@ public function testDeleteVisitorData400Error() public function testDeleteVisitorData403Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_403_ERROR, "DELETE")); + $this->expectException(ApiException::class); $this->expectExceptionCode(403); @@ -418,6 +419,9 @@ public function testDeleteVisitorData403Error() public function testDeleteVisitorData404Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_404_ERROR, "DELETE")); + $this->expectException(ApiException::class); $this->expectExceptionCode(404); @@ -426,6 +430,9 @@ public function testDeleteVisitorData404Error() public function testDeleteVisitorData429Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_VISITOR_ID_429_ERROR, "DELETE")); + $this->expectException(ApiException::class); $this->expectExceptionCode(429); @@ -434,6 +441,9 @@ public function testDeleteVisitorData429Error() public function testUpdateEvent400Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_400_ERROR, "PUT")); + $this->expectException(ApiException::class); $this->expectExceptionCode(400); @@ -442,6 +452,10 @@ public function testUpdateEvent400Error() public function testUpdateEvent403Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_403_ERROR, "PUT")); + + $this->expectException(ApiException::class); $this->expectExceptionCode(403); @@ -450,6 +464,9 @@ public function testUpdateEvent403Error() public function testUpdateEvent404Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_404_ERROR, "PUT")); + $this->expectException(ApiException::class); $this->expectExceptionCode(404); @@ -458,6 +475,9 @@ public function testUpdateEvent404Error() public function testUpdateEvent409Error() { + $this->mockHandler->reset(); + $this->mockHandler->append($this->getMockResponse(self::MOCK_EVENT_ID_409_ERROR, "PUT")); + $this->expectException(ApiException::class); $this->expectExceptionCode(409); From c2403cc4f05a2ba50116810da8f617f848d8c1a1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 28 Aug 2024 04:13:38 +0300 Subject: [PATCH 060/118] chore: add error detail to test cases --- src/ApiException.php | 2 +- template/ApiException.mustache | 2 +- test/FingerprintApiTest.php | 39 +++++++++++++++++++++++++++++----- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/ApiException.php b/src/ApiException.php index a31ebdff..a9d7e7c2 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -43,7 +43,7 @@ class ApiException extends \Exception { protected ResponseInterface $responseObject; - protected ModelInterface $errorDetails; + protected ?ModelInterface $errorDetails = null; public function __construct(?string $message = '', ?int $code = 0) { diff --git a/template/ApiException.mustache b/template/ApiException.mustache index fe6fd54d..217c69b0 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -33,7 +33,7 @@ use Psr\Http\Message\ResponseInterface; class ApiException extends Exception { protected ResponseInterface $responseObject; - protected ModelInterface $errorDetails; + protected ?ModelInterface $errorDetails = null; public function __construct(?string $message = "", ?int $code = 0) { diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 499da140..0b9bd57b 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -3,11 +3,13 @@ namespace Fingerprint\ServerAPI; use Fingerprint\ServerAPI\Api\FingerprintApi; +use Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response; use Fingerprint\ServerAPI\Model\EventUpdateRequest; use Fingerprint\ServerAPI\Model\IdentificationError; use Fingerprint\ServerAPI\Model\ProductError; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Response; @@ -425,7 +427,13 @@ public function testDeleteVisitorData404Error() $this->expectException(ApiException::class); $this->expectExceptionCode(404); - $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_404_ERROR); + try { + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_404_ERROR); + } catch (ApiException $e) { + $this->assertEquals("VisitorNotFound", $e->getErrorDetails()->getError()->getCode()); + + throw $e; + } } public function testDeleteVisitorData429Error() @@ -447,7 +455,12 @@ public function testUpdateEvent400Error() $this->expectException(ApiException::class); $this->expectExceptionCode(400); - $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_400_ERROR); + try { + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_400_ERROR); + } catch (ApiException $e) { + $this->assertEquals("RequestCannotBeParsed", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } public function testUpdateEvent403Error() @@ -459,7 +472,12 @@ public function testUpdateEvent403Error() $this->expectException(ApiException::class); $this->expectExceptionCode(403); - $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_403_ERROR); + try { + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_403_ERROR); + } catch (ApiException $e) { + $this->assertEquals("TokenRequired", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } public function testUpdateEvent404Error() @@ -470,7 +488,13 @@ public function testUpdateEvent404Error() $this->expectException(ApiException::class); $this->expectExceptionCode(404); - $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_404_ERROR); + try { + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_404_ERROR); + } catch (ApiException $e) { + + $this->assertEquals("RequestNotFound", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } public function testUpdateEvent409Error() @@ -481,6 +505,11 @@ public function testUpdateEvent409Error() $this->expectException(ApiException::class); $this->expectExceptionCode(409); - $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_409_ERROR); + try { + $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_409_ERROR); + } catch (ApiException $e) { + $this->assertEquals("StateNotReady", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } } From 10de2a5e80e089e57a1858598b58c6b850a23465 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 28 Aug 2024 05:17:00 +0300 Subject: [PATCH 061/118] chore: add code coverage --- .github/workflows/coverage-report.yml | 41 + composer.json | 2 +- composer.lock | 2456 ++++++++++++++++--------- coverage.php | 22 + docker-compose.yml | 2 +- docker/php/Dockerfile | 11 + docker/php/xdebug.ini | 6 + phpunit.xml.dist | 3 +- template/composer.mustache | 2 +- 9 files changed, 1642 insertions(+), 903 deletions(-) create mode 100644 .github/workflows/coverage-report.yml create mode 100644 coverage.php create mode 100644 docker/php/Dockerfile create mode 100644 docker/php/xdebug.ini diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml new file mode 100644 index 00000000..663d4b0e --- /dev/null +++ b/.github/workflows/coverage-report.yml @@ -0,0 +1,41 @@ +name: 'coverage-report' +on: + push: + branches: + - main + - coverage # remove before merge to main + +permissions: + contents: write +jobs: + coverage-report: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: php-actions/phpunit@v3 + with: + php_version: "${{ matrix.php_version }}" + bootstrap: vendor/autoload.php + configuration: phpunit.xml.dist + args: --coverage-xml cov/xml + version: "9.3.0" + - name: "Parse Coverage" + run: "php ./coverage.php" + - name: Create Coverage Badges + uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 + with: + source: cov/json/index.json + output: htmlcov/badges.svg + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc + with: + branch: gh-pages + folder: htmlcov \ No newline at end of file diff --git a/composer.json b/composer.json index 61e80160..bd5e2568 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33", + "phpunit/phpunit": "9.3.0", "vlucas/phpdotenv": "^5.6" }, "autoload": { diff --git a/composer.lock b/composer.lock index 2b131405..7b9d721b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,70 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d252675910c39b945743e945daf6ff88", + "content-hash": "873eb84e1743489df43bea751fa09d53", "packages": [ - { - "name": "graham-campbell/result-type", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "autoload": { - "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], - "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:45:45+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "7.9.2", @@ -393,81 +331,6 @@ ], "time": "2024-07-18T11:15:46+00:00" }, - { - "name": "phpoption/phpoption", - "version": "1.9.3", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:41:07+00:00" - }, { "name": "psr/http-client", "version": "1.0.3", @@ -738,43 +601,87 @@ } ], "time": "2024-04-18T09:32:20+00:00" - }, + } + ], + "packages-dev": [ { - "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "name": "doctrine/deprecations", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.1 || ^8.0" }, - "provide": { - "ext-ctype": "*" + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { - "ext-ctype": "For best performance" + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -783,246 +690,932 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "constructor", + "instantiate" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { - "url": "https://symfony.com/sponsor", + "url": "https://www.doctrine-project.org/sponsorship.html", "type": "custom" }, { - "url": "https://github.com/fabpot", - "type": "github" + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "name": "graham-campbell/result-type", + "version": "v1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" } + ], + "time": "2024-07-20T21:45:45+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, + "type": "library", "autoload": { "files": [ - "bootstrap.php" + "src/DeepCopy/deep_copy.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + }, + "time": "2024-07-01T20:03:41+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.4.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + }, + "time": "2024-05-21T05:55:05+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "153ae662783729388a584b4361f2545e4d841e3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + }, + "time": "2024-02-23T11:10:43+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2 || ^2.0", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "dev", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" + }, + "time": "2024-02-29T11:52:51+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.29.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + }, + "time": "2024-05-31T08:52:43+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "filesystem", + "iterator" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "branch-alias": { + "dev-master": "3.1-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "process" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" + "php": ">=7.3" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1030,196 +1623,213 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "dotenv", - "env", - "environment" + "template" ], "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" } ], - "time": "2024-07-20T21:52:34+00:00" - } - ], - "packages-dev": [ + "time": "2020-10-26T05:33:50+00:00" + }, { - "name": "doctrine/instantiator", - "version": "1.5.0", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "constructor", - "instantiate" + "timer" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.12.0", + "name": "phpunit/phpunit", + "version": "9.3.0", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c", + "reference": "05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": "^7.3 || ^8.0", + "phpspec/prophecy": "^1.11.1", + "phpunit/php-code-coverage": "^9.0", + "phpunit/php-file-iterator": "^3.0.4", + "phpunit/php-invoker": "^3.1", + "phpunit/php-text-template": "^2.0.2", + "phpunit/php-timer": "^5.0.1", + "sebastian/code-unit": "^1.0.5", + "sebastian/comparator": "^4.0.3", + "sebastian/diff": "^4.0.2", + "sebastian/environment": "^5.1.2", + "sebastian/exporter": "^4.0.2", + "sebastian/global-state": "^5.0", + "sebastian/object-enumerator": "^4.0.2", + "sebastian/resource-operations": "^3.0.2", + "sebastian/type": "^2.2.1", + "sebastian/version": "^3.0.1" }, "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" }, + "bin": [ + "phpunit" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.3-dev" + } + }, "autoload": { "files": [ - "src/DeepCopy/deep_copy.php" + "src/Framework/Assert/Functions.php" ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.3" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2020-08-07T04:24:24+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.4", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1232,53 +1842,52 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", - "role": "Developer" + "role": "lead" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { - "url": "https://github.com/theseer", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2024-03-03T12:33:53+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1289,65 +1898,51 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "email": "sebastian@phpunit.de" } ], - "description": "Library for handling version information and constraints", + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, - "time": "2022-02-21T01:04:05+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "7.0.17", + "name": "sebastian/comparator", + "version": "4.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", - "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.3 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1362,20 +1957,31 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "coverage", - "testing", - "xunit" + "comparator", + "compare", + "equality" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -1383,32 +1989,33 @@ "type": "github" } ], - "time": "2024-03-02T06:09:37+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "2.0.6", + "name": "sebastian/complexity", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "69deeb8664f611f156a924154985fbd4911eb36b" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b", - "reference": "69deeb8664f611f156a924154985fbd4911eb36b", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "php": ">=7.1" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1427,15 +2034,11 @@ "role": "lead" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -1443,26 +2046,35 @@ "type": "github" } ], - "time": "2024-03-01T13:39:50+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "sebastian/diff", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1475,45 +2087,60 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "template" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.4", + "name": "sebastian/environment", + "version": "5.1.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb", - "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1528,18 +2155,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "timer" + "Xdebug", + "environment", + "hhvm" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -1547,28 +2175,29 @@ "type": "github" } ], - "time": "2024-03-01T13:42:41+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "4.0.4", + "name": "sebastian/exporter", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1589,16 +2218,33 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ - "tokenizer" + "export", + "exporter" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -1606,61 +2252,38 @@ "type": "github" } ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { - "name": "phpunit/phpunit", - "version": "8.5.33", + "name": "sebastian/global-state", + "version": "5.0.7", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.5", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.5", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], + "ext-uopz": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1675,61 +2298,51 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "phpunit", - "testing", - "xunit" + "global state" ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, { "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" } ], - "time": "2023-02-27T13:04:50+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", - "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "php": ">=5.6" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1744,14 +2357,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -1759,34 +2373,34 @@ "type": "github" } ], - "time": "2024-03-01T13:45:45+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.5", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1802,30 +2416,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -1833,33 +2430,32 @@ "type": "github" } ], - "time": "2022-09-14T12:31:48+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.6", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6", - "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1875,23 +2471,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -1899,35 +2485,32 @@ "type": "github" } ], - "time": "2024-03-02T06:16:36+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "sebastian/environment", - "version": "4.2.5", + "name": "sebastian/recursion-context", + "version": "4.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "56932f6049a0482853056ffd617c91ffcc754205" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205", - "reference": "56932f6049a0482853056ffd617c91ffcc754205", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1943,18 +2526,21 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -1962,34 +2548,32 @@ "type": "github" } ], - "time": "2024-03-01T13:49:59+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { - "name": "sebastian/exporter", - "version": "3.1.6", + "name": "sebastian/resource-operations", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56", - "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2005,33 +2589,12 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -2039,38 +2602,32 @@ "type": "github" } ], - "time": "2024-03-02T06:21:38+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "sebastian/global-state", - "version": "3.0.5", + "name": "sebastian/type", + "version": "2.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9", - "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3" }, "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -2085,17 +2642,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -2103,34 +2658,29 @@ "type": "github" } ], - "time": "2024-03-02T06:13:16+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.5", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "ac5b293dba925751b808e02923399fb44ff0d541" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541", - "reference": "ac5b293dba925751b808e02923399fb44ff0d541", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2145,14 +2695,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { @@ -2160,138 +2711,179 @@ "type": "github" } ], - "time": "2024-03-01T13:54:02+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.3", + "name": "symfony/polyfill-ctype", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "1d439c229e61f244ff1f211e5c99737f90c67def" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def", - "reference": "1d439c229e61f244ff1f211e5c99737f90c67def", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.1-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2024-03-01T13:56:04+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.2", + "name": "symfony/polyfill-mbstring", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c", - "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2024-03-01T14:07:30+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.3", + "name": "symfony/polyfill-php80", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee", - "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -2299,64 +2891,88 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.0-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2024-03-01T13:59:09+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "sebastian/type", - "version": "1.1.5", + "name": "theseer/tokenizer", + "version": "1.2.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874", - "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.2" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -2368,52 +2984,69 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.5" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/theseer", "type": "github" } ], - "time": "2024-03-01T14:04:07+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "vlucas/phpdotenv", + "version": "v5.6.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { - "php": ">=5.6" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "5.6-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Dotenv\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2421,68 +3054,95 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:52:34+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.2.3", + "name": "webmozart/assert", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", + "ext-ctype": "*", "php": "^7.2 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Webmozart\\Assert\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/coverage.php b/coverage.php new file mode 100644 index 00000000..484c6131 --- /dev/null +++ b/coverage.php @@ -0,0 +1,22 @@ + [ + // "lines" => ["pct" => (float)$arr["project"]["directory"]["totals"]["lines"]["@attributes"]["percent"]], + // "methods" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + // "functions" => ["pct" => (float)$arr["project"]["directory"]["totals"]["functions"]["@attributes"]["percent"]], + // "classes" => ["pct" => (float)$arr["project"]["directory"]["totals"]["classes"]["@attributes"]["percent"]], + // "traits" => ["pct" => (float)$arr["project"]["directory"]["totals"]["traits"]["@attributes"]["percent"]], + "statements" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + ] +]; +file_put_contents(__DIR__ . "/cov/json/index.json", json_encode($map)); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d94eb86e..bfbd8270 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: env_file: - .env phpunit: - image: php:8.1-cli + build: './docker/php' volumes: - ./:/app working_dir: /app diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 00000000..4059ee37 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,11 @@ +FROM php:8.2-cli + +# Install dependencies and Xdebug +RUN apt-get update && apt-get install -y \ + libicu-dev \ + && docker-php-ext-install intl \ + && pecl install xdebug \ + && docker-php-ext-enable xdebug + +# Configure Xdebug +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/docker/php/xdebug.ini b/docker/php/xdebug.ini new file mode 100644 index 00000000..1b32702a --- /dev/null +++ b/docker/php/xdebug.ini @@ -0,0 +1,6 @@ +zend_extension=xdebug.so +xdebug.mode=coverage +xdebug.start_with_request=yes +xdebug.discover_client_host=true +xdebug.client_host=host.docker.internal +xdebug.client_port=9003 \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 61400802..888497e0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,8 +13,7 @@ - ./src/Api - ./src/Model + ./src diff --git a/template/composer.mustache b/template/composer.mustache index 1f968f05..02586ed0 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -41,7 +41,7 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33", + "phpunit/phpunit": "9.3.0", "vlucas/phpdotenv": "^5.6" }, "autoload": { From 64e05100a2c20c8d1f8e5f9719ee5292c59761c2 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 28 Aug 2024 14:44:44 +0300 Subject: [PATCH 062/118] feat: add retry after policy to api exception This commit solves task inter-860 --- src/Api/FingerprintApi.php | 28 ++++++++++++++++++++++++++++ src/ApiException.php | 11 +++++++++++ template/ApiException.mustache | 11 +++++++++++ template/api.mustache | 16 ++++++++++++++++ 4 files changed, 66 insertions(+) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index e2413418..60ae6b72 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -149,6 +149,13 @@ public function getEvent(string $request_id): array break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } } @@ -219,6 +226,13 @@ function ($e) { break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } ); @@ -308,6 +322,13 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } } @@ -383,6 +404,13 @@ function ($e) { break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } ); diff --git a/src/ApiException.php b/src/ApiException.php index a31ebdff..be7536f6 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -44,6 +44,7 @@ class ApiException extends \Exception { protected ResponseInterface $responseObject; protected ModelInterface $errorDetails; + protected ?int $retryAfter = null; public function __construct(?string $message = '', ?int $code = 0) { @@ -72,4 +73,14 @@ public function setErrorDetails(ModelInterface $errorDetails): void { $this->errorDetails = $errorDetails; } + + public function getRetryAfter(): ?int + { + return $this->retryAfter; + } + + public function setRetryAfter(?int $retryAfter): void + { + $this->retryAfter = $retryAfter; + } } diff --git a/template/ApiException.mustache b/template/ApiException.mustache index fe6fd54d..f6a323b7 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -34,6 +34,7 @@ class ApiException extends Exception { protected ResponseInterface $responseObject; protected ModelInterface $errorDetails; + protected ?int $retryAfter = null; public function __construct(?string $message = "", ?int $code = 0) { @@ -63,4 +64,14 @@ class ApiException extends Exception { $this->errorDetails = $errorDetails; } + + public function getRetryAfter(): ?int + { + return $this->retryAfter; + } + + public function setRetryAfter(?int $retryAfter): void + { + $this->retryAfter = $retryAfter; + } } \ No newline at end of file diff --git a/template/api.mustache b/template/api.mustache index 9a631e5f..3a3f0cde 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -137,6 +137,14 @@ use \GuzzleHttp\Exception\GuzzleException; {{/dataType}} {{/responses}} } + + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int)$response->getHeader('retry-after')); + } + } + throw $e; } } @@ -203,6 +211,14 @@ use \GuzzleHttp\Exception\GuzzleException; {{/dataType}} {{/responses}} } + + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int)$response->getHeader('retry-after')); + } + } + throw $e; } ); From 06c94c6f4f8d49c06d6faf176d4e58ca9e411d8c Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 12:36:27 +0300 Subject: [PATCH 063/118] chore: add checks for error detail types on unit tests --- test/FingerprintApiTest.php | 68 ++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 0b9bd57b..b13e9f17 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -3,10 +3,18 @@ namespace Fingerprint\ServerAPI; use Fingerprint\ServerAPI\Api\FingerprintApi; +use Fingerprint\ServerAPI\Model\ErrorCommon403Response; +use Fingerprint\ServerAPI\Model\ErrorCommon429Response; +use Fingerprint\ServerAPI\Model\ErrorEvent404Response; +use Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response; use Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response; +use Fingerprint\ServerAPI\Model\ErrorVisitor400Response; +use Fingerprint\ServerAPI\Model\ErrorVisitor404Response; +use Fingerprint\ServerAPI\Model\ErrorVisits403; use Fingerprint\ServerAPI\Model\EventUpdateRequest; use Fingerprint\ServerAPI\Model\IdentificationError; use Fingerprint\ServerAPI\Model\ProductError; +use Fingerprint\ServerAPI\Model\TooManyRequestsResponse; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; @@ -361,7 +369,12 @@ public function testGetVisits403Error() $this->expectException(ApiException::class); $this->expectExceptionCode(403); - $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_403_ERROR); + try { + $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_403_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorVisits403::class, get_class($e->getErrorDetails())); + throw $e; + } } public function testGetVisits429Error() @@ -372,7 +385,12 @@ public function testGetVisits429Error() $this->expectException(ApiException::class); $this->expectExceptionCode(429); - $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_429_ERROR); + try { + $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_429_ERROR); + } catch (ApiException $e) { + $this->assertEquals(TooManyRequestsResponse::class, get_class($e->getErrorDetails())); + throw $e; + } } public function testGetEvent403Error() @@ -383,7 +401,12 @@ public function testGetEvent403Error() $this->expectException(ApiException::class); $this->expectExceptionCode(403); - $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_403_ERROR); + try { + $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_403_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorCommon403Response::class, get_class($e->getErrorDetails())); + throw $e; + } } public function testGetEvent404Error() @@ -394,7 +417,14 @@ public function testGetEvent404Error() $this->expectException(ApiException::class); $this->expectExceptionCode(404); - $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_404_ERROR); + try { + $this->fingerprint_api->getEvent(self::MOCK_EVENT_ID_404_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorEvent404Response::class, get_class($e->getErrorDetails())); + $this->assertEquals("request id is not found", $e->getErrorDetails()->getError()->getMessage()); + $this->assertEquals("RequestNotFound", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } public function testDeleteVisitorData400Error() @@ -405,7 +435,15 @@ public function testDeleteVisitorData400Error() $this->expectException(ApiException::class); $this->expectExceptionCode(400); - $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_400_ERROR); + try { + + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_400_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorVisitor400Response::class, get_class($e->getErrorDetails())); + $this->assertEquals("invalid visitor id", $e->getErrorDetails()->getError()->getMessage()); + $this->assertEquals("RequestCannotBeParsed", $e->getErrorDetails()->getError()->getCode()); + throw $e; + } } public function testDeleteVisitorData403Error() @@ -416,7 +454,12 @@ public function testDeleteVisitorData403Error() $this->expectException(ApiException::class); $this->expectExceptionCode(403); - $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_403_ERROR); + try { + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_403_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorCommon403Response::class, get_class($e->getErrorDetails())); + throw $e; + } } public function testDeleteVisitorData404Error() @@ -430,6 +473,7 @@ public function testDeleteVisitorData404Error() try { $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_404_ERROR); } catch (ApiException $e) { + $this->assertEquals(ErrorVisitor404Response::class, get_class($e->getErrorDetails())); $this->assertEquals("VisitorNotFound", $e->getErrorDetails()->getError()->getCode()); throw $e; @@ -444,7 +488,12 @@ public function testDeleteVisitorData429Error() $this->expectException(ApiException::class); $this->expectExceptionCode(429); - $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_429_ERROR); + try { + $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_429_ERROR); + } catch (ApiException $e) { + $this->assertEquals(ErrorCommon429Response::class, get_class($e->getErrorDetails())); + throw $e; + } } public function testUpdateEvent400Error() @@ -458,6 +507,7 @@ public function testUpdateEvent400Error() try { $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_400_ERROR); } catch (ApiException $e) { + $this->assertEquals(ErrorUpdateEvent400Response::class, get_class($e->getErrorDetails())); $this->assertEquals("RequestCannotBeParsed", $e->getErrorDetails()->getError()->getCode()); throw $e; } @@ -475,6 +525,7 @@ public function testUpdateEvent403Error() try { $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_403_ERROR); } catch (ApiException $e) { + $this->assertEquals(ErrorCommon403Response::class, get_class($e->getErrorDetails())); $this->assertEquals("TokenRequired", $e->getErrorDetails()->getError()->getCode()); throw $e; } @@ -491,7 +542,7 @@ public function testUpdateEvent404Error() try { $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_404_ERROR); } catch (ApiException $e) { - + $this->assertEquals(ErrorEvent404Response::class, get_class($e->getErrorDetails())); $this->assertEquals("RequestNotFound", $e->getErrorDetails()->getError()->getCode()); throw $e; } @@ -508,6 +559,7 @@ public function testUpdateEvent409Error() try { $this->fingerprint_api->updateEvent(new EventUpdateRequest([]), self::MOCK_EVENT_ID_409_ERROR); } catch (ApiException $e) { + $this->assertEquals(ErrorUpdateEvent409Response::class, get_class($e->getErrorDetails())); $this->assertEquals("StateNotReady", $e->getErrorDetails()->getError()->getCode()); throw $e; } From ad187f36d458b2e95b672271bc9d54480c7bb979 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 12:57:23 +0300 Subject: [PATCH 064/118] chore: regenerate from template --- src/Api/FingerprintApi.php | 28 ++++++++++++++++++++++++++++ src/ApiException.php | 2 +- template/ApiException.mustache | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index efb46588..a5c40379 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -156,6 +156,13 @@ public function deleteVisitorData(string $visitor_id): array break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } } @@ -233,6 +240,13 @@ function ($e) { break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } ); @@ -676,6 +690,13 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } } @@ -754,6 +775,13 @@ function ($e) { break; } + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')); + } + } + throw $e; } ); diff --git a/src/ApiException.php b/src/ApiException.php index be7536f6..1905ffe8 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -43,7 +43,7 @@ class ApiException extends \Exception { protected ResponseInterface $responseObject; - protected ModelInterface $errorDetails; + protected ?ModelInterface $errorDetails = null; protected ?int $retryAfter = null; public function __construct(?string $message = '', ?int $code = 0) diff --git a/template/ApiException.mustache b/template/ApiException.mustache index f6a323b7..93dc9388 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -33,7 +33,7 @@ use Psr\Http\Message\ResponseInterface; class ApiException extends Exception { protected ResponseInterface $responseObject; - protected ModelInterface $errorDetails; + protected ?ModelInterface $errorDetails = null; protected ?int $retryAfter = null; public function __construct(?string $message = "", ?int $code = 0) From 1175aab028d16007aa4e392c5ecb3e5f2775247c Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 13:10:26 +0300 Subject: [PATCH 065/118] chore: add test case for retry-after header --- src/Api/FingerprintApi.php | 16 ++++++++-------- template/api.mustache | 4 ++-- test/FingerprintApiTest.php | 8 +++++++- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index a5c40379..7d13b875 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -159,7 +159,7 @@ public function deleteVisitorData(string $visitor_id): array if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -243,7 +243,7 @@ function ($e) { if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -335,7 +335,7 @@ public function getEvent(string $request_id): array if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -414,7 +414,7 @@ function ($e) { if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -511,7 +511,7 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -595,7 +595,7 @@ function ($e) { if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -693,7 +693,7 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -778,7 +778,7 @@ function ($e) { if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } diff --git a/template/api.mustache b/template/api.mustache index 39c03724..790ac62e 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -142,7 +142,7 @@ use \GuzzleHttp\Exception\GuzzleException; if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int)$response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } @@ -218,7 +218,7 @@ use \GuzzleHttp\Exception\GuzzleException; if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int)$response->getHeader('retry-after')); + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); } } diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index b13e9f17..e58ec861 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -68,6 +68,9 @@ protected function getMockResponse(string $mockId, string $method = "GET", ?stri { $mock_name = ""; $status = 200; + $headers = [ + 'Content-Type' => 'application/json', + ]; if ($method === "GET" || $method === "DELETE") { switch ($mockId) { @@ -111,6 +114,7 @@ protected function getMockResponse(string $mockId, string $method = "GET", ?stri case self::MOCK_VISITOR_ID_429_ERROR: $mock_name = 'get_visits_429_too_many_requests_error.json'; $status = 429; + $headers['retry-after'] = 30; break; case self::MOCK_VISITOR_ID_400_ERROR: $mock_name = "400_error_incorrect_visitor_id.json"; @@ -157,7 +161,7 @@ protected function getMockResponse(string $mockId, string $method = "GET", ?stri $contents = json_encode($visits_mock_data); } - return new Response($status, [], $contents); + return new Response($status, $headers, $contents); } public function testGetEvent() @@ -389,6 +393,7 @@ public function testGetVisits429Error() $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID_429_ERROR); } catch (ApiException $e) { $this->assertEquals(TooManyRequestsResponse::class, get_class($e->getErrorDetails())); + $this->assertEquals(30, $e->getRetryAfter()); throw $e; } } @@ -492,6 +497,7 @@ public function testDeleteVisitorData429Error() $this->fingerprint_api->deleteVisitorData(self::MOCK_VISITOR_ID_429_ERROR); } catch (ApiException $e) { $this->assertEquals(ErrorCommon429Response::class, get_class($e->getErrorDetails())); + $this->assertEquals(30, $e->getRetryAfter()); throw $e; } } From 87e0fac7e8be29b8d2f72557f400504c94ffbe74 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 13:12:53 +0300 Subject: [PATCH 066/118] chore(ci): change test branch name for coverage report workflow --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 663d4b0e..02a0315d 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,7 +3,7 @@ on: push: branches: - main - - coverage # remove before merge to main + - chore/code-coverage # remove before merge to main permissions: contents: write From b4214675dbaab07a7fd72c55f6237879ac908be1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 13:14:31 +0300 Subject: [PATCH 067/118] chore(coverage): fix php version env --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 02a0315d..66b0df22 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -22,7 +22,7 @@ jobs: run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - uses: php-actions/phpunit@v3 with: - php_version: "${{ matrix.php_version }}" + php_version: 8.2 bootstrap: vendor/autoload.php configuration: phpunit.xml.dist args: --coverage-xml cov/xml From 3bc4ae7a2678b5027af8b425f5ae63b532204e02 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:47:04 +0300 Subject: [PATCH 068/118] chore(coverage): implement coverage report with docker --- .github/workflows/coverage-diff.yml | 31 +++++++++++++++++++++++++++ .github/workflows/coverage-report.yml | 13 ++++------- .gitignore | 3 ++- README.md | 1 + phpunit.xml.dist | 5 +++++ template/README.mustache | 1 + 6 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/coverage-diff.yml diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml new file mode 100644 index 00000000..a58b88ea --- /dev/null +++ b/.github/workflows/coverage-diff.yml @@ -0,0 +1,31 @@ +name: 'coverage-diff' +on: + pull_request: + branches: + - master + - main +jobs: + coverage-diff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: php-actions/phpunit@v3 + with: + php_version: 8.2 + bootstrap: vendor/autoload.php + configuration: phpunit.xml.dist + args: --coverage-xml cov/xml --coverage-html cov/html --coverage-clover cov/xml/clover.xml + version: "9.3.0" + - name: Get Cover + uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac + with: + coverageFile: ./cov/xml/clover.xml + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 66b0df22..adab99f0 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -20,22 +20,17 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 - with: - php_version: 8.2 - bootstrap: vendor/autoload.php - configuration: phpunit.xml.dist - args: --coverage-xml cov/xml - version: "9.3.0" + - name: PHPUnit + run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 with: source: cov/json/index.json - output: htmlcov/badges.svg + output: cov/html/coverage.svg - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc with: branch: gh-pages - folder: htmlcov \ No newline at end of file + folder: cov/html \ No newline at end of file diff --git a/.gitignore b/.gitignore index 84ff5e8f..f896e19d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ .env release/yarn-error.log release/node_modules -.php-cs-fixer.cache \ No newline at end of file +.php-cs-fixer.cache +cov/ \ No newline at end of file diff --git a/README.md b/README.md index 197331ae..edd8ff33 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@

CI badge CI badge +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 888497e0..788ac530 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,4 +16,9 @@ ./src + + + + + diff --git a/template/README.mustache b/template/README.mustache index 3154a0e0..273d05dd 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -10,6 +10,7 @@

CI badge CI badge +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require From 4f38f59da539add32618d5fc73158a64af6d8e35 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:50:26 +0300 Subject: [PATCH 069/118] chore(coverage): add docker-compose install step --- .github/workflows/coverage-report.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index adab99f0..9e23c41c 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -20,6 +20,9 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 + with: + version: '2.14.2' - name: PHPUnit run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" From 9414784fa099da01578f4bbd22f36092db80c652 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:53:24 +0300 Subject: [PATCH 070/118] chore(coverage): add env creation step --- .github/workflows/coverage-report.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 9e23c41c..09bf0ff8 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -23,6 +23,8 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' + - name: "Create Empty env File for Docker" + run: touch .env - name: PHPUnit run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" From dec411d9c1add4aa721e51c000a785d8f68136a5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:57:30 +0300 Subject: [PATCH 071/118] chore(template): use parentschema instead of parent for invalid properties --- src/Model/RawDeviceAttributesResult.php | 2 +- template/model_generic.mustache | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 233734d2..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return parent::listInvalidProperties(); + return []; } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0b480bf6..a0786595 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parent}} + {{#parentSchema}} $invalidProperties = parent::listInvalidProperties(); - {{/parent}} - {{^parent}} + {{/parentSchema}} + {{^parentSchema}} $invalidProperties = []; - {{/parent}} + {{/parentSchema}} {{#vars}} {{#required}} From bf03dd22e0b4ffac05c21a83ebb6acc9fdc9a509 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:03:38 +0300 Subject: [PATCH 072/118] chore(coverage): add permissions for cov directory --- .github/workflows/coverage-report.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 09bf0ff8..1934236e 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -23,6 +23,10 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit From dce75b6f1d45efa658bffd9a57dc480a6ba563e8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:13:03 +0300 Subject: [PATCH 073/118] chore(coverage-diff): use docker --- .github/workflows/coverage-diff.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index a58b88ea..3783586e 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -4,6 +4,7 @@ on: branches: - master - main + - chore/code-coverage # remove this after merged to main jobs: coverage-diff: runs-on: ubuntu-latest @@ -17,13 +18,17 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: - php_version: 8.2 - bootstrap: vendor/autoload.php - configuration: phpunit.xml.dist - args: --coverage-xml cov/xml --coverage-html cov/html --coverage-clover cov/xml/clover.xml - version: "9.3.0" + version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov + - name: "Create Empty env File for Docker" + run: touch .env + - name: PHPUnit + run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: Get Cover uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac with: From 0ad5e2440857c4b2546dd3dc607d24faad04d533 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:14:35 +0300 Subject: [PATCH 074/118] chore(coverage-diff): test coverage diff --- .github/workflows/coverage-diff.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 3783586e..9847300d 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -5,6 +5,9 @@ on: - master - main - chore/code-coverage # remove this after merged to main + push: # remove before merge to main + branches: + - chore/code-coverage jobs: coverage-diff: runs-on: ubuntu-latest From c9c75d26a95aa3f4b1b12df6d362ba3dae8a5f1d Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:18:36 +0300 Subject: [PATCH 075/118] chore(coverage): cleanup branches --- .github/workflows/coverage-diff.yml | 5 ----- .github/workflows/coverage-report.yml | 1 - 2 files changed, 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 9847300d..cf7de75f 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -2,12 +2,7 @@ name: 'coverage-diff' on: pull_request: branches: - - master - main - - chore/code-coverage # remove this after merged to main - push: # remove before merge to main - branches: - - chore/code-coverage jobs: coverage-diff: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 1934236e..3b8dc092 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - chore/code-coverage # remove before merge to main permissions: contents: write From 4876354026c220fe15781b96ed0d752f29846402 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:22:22 +0300 Subject: [PATCH 076/118] docs(readme): update coverage badge link --- README.md | 2 +- template/README.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edd8ff33..7e639589 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

CI badge CI badge -Unit Test Coverage +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require diff --git a/template/README.mustache b/template/README.mustache index 273d05dd..8f724c3b 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -10,7 +10,7 @@

CI badge CI badge -Unit Test Coverage +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require From 444e1ebd01996ae9bbeb956cab9f93b7181f41ec Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:26:59 +0300 Subject: [PATCH 077/118] chore(ci): use sha instead of version for 3rd party actions --- .github/workflows/coverage-diff.yml | 2 +- .github/workflows/coverage-report.yml | 2 +- .github/workflows/functional.yml | 2 +- .github/workflows/test.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index cf7de75f..21c764f0 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 coverage: none diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 3b8dc092..f77569f9 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 coverage: none diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 433e9d5c..9dc31240 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -22,7 +22,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: "${{ matrix.php_version }}" coverage: none diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b46db6b..0d84fd91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,14 +17,14 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: "${{ matrix.php_version }}" coverage: none tools: composer:v2 - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 + - uses: php-actions/phpunit@aed47a6852905dbd05b7c1a47c526b38fcc4bc17 with: php_version: "${{ matrix.php_version }}" bootstrap: vendor/autoload.php From 5549a026596e8eb063d562fcd86f15c17c7b942a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:29:54 +0300 Subject: [PATCH 078/118] chore(ci): try to run coverage result --- .github/workflows/coverage-diff.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 21c764f0..5aa732c6 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -3,6 +3,8 @@ on: pull_request: branches: - main + - chore/code-coverage # remove this before merge to main + - develop # remove this before merge to main jobs: coverage-diff: runs-on: ubuntu-latest From a5cdb1f4beaa0e5e5d727dd7476b23e62a5c68e9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:53:38 +0300 Subject: [PATCH 079/118] chore(coverage-diff): implement custom coverage diff --- .github/workflows/coverage-diff.yml | 57 +++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 5aa732c6..5c580610 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -27,10 +27,53 @@ jobs: chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - - name: PHPUnit - run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - - name: Get Cover - uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac - with: - coverageFile: ./cov/xml/clover.xml - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: PHPUnit for PR + run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml + - name: Checkout base branch + run: git checkout ${{ github.event.pull_request.base.ref }} + - name: PHPUnit for Base + run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml + + - name: Calculate coverage for PR branch + id: pr_coverage + run: | + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + + - name: Calculate coverage for base branch + id: base_coverage + run: | + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV + + - name: Compare coverage + run: | + COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | bc) + echo "Coverage PR: $COVERAGE_PR%" + echo "Coverage Base: $COVERAGE_BASE%" + echo "Coverage Diff: $COVERAGE_DIFF%" + + if [ $(echo "$COVERAGE_DIFF > 0" | bc) -eq 1 ]; then + COVERAGE_MESSAGE=":green_circle: Coverage increased by $COVERAGE_DIFF%" + elif [ $(echo "$COVERAGE_DIFF < 0" | bc) -eq 1 ]; then + COVERAGE_MESSAGE=":red_circle: Coverage decreased by ${COVERAGE_DIFF#-}%" + else + COVERAGE_MESSAGE=":yellow_circle: Coverage remained the same." + fi + + echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV + + - name: Post coverage comment to PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') + + curl -s -H "Authorization: token $GITHUB_TOKEN" \ + -X POST -d "$PR_COMMENT" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" From 5f72fc04dc71f195ac3744a07c09aadd6c062385 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:57:38 +0300 Subject: [PATCH 080/118] chore(coverage-diff): update checkout step --- .github/workflows/coverage-diff.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 5c580610..809cacf0 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -29,8 +29,9 @@ jobs: run: touch .env - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml - - name: Checkout base branch - run: git checkout ${{ github.event.pull_request.base.ref }} + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.base.ref }} - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml From 91909591d1afe0ce8d06c980c647ec2fe433913a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:00:37 +0300 Subject: [PATCH 081/118] chore(coverage-diff): install requirements for base branch phpunit --- .github/workflows/coverage-diff.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 809cacf0..c963f2a7 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -32,6 +32,24 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} + + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 + with: + version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov + - name: "Create Empty env File for Docker" + run: touch .env - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml From 2e1fc628f8939067610b43cc295b56492e03c42a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:05:39 +0300 Subject: [PATCH 082/118] chore(coverage-diff): update paths for diff check --- .github/workflows/coverage-diff.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index c963f2a7..029d7fad 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -56,16 +56,16 @@ jobs: - name: Calculate coverage for PR branch id: pr_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Calculate coverage for base branch id: base_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV From 8a753f7bcf489a7b8aa42ef1ba3221d4a50ad801 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:40:23 +0300 Subject: [PATCH 083/118] chore(coverage-diff): fix coverage message template --- .github/workflows/coverage-diff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 029d7fad..d60e2802 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -91,7 +91,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n'$COVERAGE_MESSAGE'"}') curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ From 1802475eece9a0a2c731bbb2919c52088ec1bedc Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:50:42 +0300 Subject: [PATCH 084/118] chore(coverage-diff): use awk instead grep for calculating diff --- .github/workflows/coverage-diff.yml | 53 +++++++++++++++++++---------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index d60e2802..c4832872 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -28,7 +28,24 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for PR - run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml + run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + - name: Calculate coverage for PR branch + id: pr_coverage + run: | + COVERAGE_PR=$(awk -F'"' ' + / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; + } + }' cov/xml/clover.xml) + echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} @@ -51,34 +68,34 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base - run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml - - - name: Calculate coverage for PR branch - id: pr_coverage - run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) - COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) - echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - + run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for base branch id: base_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) - COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + COVERAGE_BASE=$(awk -F'"' ' + / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; + } + }' cov/xml/clover.xml) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage run: | - COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | bc) + COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | awk '{printf "%.2f", $0}') echo "Coverage PR: $COVERAGE_PR%" echo "Coverage Base: $COVERAGE_BASE%" echo "Coverage Diff: $COVERAGE_DIFF%" - if [ $(echo "$COVERAGE_DIFF > 0" | bc) -eq 1 ]; then + if (( $(echo "$COVERAGE_DIFF > 0" | awk '{print ($0 > 0)}') )); then COVERAGE_MESSAGE=":green_circle: Coverage increased by $COVERAGE_DIFF%" - elif [ $(echo "$COVERAGE_DIFF < 0" | bc) -eq 1 ]; then + elif (( $(echo "$COVERAGE_DIFF < 0" | awk '{print ($0 < 0)}') )); then COVERAGE_MESSAGE=":red_circle: Coverage decreased by ${COVERAGE_DIFF#-}%" else COVERAGE_MESSAGE=":yellow_circle: Coverage remained the same." @@ -91,7 +108,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n'$COVERAGE_MESSAGE'"}') + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ From 2bd23e187594579d8dbbe4b6c79828af963abef7 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:16:03 +0300 Subject: [PATCH 085/118] chore(coverage-diff): update base calculation and message body --- .github/workflows/coverage-diff.yml | 37 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index c4832872..29197844 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -72,18 +72,22 @@ jobs: - name: Calculate coverage for base branch id: base_coverage run: | - COVERAGE_BASE=$(awk -F'"' ' + COVERAGE_BASE=$(if [ -f cov/xml/clover.xml ]; then + awk -F'"' ' / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; } - END { - if (total_statements > 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml) + }' cov/xml/clover.xml + else + echo 0 + fi) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage @@ -106,10 +110,15 @@ jobs: - name: Post coverage comment to PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERAGE_PR: ${{ env.COVERAGE_PR }} + COVERAGE_BASE: ${{ env.COVERAGE_BASE }} + COVERAGE_MESSAGE: ${{ env.COVERAGE_MESSAGE }} run: | - PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') - + PR_COMMENT=$(jq -n --arg pr_coverage "$COVERAGE_PR" \ + --arg base_coverage "$COVERAGE_BASE" \ + --arg coverage_message "$COVERAGE_MESSAGE" \ + '{"body": "### Code Coverage Report\n\n**PR Coverage**: \($pr_coverage)%\n**Base Coverage**: \($base_coverage)%\n\n\($coverage_message)"}') + curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \ No newline at end of file From 79eb7e0a72ec85db1460c9b9e24b14a4ea19acb0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:21:21 +0300 Subject: [PATCH 086/118] chore(coverage-diff): update diff calculation --- .github/workflows/coverage-diff.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 29197844..e58b4646 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -27,23 +27,29 @@ jobs: chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env + - name: Clear previous coverage data + run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for PR branch id: pr_coverage run: | COVERAGE_PR=$(awk -F'"' ' - / 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml) + coverage = (covered_statements / total_statements) * 100; + if (coverage > 100) { + coverage = 100; + } + print coverage; + } else { + print 0; + } + }' clover-pr.xml) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 From c7d0a4d6d27a61c16d9a0acb8e25c64e0b0b27e8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:23:55 +0300 Subject: [PATCH 087/118] chore(coverage-diff): fix path for clover destinations --- .github/workflows/coverage-diff.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index e58b4646..cdbc2aac 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -28,7 +28,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: Clear previous coverage data - run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml + run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for PR branch @@ -49,7 +49,7 @@ jobs: } else { print 0; } - }' clover-pr.xml) + }' cov/xml/clover.xml) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 From 3e2b8324be199dfd554c8a82d21fe2408219ab5b Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:13:59 +0300 Subject: [PATCH 088/118] chore(coverage-diff): update diff with markdown result --- .github/workflows/coverage-diff.yml | 64 +++++++--------------------- coverage.php | 65 +++++++++++++++++++++++++---- phpunit.xml.dist | 17 ++++---- src/Sealed/Sealed.php | 5 ++- test/FingerprintApiTest.php | 1 + 5 files changed, 87 insertions(+), 65 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index cdbc2aac..2208cc05 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -31,25 +31,11 @@ jobs: run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - - name: Calculate coverage for PR branch + - name: Create coverage report for PR id: pr_coverage run: | - COVERAGE_PR=$(awk -F'"' ' - / 0) { - coverage = (covered_statements / total_statements) * 100; - if (coverage > 100) { - coverage = 100; - } - print coverage; - } else { - print 0; - } - }' cov/xml/clover.xml) + php ./coverage.php + COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 @@ -75,28 +61,15 @@ jobs: run: touch .env - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - - name: Calculate coverage for base branch + - name: Create coverage report for Base id: base_coverage run: | - COVERAGE_BASE=$(if [ -f cov/xml/clover.xml ]; then - awk -F'"' ' - / 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml - else - echo 0 - fi) + php ./coverage.php + COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - + - name: Compare coverage + id: compare_coverage run: | COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | awk '{printf "%.2f", $0}') echo "Coverage PR: $COVERAGE_PR%" @@ -113,18 +86,13 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV - - name: Post coverage comment to PR - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERAGE_PR: ${{ env.COVERAGE_PR }} - COVERAGE_BASE: ${{ env.COVERAGE_BASE }} - COVERAGE_MESSAGE: ${{ env.COVERAGE_MESSAGE }} + - name: Add coverage message to markdown run: | - PR_COMMENT=$(jq -n --arg pr_coverage "$COVERAGE_PR" \ - --arg base_coverage "$COVERAGE_BASE" \ - --arg coverage_message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: \($pr_coverage)%\n**Base Coverage**: \($base_coverage)%\n\n\($coverage_message)"}') + echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md - curl -s -H "Authorization: token $GITHUB_TOKEN" \ - -X POST -d "$PR_COMMENT" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \ No newline at end of file + - name: Add comment with coverage report + uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 + with: + message: | + ${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }} + $(cat cov/markdown/coverage_report.md) \ No newline at end of file diff --git a/coverage.php b/coverage.php index 484c6131..66c58b01 100644 --- a/coverage.php +++ b/coverage.php @@ -1,22 +1,69 @@ [ - // "lines" => ["pct" => (float)$arr["project"]["directory"]["totals"]["lines"]["@attributes"]["percent"]], - // "methods" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], - // "functions" => ["pct" => (float)$arr["project"]["directory"]["totals"]["functions"]["@attributes"]["percent"]], - // "classes" => ["pct" => (float)$arr["project"]["directory"]["totals"]["classes"]["@attributes"]["percent"]], - // "traits" => ["pct" => (float)$arr["project"]["directory"]["totals"]["traits"]["@attributes"]["percent"]], - "statements" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + "statements" => ["pct" => $percentage], ] ]; -file_put_contents(__DIR__ . "/cov/json/index.json", json_encode($map)); \ No newline at end of file +file_put_contents($outputPath . "index.json", json_encode($map)); + +// Generate Markdown report +$markdown = "# Code Coverage Report\n\n"; +$markdown .= "## Overall Coverage\n\n"; +$markdown .= "| Lines | Covered | Coverage |\n"; +$markdown .= "|--------|---------|----------|\n"; +$markdown .= sprintf( + "| %d | %d | %.2f%% |\n", + $elements, + $covered, + $percentage +); + +$markdown .= "\n## Files Coverage\n\n"; +$markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; +$markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; + +foreach ($arr["project"]["file"] as $file) { + $filePath = $file["@attributes"]["name"]; + $fileMetrics = $file["metrics"]["@attributes"]; + + $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; + $conditionalsPct = $fileMetrics["conditionals"] > 0 ? ($fileMetrics["coveredconditionals"] / $fileMetrics["conditionals"]) * 100 : 0; + $statementsPct = $fileMetrics["statements"] > 0 ? ($fileMetrics["coveredstatements"] / $fileMetrics["statements"]) * 100 : 0; + + $fileElements = (int)$fileMetrics["elements"]; + $fileCoveredElements = (int)$fileMetrics["coveredelements"]; + $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; + + $markdown .= sprintf( + "| %s | %.2f%% | %.2f%% | %.2f%% | %.2f%% |\n", + basename($filePath), + $methodsPct, + $conditionalsPct, + $statementsPct, + $totalCoveragePct + ); +} + +file_put_contents($markdownPath . "coverage_report.md", $markdown); \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 788ac530..d0d03c54 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,27 @@ + ./test - - - ./src - - - + + + ./src/Api/FingerprintApi.php + ./src/Sealed/Sealed.php + ./src/Webhook/WebhookVerifier.php + ./src/ObjectSerializer.php + - + \ No newline at end of file diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 89cb06b2..33c0290d 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -105,7 +105,10 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string */ private static function decompress($data): string { - $inflated = gzinflate($data); + if (false === $data || strlen($data) === 0) { + throw new DecompressionException(); + } + $inflated = @gzinflate($data); // Ignore warnings, because we check the decompressed data's validity and throw error if necessary if (false === $inflated) { throw new DecompressionException(); diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index e498b7d7..22dac165 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -269,6 +269,7 @@ public function testGetUnknownFieldFromEvent() public function testGetBrokenFormatEvent() { + $event = null; try { list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); } catch (SerializationException $exception) { From 4561bdf5f32548159b22c89db9962da4241c2d0a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:15:32 +0300 Subject: [PATCH 089/118] refactor: supress warnings for sealed --- src/Sealed/Sealed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 33c0290d..687910b3 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -105,7 +105,7 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string */ private static function decompress($data): string { - if (false === $data || strlen($data) === 0) { + if (false === $data || 0 === strlen($data)) { throw new DecompressionException(); } $inflated = @gzinflate($data); // Ignore warnings, because we check the decompressed data's validity and throw error if necessary From e6d46e072c8773d15a89dbd92e9becb6615dc088 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:22:30 +0300 Subject: [PATCH 090/118] chore(coverage-diff): update diff base coverage calc and hide files section --- .github/workflows/coverage-diff.yml | 12 ++++++++++-- coverage.php | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 2208cc05..87530a4f 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -64,8 +64,16 @@ jobs: - name: Create coverage report for Base id: base_coverage run: | - php ./coverage.php - COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) + COVERAGE_BASE=0 + + if [ -f "./coverage.php" ]; then + php ./coverage.php + fi + + if [ -f "cov/json/index.json" ]; then + COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) + fi + echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage diff --git a/coverage.php b/coverage.php index 66c58b01..69b86d02 100644 --- a/coverage.php +++ b/coverage.php @@ -40,7 +40,8 @@ $percentage ); -$markdown .= "\n## Files Coverage\n\n"; +$markdown .= "\n

\n"; +$markdown .= "Files Coverage\n\n"; $markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; $markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; @@ -66,4 +67,6 @@ ); } +$markdown .= "\n
\n"; + file_put_contents($markdownPath . "coverage_report.md", $markdown); \ No newline at end of file From ca3cc8cadca4c002fb630ff5406f910c47c2846b Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:29:43 +0300 Subject: [PATCH 091/118] chore(coverage-diff): use markdown report as artifact --- .github/workflows/coverage-diff.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 87530a4f..bb25c5a4 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -37,6 +37,12 @@ jobs: php ./coverage.php COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + - name: Upload coverage report markdown + if: always() + uses: actions/upload-artifact@v3 + with: + name: coverage-report-md + path: cov/markdown/coverage_report.md - uses: actions/checkout@v4 with: @@ -94,6 +100,12 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV + - name: Download coverage report markdown + uses: actions/download-artifact@v3 + with: + name: coverage-report-md + path: cov/markdown/ + - name: Add coverage message to markdown run: | echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md From b9eb25949f10f7e1b62c202cb1b4295c86fe8fcb Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:34:03 +0300 Subject: [PATCH 092/118] chore(coverage-diff): update combining markdown and comment format --- .github/workflows/coverage-diff.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index bb25c5a4..a4538c06 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -106,13 +106,15 @@ jobs: name: coverage-report-md path: cov/markdown/ - - name: Add coverage message to markdown + - name: Combine Coverage Message and Report + id: combine_message run: | - echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md + echo "${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }}" > coverage_message.txt + cat cov/markdown/coverage_report.md >> coverage_message.txt + combined_message=$(cat coverage_message.txt) + echo "combined_message=$combined_message" >> $GITHUB_ENV - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: | - ${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }} - $(cat cov/markdown/coverage_report.md) \ No newline at end of file + message: ${{ env.combined_message }} \ No newline at end of file From f6b87e34d931b1481d31f1ccf12da4eee413bbe0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:41:33 +0300 Subject: [PATCH 093/118] chore(coverage-diff): combine message with coverage message --- .github/workflows/coverage-diff.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index a4538c06..0e86c274 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -107,14 +107,15 @@ jobs: path: cov/markdown/ - name: Combine Coverage Message and Report - id: combine_message run: | - echo "${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }}" > coverage_message.txt + echo "${COVERAGE_MESSAGE}" > coverage_message.txt cat cov/markdown/coverage_report.md >> coverage_message.txt combined_message=$(cat coverage_message.txt) - echo "combined_message=$combined_message" >> $GITHUB_ENV + echo "combined_message<> $GITHUB_ENV + echo "$combined_message" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: ${{ env.combined_message }} \ No newline at end of file + message: "${{ env.combined_message }}" \ No newline at end of file From 5b021e3c75f75d3c6db832ff35b6403ba083823c Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:54:11 +0300 Subject: [PATCH 094/118] chore(coverage-diff): include all php files for coverage --- phpunit.xml.dist | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d0d03c54..9ca94afb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,10 +15,7 @@ - ./src/Api/FingerprintApi.php - ./src/Sealed/Sealed.php - ./src/Webhook/WebhookVerifier.php - ./src/ObjectSerializer.php + ./src From 0bfb1b16e8dbf6d6b1bd3bf4b3e976d928ab9b72 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:59:49 +0300 Subject: [PATCH 095/118] chore(coverage-diff): remove conditionals from markdown report --- coverage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/coverage.php b/coverage.php index 69b86d02..4c386339 100644 --- a/coverage.php +++ b/coverage.php @@ -42,15 +42,14 @@ $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; -$markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; -$markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; +$markdown .= "| File | Methods | Statements | Total Coverage |\n"; +$markdown .= "|------|-------------------|------------------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = $file["@attributes"]["name"]; $fileMetrics = $file["metrics"]["@attributes"]; $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; - $conditionalsPct = $fileMetrics["conditionals"] > 0 ? ($fileMetrics["coveredconditionals"] / $fileMetrics["conditionals"]) * 100 : 0; $statementsPct = $fileMetrics["statements"] > 0 ? ($fileMetrics["coveredstatements"] / $fileMetrics["statements"]) * 100 : 0; $fileElements = (int)$fileMetrics["elements"]; @@ -58,10 +57,9 @@ $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; $markdown .= sprintf( - "| %s | %.2f%% | %.2f%% | %.2f%% | %.2f%% |\n", + "| %s | %.2f%% | %.2f%% | %.2f%% |\n", basename($filePath), $methodsPct, - $conditionalsPct, $statementsPct, $totalCoveragePct ); From 71953b67ba0db0243a4c7b0d26d75e2c0f4ea809 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 17:13:59 +0300 Subject: [PATCH 096/118] docs(contributing): add coverage report section --- contributing.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/contributing.md b/contributing.md index 75717c83..32d3c62a 100644 --- a/contributing.md +++ b/contributing.md @@ -17,6 +17,21 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` +## Creating Coverage Report + +To generate a code coverage report in markdown format, follow these steps: + +1. Run PHPUnit with the `--coverage-clover` option to generate a coverage report in Clover XML format: + ```shell + docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + ``` +2. After generating the Clover XML file, run the coverage.php script to convert it into a markdown report: + ```shell + docker-compose run php php coverage.php + ``` + +The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. + ### Testing the local source code of the SDK Use the `run_checks.php` file to make API requests using the local version of the SDK. From 7d8fed3c0de1428c563a7b543987c154488c79db Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 20:34:54 +0300 Subject: [PATCH 097/118] docs(contributing): add coverage report html section --- contributing.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 32d3c62a..438b86cb 100644 --- a/contributing.md +++ b/contributing.md @@ -17,7 +17,7 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` -## Creating Coverage Report +## Creating Coverage Report (Markdown) To generate a code coverage report in markdown format, follow these steps: @@ -32,6 +32,17 @@ To generate a code coverage report in markdown format, follow these steps: The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +## Creating Coverage Report (HTML) + +To generate a code coverage report in HTML format, just run this command: + +Run PHPUnit with the `--coverage-html` option to generate a coverage report in Clover HTML format: +```shell +docker-compose run phpunit --coverage-html=cov/html +``` + +The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. + ### Testing the local source code of the SDK Use the `run_checks.php` file to make API requests using the local version of the SDK. From b5239ef38a2b3469dba2059a66e336ae165c4cd5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 20:38:38 +0300 Subject: [PATCH 098/118] docs(contributing): fix typos in coverage html section --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 438b86cb..1c0d5bb0 100644 --- a/contributing.md +++ b/contributing.md @@ -41,7 +41,7 @@ Run PHPUnit with the `--coverage-html` option to generate a coverage report in C docker-compose run phpunit --coverage-html=cov/html ``` -The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +The html report will be saved in the cov/html directory. You can open this folder to review the coverage details. ### Testing the local source code of the SDK From f670f216666210a981798084ffa5fe9d58c5ceb0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:15:02 +0300 Subject: [PATCH 099/118] chore(coverage-diff): use relative path for coverage files --- coverage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coverage.php b/coverage.php index 4c386339..c59a9c90 100644 --- a/coverage.php +++ b/coverage.php @@ -46,7 +46,7 @@ $markdown .= "|------|-------------------|------------------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { - $filePath = $file["@attributes"]["name"]; + $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; $fileMetrics = $file["metrics"]["@attributes"]; $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; @@ -58,7 +58,7 @@ $markdown .= sprintf( "| %s | %.2f%% | %.2f%% | %.2f%% |\n", - basename($filePath), + $filePath, $methodsPct, $statementsPct, $totalCoveragePct From 6fcaae0a17578e3b3aaa9800b9591f5a9be6866e Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:30:12 +0300 Subject: [PATCH 100/118] chore(coverage-diff): use gitkeep instead of using 777 perms --- .github/workflows/coverage-diff.yml | 8 -------- .github/workflows/coverage-report.yml | 4 ---- .gitignore | 3 ++- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 coverage.php | 8 -------- 9 files changed, 2 insertions(+), 21 deletions(-) create mode 100644 cov/.gitkeep create mode 100644 cov/html/.gitkeep create mode 100644 cov/json/.gitkeep create mode 100644 cov/markdown/.gitkeep create mode 100644 cov/xml/.gitkeep diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 0e86c274..28bb4be7 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -21,10 +21,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: Clear previous coverage data @@ -59,10 +55,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index f77569f9..246a1e6f 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -22,10 +22,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit diff --git a/.gitignore b/.gitignore index f896e19d..94d68667 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ release/yarn-error.log release/node_modules .php-cs-fixer.cache -cov/ \ No newline at end of file +cov/**/*.* +!cov/**/.gitkeep \ No newline at end of file diff --git a/cov/.gitkeep b/cov/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/coverage.php b/coverage.php index c59a9c90..495e2573 100644 --- a/coverage.php +++ b/coverage.php @@ -3,14 +3,6 @@ $outputPath = __DIR__ . "/cov/json/"; $markdownPath = __DIR__ . "/cov/markdown/"; -if (!file_exists($outputPath)) { - mkdir($outputPath, 0777, true); -} - -if (!file_exists($markdownPath)) { - mkdir($markdownPath, 0777, true); -} - $contents = file_get_contents(__DIR__ . "/cov/xml/clover.xml"); $xml = simplexml_load_string($contents); $arr = json_decode(json_encode($xml), true); From 3d81684e717237b812493020f830f9aeaea8c537 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:38:08 +0300 Subject: [PATCH 101/118] chore(coverage): coverage inside phpunit xml file --- .github/workflows/coverage-diff.yml | 4 ++-- .github/workflows/coverage-report.yml | 2 +- contributing.md | 14 +++++++------- phpunit.xml.dist | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 28bb4be7..e0376c40 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -26,7 +26,7 @@ jobs: - name: Clear previous coverage data run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR - run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: Create coverage report for PR id: pr_coverage run: | @@ -58,7 +58,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base - run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: Create coverage report for Base id: base_coverage run: | diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 246a1e6f..71aaba13 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -25,7 +25,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit - run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges diff --git a/contributing.md b/contributing.md index 1c0d5bb0..c7b1094e 100644 --- a/contributing.md +++ b/contributing.md @@ -21,27 +21,27 @@ To download fresh OpenAPI schema run `sh ./scripts/sync.sh` To generate a code coverage report in markdown format, follow these steps: -1. Run PHPUnit with the `--coverage-clover` option to generate a coverage report in Clover XML format: +1. Run PHPUnit to generate a coverage report in Clover XML format: ```shell - docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + docker-compose run phpunit ``` -2. After generating the Clover XML file, run the coverage.php script to convert it into a markdown report: +2. After PHPUnit generates the Clover XML file in `cov/xml/clover.xml`, run the coverage.php script to convert it into a markdown report: ```shell docker-compose run php php coverage.php ``` -The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. ## Creating Coverage Report (HTML) To generate a code coverage report in HTML format, just run this command: -Run PHPUnit with the `--coverage-html` option to generate a coverage report in Clover HTML format: +Run PHPUnit to generate a coverage report in HTML format: ```shell -docker-compose run phpunit --coverage-html=cov/html +docker-compose run phpunit ``` -The html report will be saved in the cov/html directory. You can open this folder to review the coverage details. +The html report will be saved in the `cov/html` directory. You can open this folder to review the coverage details. ### Testing the local source code of the SDK diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9ca94afb..5f9a36d1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,7 +18,9 @@ ./src + + \ No newline at end of file From 0c5e9acab4768e23aa1a890f1a2589912c1f37c8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:42:47 +0300 Subject: [PATCH 102/118] chore(coverage): update folder permissions --- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 cov/.gitkeep mode change 100644 => 100755 cov/html/.gitkeep mode change 100644 => 100755 cov/json/.gitkeep mode change 100644 => 100755 cov/markdown/.gitkeep mode change 100644 => 100755 cov/xml/.gitkeep diff --git a/cov/.gitkeep b/cov/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep old mode 100644 new mode 100755 From e48c72a05325ca0d903b2f407e37796be6db9105 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:47:10 +0300 Subject: [PATCH 103/118] chore(coverage-diff): remove git clean --- .github/workflows/coverage-diff.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index e0376c40..517705c1 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + clean: false - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 @@ -43,6 +45,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} + clean: false - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: From b33758afc4e8a4a0d51d7dbafea202bcac9fecb7 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 12:35:33 +0300 Subject: [PATCH 104/118] chore(coverage): update folder permissions --- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 cov/.gitkeep mode change 100755 => 100644 cov/html/.gitkeep mode change 100755 => 100644 cov/json/.gitkeep mode change 100755 => 100644 cov/markdown/.gitkeep mode change 100755 => 100644 cov/xml/.gitkeep diff --git a/cov/.gitkeep b/cov/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep old mode 100755 new mode 100644 From 8daa0562c6b4cb3685488b32ae2d8a6fb0b88414 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 13:49:19 +0300 Subject: [PATCH 105/118] chore(coverage-diff): prettify overall coverage table --- coverage.php | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/coverage.php b/coverage.php index 495e2573..01c794c5 100644 --- a/coverage.php +++ b/coverage.php @@ -7,35 +7,60 @@ $xml = simplexml_load_string($contents); $arr = json_decode(json_encode($xml), true); -// Calculate total coverage -$elements = (int)$arr["project"]["metrics"]["@attributes"]["elements"]; -$covered = (int)$arr["project"]["metrics"]["@attributes"]["coveredelements"]; -$percentage = ($covered / $elements) * 100; +$metrics = $arr["project"]["metrics"]["@attributes"]; + +// Calculate coverage metrics +$statementsCovered = (int)$metrics["coveredstatements"]; +$statementsTotal = (int)$metrics["statements"]; +$statementsPct = $statementsTotal > 0 ? ($statementsCovered / $statementsTotal) * 100 : 0; + +$functionsCovered = (int)$metrics["coveredmethods"]; +$functionsTotal = (int)$metrics["methods"]; +$functionsPct = $functionsTotal > 0 ? ($functionsCovered / $functionsTotal) * 100 : 0; + +// Function to return color based on percentage +function getCoverageStatus($percentage) { + if ($percentage >= 80) { + return ":green_circle:"; + } elseif ($percentage >= 50) { + return ":yellow_circle:"; + } else { + return ":red_circle:"; + } +} // Generate JSON report $map = [ "total" => [ - "statements" => ["pct" => $percentage], + "statements" => ["pct" => $statementsPct], ] ]; file_put_contents($outputPath . "index.json", json_encode($map)); // Generate Markdown report $markdown = "# Code Coverage Report\n\n"; -$markdown .= "## Overall Coverage\n\n"; -$markdown .= "| Lines | Covered | Coverage |\n"; -$markdown .= "|--------|---------|----------|\n"; +$markdown .= "## Coverage Report\n\n"; +$markdown .= "| St. | Category | Percentage | Covered / Total |\n"; +$markdown .= "|-----|----------------|------------|-----------------|\n"; +$markdown .= sprintf( + "| %s | Statements | %.2f%% | %d / %d |\n", + getCoverageStatus($statementsPct), + $statementsPct, + $statementsCovered, + $statementsTotal +); $markdown .= sprintf( - "| %d | %d | %.2f%% |\n", - $elements, - $covered, - $percentage + "| %s | Functions | %.2f%% | %d / %d |\n", + getCoverageStatus($functionsPct), + $functionsPct, + $functionsCovered, + $functionsTotal ); $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; $markdown .= "| File | Methods | Statements | Total Coverage |\n"; -$markdown .= "|------|-------------------|------------------------|----------------|\n"; +$markdown .= "|------|---------|------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; From 630f3abc57bac2e3660e64b1d91e1f81ce52027d Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 13:52:33 +0300 Subject: [PATCH 106/118] chore(coverage-diff): prettify files coverage table --- coverage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coverage.php b/coverage.php index 01c794c5..1e9ec0c0 100644 --- a/coverage.php +++ b/coverage.php @@ -59,8 +59,8 @@ function getCoverageStatus($percentage) { $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; -$markdown .= "| File | Methods | Statements | Total Coverage |\n"; -$markdown .= "|------|---------|------------|----------------|\n"; +$markdown .= "| St. | File | Methods | Statements | Total Coverage |\n"; +$markdown .= "|-----|------|---------|------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; @@ -74,7 +74,8 @@ function getCoverageStatus($percentage) { $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; $markdown .= sprintf( - "| %s | %.2f%% | %.2f%% | %.2f%% |\n", + "| %s | %s | %.2f%% | %.2f%% | %.2f%% |\n", + getCoverageStatus($totalCoveragePct), $filePath, $methodsPct, $statementsPct, From 78ec4331d231768a2bc222a41ca9330dbcdd61f8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:02:04 +0300 Subject: [PATCH 107/118] docs(contributing): add docker section alternative to run php locally --- contributing.md | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/contributing.md b/contributing.md index c7b1094e..0b2720dc 100644 --- a/contributing.md +++ b/contributing.md @@ -17,31 +17,24 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` -## Creating Coverage Report (Markdown) +## Creating Coverage Report (Markdown and HTML) -To generate a code coverage report in markdown format, follow these steps: +To generate a code coverage report, follow these steps: -1. Run PHPUnit to generate a coverage report in Clover XML format: +1. Run PHPUnit to generate a coverage report: ```shell docker-compose run phpunit ``` -2. After PHPUnit generates the Clover XML file in `cov/xml/clover.xml`, run the coverage.php script to convert it into a markdown report: - ```shell - docker-compose run php php coverage.php - ``` - -The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. -## Creating Coverage Report (HTML) + - The Clover XML report will be saved in `cov/xml/clover.xml`. + - The HTML report will be saved in the `cov/html` directory. -To generate a code coverage report in HTML format, just run this command: - -Run PHPUnit to generate a coverage report in HTML format: -```shell -docker-compose run phpunit -``` +2. To convert the Clover XML report into a markdown report, run the coverage.php script: + ```shell + docker-compose run php php coverage.php + ``` -The html report will be saved in the `cov/html` directory. You can open this folder to review the coverage details. +The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. ### Testing the local source code of the SDK @@ -53,10 +46,26 @@ Use the `run_checks.php` file to make API requests using the local version of th 4. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. 5. Finally, run `php run_checks.php`. +### Testing the local source code of the SDK (Docker) + +As an alternative to running the SDK tests locally, you can use Docker: + +1. Ensure that Docker is installed and running on your machine. +2. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. +3. Run the following command to install dependencies using Docker: + ```shell + docker-compose run composer install + ``` +4. Run the following command to execute the SDK tests using Docker: + ```shell + docker-compose run php php run_checks.php + ``` + ### Configuration -Project configuration is described in `config.json` file. To read about available parameters run the command below: +Project configuration is described in the `config.json` file. To read about available parameters run the command below: ```shell java -jar ./bin/swagger-codegen-cli.jar config-help -l php ``` + From c3ef2adc9266e787efeb505a55b917ee1294000b Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:26:12 +0300 Subject: [PATCH 108/118] chore: test coverage report --- .github/workflows/coverage-report.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 71aaba13..80c4efcd 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,6 +3,8 @@ on: push: branches: - main + - chore/code-coverage # remove before merge to main + - develop # remove before merge to main permissions: contents: write From 282e40d34cda9d681a2659c6e930f03fc2441f91 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:45:52 +0300 Subject: [PATCH 109/118] chore(coverage-report): update docker user and group --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 80c4efcd..034df4f3 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -27,7 +27,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit - run: docker-compose run phpunit + run: docker-compose run --user "$(id -u):$(id -g)" phpunit - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges From 51747bde0bc0905057f895fd95347ac2f96b9935 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:55:15 +0300 Subject: [PATCH 110/118] chore(coverage-badge): format value for badge --- coverage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage.php b/coverage.php index 1e9ec0c0..4a4b4c6d 100644 --- a/coverage.php +++ b/coverage.php @@ -32,7 +32,7 @@ function getCoverageStatus($percentage) { // Generate JSON report $map = [ "total" => [ - "statements" => ["pct" => $statementsPct], + "statements" => ["pct" => number_format($statementsPct, 2)], ] ]; file_put_contents($outputPath . "index.json", json_encode($map)); From 19caf40626a1536d05931040d2b8c045f1742977 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:59:20 +0300 Subject: [PATCH 111/118] chore(coverage-report): add no jekyll to the exclude list for clean --- .github/workflows/coverage-report.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 034df4f3..36022ddf 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -39,4 +39,6 @@ jobs: uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc with: branch: gh-pages - folder: cov/html \ No newline at end of file + folder: cov/html + clean-exclude: | + .nojekyll \ No newline at end of file From 9f4bd046d3a5b6d9576604bcae4320dfc36c92dc Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:05:31 +0300 Subject: [PATCH 112/118] chore: update sha versions of 3rd party action versions --- .github/workflows/coverage-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 36022ddf..72e430f8 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -31,12 +31,12 @@ jobs: - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges - uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 + uses: jaywcjlove/coverage-badges-cli@df58615045079f1c827de7867044bbab3ec22b43 with: source: cov/json/index.json output: cov/html/coverage.svg - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc + uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c with: branch: gh-pages folder: cov/html From 63332def030bbd303c608f88d124ee04a86720d9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:19:59 +0300 Subject: [PATCH 113/118] refactor: rename coverage.php to more explaining name and add comment what it does --- .github/workflows/coverage-diff.yml | 6 +++--- .github/workflows/coverage-report.yml | 2 +- contributing.md | 4 ++-- coverage.php => generate_coverage_report.php | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) rename coverage.php => generate_coverage_report.php (95%) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 517705c1..4d428f6c 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -32,7 +32,7 @@ jobs: - name: Create coverage report for PR id: pr_coverage run: | - php ./coverage.php + php ./generate_coverage_report.php COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Upload coverage report markdown @@ -67,8 +67,8 @@ jobs: run: | COVERAGE_BASE=0 - if [ -f "./coverage.php" ]; then - php ./coverage.php + if [ -f "./generate_coverage_report.php" ]; then + php ./generate_coverage_report.php fi if [ -f "cov/json/index.json" ]; then diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 72e430f8..9a64d3a2 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -29,7 +29,7 @@ jobs: - name: PHPUnit run: docker-compose run --user "$(id -u):$(id -g)" phpunit - name: "Parse Coverage" - run: "php ./coverage.php" + run: "php ./generate_coverage_report.php" - name: Create Coverage Badges uses: jaywcjlove/coverage-badges-cli@df58615045079f1c827de7867044bbab3ec22b43 with: diff --git a/contributing.md b/contributing.md index 0b2720dc..826d7ea3 100644 --- a/contributing.md +++ b/contributing.md @@ -29,9 +29,9 @@ To generate a code coverage report, follow these steps: - The Clover XML report will be saved in `cov/xml/clover.xml`. - The HTML report will be saved in the `cov/html` directory. -2. To convert the Clover XML report into a markdown report, run the coverage.php script: +2. To convert the Clover XML report into a markdown report, run the generate_coverage_report.php script: ```shell - docker-compose run php php coverage.php + docker-compose run php php generate_coverage_report.php ``` The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. diff --git a/coverage.php b/generate_coverage_report.php similarity index 95% rename from coverage.php rename to generate_coverage_report.php index 4a4b4c6d..98ad057b 100644 --- a/coverage.php +++ b/generate_coverage_report.php @@ -1,5 +1,7 @@ Date: Tue, 3 Sep 2024 15:26:13 +0300 Subject: [PATCH 114/118] chore: cleanup branches for coverage actions --- .github/workflows/coverage-diff.yml | 5 +---- .github/workflows/coverage-report.yml | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 4d428f6c..d5323917 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -1,10 +1,7 @@ name: 'coverage-diff' on: pull_request: - branches: - - main - - chore/code-coverage # remove this before merge to main - - develop # remove this before merge to main + jobs: coverage-diff: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 9a64d3a2..2ed93a63 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,8 +3,6 @@ on: push: branches: - main - - chore/code-coverage # remove before merge to main - - develop # remove before merge to main permissions: contents: write From 8c60356de7902f4d98f4b9c03bbe6ecf8bd3cb8c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:30:49 +0300 Subject: [PATCH 115/118] chore: use v4 instead of v3 for github builtin actions --- .github/workflows/coverage-diff.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index d5323917..f62e2fa3 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -34,7 +34,7 @@ jobs: echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Upload coverage report markdown if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report-md path: cov/markdown/coverage_report.md @@ -93,7 +93,7 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV - name: Download coverage report markdown - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: coverage-report-md path: cov/markdown/ From 9170f82569afa1b52e316f18d1c960f9da7fcccf Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:33:42 +0300 Subject: [PATCH 116/118] chore: add jub summary for coverage diff --- .github/workflows/coverage-diff.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index f62e2fa3..6c6662c9 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -110,4 +110,9 @@ jobs: - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: "${{ env.combined_message }}" \ No newline at end of file + message: "${{ env.combined_message }}" + - name: Add coverage report to the job summary + run: | + { + echo "${{ env.combined_message }}" + } >> $GITHUB_STEP_SUMMARY \ No newline at end of file From 6af96bd1dc5566a4e147d10690622b386274954b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 4 Sep 2024 09:28:48 +0000 Subject: [PATCH 117/118] chore(release): 5.0.0-develop.1 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [5.0.0-develop.1](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/compare/v4.1.0...v5.0.0-develop.1) (2024-09-04) ### ⚠ BREAKING CHANGES * Renamed Error Response Model Names `ErrorEvent403ResponseError` → `Common403ErrorResponse` `ManyRequestsResponse` → `TooManyRequestsResponse` * Webhook `tag` field is now optional * API Methods now throws `SerializationException` * API Methods returns tuple instead of models * API Methods removed other than `getModel` * Upgraded minimum php version to 8.1 * Request logic is rewritten, Upgraded minimum php version to 8.1 ### Features * add `remoteControl`, `velocity` and `developerTools` signals ([5bf9368](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/5bf9368fb1bb5abbfa72366fe6c66fe32352ad54)) * add delete visitor data endpoint ([a00f325](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/a00f325706af38cc20e4c387db44dfa83c7a7a22)) * add retry after policy to api exception ([64e0510](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/64e05100a2c20c8d1f8e5f9719ee5292c59761c2)) * add support for validating webhook signatures inter-768 ([6a4cbd6](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/6a4cbd6e2a521a209806337d90ae8f7e291a534b)) * add update event endpoint (PUT) ([cb21d0b](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/cb21d0b4c48b7b94f4e9a7de1ab74313fe339e5f)) * change api to return tuple instead of serialized model ([62e4ad3](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/62e4ad3020425667f45e3beeb166b4095a437ab5)) * introduce rawResponse for getVisits and getEvent methods ([9b01ba6](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/9b01ba65e7ac794c77afedc155823baef2c80b17)) * introduce serialization exception ([bfea23a](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/bfea23a50b61152d4fc65d290c730d0e3fcb6123)) * only generate models and docs from swagger codegen ([26e984f](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/26e984ffd01dc9f21af3dd4da75fcb7e4309961f)) * remove raw response and introduce with http info ([ce2fedf](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/ce2fedfcd94f5f1459049ba49eff75e2d3b8620c)) * rewrite request logic ([0016822](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/001682270fd4370484b25062550a65bd375b9372)) * upgrade min php version to 8 ([5698871](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/5698871fa497ee4ad50b2941d39769b45f15dfc2)) ### Bug Fixes * serializaiton problem on sealed results ([29cb26c](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/29cb26c3f50bfa035ca750948bb92a2299f579bd)) --- CHANGELOG.md | 35 + README.md | 2 +- composer.json | 2 +- config.json | 2 +- src/Api/FingerprintApi.php | 980 ++++++++---------- src/ApiException.php | 28 +- src/Configuration.php | 163 ++- src/Model/ASN.php | 214 ++-- src/Model/BotdDetectionResult.php | 207 ++-- src/Model/BotdResult.php | 303 +++--- src/Model/BrowserDetails.php | 311 +++--- src/Model/ClonedAppResult.php | 188 ++-- src/Model/Common403ErrorResponse.php | 217 ++-- src/Model/Confidence.php | 197 ++-- src/Model/DataCenter.php | 195 ++-- src/Model/DeprecatedIPLocation.php | 332 +++--- src/Model/DeprecatedIPLocationCity.php | 189 ++-- src/Model/DeveloperToolsResult.php | 190 ++-- src/Model/EmulatorResult.php | 188 ++-- src/Model/ErrorCommon403Response.php | 193 ++-- src/Model/ErrorCommon429Response.php | 193 ++-- src/Model/ErrorCommon429ResponseError.php | 203 ++-- src/Model/ErrorEvent404Response.php | 193 ++-- src/Model/ErrorEvent404ResponseError.php | 201 ++-- src/Model/ErrorUpdateEvent400Response.php | 193 ++-- .../ErrorUpdateEvent400ResponseError.php | 205 ++-- src/Model/ErrorUpdateEvent409Response.php | 193 ++-- .../ErrorUpdateEvent409ResponseError.php | 201 ++-- src/Model/ErrorVisitor400Response.php | 193 ++-- src/Model/ErrorVisitor400ResponseError.php | 203 ++-- src/Model/ErrorVisitor404Response.php | 193 ++-- src/Model/ErrorVisitor404ResponseError.php | 201 ++-- src/Model/ErrorVisits403.php | 190 ++-- src/Model/EventResponse.php | 206 ++-- src/Model/EventUpdateRequest.php | 213 ++-- src/Model/FactoryResetResult.php | 197 ++-- src/Model/FridaResult.php | 188 ++-- src/Model/HighActivityResult.php | 199 ++-- src/Model/IPLocation.php | 331 +++--- src/Model/IPLocationCity.php | 189 ++-- src/Model/IdentificationError.php | 205 ++-- src/Model/IncognitoResult.php | 190 ++-- src/Model/IpBlockListResult.php | 205 ++-- src/Model/IpBlockListResultDetails.php | 201 ++-- src/Model/IpInfoResult.php | 205 ++-- src/Model/IpInfoResultV4.php | 245 ++--- src/Model/IpInfoResultV6.php | 245 ++--- src/Model/JailbrokenResult.php | 188 ++-- src/Model/Location.php | 197 ++-- src/Model/LocationSpoofingResult.php | 190 ++-- src/Model/ModelInterface.php | 22 +- src/Model/PrivacySettingsResult.php | 188 ++-- src/Model/ProductError.php | 205 ++-- src/Model/ProductsResponse.php | 667 ++++++------ src/Model/ProductsResponseBotd.php | 204 ++-- src/Model/ProductsResponseIdentification.php | 204 ++-- .../ProductsResponseIdentificationData.php | 494 ++++----- src/Model/ProxyResult.php | 190 ++-- src/Model/RawDeviceAttributesResult.php | 179 ++-- src/Model/RemoteControlResult.php | 188 ++-- src/Model/Response.php | 232 ++--- src/Model/ResponseVisits.php | 473 ++++----- src/Model/RootAppsResult.php | 188 ++-- src/Model/SeenAt.php | 197 ++-- src/Model/SignalResponseClonedApp.php | 204 ++-- src/Model/SignalResponseDeveloperTools.php | 204 ++-- src/Model/SignalResponseEmulator.php | 204 ++-- src/Model/SignalResponseFactoryReset.php | 204 ++-- src/Model/SignalResponseFrida.php | 204 ++-- src/Model/SignalResponseHighActivity.php | 204 ++-- src/Model/SignalResponseIncognito.php | 204 ++-- src/Model/SignalResponseIpBlocklist.php | 204 ++-- src/Model/SignalResponseIpInfo.php | 204 ++-- src/Model/SignalResponseJailbroken.php | 204 ++-- src/Model/SignalResponseLocationSpoofing.php | 204 ++-- src/Model/SignalResponsePrivacySettings.php | 204 ++-- src/Model/SignalResponseProxy.php | 204 ++-- .../SignalResponseRawDeviceAttributes.php | 204 ++-- src/Model/SignalResponseRemoteControl.php | 204 ++-- src/Model/SignalResponseRootApps.php | 204 ++-- src/Model/SignalResponseSuspectScore.php | 204 ++-- src/Model/SignalResponseTampering.php | 204 ++-- src/Model/SignalResponseTor.php | 204 ++-- src/Model/SignalResponseVelocity.php | 204 ++-- src/Model/SignalResponseVirtualMachine.php | 204 ++-- src/Model/SignalResponseVpn.php | 204 ++-- src/Model/Subdivision.php | 196 ++-- src/Model/SuspectScoreResult.php | 188 ++-- src/Model/TamperingResult.php | 199 ++-- src/Model/TooManyRequestsResponse.php | 190 ++-- src/Model/TorResult.php | 190 ++-- src/Model/VelocityIntervalResult.php | 215 ++-- src/Model/VelocityIntervals.php | 193 ++-- src/Model/VelocityResult.php | 260 ++--- src/Model/VirtualMachineResult.php | 188 ++-- src/Model/Visit.php | 471 ++++----- src/Model/VpnResult.php | 243 ++--- src/Model/VpnResultMethods.php | 241 ++--- src/Model/WebhookVisit.php | 944 +++++++++-------- 99 files changed, 11208 insertions(+), 10921 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b994d5fe..4967cd03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +## [5.0.0-develop.1](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/compare/v4.1.0...v5.0.0-develop.1) (2024-09-04) + + +### ⚠ BREAKING CHANGES + +* Renamed Error Response Model Names +`ErrorEvent403ResponseError` → `Common403ErrorResponse` +`ManyRequestsResponse` → `TooManyRequestsResponse` +* Webhook `tag` field is now optional +* API Methods now throws `SerializationException` +* API Methods returns tuple instead of models +* API Methods removed other than `getModel` +* Upgraded minimum php version to 8.1 +* Request logic is rewritten, Upgraded minimum php version to 8.1 + +### Features + +* add `remoteControl`, `velocity` and `developerTools` signals ([5bf9368](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/5bf9368fb1bb5abbfa72366fe6c66fe32352ad54)) +* add delete visitor data endpoint ([a00f325](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/a00f325706af38cc20e4c387db44dfa83c7a7a22)) +* add retry after policy to api exception ([64e0510](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/64e05100a2c20c8d1f8e5f9719ee5292c59761c2)) +* add support for validating webhook signatures inter-768 ([6a4cbd6](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/6a4cbd6e2a521a209806337d90ae8f7e291a534b)) +* add update event endpoint (PUT) ([cb21d0b](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/cb21d0b4c48b7b94f4e9a7de1ab74313fe339e5f)) +* change api to return tuple instead of serialized model ([62e4ad3](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/62e4ad3020425667f45e3beeb166b4095a437ab5)) +* introduce rawResponse for getVisits and getEvent methods ([9b01ba6](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/9b01ba65e7ac794c77afedc155823baef2c80b17)) +* introduce serialization exception ([bfea23a](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/bfea23a50b61152d4fc65d290c730d0e3fcb6123)) +* only generate models and docs from swagger codegen ([26e984f](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/26e984ffd01dc9f21af3dd4da75fcb7e4309961f)) +* remove raw response and introduce with http info ([ce2fedf](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/ce2fedfcd94f5f1459049ba49eff75e2d3b8620c)) +* rewrite request logic ([0016822](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/001682270fd4370484b25062550a65bd375b9372)) +* upgrade min php version to 8 ([5698871](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/5698871fa497ee4ad50b2941d39769b45f15dfc2)) + + +### Bug Fixes + +* serializaiton problem on sealed results ([29cb26c](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/commit/29cb26c3f50bfa035ca750948bb92a2299f579bd)) + ## [4.1.0](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/compare/v4.0.0...v4.1.0) (2024-03-26) diff --git a/README.md b/README.md index a39746e1..6996a129 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 3 - - Package version: 4.1.0 + - Package version: dev-5.0.0-1 - Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen ## Requirements diff --git a/composer.json b/composer.json index bd5e2568..04fb84fd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "fingerprint/fingerprint-pro-server-api-sdk", - "version": "4.1.0", + "version": "dev-5.0.0-1", "description": "Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro.", "keywords": [ "swagger", diff --git a/config.json b/config.json index 6b9a6000..20883265 100644 --- a/config.json +++ b/config.json @@ -8,5 +8,5 @@ "gitUserId": "fingerprintjs", "gitRepoId": "fingerprint-pro-server-api-php-sdk", "description": "Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro.", - "artifactVersion": "4.1.0" + "artifactVersion": "dev-5.0.0-1" } diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 7d13b875..efe7553b 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -1,17 +1,16 @@ client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -71,19 +67,18 @@ public function getConfig(): Configuration return $this->config; } + /** - * Operation deleteVisitorData. + * Operation deleteVisitorData * * Delete data by visitor ID * - * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) - * - * @return array{ null, \Psr\Http\Message\ResponseInterface } - * + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException + * @return array{ null, \Psr\Http\Message\ResponseInterface } */ public function deleteVisitorData(string $visitor_id): array { @@ -92,7 +87,6 @@ public function deleteVisitorData(string $visitor_id): array try { $options = $this->createHttpClientOption(); - try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -101,7 +95,6 @@ public function deleteVisitorData(string $visitor_id): array $e->getCode() ); $apiException->setResponseObject($e->getResponse()); - throw $apiException; } @@ -117,69 +110,60 @@ public function deleteVisitorData(string $visitor_id): array $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } return [null, $response]; + } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 400: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - } + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + } - if (429 === $e->getCode()) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } - } - throw $e; - } + throw $e; + } } /** - * Operation deleteVisitorDataAsync. - * - * Delete data by visitor ID - * - * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface + * Operation deleteVisitorDataAsync + * + * Delete data by visitor ID + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function deleteVisitorDataAsync(string $visitor_id): \GuzzleHttp\Promise\PromiseInterface { $returnType = ''; $request = $this->deleteVisitorDataRequest($visitor_id); @@ -187,7 +171,7 @@ public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( - function ($response) use ($request) { + function ($response) use ($returnType, $request) { $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { @@ -200,47 +184,37 @@ function ($response) use ($request) { $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } - return [null, $response]; }, function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 400: + case 400: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 403: + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 404: + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 429: + case 429: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; } - if (429 === $e->getCode()) { + if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -253,18 +227,86 @@ function ($e) { } /** - * Operation getEvent. + * Create request for operation 'deleteVisitorData' * - * Get event by request ID * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function deleteVisitorDataRequest(string $visitor_id): \GuzzleHttp\Psr7\Request + { + // verify the required parameter 'visitor_id' is set + if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $visitor_id when calling deleteVisitorData' + ); + } + + $resourcePath = '/visitors/{visitor_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + + // path params + if ($visitor_id !== null) { + $resourcePath = str_replace( + '{' . 'visitor_id' . '}', + ObjectSerializer::toPathValue($visitor_id), + $resourcePath + ); + } + + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if ($apiKey !== null) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if ($apiKey !== null) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + + /** + * Operation getEvent * - * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } + * Get event by request ID * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException + * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent(string $request_id): array { @@ -273,7 +315,6 @@ public function getEvent(string $request_id): array try { $options = $this->createHttpClientOption(); - try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -282,7 +323,6 @@ public function getEvent(string $request_id): array $e->getCode() ); $apiException->setResponseObject($e->getResponse()); - throw $apiException; } @@ -298,64 +338,58 @@ public function getEvent(string $request_id): array $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; + } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 200: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - } + case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + } - if (429 === $e->getCode()) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } - } - throw $e; - } + throw $e; + } } /** - * Operation getEventAsync. - * - * Get event by request ID - * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function getEventAsync(string $request_id): PromiseInterface + * Operation getEventAsync + * + * Get event by request ID + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function getEventAsync(string $request_id): \GuzzleHttp\Promise\PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -376,7 +410,6 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } @@ -387,31 +420,25 @@ function ($response) use ($returnType, $request) { function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 200: + case 200: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 403: + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 404: + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; } - if (429 === $e->getCode()) { + if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -424,32 +451,99 @@ function ($e) { } /** - * Operation getVisits. + * Create request for operation 'getEvent' * - * Get visits by visitor ID * - * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function getEventRequest(string $request_id): \GuzzleHttp\Psr7\Request + { + // verify the required parameter 'request_id' is set + if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $request_id when calling getEvent' + ); + } + + $resourcePath = '/events/{request_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + + // path params + if ($request_id !== null) { + $resourcePath = str_replace( + '{' . 'request_id' . '}', + ObjectSerializer::toPathValue($request_id), + $resourcePath + ); + } + + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if ($apiKey !== null) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if ($apiKey !== null) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + + /** + * Operation getVisits * - * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } + * Get visits by visitor ID * + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException + * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } */ - public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array + public function getVisits(string $visitor_id, string $request_id = null, string $linked_id = null, int $limit = null, string $pagination_key = null, int $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); try { $options = $this->createHttpClientOption(); - try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -458,7 +552,6 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin $e->getCode() ); $apiException->setResponseObject($e->getResponse()); - throw $apiException; } @@ -474,69 +567,63 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; + } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 200: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - } + case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + } - if (429 === $e->getCode()) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } - } - throw $e; - } + throw $e; + } } /** - * Operation getVisitsAsync. - * - * Get visits by visitor ID - * - * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface + * Operation getVisitsAsync + * + * Get visits by visitor ID + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function getVisitsAsync(string $visitor_id, string $request_id = null, string $linked_id = null, int $limit = null, string $pagination_key = null, int $before = null): \GuzzleHttp\Promise\PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -557,7 +644,6 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } @@ -568,31 +654,25 @@ function ($response) use ($returnType, $request) { function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 200: + case 200: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 403: + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 429: + case 429: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; } - if (429 === $e->getCode()) { + if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -605,28 +685,115 @@ function ($e) { } /** - * Operation updateEvent. + * Create request for operation 'getVisits' * - * Update an event with a given request ID * - * @param EventUpdateRequest $body (required) - * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function getVisitsRequest(string $visitor_id, string|null $request_id = null, string|null $linked_id = null, int|null $limit = null, string|null $pagination_key = null, int|null $before = null): \GuzzleHttp\Psr7\Request + { + // verify the required parameter 'visitor_id' is set + if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $visitor_id when calling getVisits' + ); + } + + $resourcePath = '/visitors/{visitor_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // query params + if ($request_id !== null) { + $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); + } + // query params + if ($linked_id !== null) { + $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); + } + // query params + if ($pagination_key !== null) { + $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); + } + // query params + if ($before !== null) { + $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); + } + + // path params + if ($visitor_id !== null) { + $resourcePath = str_replace( + '{' . 'visitor_id' . '}', + ObjectSerializer::toPathValue($visitor_id), + $resourcePath + ); + } + + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if ($apiKey !== null) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if ($apiKey !== null) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + + /** + * Operation updateEvent * - * @return array{ null, \Psr\Http\Message\ResponseInterface } + * Update an event with a given request ID * + * @param \Fingerprint\ServerAPI\Model\EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException + * @return array{ null, \Psr\Http\Message\ResponseInterface } */ - public function updateEvent(EventUpdateRequest $body, string $request_id): array + public function updateEvent(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): array { $returnType = ''; $request = $this->updateEventRequest($body, $request_id); try { $options = $this->createHttpClientOption(); - try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -635,7 +802,6 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array $e->getCode() ); $apiException->setResponseObject($e->getResponse()); - throw $apiException; } @@ -651,70 +817,61 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } return [null, $response]; + } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 400: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - - case 409: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - - break; - } + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + case 409: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + } - if (429 === $e->getCode()) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + if ($e->getCode() === 429) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } - } - throw $e; - } + throw $e; + } } /** - * Operation updateEventAsync. - * - * Update an event with a given request ID - * - * @param EventUpdateRequest $body (required) - * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function updateEventAsync(EventUpdateRequest $body, string $request_id): PromiseInterface + * Operation updateEventAsync + * + * Update an event with a given request ID + * @param \Fingerprint\ServerAPI\Model\EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function updateEventAsync(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): \GuzzleHttp\Promise\PromiseInterface { $returnType = ''; $request = $this->updateEventRequest($body, $request_id); @@ -722,7 +879,7 @@ public function updateEventAsync(EventUpdateRequest $body, string $request_id): return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( - function ($response) use ($request) { + function ($response) use ($returnType, $request) { $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { @@ -735,47 +892,37 @@ function ($response) use ($request) { $statusCode ); $apiException->setResponseObject($response); - throw $apiException; } - return [null, $response]; }, function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); - switch ($e->getCode()) { - case 400: + case 400: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 403: + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 404: + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; - - case 409: + case 409: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); - break; } - if (429 === $e->getCode()) { + if ($e->getCode() === 429) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -788,245 +935,24 @@ function ($e) { } /** - * Create request for operation 'deleteVisitorData'. - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function deleteVisitorDataRequest(string $visitor_id): Request - { - // verify the required parameter 'visitor_id' is set - if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { - throw new \InvalidArgumentException( - 'Missing the required parameter $visitor_id when calling deleteVisitorData' - ); - } - - $resourcePath = '/visitors/{visitor_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - // path params - if (null !== $visitor_id) { - $resourcePath = str_replace( - '{visitor_id}', - ObjectSerializer::toPathValue($visitor_id), - $resourcePath - ); - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if (null !== $apiKey) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if (null !== $apiKey) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - - return new Request( - 'DELETE', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create request for operation 'getEvent'. - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function getEventRequest(string $request_id): Request - { - // verify the required parameter 'request_id' is set - if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { - throw new \InvalidArgumentException( - 'Missing the required parameter $request_id when calling getEvent' - ); - } - - $resourcePath = '/events/{request_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - // path params - if (null !== $request_id) { - $resourcePath = str_replace( - '{request_id}', - ObjectSerializer::toPathValue($request_id), - $resourcePath - ); - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if (null !== $apiKey) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if (null !== $apiKey) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - - return new Request( - 'GET', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create request for operation 'getVisits'. + * Create request for operation 'updateEvent' * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request - { - // verify the required parameter 'visitor_id' is set - if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { - throw new \InvalidArgumentException( - 'Missing the required parameter $visitor_id when calling getVisits' - ); - } - - $resourcePath = '/visitors/{visitor_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - // query params - if (null !== $request_id) { - $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); - } - // query params - if (null !== $linked_id) { - $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); - } - // query params - if (null !== $limit) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); - } - // query params - if (null !== $pagination_key) { - $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); - } - // query params - if (null !== $before) { - $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); - } - - // path params - if (null !== $visitor_id) { - $resourcePath = str_replace( - '{visitor_id}', - ObjectSerializer::toPathValue($visitor_id), - $resourcePath - ); - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if (null !== $apiKey) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if (null !== $apiKey) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - - return new Request( - 'GET', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create request for operation 'updateEvent'. * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException */ - protected function updateEventRequest(EventUpdateRequest $body, string $request_id): Request + protected function updateEventRequest(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): \GuzzleHttp\Psr7\Request { // verify the required parameter 'body' is set - if (null === $body || (is_array($body) && 0 === count($body))) { + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling updateEvent' ); } // verify the required parameter 'request_id' is set - if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { + if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $request_id when calling updateEvent' ); @@ -1038,10 +964,11 @@ protected function updateEventRequest(EventUpdateRequest $body, string $request_ $headerParams = []; $httpBody = ''; + // path params - if (null !== $request_id) { + if ($request_id !== null) { $resourcePath = str_replace( - '{request_id}', + '{' . 'request_id' . '}', ObjectSerializer::toPathValue($request_id), $resourcePath ); @@ -1060,12 +987,12 @@ protected function updateEventRequest(EventUpdateRequest $body, string $request_ // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if (null !== $apiKey) { + if ($apiKey !== null) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if (null !== $apiKey) { + if ($apiKey !== null) { $queryParams['api_key'] = $apiKey; } @@ -1084,17 +1011,16 @@ protected function updateEventRequest(EventUpdateRequest $body, string $request_ ); $query = http_build_query($queryParams); - return new Request( 'PUT', - $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); } /** - * Create http client option. + * Create http client option * * @throws \RuntimeException on file opening failure */ @@ -1104,7 +1030,7 @@ protected function createHttpClientOption(): array if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); } } diff --git a/src/ApiException.php b/src/ApiException.php index 1905ffe8..289293d3 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -1,17 +1,16 @@ responseObject = $obj; @@ -83,4 +83,4 @@ public function setRetryAfter(?int $retryAfter): void { $this->retryAfter = $retryAfter; } -} +} \ No newline at end of file diff --git a/src/Configuration.php b/src/Configuration.php index 0cf80b52..74227554 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -1,17 +1,16 @@ apiKeys[$apiKeyIdentifier] = $key; - return $this; } /** - * Gets API key. + * Gets API key * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return null|string API key or token + * @return string|null API key or token */ public function getApiKey(string $apiKeyIdentifier): ?string { @@ -132,24 +129,25 @@ public function getApiKey(string $apiKeyIdentifier): ?string } /** - * Sets the prefix for API key (e.g. Bearer). + * Sets the prefix for API key (e.g. Bearer) * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; - return $this; } /** - * Gets API key prefix. + * Gets API key prefix * * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string|null */ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { @@ -157,7 +155,7 @@ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string } /** - * Sets the access token for OAuth. + * Sets the access token for OAuth * * @param string $accessToken Token for OAuth * @@ -166,12 +164,11 @@ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; - return $this; } /** - * Gets the access token for OAuth. + * Gets the access token for OAuth * * @return string Access token for OAuth */ @@ -181,7 +178,7 @@ public function getAccessToken(): string } /** - * Sets the username for HTTP basic authentication. + * Sets the username for HTTP basic authentication * * @param string $username Username for HTTP basic authentication * @@ -190,12 +187,11 @@ public function getAccessToken(): string public function setUsername(string $username): self { $this->username = $username; - return $this; } /** - * Gets the username for HTTP basic authentication. + * Gets the username for HTTP basic authentication * * @return string Username for HTTP basic authentication */ @@ -205,7 +201,7 @@ public function getUsername(): string } /** - * Sets the password for HTTP basic authentication. + * Sets the password for HTTP basic authentication * * @param string $password Password for HTTP basic authentication * @@ -214,12 +210,11 @@ public function getUsername(): string public function setPassword(string $password): self { $this->password = $password; - return $this; } /** - * Gets the password for HTTP basic authentication. + * Gets the password for HTTP basic authentication * * @return string Password for HTTP basic authentication */ @@ -229,7 +224,7 @@ public function getPassword(): string } /** - * Sets the host. + * Sets the host * * @param string $host Host * @@ -238,12 +233,11 @@ public function getPassword(): string public function setHost(string $host): self { $this->host = $host; - return $this; } /** - * Gets the host. + * Gets the host * * @return string Host */ @@ -253,30 +247,26 @@ public function getHost(): string } /** + * @param $region * @return $this */ public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: - case 'as': - case 'asia': + case "as": + case "asia": $this->setHost(self::REGION_ASIA); - break; - case self::REGION_EUROPE: - case 'eu': - case 'europe': + case "eu": + case "europe": $this->setHost(self::REGION_EUROPE); - break; - default: case self::REGION_GLOBAL: - case 'global': + case "global": $this->setHost(self::REGION_GLOBAL); - break; } @@ -284,12 +274,11 @@ public function setRegion(?string $region = self::REGION_GLOBAL): self } /** - * Sets the user agent of the api client. + * Sets the user agent of the api client * * @param string $userAgent the user agent of the api client * * @return $this - * * @throws \InvalidArgumentException */ public function setUserAgent(string $userAgent): self @@ -299,12 +288,11 @@ public function setUserAgent(string $userAgent): self } $this->userAgent = $userAgent; - return $this; } /** - * Gets the user agent of the api client. + * Gets the user agent of the api client * * @return string user agent */ @@ -314,7 +302,7 @@ public function getUserAgent(): string } /** - * Sets debug flag. + * Sets debug flag * * @param bool $debug Debug flag * @@ -323,12 +311,13 @@ public function getUserAgent(): string public function setDebug(bool $debug): self { $this->debug = $debug; - return $this; } /** - * Gets the debug flag. + * Gets the debug flag + * + * @return bool */ public function getDebug(): bool { @@ -336,7 +325,7 @@ public function getDebug(): bool } /** - * Sets the debug file. + * Sets the debug file * * @param string $debugFile Debug file * @@ -345,12 +334,13 @@ public function getDebug(): bool public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; - return $this; } /** - * Gets the debug file. + * Gets the debug file + * + * @return string */ public function getDebugFile(): string { @@ -358,7 +348,7 @@ public function getDebugFile(): string } /** - * Sets the temp folder path. + * Sets the temp folder path * * @param string $tempFolderPath Temp folder path * @@ -367,12 +357,11 @@ public function getDebugFile(): string public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; - return $this; } /** - * Gets the temp folder path. + * Gets the temp folder path * * @return string Temp folder path */ @@ -382,11 +371,15 @@ public function getTempFolderPath(): string } /** - * Gets the default configuration instance, with apiKey and host params. + * Gets the default configuration instance, with apiKey and host params + * + * @param $api_key + * @param $region + * @return Configuration */ public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { - if (null === self::$defaultConfiguration) { + if (self::$defaultConfiguration === null) { self::$defaultConfiguration = new Configuration(); } @@ -397,9 +390,11 @@ public static function getDefaultConfiguration(?string $api_key = null, ?string } /** - * Sets the detault configuration instance. + * Sets the detault configuration instance * * @param Configuration $config An instance of the Configuration Object + * + * @return void */ public static function setDefaultConfiguration(Configuration $config): void { @@ -407,44 +402,44 @@ public static function setDefaultConfiguration(Configuration $config): void } /** - * Gets the essential information for debugging. + * Gets the essential information for debugging * * @return string The report for debugging */ public static function toDebugReport(): string { - $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; - $report .= ' OS: '.php_uname().PHP_EOL; - $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; - $report .= ' OpenAPI Spec Version: 3'.PHP_EOL; - $report .= ' SDK Package Version: 4.1.0'.PHP_EOL; - $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; + $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' OpenAPI Spec Version: 3' . PHP_EOL; + $report .= ' SDK Package Version: dev-5.0.0-1' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; } /** - * Get API key (with prefix if set). + * Get API key (with prefix if set) * * @param string $apiKeyIdentifier name of apikey * - * @return null|string API key with the prefix + * @return string|null API key with the prefix */ public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); - if (null === $apiKey) { + if ($apiKey === null) { return null; } - if (null === $prefix) { + if ($prefix === null) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix.' '.$apiKey; + $keyWithPrefix = $prefix . ' ' . $apiKey; } return $keyWithPrefix; } -} +} \ No newline at end of file diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 6e544e45..047feb46 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -1,16 +1,14 @@ 'string', - 'network' => 'string', - 'name' => 'string']; +'network' => 'string', +'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'asn' => null, - 'network' => null, - 'name' => null]; +'network' => null, +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'asn' => 'asn', - 'network' => 'network', - 'name' => 'name']; +'network' => 'network', +'name' => 'name' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'asn' => 'setAsn', - 'network' => 'setNetwork', - 'name' => 'setName']; +'network' => 'setNetwork', +'name' => 'setName' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'asn' => 'getAsn', - 'network' => 'getNetwork', - 'name' => 'getName']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['network'] = isset($data['network']) ? $data['network'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'network' => 'getNetwork', +'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -157,7 +122,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -165,7 +130,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -180,6 +145,28 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['network'] = isset($data['network']) ? $data['network'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -189,29 +176,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['asn']) { + if ($this->container['asn'] === null) { $invalidProperties[] = "'asn' can't be null"; } - if (null === $this->container['network']) { + if ($this->container['network'] === null) { $invalidProperties[] = "'network' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets asn. + * Gets asn + * @return string */ public function getAsn(): string { @@ -219,7 +207,7 @@ public function getAsn(): string } /** - * Sets asn. + * Sets asn * * @param string $asn asn * @@ -233,7 +221,8 @@ public function setAsn(string $asn): self } /** - * Gets network. + * Gets network + * @return string */ public function getNetwork(): string { @@ -241,7 +230,7 @@ public function getNetwork(): string } /** - * Sets network. + * Sets network * * @param string $network network * @@ -255,8 +244,7 @@ public function setNetwork(string $network): self } /** - * Gets name. - * + * Gets name * @return ?string */ public function getName(): ?string @@ -265,7 +253,7 @@ public function getName(): ?string } /** - * Sets name. + * Sets name * * @param ?string $name name * @@ -277,11 +265,10 @@ public function setName(?string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +278,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +288,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +303,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 27120931..a10a0694 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -1,16 +1,14 @@ 'string', - 'type' => 'string']; +'type' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'type' => null]; +'type' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'type' => 'type']; +'type' => 'type' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'type' => 'setType']; +'type' => 'setType' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'type' => 'getType']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'type' => 'getType' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -157,7 +118,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -165,7 +126,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -180,8 +141,12 @@ public function getModelName(): string return self::$swaggerModelName; } + const RESULT_NOT_DETECTED = 'notDetected'; +const RESULT_GOOD = 'good'; +const RESULT_BAD = 'bad'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -189,8 +154,27 @@ public function getResultAllowableValues(): array { return [ self::RESULT_NOT_DETECTED, - self::RESULT_GOOD, - self::RESULT_BAD, ]; +self::RESULT_GOOD, +self::RESULT_BAD, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; } /** @@ -202,7 +186,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } $allowedValues = $this->getResultAllowableValues(); @@ -218,17 +202,19 @@ public function listInvalidProperties(): array /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return string */ public function getResult(): string { @@ -236,7 +222,7 @@ public function getResult(): string } /** - * Sets result. + * Sets result * * @param string $result Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on * @@ -259,8 +245,7 @@ public function setResult(string $result): self } /** - * Gets type. - * + * Gets type * @return ?string */ public function getType(): ?string @@ -269,7 +254,7 @@ public function getType(): ?string } /** - * Sets type. + * Sets type * * @param ?string $type type * @@ -281,11 +266,10 @@ public function setType(?string $type): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -295,7 +279,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -305,8 +289,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -320,10 +304,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 178a37d2..fa60626e 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -1,16 +1,14 @@ 'string', - 'time' => '\DateTime', - 'url' => 'string', - 'user_agent' => 'string', - 'request_id' => 'string', - 'linked_id' => 'string', - 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult']; +'time' => '\DateTime', +'url' => 'string', +'user_agent' => 'string', +'request_id' => 'string', +'linked_id' => 'string', +'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'ip' => 'ipv4', +'time' => 'date-time', +'url' => null, +'user_agent' => null, +'request_id' => null, +'linked_id' => null, +'bot' => null ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $swaggerFormats = [ - 'ip' => 'ipv4', - 'time' => 'date-time', - 'url' => null, - 'user_agent' => null, - 'request_id' => null, - 'linked_id' => null, - 'bot' => null]; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'ip' => 'ip', - 'time' => 'time', - 'url' => 'url', - 'user_agent' => 'userAgent', - 'request_id' => 'requestId', - 'linked_id' => 'linkedId', - 'bot' => 'bot']; +'time' => 'time', +'url' => 'url', +'user_agent' => 'userAgent', +'request_id' => 'requestId', +'linked_id' => 'linkedId', +'bot' => 'bot' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'ip' => 'setIp', - 'time' => 'setTime', - 'url' => 'setUrl', - 'user_agent' => 'setUserAgent', - 'request_id' => 'setRequestId', - 'linked_id' => 'setLinkedId', - 'bot' => 'setBot']; +'time' => 'setTime', +'url' => 'setUrl', +'user_agent' => 'setUserAgent', +'request_id' => 'setRequestId', +'linked_id' => 'setLinkedId', +'bot' => 'setBot' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'ip' => 'getIp', - 'time' => 'getTime', - 'url' => 'getUrl', - 'user_agent' => 'getUserAgent', - 'request_id' => 'getRequestId', - 'linked_id' => 'getLinkedId', - 'bot' => 'getBot']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'time' => 'getTime', +'url' => 'getUrl', +'user_agent' => 'getUserAgent', +'request_id' => 'getRequestId', +'linked_id' => 'getLinkedId', +'bot' => 'getBot' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -183,7 +143,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -191,7 +151,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -206,6 +166,32 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -215,41 +201,42 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['ip']) { + if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; } - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['url']) { + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['user_agent']) { + if ($this->container['user_agent'] === null) { $invalidProperties[] = "'user_agent' can't be null"; } - if (null === $this->container['request_id']) { + if ($this->container['request_id'] === null) { $invalidProperties[] = "'request_id' can't be null"; } - if (null === $this->container['bot']) { + if ($this->container['bot'] === null) { $invalidProperties[] = "'bot' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets ip. + * Gets ip + * @return string */ public function getIp(): string { @@ -257,9 +244,9 @@ public function getIp(): string } /** - * Sets ip. + * Sets ip * - * @param string $ip IP address of the requesting browser or bot + * @param string $ip IP address of the requesting browser or bot. * * @return $this */ @@ -271,7 +258,8 @@ public function setIp(string $ip): self } /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -279,7 +267,7 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * * @param \DateTime $time Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible * @@ -293,7 +281,8 @@ public function setTime(\DateTime $time): self } /** - * Gets url. + * Gets url + * @return string */ public function getUrl(): string { @@ -301,9 +290,9 @@ public function getUrl(): string } /** - * Sets url. + * Sets url * - * @param string $url page URL from which identification request was sent + * @param string $url Page URL from which identification request was sent. * * @return $this */ @@ -315,7 +304,8 @@ public function setUrl(string $url): self } /** - * Gets user_agent. + * Gets user_agent + * @return string */ public function getUserAgent(): string { @@ -323,7 +313,7 @@ public function getUserAgent(): string } /** - * Sets user_agent. + * Sets user_agent * * @param string $user_agent user_agent * @@ -337,7 +327,8 @@ public function setUserAgent(string $user_agent): self } /** - * Gets request_id. + * Gets request_id + * @return string */ public function getRequestId(): string { @@ -345,7 +336,7 @@ public function getRequestId(): string } /** - * Sets request_id. + * Sets request_id * * @param string $request_id request_id * @@ -359,8 +350,7 @@ public function setRequestId(string $request_id): self } /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -369,7 +359,7 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * * @param ?string $linked_id linked_id * @@ -383,31 +373,31 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets bot. + * Gets bot + * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult */ - public function getBot(): BotdDetectionResult + public function getBot(): \Fingerprint\ServerAPI\Model\BotdDetectionResult { return $this->container['bot']; } /** - * Sets bot. + * Sets bot * - * @param BotdDetectionResult $bot bot + * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ - public function setBot(BotdDetectionResult $bot): self + public function setBot(\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot): self { $this->container['bot'] = $bot; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -417,7 +407,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -427,8 +417,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -442,10 +432,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index d04d9bc8..cdfa5fa6 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -1,16 +1,14 @@ 'string', - 'browser_major_version' => 'string', - 'browser_full_version' => 'string', - 'os' => 'string', - 'os_version' => 'string', - 'device' => 'string', - 'user_agent' => 'string', - 'bot_probability' => 'int']; +'browser_major_version' => 'string', +'browser_full_version' => 'string', +'os' => 'string', +'os_version' => 'string', +'device' => 'string', +'user_agent' => 'string', +'bot_probability' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'browser_name' => null, +'browser_major_version' => null, +'browser_full_version' => null, +'os' => null, +'os_version' => null, +'device' => null, +'user_agent' => null, +'bot_probability' => null ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $swaggerFormats = [ - 'browser_name' => null, - 'browser_major_version' => null, - 'browser_full_version' => null, - 'os' => null, - 'os_version' => null, - 'device' => null, - 'user_agent' => null, - 'bot_probability' => null]; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'browser_name' => 'browserName', - 'browser_major_version' => 'browserMajorVersion', - 'browser_full_version' => 'browserFullVersion', - 'os' => 'os', - 'os_version' => 'osVersion', - 'device' => 'device', - 'user_agent' => 'userAgent', - 'bot_probability' => 'botProbability']; +'browser_major_version' => 'browserMajorVersion', +'browser_full_version' => 'browserFullVersion', +'os' => 'os', +'os_version' => 'osVersion', +'device' => 'device', +'user_agent' => 'userAgent', +'bot_probability' => 'botProbability' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'browser_name' => 'setBrowserName', - 'browser_major_version' => 'setBrowserMajorVersion', - 'browser_full_version' => 'setBrowserFullVersion', - 'os' => 'setOs', - 'os_version' => 'setOsVersion', - 'device' => 'setDevice', - 'user_agent' => 'setUserAgent', - 'bot_probability' => 'setBotProbability']; +'browser_major_version' => 'setBrowserMajorVersion', +'browser_full_version' => 'setBrowserFullVersion', +'os' => 'setOs', +'os_version' => 'setOsVersion', +'device' => 'setDevice', +'user_agent' => 'setUserAgent', +'bot_probability' => 'setBotProbability' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'browser_name' => 'getBrowserName', - 'browser_major_version' => 'getBrowserMajorVersion', - 'browser_full_version' => 'getBrowserFullVersion', - 'os' => 'getOs', - 'os_version' => 'getOsVersion', - 'device' => 'getDevice', - 'user_agent' => 'getUserAgent', - 'bot_probability' => 'getBotProbability']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; - $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; - $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; - $this->container['os'] = isset($data['os']) ? $data['os'] : null; - $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; - $this->container['device'] = isset($data['device']) ? $data['device'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'browser_major_version' => 'getBrowserMajorVersion', +'browser_full_version' => 'getBrowserFullVersion', +'os' => 'getOs', +'os_version' => 'getOsVersion', +'device' => 'getDevice', +'user_agent' => 'getUserAgent', +'bot_probability' => 'getBotProbability' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -187,7 +147,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -195,7 +155,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -210,6 +170,33 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; + $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; + $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; + $this->container['os'] = isset($data['os']) ? $data['os'] : null; + $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; + $this->container['device'] = isset($data['device']) ? $data['device'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -219,44 +206,45 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['browser_name']) { + if ($this->container['browser_name'] === null) { $invalidProperties[] = "'browser_name' can't be null"; } - if (null === $this->container['browser_major_version']) { + if ($this->container['browser_major_version'] === null) { $invalidProperties[] = "'browser_major_version' can't be null"; } - if (null === $this->container['browser_full_version']) { + if ($this->container['browser_full_version'] === null) { $invalidProperties[] = "'browser_full_version' can't be null"; } - if (null === $this->container['os']) { + if ($this->container['os'] === null) { $invalidProperties[] = "'os' can't be null"; } - if (null === $this->container['os_version']) { + if ($this->container['os_version'] === null) { $invalidProperties[] = "'os_version' can't be null"; } - if (null === $this->container['device']) { + if ($this->container['device'] === null) { $invalidProperties[] = "'device' can't be null"; } - if (null === $this->container['user_agent']) { + if ($this->container['user_agent'] === null) { $invalidProperties[] = "'user_agent' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets browser_name. + * Gets browser_name + * @return string */ public function getBrowserName(): string { @@ -264,7 +252,7 @@ public function getBrowserName(): string } /** - * Sets browser_name. + * Sets browser_name * * @param string $browser_name browser_name * @@ -278,7 +266,8 @@ public function setBrowserName(string $browser_name): self } /** - * Gets browser_major_version. + * Gets browser_major_version + * @return string */ public function getBrowserMajorVersion(): string { @@ -286,7 +275,7 @@ public function getBrowserMajorVersion(): string } /** - * Sets browser_major_version. + * Sets browser_major_version * * @param string $browser_major_version browser_major_version * @@ -300,7 +289,8 @@ public function setBrowserMajorVersion(string $browser_major_version): self } /** - * Gets browser_full_version. + * Gets browser_full_version + * @return string */ public function getBrowserFullVersion(): string { @@ -308,7 +298,7 @@ public function getBrowserFullVersion(): string } /** - * Sets browser_full_version. + * Sets browser_full_version * * @param string $browser_full_version browser_full_version * @@ -322,7 +312,8 @@ public function setBrowserFullVersion(string $browser_full_version): self } /** - * Gets os. + * Gets os + * @return string */ public function getOs(): string { @@ -330,7 +321,7 @@ public function getOs(): string } /** - * Sets os. + * Sets os * * @param string $os os * @@ -344,7 +335,8 @@ public function setOs(string $os): self } /** - * Gets os_version. + * Gets os_version + * @return string */ public function getOsVersion(): string { @@ -352,7 +344,7 @@ public function getOsVersion(): string } /** - * Sets os_version. + * Sets os_version * * @param string $os_version os_version * @@ -366,7 +358,8 @@ public function setOsVersion(string $os_version): self } /** - * Gets device. + * Gets device + * @return string */ public function getDevice(): string { @@ -374,7 +367,7 @@ public function getDevice(): string } /** - * Sets device. + * Sets device * * @param string $device device * @@ -388,7 +381,8 @@ public function setDevice(string $device): self } /** - * Gets user_agent. + * Gets user_agent + * @return string */ public function getUserAgent(): string { @@ -396,7 +390,7 @@ public function getUserAgent(): string } /** - * Sets user_agent. + * Sets user_agent * * @param string $user_agent user_agent * @@ -410,8 +404,7 @@ public function setUserAgent(string $user_agent): self } /** - * Gets bot_probability. - * + * Gets bot_probability * @return ?int */ public function getBotProbability(): ?int @@ -420,7 +413,7 @@ public function getBotProbability(): ?int } /** - * Sets bot_probability. + * Sets bot_probability * * @param ?int $bot_probability bot_probability * @@ -432,11 +425,10 @@ public function setBotProbability(?int $bot_probability): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -446,7 +438,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -456,8 +448,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -471,10 +463,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 61fd7c2d..c8fe6616 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result Android specific cloned application detection. There are 2 values: • `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). • `false` - No signs of cloned application detected or the client is not Android. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Common403ErrorResponse.php b/src/Model/Common403ErrorResponse.php index f8e5fd06..d6eb6180 100644 --- a/src/Model/Common403ErrorResponse.php +++ b/src/Model/Common403ErrorResponse.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -157,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -165,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -180,8 +140,14 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_TOKEN_REQUIRED = 'TokenRequired'; +const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; +const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; +const CODE_WRONG_REGION = 'WrongRegion'; +const CODE_FEATURE_NOT_ENABLED = 'FeatureNotEnabled'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -189,10 +155,29 @@ public function getCodeAllowableValues(): array { return [ self::CODE_TOKEN_REQUIRED, - self::CODE_TOKEN_NOT_FOUND, - self::CODE_SUBSCRIPTION_NOT_ACTIVE, - self::CODE_WRONG_REGION, - self::CODE_FEATURE_NOT_ENABLED, ]; +self::CODE_TOKEN_NOT_FOUND, +self::CODE_SUBSCRIPTION_NOT_ACTIVE, +self::CODE_WRONG_REGION, +self::CODE_FEATURE_NOT_ENABLED, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; } /** @@ -204,7 +189,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -215,26 +200,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -242,7 +228,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - No Fingerprint application found for specified secret key * `SubscriptionNotActive` - Fingerprint application is not active * `WrongRegion` - server and application region differ * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application * @@ -265,7 +251,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -273,7 +260,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -285,11 +272,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -299,7 +285,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -309,8 +295,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -324,10 +310,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 9aeb20db..aaf47b96 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -1,16 +1,14 @@ 'float', - 'revision' => 'string']; +'revision' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'score' => 'float', - 'revision' => null]; +'revision' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'score' => 'score', - 'revision' => 'revision']; +'revision' => 'revision' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'score' => 'setScore', - 'revision' => 'setRevision']; +'revision' => 'setRevision' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'score' => 'getScore', - 'revision' => 'getRevision']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['score'] = isset($data['score']) ? $data['score'] : null; - $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'revision' => 'getRevision' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['score'] = isset($data['score']) ? $data['score'] : null; + $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,26 +170,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['score']) { + if ($this->container['score'] === null) { $invalidProperties[] = "'score' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets score. + * Gets score + * @return float */ public function getScore(): float { @@ -210,9 +198,9 @@ public function getScore(): float } /** - * Sets score. + * Sets score * - * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification + * @param float $score The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. * * @return $this */ @@ -224,8 +212,7 @@ public function setScore(float $score): self } /** - * Gets revision. - * + * Gets revision * @return ?string */ public function getRevision(): ?string @@ -234,7 +221,7 @@ public function getRevision(): ?string } /** - * Sets revision. + * Sets revision * * @param ?string $revision The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. * @@ -246,11 +233,10 @@ public function setRevision(?string $revision): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -260,7 +246,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -270,8 +256,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -285,10 +271,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 1b8c9294..1030a02d 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -1,16 +1,14 @@ 'bool', - 'name' => 'string']; +'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'name' => null]; +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'name' => 'name']; +'name' => 'name' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'name' => 'setName']; +'name' => 'setName' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'name' => 'getName']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,26 +170,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -210,7 +198,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result result * @@ -224,8 +212,7 @@ public function setResult(bool $result): self } /** - * Gets name. - * + * Gets name * @return ?string */ public function getName(): ?string @@ -234,7 +221,7 @@ public function getName(): ?string } /** - * Sets name. + * Sets name * * @param ?string $name name * @@ -246,11 +233,10 @@ public function setName(?string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -260,7 +246,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -270,8 +256,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -285,10 +271,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 9739584c..af591b58 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -1,16 +1,14 @@ 'int', - 'latitude' => 'double', - 'longitude' => 'double', - 'postal_code' => 'string', - 'timezone' => 'string', - 'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', - 'country' => '\Fingerprint\ServerAPI\Model\Location', - 'continent' => '\Fingerprint\ServerAPI\Model\Location', - 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; +'latitude' => 'double', +'longitude' => 'double', +'postal_code' => 'string', +'timezone' => 'string', +'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', +'country' => '\Fingerprint\ServerAPI\Model\Location', +'continent' => '\Fingerprint\ServerAPI\Model\Location', +'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'accuracy_radius' => null, +'latitude' => 'double', +'longitude' => 'double', +'postal_code' => null, +'timezone' => 'timezone', +'city' => null, +'country' => null, +'continent' => null, +'subdivisions' => null ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $swaggerFormats = [ - 'accuracy_radius' => null, - 'latitude' => 'double', - 'longitude' => 'double', - 'postal_code' => null, - 'timezone' => 'timezone', - 'city' => null, - 'country' => null, - 'continent' => null, - 'subdivisions' => null]; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', - 'latitude' => 'latitude', - 'longitude' => 'longitude', - 'postal_code' => 'postalCode', - 'timezone' => 'timezone', - 'city' => 'city', - 'country' => 'country', - 'continent' => 'continent', - 'subdivisions' => 'subdivisions']; +'latitude' => 'latitude', +'longitude' => 'longitude', +'postal_code' => 'postalCode', +'timezone' => 'timezone', +'city' => 'city', +'country' => 'country', +'continent' => 'continent', +'subdivisions' => 'subdivisions' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', - 'latitude' => 'setLatitude', - 'longitude' => 'setLongitude', - 'postal_code' => 'setPostalCode', - 'timezone' => 'setTimezone', - 'city' => 'setCity', - 'country' => 'setCountry', - 'continent' => 'setContinent', - 'subdivisions' => 'setSubdivisions']; +'latitude' => 'setLatitude', +'longitude' => 'setLongitude', +'postal_code' => 'setPostalCode', +'timezone' => 'setTimezone', +'city' => 'setCity', +'country' => 'setCountry', +'continent' => 'setContinent', +'subdivisions' => 'setSubdivisions' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', - 'latitude' => 'getLatitude', - 'longitude' => 'getLongitude', - 'postal_code' => 'getPostalCode', - 'timezone' => 'getTimezone', - 'city' => 'getCity', - 'country' => 'getCountry', - 'continent' => 'getContinent', - 'subdivisions' => 'getSubdivisions']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'latitude' => 'getLatitude', +'longitude' => 'getLongitude', +'postal_code' => 'getPostalCode', +'timezone' => 'getTimezone', +'city' => 'getCity', +'country' => 'getCountry', +'continent' => 'getContinent', +'subdivisions' => 'getSubdivisions' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -195,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -203,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -218,6 +176,34 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -225,23 +211,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets accuracy_radius. - * + * Gets accuracy_radius * @return ?int */ public function getAccuracyRadius(): ?int @@ -250,9 +238,9 @@ public function getAccuracyRadius(): ?int } /** - * Sets accuracy_radius. + * Sets accuracy_radius * - * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. * * @return $this */ @@ -264,8 +252,7 @@ public function setAccuracyRadius(?int $accuracy_radius): self } /** - * Gets latitude. - * + * Gets latitude * @return ?double */ public function getLatitude(): ?float @@ -274,7 +261,7 @@ public function getLatitude(): ?float } /** - * Sets latitude. + * Sets latitude * * @param ?double $latitude latitude * @@ -288,8 +275,7 @@ public function setLatitude(?float $latitude): self } /** - * Gets longitude. - * + * Gets longitude * @return ?double */ public function getLongitude(): ?float @@ -298,7 +284,7 @@ public function getLongitude(): ?float } /** - * Sets longitude. + * Sets longitude * * @param ?double $longitude longitude * @@ -312,8 +298,7 @@ public function setLongitude(?float $longitude): self } /** - * Gets postal_code. - * + * Gets postal_code * @return ?string */ public function getPostalCode(): ?string @@ -322,7 +307,7 @@ public function getPostalCode(): ?string } /** - * Sets postal_code. + * Sets postal_code * * @param ?string $postal_code postal_code * @@ -336,8 +321,7 @@ public function setPostalCode(?string $postal_code): self } /** - * Gets timezone. - * + * Gets timezone * @return ?string */ public function getTimezone(): ?string @@ -346,7 +330,7 @@ public function getTimezone(): ?string } /** - * Sets timezone. + * Sets timezone * * @param ?string $timezone timezone * @@ -360,23 +344,22 @@ public function setTimezone(?string $timezone): self } /** - * Gets city. - * + * Gets city * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity */ - public function getCity(): ?DeprecatedIPLocationCity + public function getCity(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity { return $this->container['city']; } /** - * Sets city. + * Sets city * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city * * @return $this */ - public function setCity(?DeprecatedIPLocationCity $city): self + public function setCity(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -384,23 +367,22 @@ public function setCity(?DeprecatedIPLocationCity $city): self } /** - * Gets country. - * + * Gets country * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry(): ?Location + public function getCountry(): ?\Fingerprint\ServerAPI\Model\Location { return $this->container['country']; } /** - * Sets country. + * Sets country * * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry(?Location $country): self + public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): self { $this->container['country'] = $country; @@ -408,23 +390,22 @@ public function setCountry(?Location $country): self } /** - * Gets continent. - * + * Gets continent * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent(): ?Location + public function getContinent(): ?\Fingerprint\ServerAPI\Model\Location { return $this->container['continent']; } /** - * Sets continent. + * Sets continent * * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent(?Location $continent): self + public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): self { $this->container['continent'] = $continent; @@ -432,8 +413,7 @@ public function setContinent(?Location $continent): self } /** - * Gets subdivisions. - * + * Gets subdivisions * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array @@ -442,7 +422,7 @@ public function getSubdivisions(): ?array } /** - * Sets subdivisions. + * Sets subdivisions * * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -454,11 +434,10 @@ public function setSubdivisions(?array $subdivisions): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -468,7 +447,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -478,8 +457,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -493,10 +472,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index fdffb4e1..97c9f39d 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -1,16 +1,14 @@ 'string']; + 'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'name' => null]; + 'name' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'name' => 'name']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'name' => 'setName']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'name' => 'getName']; + protected static array $attributeMap = [ + 'name' => 'name' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'name' => 'setName' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,23 +162,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets name. - * + * Gets name * @return ?string */ public function getName(): ?string @@ -200,7 +189,7 @@ public function getName(): ?string } /** - * Sets name. + * Sets name * * @param ?string $name name * @@ -212,11 +201,10 @@ public function setName(?string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/DeveloperToolsResult.php b/src/Model/DeveloperToolsResult.php index 2047bf72..6342ba3d 100644 --- a/src/Model/DeveloperToolsResult.php +++ b/src/Model/DeveloperToolsResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,9 +192,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise + * @param bool $result `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. * * @return $this */ @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 0a4398fd..9e48be6a 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected or the client is not Android. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorCommon403Response.php b/src/Model/ErrorCommon403Response.php index 1afa5e6e..ae7cf089 100644 --- a/src/Model/ErrorCommon403Response.php +++ b/src/Model/ErrorCommon403Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\Common403ErrorResponse']; + 'error' => '\Fingerprint\ServerAPI\Model\Common403ErrorResponse' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse */ - public function getError(): ?Common403ErrorResponse + public function getError(): ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse $error error * * @return $this */ - public function setError(?Common403ErrorResponse $error): self + public function setError(?\Fingerprint\ServerAPI\Model\Common403ErrorResponse $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorCommon429Response.php b/src/Model/ErrorCommon429Response.php index d2dc070d..d8a8849b 100644 --- a/src/Model/ErrorCommon429Response.php +++ b/src/Model/ErrorCommon429Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError */ - public function getError(): ?ErrorCommon429ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError $error error * * @return $this */ - public function setError(?ErrorCommon429ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorCommon429ResponseError.php b/src/Model/ErrorCommon429ResponseError.php index f214c931..2c0876f3 100644 --- a/src/Model/ErrorCommon429ResponseError.php +++ b/src/Model/ErrorCommon429ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,8 +140,10 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -187,6 +153,25 @@ public function getCodeAllowableValues(): array self::CODE_TOO_MANY_REQUESTS, ]; } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -196,7 +181,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +192,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -234,9 +220,9 @@ public function getCode(): string } /** - * Sets code. + * Sets code * - * @param string $code error code: * `TooManyRequests` - The request is throttled + * @param string $code Error code: * `TooManyRequests` - The request is throttled. * * @return $this */ @@ -257,7 +243,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -265,7 +252,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -277,11 +264,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +277,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +287,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +302,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index b03ce283..15bee5ac 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError */ - public function getError(): ?ErrorEvent404ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error * * @return $this */ - public function setError(?ErrorEvent404ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 0337f0bd..e661426b 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,8 +140,10 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -187,6 +153,25 @@ public function getCodeAllowableValues(): array self::CODE_REQUEST_NOT_FOUND, ]; } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -196,7 +181,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +192,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -234,7 +220,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. * @@ -257,7 +243,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -265,7 +252,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -277,11 +264,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +277,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +287,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +302,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorUpdateEvent400Response.php b/src/Model/ErrorUpdateEvent400Response.php index 06737e39..60fe57f8 100644 --- a/src/Model/ErrorUpdateEvent400Response.php +++ b/src/Model/ErrorUpdateEvent400Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError */ - public function getError(): ?ErrorUpdateEvent400ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError $error error * * @return $this */ - public function setError(?ErrorUpdateEvent400ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorUpdateEvent400ResponseError.php b/src/Model/ErrorUpdateEvent400ResponseError.php index ec5eedb8..f925dc06 100644 --- a/src/Model/ErrorUpdateEvent400ResponseError.php +++ b/src/Model/ErrorUpdateEvent400ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -154,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -162,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -177,8 +140,11 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_REQUEST_CANNOT_BE_PARSED = 'RequestCannotBeParsed'; +const CODE_FAILED = 'Failed'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -186,7 +152,26 @@ public function getCodeAllowableValues(): array { return [ self::CODE_REQUEST_CANNOT_BE_PARSED, - self::CODE_FAILED, ]; +self::CODE_FAILED, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; } /** @@ -198,7 +183,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +194,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -236,7 +222,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `RequestCannotBeParsed` - the JSON content of the request contains some errors that prevented us from parsing it (wrong type/surpassed limits) * `Failed` - the event is more than 10 days old and cannot be updated * @@ -259,7 +245,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -267,7 +254,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message Details about the underlying issue with the input payload * @@ -279,11 +266,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -293,7 +279,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -303,8 +289,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -318,10 +304,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorUpdateEvent409Response.php b/src/Model/ErrorUpdateEvent409Response.php index 5e1a0590..da9fa971 100644 --- a/src/Model/ErrorUpdateEvent409Response.php +++ b/src/Model/ErrorUpdateEvent409Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError */ - public function getError(): ?ErrorUpdateEvent409ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError $error error * * @return $this */ - public function setError(?ErrorUpdateEvent409ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorUpdateEvent409ResponseError.php b/src/Model/ErrorUpdateEvent409ResponseError.php index 7104bb91..b4751b36 100644 --- a/src/Model/ErrorUpdateEvent409ResponseError.php +++ b/src/Model/ErrorUpdateEvent409ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,8 +140,10 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_STATE_NOT_READY = 'StateNotReady'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -187,6 +153,25 @@ public function getCodeAllowableValues(): array self::CODE_STATE_NOT_READY, ]; } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -196,7 +181,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +192,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -234,7 +220,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `StateNotReady` - The event specified with request id is not ready for updates yet. Try again. This error happens in rare cases when update API is called immediately after receiving the request id on the client. In case you need to send information right away, we recommend using the JS agent API instead. * @@ -257,7 +243,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -265,7 +252,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -277,11 +264,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +277,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +287,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +302,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorVisitor400Response.php b/src/Model/ErrorVisitor400Response.php index 8add5b42..512678d4 100644 --- a/src/Model/ErrorVisitor400Response.php +++ b/src/Model/ErrorVisitor400Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError */ - public function getError(): ?ErrorVisitor400ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError $error error * * @return $this */ - public function setError(?ErrorVisitor400ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorVisitor400ResponseError.php b/src/Model/ErrorVisitor400ResponseError.php index f3a7511d..54b82983 100644 --- a/src/Model/ErrorVisitor400ResponseError.php +++ b/src/Model/ErrorVisitor400ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,8 +140,10 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_REQUEST_CANNOT_BE_PARSED = 'RequestCannotBeParsed'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -187,6 +153,25 @@ public function getCodeAllowableValues(): array self::CODE_REQUEST_CANNOT_BE_PARSED, ]; } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -196,7 +181,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +192,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -234,9 +220,9 @@ public function getCode(): string } /** - * Sets code. + * Sets code * - * @param string $code error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format + * @param string $code Error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format. * * @return $this */ @@ -257,7 +243,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -265,7 +252,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -277,11 +264,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +277,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +287,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +302,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorVisitor404Response.php b/src/Model/ErrorVisitor404Response.php index d0eac080..d158162e 100644 --- a/src/Model/ErrorVisitor404Response.php +++ b/src/Model/ErrorVisitor404Response.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError']; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError */ - public function getError(): ?ErrorVisitor404ResponseError + public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError $error error * * @return $this */ - public function setError(?ErrorVisitor404ResponseError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorVisitor404ResponseError.php b/src/Model/ErrorVisitor404ResponseError.php index 6365d384..760519e8 100644 --- a/src/Model/ErrorVisitor404ResponseError.php +++ b/src/Model/ErrorVisitor404ResponseError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,8 +140,10 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_VISITOR_NOT_FOUND = 'VisitorNotFound'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -187,6 +153,25 @@ public function getCodeAllowableValues(): array self::CODE_VISITOR_NOT_FOUND, ]; } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -196,7 +181,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -207,26 +192,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -234,7 +220,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. * @@ -257,7 +243,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -265,7 +252,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -277,11 +264,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -291,7 +277,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -301,8 +287,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -316,10 +302,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 297998f3..c1456afa 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -1,16 +1,14 @@ 'string']; + 'error' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['error']) { + if ($this->container['error'] === null) { $invalidProperties[] = "'error' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. + * Gets error + * @return string */ public function getError(): string { @@ -204,9 +192,9 @@ public function getError(): string } /** - * Sets error. + * Sets error * - * @param string $error error text + * @param string $error Error text. * * @return $this */ @@ -216,11 +204,10 @@ public function setError(string $error): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index ee5b3fbe..281763ee 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ProductsResponse', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'products' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'products' => 'products', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'products' => 'setProducts', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'products' => 'getProducts', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['products'] = isset($data['products']) ? $data['products'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +118,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +126,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,6 +141,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -185,40 +171,41 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['products']) { + if ($this->container['products'] === null) { $invalidProperties[] = "'products' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets products. + * Gets products + * @return \Fingerprint\ServerAPI\Model\ProductsResponse */ - public function getProducts(): ProductsResponse + public function getProducts(): \Fingerprint\ServerAPI\Model\ProductsResponse { return $this->container['products']; } /** - * Sets products. + * Sets products * - * @param ProductsResponse $products products + * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products * * @return $this */ - public function setProducts(ProductsResponse $products): self + public function setProducts(\Fingerprint\ServerAPI\Model\ProductsResponse $products): self { $this->container['products'] = $products; @@ -226,33 +213,31 @@ public function setProducts(ProductsResponse $products): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -262,7 +247,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -272,8 +257,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -287,10 +272,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/EventUpdateRequest.php b/src/Model/EventUpdateRequest.php index ebcd6941..ce14cc6a 100644 --- a/src/Model/EventUpdateRequest.php +++ b/src/Model/EventUpdateRequest.php @@ -1,16 +1,14 @@ 'string', - 'tag' => 'object', - 'suspect' => 'bool']; +'tag' => 'object', +'suspect' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'linked_id' => null, - 'tag' => null, - 'suspect' => null]; +'tag' => null, +'suspect' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'linked_id' => 'linkedId', - 'tag' => 'tag', - 'suspect' => 'suspect']; +'tag' => 'tag', +'suspect' => 'suspect' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'linked_id' => 'setLinkedId', - 'tag' => 'setTag', - 'suspect' => 'setSuspect']; +'tag' => 'setTag', +'suspect' => 'setSuspect' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'linked_id' => 'getLinkedId', - 'tag' => 'getTag', - 'suspect' => 'getSuspect']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'tag' => 'getTag', +'suspect' => 'getSuspect' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -157,7 +122,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -165,7 +130,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -180,6 +145,28 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -187,23 +174,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -212,7 +201,7 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * * @param ?string $linked_id LinkedID value to assign to the existing event * @@ -226,8 +215,7 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets tag. - * + * Gets tag * @return ?object */ public function getTag(): ?object @@ -236,7 +224,7 @@ public function getTag(): ?object } /** - * Sets tag. + * Sets tag * * @param ?object $tag Full `tag` value to be set to the existing event. Replaces any existing `tag` payload completely. * @@ -250,8 +238,7 @@ public function setTag(?object $tag): self } /** - * Gets suspect. - * + * Gets suspect * @return ?bool */ public function getSuspect(): ?bool @@ -260,7 +247,7 @@ public function getSuspect(): ?bool } /** - * Sets suspect. + * Sets suspect * * @param ?bool $suspect Suspect flag indicating observed suspicious or fraudulent event * @@ -272,11 +259,10 @@ public function setSuspect(?bool $suspect): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -286,7 +272,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -296,8 +282,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -311,10 +297,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 8d6872fa..d055ab72 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -1,16 +1,14 @@ '\DateTime', - 'timestamp' => 'int']; +'timestamp' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'time' => 'date-time', - 'timestamp' => 'int64']; +'timestamp' => 'int64' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'time' => 'time', - 'timestamp' => 'timestamp']; +'timestamp' => 'timestamp' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'time' => 'setTime', - 'timestamp' => 'setTimestamp']; +'timestamp' => 'setTimestamp' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'time' => 'getTime', - 'timestamp' => 'getTimestamp']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'timestamp' => 'getTimestamp' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['timestamp']) { + if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -213,7 +201,7 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * * @param \DateTime $time Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. * @@ -227,7 +215,8 @@ public function setTime(\DateTime $time): self } /** - * Gets timestamp. + * Gets timestamp + * @return int */ public function getTimestamp(): int { @@ -235,7 +224,7 @@ public function getTimestamp(): int } /** - * Sets timestamp. + * Sets timestamp * * @param int $timestamp This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. * @@ -247,11 +236,10 @@ public function setTimestamp(int $timestamp): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index ad511bad..639f1c72 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: • `true` - Frida detected • `false` - No signs of Frida or the client is not a mobile device. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 20879925..cb7d57d5 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -1,16 +1,14 @@ 'bool', - 'daily_requests' => 'float']; +'daily_requests' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'daily_requests' => null]; +'daily_requests' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'daily_requests' => 'dailyRequests']; +'daily_requests' => 'dailyRequests' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'daily_requests' => 'setDailyRequests']; +'daily_requests' => 'setDailyRequests' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'daily_requests' => 'getDailyRequests']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'daily_requests' => 'getDailyRequests' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,26 +170,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -210,9 +198,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result flag indicating whether the request came from a high activity visitor + * @param bool $result Flag indicating whether the request came from a high activity visitor. * * @return $this */ @@ -224,8 +212,7 @@ public function setResult(bool $result): self } /** - * Gets daily_requests. - * + * Gets daily_requests * @return ?float */ public function getDailyRequests(): ?float @@ -234,9 +221,9 @@ public function getDailyRequests(): ?float } /** - * Sets daily_requests. + * Sets daily_requests * - * @param ?float $daily_requests number of requests from the same visitor in the previous day + * @param ?float $daily_requests Number of requests from the same visitor in the previous day. * * @return $this */ @@ -246,11 +233,10 @@ public function setDailyRequests(?float $daily_requests): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -260,7 +246,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -270,8 +256,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -285,10 +271,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 6f769e05..04335f39 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -1,16 +1,14 @@ 'int', - 'latitude' => 'double', - 'longitude' => 'double', - 'postal_code' => 'string', - 'timezone' => 'string', - 'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', - 'country' => '\Fingerprint\ServerAPI\Model\Location', - 'continent' => '\Fingerprint\ServerAPI\Model\Location', - 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; +'latitude' => 'double', +'longitude' => 'double', +'postal_code' => 'string', +'timezone' => 'string', +'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', +'country' => '\Fingerprint\ServerAPI\Model\Location', +'continent' => '\Fingerprint\ServerAPI\Model\Location', +'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static array $swaggerFormats = [ + 'accuracy_radius' => null, +'latitude' => 'double', +'longitude' => 'double', +'postal_code' => null, +'timezone' => 'timezone', +'city' => null, +'country' => null, +'continent' => null, +'subdivisions' => null ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $swaggerFormats = [ - 'accuracy_radius' => null, - 'latitude' => 'double', - 'longitude' => 'double', - 'postal_code' => null, - 'timezone' => 'timezone', - 'city' => null, - 'country' => null, - 'continent' => null, - 'subdivisions' => null]; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', - 'latitude' => 'latitude', - 'longitude' => 'longitude', - 'postal_code' => 'postalCode', - 'timezone' => 'timezone', - 'city' => 'city', - 'country' => 'country', - 'continent' => 'continent', - 'subdivisions' => 'subdivisions']; +'latitude' => 'latitude', +'longitude' => 'longitude', +'postal_code' => 'postalCode', +'timezone' => 'timezone', +'city' => 'city', +'country' => 'country', +'continent' => 'continent', +'subdivisions' => 'subdivisions' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', - 'latitude' => 'setLatitude', - 'longitude' => 'setLongitude', - 'postal_code' => 'setPostalCode', - 'timezone' => 'setTimezone', - 'city' => 'setCity', - 'country' => 'setCountry', - 'continent' => 'setContinent', - 'subdivisions' => 'setSubdivisions']; +'latitude' => 'setLatitude', +'longitude' => 'setLongitude', +'postal_code' => 'setPostalCode', +'timezone' => 'setTimezone', +'city' => 'setCity', +'country' => 'setCountry', +'continent' => 'setContinent', +'subdivisions' => 'setSubdivisions' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', - 'latitude' => 'getLatitude', - 'longitude' => 'getLongitude', - 'postal_code' => 'getPostalCode', - 'timezone' => 'getTimezone', - 'city' => 'getCity', - 'country' => 'getCountry', - 'continent' => 'getContinent', - 'subdivisions' => 'getSubdivisions']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'latitude' => 'getLatitude', +'longitude' => 'getLongitude', +'postal_code' => 'getPostalCode', +'timezone' => 'getTimezone', +'city' => 'getCity', +'country' => 'getCountry', +'continent' => 'getContinent', +'subdivisions' => 'getSubdivisions' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -193,7 +152,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -201,7 +160,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -216,6 +175,34 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -223,23 +210,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets accuracy_radius. - * + * Gets accuracy_radius * @return ?int */ public function getAccuracyRadius(): ?int @@ -248,9 +237,9 @@ public function getAccuracyRadius(): ?int } /** - * Sets accuracy_radius. + * Sets accuracy_radius * - * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. * * @return $this */ @@ -262,8 +251,7 @@ public function setAccuracyRadius(?int $accuracy_radius): self } /** - * Gets latitude. - * + * Gets latitude * @return ?double */ public function getLatitude(): ?float @@ -272,7 +260,7 @@ public function getLatitude(): ?float } /** - * Sets latitude. + * Sets latitude * * @param ?double $latitude latitude * @@ -286,8 +274,7 @@ public function setLatitude(?float $latitude): self } /** - * Gets longitude. - * + * Gets longitude * @return ?double */ public function getLongitude(): ?float @@ -296,7 +283,7 @@ public function getLongitude(): ?float } /** - * Sets longitude. + * Sets longitude * * @param ?double $longitude longitude * @@ -310,8 +297,7 @@ public function setLongitude(?float $longitude): self } /** - * Gets postal_code. - * + * Gets postal_code * @return ?string */ public function getPostalCode(): ?string @@ -320,7 +306,7 @@ public function getPostalCode(): ?string } /** - * Sets postal_code. + * Sets postal_code * * @param ?string $postal_code postal_code * @@ -334,8 +320,7 @@ public function setPostalCode(?string $postal_code): self } /** - * Gets timezone. - * + * Gets timezone * @return ?string */ public function getTimezone(): ?string @@ -344,7 +329,7 @@ public function getTimezone(): ?string } /** - * Sets timezone. + * Sets timezone * * @param ?string $timezone timezone * @@ -358,23 +343,22 @@ public function setTimezone(?string $timezone): self } /** - * Gets city. - * + * Gets city * @return ?\Fingerprint\ServerAPI\Model\IPLocationCity */ - public function getCity(): ?IPLocationCity + public function getCity(): ?\Fingerprint\ServerAPI\Model\IPLocationCity { return $this->container['city']; } /** - * Sets city. + * Sets city * * @param ?\Fingerprint\ServerAPI\Model\IPLocationCity $city city * * @return $this */ - public function setCity(?IPLocationCity $city): self + public function setCity(?\Fingerprint\ServerAPI\Model\IPLocationCity $city): self { $this->container['city'] = $city; @@ -382,23 +366,22 @@ public function setCity(?IPLocationCity $city): self } /** - * Gets country. - * + * Gets country * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry(): ?Location + public function getCountry(): ?\Fingerprint\ServerAPI\Model\Location { return $this->container['country']; } /** - * Sets country. + * Sets country * * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry(?Location $country): self + public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): self { $this->container['country'] = $country; @@ -406,23 +389,22 @@ public function setCountry(?Location $country): self } /** - * Gets continent. - * + * Gets continent * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent(): ?Location + public function getContinent(): ?\Fingerprint\ServerAPI\Model\Location { return $this->container['continent']; } /** - * Sets continent. + * Sets continent * * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent(?Location $continent): self + public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): self { $this->container['continent'] = $continent; @@ -430,8 +412,7 @@ public function setContinent(?Location $continent): self } /** - * Gets subdivisions. - * + * Gets subdivisions * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array @@ -440,7 +421,7 @@ public function getSubdivisions(): ?array } /** - * Sets subdivisions. + * Sets subdivisions * * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -452,11 +433,10 @@ public function setSubdivisions(?array $subdivisions): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -466,7 +446,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -476,8 +456,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -491,10 +471,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index c0637bf3..483126fd 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -1,16 +1,14 @@ 'string']; + 'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'name' => null]; + 'name' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'name' => 'name']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'name' => 'setName']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'name' => 'getName']; + protected static array $attributeMap = [ + 'name' => 'name' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'name' => 'setName' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,23 +162,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets name. - * + * Gets name * @return ?string */ public function getName(): ?string @@ -200,7 +189,7 @@ public function getName(): ?string } /** - * Sets name. + * Sets name * * @param ?string $name name * @@ -212,11 +201,10 @@ public function setName(?string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c8890cc4..6756d091 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -154,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -162,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -177,8 +140,11 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; +const CODE_FAILED = 'Failed'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -186,7 +152,26 @@ public function getCodeAllowableValues(): array { return [ self::CODE__429_TOO_MANY_REQUESTS, - self::CODE_FAILED, ]; +self::CODE_FAILED, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; } /** @@ -198,7 +183,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +194,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -236,7 +222,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -259,7 +245,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -267,7 +254,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -279,11 +266,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -293,7 +279,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -303,8 +289,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -318,10 +304,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 6299cc93..f162b8f7 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,9 +192,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise + * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise. * * @return $this */ @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index c6131829..0a5308d6 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -1,16 +1,14 @@ 'bool', - 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; +'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'details' => null]; +'details' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'details' => 'details']; +'details' => 'details' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'details' => 'setDetails']; +'details' => 'setDetails' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'details' => 'getDetails']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['details'] = isset($data['details']) ? $data['details'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'details' => 'getDetails' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - if (null === $this->container['details']) { + if ($this->container['details'] === null) { $invalidProperties[] = "'details' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -213,9 +201,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise + * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. * * @return $this */ @@ -227,31 +215,31 @@ public function setResult(bool $result): self } /** - * Gets details. + * Gets details + * @return \Fingerprint\ServerAPI\Model\IpBlockListResultDetails */ - public function getDetails(): IpBlockListResultDetails + public function getDetails(): \Fingerprint\ServerAPI\Model\IpBlockListResultDetails { return $this->container['details']; } /** - * Sets details. + * Sets details * - * @param IpBlockListResultDetails $details details + * @param \Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details details * * @return $this */ - public function setDetails(IpBlockListResultDetails $details): self + public function setDetails(\Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details): self { $this->container['details'] = $details; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 0695fbc1..572299c8 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -1,16 +1,14 @@ 'bool', - 'attack_source' => 'bool']; +'attack_source' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'email_spam' => null, - 'attack_source' => null]; +'attack_source' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'email_spam' => 'emailSpam', - 'attack_source' => 'attackSource']; +'attack_source' => 'attackSource' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'email_spam' => 'setEmailSpam', - 'attack_source' => 'setAttackSource']; +'attack_source' => 'setAttackSource' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'email_spam' => 'getEmailSpam', - 'attack_source' => 'getAttackSource']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; - $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'attack_source' => 'getAttackSource' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; + $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['email_spam']) { + if ($this->container['email_spam'] === null) { $invalidProperties[] = "'email_spam' can't be null"; } - if (null === $this->container['attack_source']) { + if ($this->container['attack_source'] === null) { $invalidProperties[] = "'attack_source' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets email_spam. + * Gets email_spam + * @return bool */ public function getEmailSpam(): bool { @@ -213,9 +201,9 @@ public function getEmailSpam(): bool } /** - * Sets email_spam. + * Sets email_spam * - * @param bool $email_spam IP address was part of a known email spam attack (SMTP) + * @param bool $email_spam IP address was part of a known email spam attack (SMTP). * * @return $this */ @@ -227,7 +215,8 @@ public function setEmailSpam(bool $email_spam): self } /** - * Gets attack_source. + * Gets attack_source + * @return bool */ public function getAttackSource(): bool { @@ -235,9 +224,9 @@ public function getAttackSource(): bool } /** - * Sets attack_source. + * Sets attack_source * - * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS) + * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS). * * @return $this */ @@ -247,11 +236,10 @@ public function setAttackSource(bool $attack_source): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 2a6a7d98..d67942e8 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\IpInfoResultV4', - 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; +'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'v4' => null, - 'v6' => null]; +'v6' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'v4' => 'v4', - 'v6' => 'v6']; +'v6' => 'v6' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'v4' => 'setV4', - 'v6' => 'setV6']; +'v6' => 'setV6' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'v4' => 'getV4', - 'v6' => 'getV6']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; - $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'v6' => 'getV6' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -153,7 +118,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -161,7 +126,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -176,6 +141,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; + $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,38 +169,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets v4. - * + * Gets v4 * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 */ - public function getV4(): ?IpInfoResultV4 + public function getV4(): ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 { return $this->container['v4']; } /** - * Sets v4. + * Sets v4 * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 * * @return $this */ - public function setV4(?IpInfoResultV4 $v4): self + public function setV4(?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -222,33 +210,31 @@ public function setV4(?IpInfoResultV4 $v4): self } /** - * Gets v6. - * + * Gets v6 * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 */ - public function getV6(): ?IpInfoResultV6 + public function getV6(): ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 { return $this->container['v6']; } /** - * Sets v6. + * Sets v6 * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 * * @return $this */ - public function setV6(?IpInfoResultV6 $v6): self + public function setV6(?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -258,7 +244,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -268,8 +254,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -283,10 +269,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 8a2f36d3..2b1613c0 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -1,16 +1,14 @@ 'string', - 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', - 'asn' => '\Fingerprint\ServerAPI\Model\ASN', - 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; +'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', +'asn' => '\Fingerprint\ServerAPI\Model\ASN', +'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'address' => 'ipv4', - 'geolocation' => null, - 'asn' => null, - 'datacenter' => null]; +'geolocation' => null, +'asn' => null, +'datacenter' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'address' => 'address', - 'geolocation' => 'geolocation', - 'asn' => 'asn', - 'datacenter' => 'datacenter']; +'geolocation' => 'geolocation', +'asn' => 'asn', +'datacenter' => 'datacenter' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'address' => 'setAddress', - 'geolocation' => 'setGeolocation', - 'asn' => 'setAsn', - 'datacenter' => 'setDatacenter']; +'geolocation' => 'setGeolocation', +'asn' => 'setAsn', +'datacenter' => 'setDatacenter' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'address' => 'getAddress', - 'geolocation' => 'getGeolocation', - 'asn' => 'getAsn', - 'datacenter' => 'getDatacenter']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'geolocation' => 'getGeolocation', +'asn' => 'getAsn', +'datacenter' => 'getDatacenter' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -163,7 +127,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -171,7 +135,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -186,6 +150,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -195,29 +182,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['address']) { + if ($this->container['address'] === null) { $invalidProperties[] = "'address' can't be null"; } - if (null === $this->container['geolocation']) { + if ($this->container['geolocation'] === null) { $invalidProperties[] = "'geolocation' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets address. + * Gets address + * @return string */ public function getAddress(): string { @@ -225,7 +213,7 @@ public function getAddress(): string } /** - * Sets address. + * Sets address * * @param string $address address * @@ -239,21 +227,22 @@ public function setAddress(string $address): self } /** - * Gets geolocation. + * Gets geolocation + * @return \Fingerprint\ServerAPI\Model\IPLocation */ - public function getGeolocation(): IPLocation + public function getGeolocation(): \Fingerprint\ServerAPI\Model\IPLocation { return $this->container['geolocation']; } /** - * Sets geolocation. + * Sets geolocation * - * @param IPLocation $geolocation geolocation + * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation * * @return $this */ - public function setGeolocation(IPLocation $geolocation): self + public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -261,23 +250,22 @@ public function setGeolocation(IPLocation $geolocation): self } /** - * Gets asn. - * + * Gets asn * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn(): ?ASN + public function getAsn(): ?\Fingerprint\ServerAPI\Model\ASN { return $this->container['asn']; } /** - * Sets asn. + * Sets asn * * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn(?ASN $asn): self + public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self { $this->container['asn'] = $asn; @@ -285,33 +273,31 @@ public function setAsn(?ASN $asn): self } /** - * Gets datacenter. - * + * Gets datacenter * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter(): ?DataCenter + public function getDatacenter(): ?\Fingerprint\ServerAPI\Model\DataCenter { return $this->container['datacenter']; } /** - * Sets datacenter. + * Sets datacenter * * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter(?DataCenter $datacenter): self + public function setDatacenter(?\Fingerprint\ServerAPI\Model\DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -321,7 +307,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -331,8 +317,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -346,10 +332,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 0774ae9c..a4778893 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -1,16 +1,14 @@ 'string', - 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', - 'asn' => '\Fingerprint\ServerAPI\Model\ASN', - 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; +'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', +'asn' => '\Fingerprint\ServerAPI\Model\ASN', +'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'address' => 'ipv6', - 'geolocation' => null, - 'asn' => null, - 'datacenter' => null]; +'geolocation' => null, +'asn' => null, +'datacenter' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'address' => 'address', - 'geolocation' => 'geolocation', - 'asn' => 'asn', - 'datacenter' => 'datacenter']; +'geolocation' => 'geolocation', +'asn' => 'asn', +'datacenter' => 'datacenter' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'address' => 'setAddress', - 'geolocation' => 'setGeolocation', - 'asn' => 'setAsn', - 'datacenter' => 'setDatacenter']; +'geolocation' => 'setGeolocation', +'asn' => 'setAsn', +'datacenter' => 'setDatacenter' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'address' => 'getAddress', - 'geolocation' => 'getGeolocation', - 'asn' => 'getAsn', - 'datacenter' => 'getDatacenter']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'geolocation' => 'getGeolocation', +'asn' => 'getAsn', +'datacenter' => 'getDatacenter' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -163,7 +127,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -171,7 +135,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -186,6 +150,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -195,29 +182,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['address']) { + if ($this->container['address'] === null) { $invalidProperties[] = "'address' can't be null"; } - if (null === $this->container['geolocation']) { + if ($this->container['geolocation'] === null) { $invalidProperties[] = "'geolocation' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets address. + * Gets address + * @return string */ public function getAddress(): string { @@ -225,7 +213,7 @@ public function getAddress(): string } /** - * Sets address. + * Sets address * * @param string $address address * @@ -239,21 +227,22 @@ public function setAddress(string $address): self } /** - * Gets geolocation. + * Gets geolocation + * @return \Fingerprint\ServerAPI\Model\IPLocation */ - public function getGeolocation(): IPLocation + public function getGeolocation(): \Fingerprint\ServerAPI\Model\IPLocation { return $this->container['geolocation']; } /** - * Sets geolocation. + * Sets geolocation * - * @param IPLocation $geolocation geolocation + * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation * * @return $this */ - public function setGeolocation(IPLocation $geolocation): self + public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -261,23 +250,22 @@ public function setGeolocation(IPLocation $geolocation): self } /** - * Gets asn. - * + * Gets asn * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn(): ?ASN + public function getAsn(): ?\Fingerprint\ServerAPI\Model\ASN { return $this->container['asn']; } /** - * Sets asn. + * Sets asn * * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn(?ASN $asn): self + public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self { $this->container['asn'] = $asn; @@ -285,33 +273,31 @@ public function setAsn(?ASN $asn): self } /** - * Gets datacenter. - * + * Gets datacenter * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter(): ?DataCenter + public function getDatacenter(): ?\Fingerprint\ServerAPI\Model\DataCenter { return $this->container['datacenter']; } /** - * Sets datacenter. + * Sets datacenter * * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter(?DataCenter $datacenter): self + public function setDatacenter(?\Fingerprint\ServerAPI\Model\DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -321,7 +307,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -331,8 +317,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -346,10 +332,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index fa94ca4d..0aa11da2 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result iOS specific jailbreak detection. There are 2 values: • `true` - Jailbreak detected • `false` - No signs of jailbreak or the client is not iOS. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Location.php b/src/Model/Location.php index 10af00e7..85cda839 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -1,16 +1,14 @@ 'string', - 'name' => 'string']; +'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'name' => null]; +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'name' => 'name']; +'name' => 'name' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'name' => 'setName']; +'name' => 'setName' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'name' => 'getName']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } - if (null === $this->container['name']) { + if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -213,7 +201,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code code * @@ -227,7 +215,8 @@ public function setCode(string $code): self } /** - * Gets name. + * Gets name + * @return string */ public function getName(): string { @@ -235,7 +224,7 @@ public function getName(): string } /** - * Sets name. + * Sets name * * @param string $name name * @@ -247,11 +236,10 @@ public function setName(string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index fb7e697c..5a0e8ce1 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,9 +192,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result flag indicating whether the request came from a mobile device with location spoofing enabled + * @param bool $result Flag indicating whether the request came from a mobile device with location spoofing enabled. * * @return $this */ @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 0156c76d..c6adaf20 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -1,18 +1,17 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 5a0879e9..2cf9817c 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -1,16 +1,14 @@ 'string', - 'message' => 'string']; +'message' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, - 'message' => null]; +'message' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', - 'message' => 'message']; +'message' => 'message' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', - 'message' => 'setMessage']; +'message' => 'setMessage' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', - 'message' => 'getMessage']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'message' => 'getMessage' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -154,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -162,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -177,8 +140,11 @@ public function getModelName(): string return self::$swaggerModelName; } + const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; +const CODE_FAILED = 'Failed'; + /** - * Gets allowable values of the enum. + * Gets allowable values of the enum * * @return string[] */ @@ -186,7 +152,26 @@ public function getCodeAllowableValues(): array { return [ self::CODE_TOO_MANY_REQUESTS, - self::CODE_FAILED, ]; +self::CODE_FAILED, ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; } /** @@ -198,7 +183,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['code']) { + if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +194,27 @@ public function listInvalidProperties(): array ); } - if (null === $this->container['message']) { + if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets code. + * Gets code + * @return string */ public function getCode(): string { @@ -236,7 +222,7 @@ public function getCode(): string } /** - * Sets code. + * Sets code * * @param string $code Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -259,7 +245,8 @@ public function setCode(string $code): self } /** - * Gets message. + * Gets message + * @return string */ public function getMessage(): string { @@ -267,7 +254,7 @@ public function getMessage(): string } /** - * Sets message. + * Sets message * * @param string $message message * @@ -279,11 +266,10 @@ public function setMessage(string $message): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -293,7 +279,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -303,8 +289,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -318,10 +304,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 16649fd8..d832b8c5 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', - 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', - 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', - 'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', - 'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', - 'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', - 'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', - 'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', - 'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', - 'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', - 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', - 'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', - 'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', - 'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', - 'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', - 'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', - 'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', - 'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', - 'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', - 'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', - 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes', - 'remote_control' => '\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl', - 'velocity' => '\Fingerprint\ServerAPI\Model\SignalResponseVelocity', - 'developer_tools' => '\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools']; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ +'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', +'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', +'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', +'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', +'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', +'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', +'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', +'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', +'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', +'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', +'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', +'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', +'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', +'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', +'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', +'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', +'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', +'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', +'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', +'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes', +'remote_control' => '\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl', +'velocity' => '\Fingerprint\ServerAPI\Model\SignalResponseVelocity', +'developer_tools' => '\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'identification' => null, - 'botd' => null, - 'ip_info' => null, - 'incognito' => null, - 'root_apps' => null, - 'emulator' => null, - 'cloned_app' => null, - 'factory_reset' => null, - 'jailbroken' => null, - 'frida' => null, - 'ip_blocklist' => null, - 'tor' => null, - 'privacy_settings' => null, - 'virtual_machine' => null, - 'vpn' => null, - 'proxy' => null, - 'tampering' => null, - 'high_activity' => null, - 'location_spoofing' => null, - 'suspect_score' => null, - 'raw_device_attributes' => null, - 'remote_control' => null, - 'velocity' => null, - 'developer_tools' => null]; +'botd' => null, +'ip_info' => null, +'incognito' => null, +'root_apps' => null, +'emulator' => null, +'cloned_app' => null, +'factory_reset' => null, +'jailbroken' => null, +'frida' => null, +'ip_blocklist' => null, +'tor' => null, +'privacy_settings' => null, +'virtual_machine' => null, +'vpn' => null, +'proxy' => null, +'tampering' => null, +'high_activity' => null, +'location_spoofing' => null, +'suspect_score' => null, +'raw_device_attributes' => null, +'remote_control' => null, +'velocity' => null, +'developer_tools' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'identification' => 'identification', - 'botd' => 'botd', - 'ip_info' => 'ipInfo', - 'incognito' => 'incognito', - 'root_apps' => 'rootApps', - 'emulator' => 'emulator', - 'cloned_app' => 'clonedApp', - 'factory_reset' => 'factoryReset', - 'jailbroken' => 'jailbroken', - 'frida' => 'frida', - 'ip_blocklist' => 'ipBlocklist', - 'tor' => 'tor', - 'privacy_settings' => 'privacySettings', - 'virtual_machine' => 'virtualMachine', - 'vpn' => 'vpn', - 'proxy' => 'proxy', - 'tampering' => 'tampering', - 'high_activity' => 'highActivity', - 'location_spoofing' => 'locationSpoofing', - 'suspect_score' => 'suspectScore', - 'raw_device_attributes' => 'rawDeviceAttributes', - 'remote_control' => 'remoteControl', - 'velocity' => 'velocity', - 'developer_tools' => 'developerTools']; - - /** - * Array of attributes to setter functions (for deserialization of responses). +'botd' => 'botd', +'ip_info' => 'ipInfo', +'incognito' => 'incognito', +'root_apps' => 'rootApps', +'emulator' => 'emulator', +'cloned_app' => 'clonedApp', +'factory_reset' => 'factoryReset', +'jailbroken' => 'jailbroken', +'frida' => 'frida', +'ip_blocklist' => 'ipBlocklist', +'tor' => 'tor', +'privacy_settings' => 'privacySettings', +'virtual_machine' => 'virtualMachine', +'vpn' => 'vpn', +'proxy' => 'proxy', +'tampering' => 'tampering', +'high_activity' => 'highActivity', +'location_spoofing' => 'locationSpoofing', +'suspect_score' => 'suspectScore', +'raw_device_attributes' => 'rawDeviceAttributes', +'remote_control' => 'remoteControl', +'velocity' => 'velocity', +'developer_tools' => 'developerTools' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'identification' => 'setIdentification', - 'botd' => 'setBotd', - 'ip_info' => 'setIpInfo', - 'incognito' => 'setIncognito', - 'root_apps' => 'setRootApps', - 'emulator' => 'setEmulator', - 'cloned_app' => 'setClonedApp', - 'factory_reset' => 'setFactoryReset', - 'jailbroken' => 'setJailbroken', - 'frida' => 'setFrida', - 'ip_blocklist' => 'setIpBlocklist', - 'tor' => 'setTor', - 'privacy_settings' => 'setPrivacySettings', - 'virtual_machine' => 'setVirtualMachine', - 'vpn' => 'setVpn', - 'proxy' => 'setProxy', - 'tampering' => 'setTampering', - 'high_activity' => 'setHighActivity', - 'location_spoofing' => 'setLocationSpoofing', - 'suspect_score' => 'setSuspectScore', - 'raw_device_attributes' => 'setRawDeviceAttributes', - 'remote_control' => 'setRemoteControl', - 'velocity' => 'setVelocity', - 'developer_tools' => 'setDeveloperTools']; - - /** - * Array of attributes to getter functions (for serialization of requests). +'botd' => 'setBotd', +'ip_info' => 'setIpInfo', +'incognito' => 'setIncognito', +'root_apps' => 'setRootApps', +'emulator' => 'setEmulator', +'cloned_app' => 'setClonedApp', +'factory_reset' => 'setFactoryReset', +'jailbroken' => 'setJailbroken', +'frida' => 'setFrida', +'ip_blocklist' => 'setIpBlocklist', +'tor' => 'setTor', +'privacy_settings' => 'setPrivacySettings', +'virtual_machine' => 'setVirtualMachine', +'vpn' => 'setVpn', +'proxy' => 'setProxy', +'tampering' => 'setTampering', +'high_activity' => 'setHighActivity', +'location_spoofing' => 'setLocationSpoofing', +'suspect_score' => 'setSuspectScore', +'raw_device_attributes' => 'setRawDeviceAttributes', +'remote_control' => 'setRemoteControl', +'velocity' => 'setVelocity', +'developer_tools' => 'setDeveloperTools' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'identification' => 'getIdentification', - 'botd' => 'getBotd', - 'ip_info' => 'getIpInfo', - 'incognito' => 'getIncognito', - 'root_apps' => 'getRootApps', - 'emulator' => 'getEmulator', - 'cloned_app' => 'getClonedApp', - 'factory_reset' => 'getFactoryReset', - 'jailbroken' => 'getJailbroken', - 'frida' => 'getFrida', - 'ip_blocklist' => 'getIpBlocklist', - 'tor' => 'getTor', - 'privacy_settings' => 'getPrivacySettings', - 'virtual_machine' => 'getVirtualMachine', - 'vpn' => 'getVpn', - 'proxy' => 'getProxy', - 'tampering' => 'getTampering', - 'high_activity' => 'getHighActivity', - 'location_spoofing' => 'getLocationSpoofing', - 'suspect_score' => 'getSuspectScore', - 'raw_device_attributes' => 'getRawDeviceAttributes', - 'remote_control' => 'getRemoteControl', - 'velocity' => 'getVelocity', - 'developer_tools' => 'getDeveloperTools']; - - /** - * Associative array for storing property values. +'botd' => 'getBotd', +'ip_info' => 'getIpInfo', +'incognito' => 'getIncognito', +'root_apps' => 'getRootApps', +'emulator' => 'getEmulator', +'cloned_app' => 'getClonedApp', +'factory_reset' => 'getFactoryReset', +'jailbroken' => 'getJailbroken', +'frida' => 'getFrida', +'ip_blocklist' => 'getIpBlocklist', +'tor' => 'getTor', +'privacy_settings' => 'getPrivacySettings', +'virtual_machine' => 'getVirtualMachine', +'vpn' => 'getVpn', +'proxy' => 'getProxy', +'tampering' => 'getTampering', +'high_activity' => 'getHighActivity', +'location_spoofing' => 'getLocationSpoofing', +'suspect_score' => 'getSuspectScore', +'raw_device_attributes' => 'getRawDeviceAttributes', +'remote_control' => 'getRemoteControl', +'velocity' => 'getVelocity', +'developer_tools' => 'getDeveloperTools' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + + + /** + * Associative array for storing property values * * @var mixed[] */ protected array $container = []; /** - * Constructor. + * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; @@ -244,70 +294,6 @@ public function __construct(?array $data = null) $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; } - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name. - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses). - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests). - */ - public static function getters(): array - { - return self::$getters; - } - - /** - * The original name of the model. - */ - public function getModelName(): string - { - return self::$swaggerModelName; - } - /** * Show all the invalid properties with reasons. * @@ -315,38 +301,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets identification. - * + * Gets identification * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification */ - public function getIdentification(): ?ProductsResponseIdentification + public function getIdentification(): ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification { return $this->container['identification']; } /** - * Sets identification. + * Sets identification * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification * * @return $this */ - public function setIdentification(?ProductsResponseIdentification $identification): self + public function setIdentification(?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -354,23 +342,22 @@ public function setIdentification(?ProductsResponseIdentification $identificatio } /** - * Gets botd. - * + * Gets botd * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd */ - public function getBotd(): ?ProductsResponseBotd + public function getBotd(): ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd { return $this->container['botd']; } /** - * Sets botd. + * Sets botd * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd * * @return $this */ - public function setBotd(?ProductsResponseBotd $botd): self + public function setBotd(?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -378,23 +365,22 @@ public function setBotd(?ProductsResponseBotd $botd): self } /** - * Gets ip_info. - * + * Gets ip_info * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo */ - public function getIpInfo(): ?SignalResponseIpInfo + public function getIpInfo(): ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo { return $this->container['ip_info']; } /** - * Sets ip_info. + * Sets ip_info * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info * * @return $this */ - public function setIpInfo(?SignalResponseIpInfo $ip_info): self + public function setIpInfo(?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -402,23 +388,22 @@ public function setIpInfo(?SignalResponseIpInfo $ip_info): self } /** - * Gets incognito. - * + * Gets incognito * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito */ - public function getIncognito(): ?SignalResponseIncognito + public function getIncognito(): ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito { return $this->container['incognito']; } /** - * Sets incognito. + * Sets incognito * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito * * @return $this */ - public function setIncognito(?SignalResponseIncognito $incognito): self + public function setIncognito(?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -426,23 +411,22 @@ public function setIncognito(?SignalResponseIncognito $incognito): self } /** - * Gets root_apps. - * + * Gets root_apps * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps */ - public function getRootApps(): ?SignalResponseRootApps + public function getRootApps(): ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps { return $this->container['root_apps']; } /** - * Sets root_apps. + * Sets root_apps * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps * * @return $this */ - public function setRootApps(?SignalResponseRootApps $root_apps): self + public function setRootApps(?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -450,23 +434,22 @@ public function setRootApps(?SignalResponseRootApps $root_apps): self } /** - * Gets emulator. - * + * Gets emulator * @return ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator */ - public function getEmulator(): ?SignalResponseEmulator + public function getEmulator(): ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator { return $this->container['emulator']; } /** - * Sets emulator. + * Sets emulator * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator * * @return $this */ - public function setEmulator(?SignalResponseEmulator $emulator): self + public function setEmulator(?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -474,23 +457,22 @@ public function setEmulator(?SignalResponseEmulator $emulator): self } /** - * Gets cloned_app. - * + * Gets cloned_app * @return ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp */ - public function getClonedApp(): ?SignalResponseClonedApp + public function getClonedApp(): ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp { return $this->container['cloned_app']; } /** - * Sets cloned_app. + * Sets cloned_app * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ - public function setClonedApp(?SignalResponseClonedApp $cloned_app): self + public function setClonedApp(?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -498,23 +480,22 @@ public function setClonedApp(?SignalResponseClonedApp $cloned_app): self } /** - * Gets factory_reset. - * + * Gets factory_reset * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset */ - public function getFactoryReset(): ?SignalResponseFactoryReset + public function getFactoryReset(): ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset { return $this->container['factory_reset']; } /** - * Sets factory_reset. + * Sets factory_reset * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ - public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): self + public function setFactoryReset(?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -522,23 +503,22 @@ public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): sel } /** - * Gets jailbroken. - * + * Gets jailbroken * @return ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken */ - public function getJailbroken(): ?SignalResponseJailbroken + public function getJailbroken(): ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken { return $this->container['jailbroken']; } /** - * Sets jailbroken. + * Sets jailbroken * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ - public function setJailbroken(?SignalResponseJailbroken $jailbroken): self + public function setJailbroken(?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -546,23 +526,22 @@ public function setJailbroken(?SignalResponseJailbroken $jailbroken): self } /** - * Gets frida. - * + * Gets frida * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFrida */ - public function getFrida(): ?SignalResponseFrida + public function getFrida(): ?\Fingerprint\ServerAPI\Model\SignalResponseFrida { return $this->container['frida']; } /** - * Sets frida. + * Sets frida * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida * * @return $this */ - public function setFrida(?SignalResponseFrida $frida): self + public function setFrida(?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -570,23 +549,22 @@ public function setFrida(?SignalResponseFrida $frida): self } /** - * Gets ip_blocklist. - * + * Gets ip_blocklist * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist */ - public function getIpBlocklist(): ?SignalResponseIpBlocklist + public function getIpBlocklist(): ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } /** - * Sets ip_blocklist. + * Sets ip_blocklist * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self + public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -594,23 +572,22 @@ public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self } /** - * Gets tor. - * + * Gets tor * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTor */ - public function getTor(): ?SignalResponseTor + public function getTor(): ?\Fingerprint\ServerAPI\Model\SignalResponseTor { return $this->container['tor']; } /** - * Sets tor. + * Sets tor * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor * * @return $this */ - public function setTor(?SignalResponseTor $tor): self + public function setTor(?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -618,23 +595,22 @@ public function setTor(?SignalResponseTor $tor): self } /** - * Gets privacy_settings. - * + * Gets privacy_settings * @return ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings */ - public function getPrivacySettings(): ?SignalResponsePrivacySettings + public function getPrivacySettings(): ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings { return $this->container['privacy_settings']; } /** - * Sets privacy_settings. + * Sets privacy_settings * * @param ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_settings): self + public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -642,23 +618,22 @@ public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_setti } /** - * Gets virtual_machine. - * + * Gets virtual_machine * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine */ - public function getVirtualMachine(): ?SignalResponseVirtualMachine + public function getVirtualMachine(): ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine { return $this->container['virtual_machine']; } /** - * Sets virtual_machine. + * Sets virtual_machine * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine): self + public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -666,23 +641,22 @@ public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine } /** - * Gets vpn. - * + * Gets vpn * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVpn */ - public function getVpn(): ?SignalResponseVpn + public function getVpn(): ?\Fingerprint\ServerAPI\Model\SignalResponseVpn { return $this->container['vpn']; } /** - * Sets vpn. + * Sets vpn * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn * * @return $this */ - public function setVpn(?SignalResponseVpn $vpn): self + public function setVpn(?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -690,23 +664,22 @@ public function setVpn(?SignalResponseVpn $vpn): self } /** - * Gets proxy. - * + * Gets proxy * @return ?\Fingerprint\ServerAPI\Model\SignalResponseProxy */ - public function getProxy(): ?SignalResponseProxy + public function getProxy(): ?\Fingerprint\ServerAPI\Model\SignalResponseProxy { return $this->container['proxy']; } /** - * Sets proxy. + * Sets proxy * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy * * @return $this */ - public function setProxy(?SignalResponseProxy $proxy): self + public function setProxy(?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -714,23 +687,22 @@ public function setProxy(?SignalResponseProxy $proxy): self } /** - * Gets tampering. - * + * Gets tampering * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTampering */ - public function getTampering(): ?SignalResponseTampering + public function getTampering(): ?\Fingerprint\ServerAPI\Model\SignalResponseTampering { return $this->container['tampering']; } /** - * Sets tampering. + * Sets tampering * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering * * @return $this */ - public function setTampering(?SignalResponseTampering $tampering): self + public function setTampering(?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -738,23 +710,22 @@ public function setTampering(?SignalResponseTampering $tampering): self } /** - * Gets high_activity. - * + * Gets high_activity * @return ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity */ - public function getHighActivity(): ?SignalResponseHighActivity + public function getHighActivity(): ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity { return $this->container['high_activity']; } /** - * Sets high_activity. + * Sets high_activity * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity * * @return $this */ - public function setHighActivity(?SignalResponseHighActivity $high_activity): self + public function setHighActivity(?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -762,23 +733,22 @@ public function setHighActivity(?SignalResponseHighActivity $high_activity): sel } /** - * Gets location_spoofing. - * + * Gets location_spoofing * @return ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing */ - public function getLocationSpoofing(): ?SignalResponseLocationSpoofing + public function getLocationSpoofing(): ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } /** - * Sets location_spoofing. + * Sets location_spoofing * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_spoofing): self + public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -786,23 +756,22 @@ public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_sp } /** - * Gets suspect_score. - * + * Gets suspect_score * @return ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore */ - public function getSuspectScore(): ?SignalResponseSuspectScore + public function getSuspectScore(): ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore { return $this->container['suspect_score']; } /** - * Sets suspect_score. + * Sets suspect_score * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ - public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): self + public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -810,23 +779,22 @@ public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): sel } /** - * Gets raw_device_attributes. - * + * Gets raw_device_attributes * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes */ - public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes + public function getRawDeviceAttributes(): ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } /** - * Sets raw_device_attributes. + * Sets raw_device_attributes * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ - public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_device_attributes): self + public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -834,23 +802,22 @@ public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_d } /** - * Gets remote_control. - * + * Gets remote_control * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl */ - public function getRemoteControl(): ?SignalResponseRemoteControl + public function getRemoteControl(): ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl { return $this->container['remote_control']; } /** - * Sets remote_control. + * Sets remote_control * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl $remote_control remote_control * * @return $this */ - public function setRemoteControl(?SignalResponseRemoteControl $remote_control): self + public function setRemoteControl(?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl $remote_control): self { $this->container['remote_control'] = $remote_control; @@ -858,23 +825,22 @@ public function setRemoteControl(?SignalResponseRemoteControl $remote_control): } /** - * Gets velocity. - * + * Gets velocity * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity */ - public function getVelocity(): ?SignalResponseVelocity + public function getVelocity(): ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity { return $this->container['velocity']; } /** - * Sets velocity. + * Sets velocity * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity $velocity velocity * * @return $this */ - public function setVelocity(?SignalResponseVelocity $velocity): self + public function setVelocity(?\Fingerprint\ServerAPI\Model\SignalResponseVelocity $velocity): self { $this->container['velocity'] = $velocity; @@ -882,33 +848,31 @@ public function setVelocity(?SignalResponseVelocity $velocity): self } /** - * Gets developer_tools. - * + * Gets developer_tools * @return ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools */ - public function getDeveloperTools(): ?SignalResponseDeveloperTools + public function getDeveloperTools(): ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools { return $this->container['developer_tools']; } /** - * Sets developer_tools. + * Sets developer_tools * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools $developer_tools developer_tools * * @return $this */ - public function setDeveloperTools(?SignalResponseDeveloperTools $developer_tools): self + public function setDeveloperTools(?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools $developer_tools): self { $this->container['developer_tools'] = $developer_tools; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -918,7 +882,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -928,8 +892,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -943,10 +907,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 7d8255c1..b8501ba2 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\BotdResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\BotdResult */ - public function getData(): ?BotdResult + public function getData(): ?\Fingerprint\ServerAPI\Model\BotdResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\BotdResult $data data * * @return $this */ - public function setData(?BotdResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\BotdResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?BotdResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index dfec88dc..a76bf9fd 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', - 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; +'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData */ - public function getData(): ?ProductsResponseIdentificationData + public function getData(): ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data * * @return $this */ - public function setData(?ProductsResponseIdentificationData $data): self + public function setData(?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?ProductsResponseIdentificationData $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?IdentificationError + public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?IdentificationError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 1bf397fc..cf18766d 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -1,16 +1,14 @@ 'string', - 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', - 'incognito' => 'bool', - 'ip' => 'string', - 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', - 'timestamp' => 'int', - 'time' => '\DateTime', - 'url' => 'string', - 'tag' => 'map[string,object]', - 'linked_id' => 'string', - 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', - 'visitor_found' => 'bool', - 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', - 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', - 'visitor_id' => 'string']; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ +'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', +'incognito' => 'bool', +'ip' => 'string', +'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', +'timestamp' => 'int', +'time' => '\DateTime', +'url' => 'string', +'tag' => 'map[string,object]', +'linked_id' => 'string', +'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', +'visitor_found' => 'bool', +'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', +'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', +'visitor_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, - 'browser_details' => null, - 'incognito' => null, - 'ip' => 'ipv4', - 'ip_location' => null, - 'timestamp' => 'int64', - 'time' => 'date-time', - 'url' => null, - 'tag' => null, - 'linked_id' => null, - 'confidence' => null, - 'visitor_found' => null, - 'first_seen_at' => null, - 'last_seen_at' => null, - 'visitor_id' => null]; +'browser_details' => null, +'incognito' => null, +'ip' => 'ipv4', +'ip_location' => null, +'timestamp' => 'int64', +'time' => 'date-time', +'url' => null, +'tag' => null, +'linked_id' => null, +'confidence' => null, +'visitor_found' => null, +'first_seen_at' => null, +'last_seen_at' => null, +'visitor_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', - 'browser_details' => 'browserDetails', - 'incognito' => 'incognito', - 'ip' => 'ip', - 'ip_location' => 'ipLocation', - 'timestamp' => 'timestamp', - 'time' => 'time', - 'url' => 'url', - 'tag' => 'tag', - 'linked_id' => 'linkedId', - 'confidence' => 'confidence', - 'visitor_found' => 'visitorFound', - 'first_seen_at' => 'firstSeenAt', - 'last_seen_at' => 'lastSeenAt', - 'visitor_id' => 'visitorId']; - - /** - * Array of attributes to setter functions (for deserialization of responses). +'browser_details' => 'browserDetails', +'incognito' => 'incognito', +'ip' => 'ip', +'ip_location' => 'ipLocation', +'timestamp' => 'timestamp', +'time' => 'time', +'url' => 'url', +'tag' => 'tag', +'linked_id' => 'linkedId', +'confidence' => 'confidence', +'visitor_found' => 'visitorFound', +'first_seen_at' => 'firstSeenAt', +'last_seen_at' => 'lastSeenAt', +'visitor_id' => 'visitorId' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', - 'browser_details' => 'setBrowserDetails', - 'incognito' => 'setIncognito', - 'ip' => 'setIp', - 'ip_location' => 'setIpLocation', - 'timestamp' => 'setTimestamp', - 'time' => 'setTime', - 'url' => 'setUrl', - 'tag' => 'setTag', - 'linked_id' => 'setLinkedId', - 'confidence' => 'setConfidence', - 'visitor_found' => 'setVisitorFound', - 'first_seen_at' => 'setFirstSeenAt', - 'last_seen_at' => 'setLastSeenAt', - 'visitor_id' => 'setVisitorId']; - - /** - * Array of attributes to getter functions (for serialization of requests). +'browser_details' => 'setBrowserDetails', +'incognito' => 'setIncognito', +'ip' => 'setIp', +'ip_location' => 'setIpLocation', +'timestamp' => 'setTimestamp', +'time' => 'setTime', +'url' => 'setUrl', +'tag' => 'setTag', +'linked_id' => 'setLinkedId', +'confidence' => 'setConfidence', +'visitor_found' => 'setVisitorFound', +'first_seen_at' => 'setFirstSeenAt', +'last_seen_at' => 'setLastSeenAt', +'visitor_id' => 'setVisitorId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', - 'browser_details' => 'getBrowserDetails', - 'incognito' => 'getIncognito', - 'ip' => 'getIp', - 'ip_location' => 'getIpLocation', - 'timestamp' => 'getTimestamp', - 'time' => 'getTime', - 'url' => 'getUrl', - 'tag' => 'getTag', - 'linked_id' => 'getLinkedId', - 'confidence' => 'getConfidence', - 'visitor_found' => 'getVisitorFound', - 'first_seen_at' => 'getFirstSeenAt', - 'last_seen_at' => 'getLastSeenAt', - 'visitor_id' => 'getVisitorId']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'browser_details' => 'getBrowserDetails', +'incognito' => 'getIncognito', +'ip' => 'getIp', +'ip_location' => 'getIpLocation', +'timestamp' => 'getTimestamp', +'time' => 'getTime', +'url' => 'getUrl', +'tag' => 'getTag', +'linked_id' => 'getLinkedId', +'confidence' => 'getConfidence', +'visitor_found' => 'getVisitorFound', +'first_seen_at' => 'getFirstSeenAt', +'last_seen_at' => 'getLastSeenAt', +'visitor_id' => 'getVisitorId' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -229,7 +182,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -237,7 +190,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -252,6 +205,40 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -261,59 +248,60 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['request_id']) { + if ($this->container['request_id'] === null) { $invalidProperties[] = "'request_id' can't be null"; } - if (null === $this->container['browser_details']) { + if ($this->container['browser_details'] === null) { $invalidProperties[] = "'browser_details' can't be null"; } - if (null === $this->container['incognito']) { + if ($this->container['incognito'] === null) { $invalidProperties[] = "'incognito' can't be null"; } - if (null === $this->container['ip']) { + if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; } - if (null === $this->container['timestamp']) { + if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['url']) { + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['tag']) { + if ($this->container['tag'] === null) { $invalidProperties[] = "'tag' can't be null"; } - if (null === $this->container['visitor_found']) { + if ($this->container['visitor_found'] === null) { $invalidProperties[] = "'visitor_found' can't be null"; } - if (null === $this->container['first_seen_at']) { + if ($this->container['first_seen_at'] === null) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if (null === $this->container['last_seen_at']) { + if ($this->container['last_seen_at'] === null) { $invalidProperties[] = "'last_seen_at' can't be null"; } - if (null === $this->container['visitor_id']) { + if ($this->container['visitor_id'] === null) { $invalidProperties[] = "'visitor_id' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets request_id. + * Gets request_id + * @return string */ public function getRequestId(): string { @@ -321,9 +309,9 @@ public function getRequestId(): string } /** - * Sets request_id. + * Sets request_id * - * @param string $request_id unique identifier of the user's identification request + * @param string $request_id Unique identifier of the user's identification request. * * @return $this */ @@ -335,21 +323,22 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details. + * Gets browser_details + * @return \Fingerprint\ServerAPI\Model\BrowserDetails */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details. + * Sets browser_details * - * @param BrowserDetails $browser_details browser_details + * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(BrowserDetails $browser_details): self + public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -357,7 +346,8 @@ public function setBrowserDetails(BrowserDetails $browser_details): self } /** - * Gets incognito. + * Gets incognito + * @return bool */ public function getIncognito(): bool { @@ -365,9 +355,9 @@ public function getIncognito(): bool } /** - * Sets incognito. + * Sets incognito * - * @param bool $incognito flag if user used incognito session + * @param bool $incognito Flag if user used incognito session. * * @return $this */ @@ -379,7 +369,8 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip. + * Gets ip + * @return string */ public function getIp(): string { @@ -387,7 +378,7 @@ public function getIp(): string } /** - * Sets ip. + * Sets ip * * @param string $ip ip * @@ -401,23 +392,22 @@ public function setIp(string $ip): self } /** - * Gets ip_location. - * + * Gets ip_location * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?DeprecatedIPLocation + public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location. + * Sets ip_location * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?DeprecatedIPLocation $ip_location): self + public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -425,7 +415,8 @@ public function setIpLocation(?DeprecatedIPLocation $ip_location): self } /** - * Gets timestamp. + * Gets timestamp + * @return int */ public function getTimestamp(): int { @@ -433,9 +424,9 @@ public function getTimestamp(): int } /** - * Sets timestamp. + * Sets timestamp * - * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. * * @return $this */ @@ -447,7 +438,8 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -455,9 +447,9 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * - * @param \DateTime $time time expressed according to ISO 8601 in UTC format + * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. * * @return $this */ @@ -469,7 +461,8 @@ public function setTime(\DateTime $time): self } /** - * Gets url. + * Gets url + * @return string */ public function getUrl(): string { @@ -477,9 +470,9 @@ public function getUrl(): string } /** - * Sets url. + * Sets url * - * @param string $url page URL from which the identification request was sent + * @param string $url Page URL from which the identification request was sent. * * @return $this */ @@ -491,8 +484,7 @@ public function setUrl(string $url): self } /** - * Gets tag. - * + * Gets tag * @return map[string,object] */ public function getTag(): array @@ -501,9 +493,9 @@ public function getTag(): array } /** - * Sets tag. + * Sets tag * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. * * @return $this */ @@ -515,8 +507,7 @@ public function setTag(array $tag): self } /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -525,9 +516,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * - * @param ?string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id A customer-provided id that was sent with identification request. * * @return $this */ @@ -539,23 +530,22 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence. - * + * Gets confidence * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?Confidence + public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence { return $this->container['confidence']; } /** - * Sets confidence. + * Sets confidence * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?Confidence $confidence): self + public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -563,7 +553,8 @@ public function setConfidence(?Confidence $confidence): self } /** - * Gets visitor_found. + * Gets visitor_found + * @return bool */ public function getVisitorFound(): bool { @@ -571,9 +562,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found. + * Sets visitor_found * - * @param bool $visitor_found attribute represents if a visitor had been identified before + * @param bool $visitor_found Attribute represents if a visitor had been identified before. * * @return $this */ @@ -585,21 +576,22 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at. + * Gets first_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at. + * Sets first_seen_at * - * @param SeenAt $first_seen_at first_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(SeenAt $first_seen_at): self + public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -607,21 +599,22 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self } /** - * Gets last_seen_at. + * Gets last_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at. + * Sets last_seen_at * - * @param SeenAt $last_seen_at last_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(SeenAt $last_seen_at): self + public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -629,7 +622,8 @@ public function setLastSeenAt(SeenAt $last_seen_at): self } /** - * Gets visitor_id. + * Gets visitor_id + * @return string */ public function getVisitorId(): string { @@ -637,9 +631,9 @@ public function getVisitorId(): string } /** - * Sets visitor_id. + * Sets visitor_id * - * @param string $visitor_id string of 20 characters that uniquely identifies the visitor's browser + * @param string $visitor_id String of 20 characters that uniquely identifies the visitor's browser. * * @return $this */ @@ -649,11 +643,10 @@ public function setVisitorId(string $visitor_id): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -663,7 +656,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -673,8 +666,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -688,10 +681,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 0ba7fc50..6ce3b94d 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,9 +192,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise + * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise. * * @return $this */ @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1e560cb3..1457f572 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -1,16 +1,14 @@ listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -201,7 +191,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -211,8 +201,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -226,10 +216,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/RemoteControlResult.php b/src/Model/RemoteControlResult.php index 125baf85..3ee7b1c1 100644 --- a/src/Model/RemoteControlResult.php +++ b/src/Model/RemoteControlResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Response.php b/src/Model/Response.php index 2aa4f347..e8629528 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -1,16 +1,14 @@ 'string', - 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', - 'last_timestamp' => 'int', - 'pagination_key' => 'string']; +'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', +'last_timestamp' => 'int', +'pagination_key' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'visitor_id' => null, - 'visits' => null, - 'last_timestamp' => 'int64', - 'pagination_key' => null]; +'visits' => null, +'last_timestamp' => 'int64', +'pagination_key' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'visitor_id' => 'visitorId', - 'visits' => 'visits', - 'last_timestamp' => 'lastTimestamp', - 'pagination_key' => 'paginationKey']; +'visits' => 'visits', +'last_timestamp' => 'lastTimestamp', +'pagination_key' => 'paginationKey' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'visitor_id' => 'setVisitorId', - 'visits' => 'setVisits', - 'last_timestamp' => 'setLastTimestamp', - 'pagination_key' => 'setPaginationKey']; +'visits' => 'setVisits', +'last_timestamp' => 'setLastTimestamp', +'pagination_key' => 'setPaginationKey' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'visitor_id' => 'getVisitorId', - 'visits' => 'getVisits', - 'last_timestamp' => 'getLastTimestamp', - 'pagination_key' => 'getPaginationKey']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; - $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; - $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'visits' => 'getVisits', +'last_timestamp' => 'getLastTimestamp', +'pagination_key' => 'getPaginationKey' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -165,7 +128,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -173,7 +136,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -188,6 +151,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; + $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; + $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -197,29 +183,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['visitor_id']) { + if ($this->container['visitor_id'] === null) { $invalidProperties[] = "'visitor_id' can't be null"; } - if (null === $this->container['visits']) { + if ($this->container['visits'] === null) { $invalidProperties[] = "'visits' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets visitor_id. + * Gets visitor_id + * @return string */ public function getVisitorId(): string { @@ -227,7 +214,7 @@ public function getVisitorId(): string } /** - * Sets visitor_id. + * Sets visitor_id * * @param string $visitor_id visitor_id * @@ -241,8 +228,7 @@ public function setVisitorId(string $visitor_id): self } /** - * Gets visits. - * + * Gets visits * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ public function getVisits(): array @@ -251,7 +237,7 @@ public function getVisits(): array } /** - * Sets visits. + * Sets visits * * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits * @@ -265,8 +251,7 @@ public function setVisits(array $visits): self } /** - * Gets last_timestamp. - * + * Gets last_timestamp * @return ?int */ public function getLastTimestamp(): ?int @@ -275,7 +260,7 @@ public function getLastTimestamp(): ?int } /** - * Sets last_timestamp. + * Sets last_timestamp * * @param ?int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. * @@ -289,8 +274,7 @@ public function setLastTimestamp(?int $last_timestamp): self } /** - * Gets pagination_key. - * + * Gets pagination_key * @return ?string */ public function getPaginationKey(): ?string @@ -299,7 +283,7 @@ public function getPaginationKey(): ?string } /** - * Sets pagination_key. + * Sets pagination_key * * @param ?string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. * @@ -311,11 +295,10 @@ public function setPaginationKey(?string $pagination_key): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -325,7 +308,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -335,8 +318,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -350,10 +333,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index e3b67f55..86f7dab5 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -1,16 +1,14 @@ 'string', - 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', - 'incognito' => 'bool', - 'ip' => 'string', - 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', - 'timestamp' => 'int', - 'time' => '\DateTime', - 'url' => 'string', - 'tag' => 'map[string,object]', - 'linked_id' => 'string', - 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', - 'visitor_found' => 'bool', - 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', - 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ +'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', +'incognito' => 'bool', +'ip' => 'string', +'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', +'timestamp' => 'int', +'time' => '\DateTime', +'url' => 'string', +'tag' => 'map[string,object]', +'linked_id' => 'string', +'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', +'visitor_found' => 'bool', +'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', +'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, - 'browser_details' => null, - 'incognito' => null, - 'ip' => 'ipv4', - 'ip_location' => null, - 'timestamp' => 'int64', - 'time' => 'date-time', - 'url' => null, - 'tag' => null, - 'linked_id' => null, - 'confidence' => null, - 'visitor_found' => null, - 'first_seen_at' => null, - 'last_seen_at' => null]; +'browser_details' => null, +'incognito' => null, +'ip' => 'ipv4', +'ip_location' => null, +'timestamp' => 'int64', +'time' => 'date-time', +'url' => null, +'tag' => null, +'linked_id' => null, +'confidence' => null, +'visitor_found' => null, +'first_seen_at' => null, +'last_seen_at' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', - 'browser_details' => 'browserDetails', - 'incognito' => 'incognito', - 'ip' => 'ip', - 'ip_location' => 'ipLocation', - 'timestamp' => 'timestamp', - 'time' => 'time', - 'url' => 'url', - 'tag' => 'tag', - 'linked_id' => 'linkedId', - 'confidence' => 'confidence', - 'visitor_found' => 'visitorFound', - 'first_seen_at' => 'firstSeenAt', - 'last_seen_at' => 'lastSeenAt']; - - /** - * Array of attributes to setter functions (for deserialization of responses). +'browser_details' => 'browserDetails', +'incognito' => 'incognito', +'ip' => 'ip', +'ip_location' => 'ipLocation', +'timestamp' => 'timestamp', +'time' => 'time', +'url' => 'url', +'tag' => 'tag', +'linked_id' => 'linkedId', +'confidence' => 'confidence', +'visitor_found' => 'visitorFound', +'first_seen_at' => 'firstSeenAt', +'last_seen_at' => 'lastSeenAt' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', - 'browser_details' => 'setBrowserDetails', - 'incognito' => 'setIncognito', - 'ip' => 'setIp', - 'ip_location' => 'setIpLocation', - 'timestamp' => 'setTimestamp', - 'time' => 'setTime', - 'url' => 'setUrl', - 'tag' => 'setTag', - 'linked_id' => 'setLinkedId', - 'confidence' => 'setConfidence', - 'visitor_found' => 'setVisitorFound', - 'first_seen_at' => 'setFirstSeenAt', - 'last_seen_at' => 'setLastSeenAt']; - - /** - * Array of attributes to getter functions (for serialization of requests). +'browser_details' => 'setBrowserDetails', +'incognito' => 'setIncognito', +'ip' => 'setIp', +'ip_location' => 'setIpLocation', +'timestamp' => 'setTimestamp', +'time' => 'setTime', +'url' => 'setUrl', +'tag' => 'setTag', +'linked_id' => 'setLinkedId', +'confidence' => 'setConfidence', +'visitor_found' => 'setVisitorFound', +'first_seen_at' => 'setFirstSeenAt', +'last_seen_at' => 'setLastSeenAt' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', - 'browser_details' => 'getBrowserDetails', - 'incognito' => 'getIncognito', - 'ip' => 'getIp', - 'ip_location' => 'getIpLocation', - 'timestamp' => 'getTimestamp', - 'time' => 'getTime', - 'url' => 'getUrl', - 'tag' => 'getTag', - 'linked_id' => 'getLinkedId', - 'confidence' => 'getConfidence', - 'visitor_found' => 'getVisitorFound', - 'first_seen_at' => 'getFirstSeenAt', - 'last_seen_at' => 'getLastSeenAt']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'browser_details' => 'getBrowserDetails', +'incognito' => 'getIncognito', +'ip' => 'getIp', +'ip_location' => 'getIpLocation', +'timestamp' => 'getTimestamp', +'time' => 'getTime', +'url' => 'getUrl', +'tag' => 'getTag', +'linked_id' => 'getLinkedId', +'confidence' => 'getConfidence', +'visitor_found' => 'getVisitorFound', +'first_seen_at' => 'getFirstSeenAt', +'last_seen_at' => 'getLastSeenAt' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -223,7 +177,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -231,7 +185,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -246,6 +200,39 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -255,56 +242,57 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['request_id']) { + if ($this->container['request_id'] === null) { $invalidProperties[] = "'request_id' can't be null"; } - if (null === $this->container['browser_details']) { + if ($this->container['browser_details'] === null) { $invalidProperties[] = "'browser_details' can't be null"; } - if (null === $this->container['incognito']) { + if ($this->container['incognito'] === null) { $invalidProperties[] = "'incognito' can't be null"; } - if (null === $this->container['ip']) { + if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; } - if (null === $this->container['timestamp']) { + if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['url']) { + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['tag']) { + if ($this->container['tag'] === null) { $invalidProperties[] = "'tag' can't be null"; } - if (null === $this->container['visitor_found']) { + if ($this->container['visitor_found'] === null) { $invalidProperties[] = "'visitor_found' can't be null"; } - if (null === $this->container['first_seen_at']) { + if ($this->container['first_seen_at'] === null) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if (null === $this->container['last_seen_at']) { + if ($this->container['last_seen_at'] === null) { $invalidProperties[] = "'last_seen_at' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets request_id. + * Gets request_id + * @return string */ public function getRequestId(): string { @@ -312,9 +300,9 @@ public function getRequestId(): string } /** - * Sets request_id. + * Sets request_id * - * @param string $request_id unique identifier of the user's identification request + * @param string $request_id Unique identifier of the user's identification request. * * @return $this */ @@ -326,21 +314,22 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details. + * Gets browser_details + * @return \Fingerprint\ServerAPI\Model\BrowserDetails */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details. + * Sets browser_details * - * @param BrowserDetails $browser_details browser_details + * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(BrowserDetails $browser_details): self + public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -348,7 +337,8 @@ public function setBrowserDetails(BrowserDetails $browser_details): self } /** - * Gets incognito. + * Gets incognito + * @return bool */ public function getIncognito(): bool { @@ -356,9 +346,9 @@ public function getIncognito(): bool } /** - * Sets incognito. + * Sets incognito * - * @param bool $incognito flag if user used incognito session + * @param bool $incognito Flag if user used incognito session. * * @return $this */ @@ -370,7 +360,8 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip. + * Gets ip + * @return string */ public function getIp(): string { @@ -378,7 +369,7 @@ public function getIp(): string } /** - * Sets ip. + * Sets ip * * @param string $ip ip * @@ -392,23 +383,22 @@ public function setIp(string $ip): self } /** - * Gets ip_location. - * + * Gets ip_location * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?DeprecatedIPLocation + public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location. + * Sets ip_location * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?DeprecatedIPLocation $ip_location): self + public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -416,7 +406,8 @@ public function setIpLocation(?DeprecatedIPLocation $ip_location): self } /** - * Gets timestamp. + * Gets timestamp + * @return int */ public function getTimestamp(): int { @@ -424,9 +415,9 @@ public function getTimestamp(): int } /** - * Sets timestamp. + * Sets timestamp * - * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. * * @return $this */ @@ -438,7 +429,8 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -446,9 +438,9 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * - * @param \DateTime $time time expressed according to ISO 8601 in UTC format + * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. * * @return $this */ @@ -460,7 +452,8 @@ public function setTime(\DateTime $time): self } /** - * Gets url. + * Gets url + * @return string */ public function getUrl(): string { @@ -468,9 +461,9 @@ public function getUrl(): string } /** - * Sets url. + * Sets url * - * @param string $url page URL from which the identification request was sent + * @param string $url Page URL from which the identification request was sent. * * @return $this */ @@ -482,8 +475,7 @@ public function setUrl(string $url): self } /** - * Gets tag. - * + * Gets tag * @return map[string,object] */ public function getTag(): array @@ -492,9 +484,9 @@ public function getTag(): array } /** - * Sets tag. + * Sets tag * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. * * @return $this */ @@ -506,8 +498,7 @@ public function setTag(array $tag): self } /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -516,9 +507,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * - * @param ?string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id A customer-provided id that was sent with identification request. * * @return $this */ @@ -530,23 +521,22 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence. - * + * Gets confidence * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?Confidence + public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence { return $this->container['confidence']; } /** - * Sets confidence. + * Sets confidence * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?Confidence $confidence): self + public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -554,7 +544,8 @@ public function setConfidence(?Confidence $confidence): self } /** - * Gets visitor_found. + * Gets visitor_found + * @return bool */ public function getVisitorFound(): bool { @@ -562,9 +553,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found. + * Sets visitor_found * - * @param bool $visitor_found attribute represents if a visitor had been identified before + * @param bool $visitor_found Attribute represents if a visitor had been identified before. * * @return $this */ @@ -576,21 +567,22 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at. + * Gets first_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at. + * Sets first_seen_at * - * @param SeenAt $first_seen_at first_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(SeenAt $first_seen_at): self + public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -598,31 +590,31 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self } /** - * Gets last_seen_at. + * Gets last_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at. + * Sets last_seen_at * - * @param SeenAt $last_seen_at last_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(SeenAt $last_seen_at): self + public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -632,7 +624,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -642,8 +634,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -657,10 +649,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 6c1c82cf..6d631491 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected or the client isn't Android. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 29de802d..fa16f96b 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -1,16 +1,14 @@ '\DateTime', - 'subscription' => '\DateTime']; +'subscription' => '\DateTime' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'global' => 'date-time', - 'subscription' => 'date-time']; +'subscription' => 'date-time' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'global' => 'global', - 'subscription' => 'subscription']; +'subscription' => 'subscription' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'global' => 'setGlobal', - 'subscription' => 'setSubscription']; +'subscription' => 'setSubscription' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'global' => 'getGlobal', - 'subscription' => 'getSubscription']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['global'] = isset($data['global']) ? $data['global'] : null; - $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'subscription' => 'getSubscription' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['global'] = isset($data['global']) ? $data['global'] : null; + $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['global']) { + if ($this->container['global'] === null) { $invalidProperties[] = "'global' can't be null"; } - if (null === $this->container['subscription']) { + if ($this->container['subscription'] === null) { $invalidProperties[] = "'subscription' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets global. + * Gets global + * @return \DateTime */ public function getGlobal(): \DateTime { @@ -213,7 +201,7 @@ public function getGlobal(): \DateTime } /** - * Sets global. + * Sets global * * @param \DateTime $global global * @@ -227,7 +215,8 @@ public function setGlobal(\DateTime $global): self } /** - * Gets subscription. + * Gets subscription + * @return \DateTime */ public function getSubscription(): \DateTime { @@ -235,7 +224,7 @@ public function getSubscription(): \DateTime } /** - * Sets subscription. + * Sets subscription * * @param \DateTime $subscription subscription * @@ -247,11 +236,10 @@ public function setSubscription(\DateTime $subscription): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 0edbcaf2..471945c9 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ClonedAppResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getData(): ?ClonedAppResult + public function getData(): ?\Fingerprint\ServerAPI\Model\ClonedAppResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $data data * * @return $this */ - public function setData(?ClonedAppResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\ClonedAppResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?ClonedAppResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseDeveloperTools.php b/src/Model/SignalResponseDeveloperTools.php index d25d3207..eff6cb94 100644 --- a/src/Model/SignalResponseDeveloperTools.php +++ b/src/Model/SignalResponseDeveloperTools.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult */ - public function getData(): ?DeveloperToolsResult + public function getData(): ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data data * * @return $this */ - public function setData(?DeveloperToolsResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?DeveloperToolsResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 15d6b196..91c5b1f4 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\EmulatorResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getData(): ?EmulatorResult + public function getData(): ?\Fingerprint\ServerAPI\Model\EmulatorResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $data data * * @return $this */ - public function setData(?EmulatorResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\EmulatorResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?EmulatorResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 95f0737a..793f39ba 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\FactoryResetResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getData(): ?FactoryResetResult + public function getData(): ?\Fingerprint\ServerAPI\Model\FactoryResetResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $data data * * @return $this */ - public function setData(?FactoryResetResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\FactoryResetResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?FactoryResetResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 86aba169..d0435ba8 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\FridaResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getData(): ?FridaResult + public function getData(): ?\Fingerprint\ServerAPI\Model\FridaResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\FridaResult $data data * * @return $this */ - public function setData(?FridaResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\FridaResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?FridaResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 9a1e755a..83d6e166 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\HighActivityResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getData(): ?HighActivityResult + public function getData(): ?\Fingerprint\ServerAPI\Model\HighActivityResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $data data * * @return $this */ - public function setData(?HighActivityResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\HighActivityResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?HighActivityResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index e8e87138..df00b265 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\IncognitoResult', - 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; +'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\IncognitoResult */ - public function getData(): ?IncognitoResult + public function getData(): ?\Fingerprint\ServerAPI\Model\IncognitoResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\IncognitoResult $data data * * @return $this */ - public function setData(?IncognitoResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\IncognitoResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?IncognitoResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?IdentificationError + public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?IdentificationError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 00a37d29..e57be30f 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\IpBlockListResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getData(): ?IpBlockListResult + public function getData(): ?\Fingerprint\ServerAPI\Model\IpBlockListResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $data data * * @return $this */ - public function setData(?IpBlockListResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\IpBlockListResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?IpBlockListResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 48e5fa40..125e4034 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\IpInfoResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getData(): ?IpInfoResult + public function getData(): ?\Fingerprint\ServerAPI\Model\IpInfoResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $data data * * @return $this */ - public function setData(?IpInfoResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\IpInfoResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?IpInfoResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 5d33f2fe..e201df53 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\JailbrokenResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getData(): ?JailbrokenResult + public function getData(): ?\Fingerprint\ServerAPI\Model\JailbrokenResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $data data * * @return $this */ - public function setData(?JailbrokenResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\JailbrokenResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?JailbrokenResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index aef5b071..9af2dbd1 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getData(): ?LocationSpoofingResult + public function getData(): ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data * * @return $this */ - public function setData(?LocationSpoofingResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?LocationSpoofingResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index a97c78aa..938fec13 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getData(): ?PrivacySettingsResult + public function getData(): ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data * * @return $this */ - public function setData(?PrivacySettingsResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?PrivacySettingsResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 0f354989..9cc61fa5 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\ProxyResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getData(): ?ProxyResult + public function getData(): ?\Fingerprint\ServerAPI\Model\ProxyResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $data data * * @return $this */ - public function setData(?ProxyResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\ProxyResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?ProxyResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 68a20adc..ccc566d6 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', - 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; +'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getData(): array + public function getData(): ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data * * @return $this */ - public function setData(?array $data): self + public function setData(?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?array $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?IdentificationError + public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?IdentificationError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseRemoteControl.php b/src/Model/SignalResponseRemoteControl.php index afec1f39..b214d614 100644 --- a/src/Model/SignalResponseRemoteControl.php +++ b/src/Model/SignalResponseRemoteControl.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\RemoteControlResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult */ - public function getData(): ?RemoteControlResult + public function getData(): ?\Fingerprint\ServerAPI\Model\RemoteControlResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $data data * * @return $this */ - public function setData(?RemoteControlResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\RemoteControlResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?RemoteControlResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index d5ed6c79..fdcd2dcf 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\RootAppsResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getData(): ?RootAppsResult + public function getData(): ?\Fingerprint\ServerAPI\Model\RootAppsResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $data data * * @return $this */ - public function setData(?RootAppsResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\RootAppsResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?RootAppsResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 3614acf0..df2b1429 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\SuspectScoreResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getData(): ?SuspectScoreResult + public function getData(): ?\Fingerprint\ServerAPI\Model\SuspectScoreResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data data * * @return $this */ - public function setData(?SuspectScoreResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?SuspectScoreResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 68c818ea..b0a97571 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\TamperingResult', - 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; +'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getData(): ?TamperingResult + public function getData(): ?\Fingerprint\ServerAPI\Model\TamperingResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $data data * * @return $this */ - public function setData(?TamperingResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\TamperingResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?TamperingResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?IdentificationError + public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?IdentificationError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 06ac9768..f6571172 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\TorResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getData(): ?TorResult + public function getData(): ?\Fingerprint\ServerAPI\Model\TorResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\TorResult $data data * * @return $this */ - public function setData(?TorResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\TorResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?TorResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseVelocity.php b/src/Model/SignalResponseVelocity.php index 3ccfbdbe..07d6e801 100644 --- a/src/Model/SignalResponseVelocity.php +++ b/src/Model/SignalResponseVelocity.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\VelocityResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\VelocityResult */ - public function getData(): ?VelocityResult + public function getData(): ?\Fingerprint\ServerAPI\Model\VelocityResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $data data * * @return $this */ - public function setData(?VelocityResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\VelocityResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?VelocityResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 906eedd2..83933a73 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\VirtualMachineResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getData(): ?VirtualMachineResult + public function getData(): ?\Fingerprint\ServerAPI\Model\VirtualMachineResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data data * * @return $this */ - public function setData(?VirtualMachineResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?VirtualMachineResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index b96d13c5..1fd9bdb8 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\VpnResult', - 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; +'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, - 'error' => null]; +'error' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', - 'error' => 'error']; +'error' => 'error' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'data' => 'setData', - 'error' => 'setError']; +'error' => 'setError' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'data' => 'getData', - 'error' => 'getError']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,38 +168,40 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets data. - * + * Gets data * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getData(): ?VpnResult + public function getData(): ?\Fingerprint\ServerAPI\Model\VpnResult { return $this->container['data']; } /** - * Sets data. + * Sets data * * @param ?\Fingerprint\ServerAPI\Model\VpnResult $data data * * @return $this */ - public function setData(?VpnResult $data): self + public function setData(?\Fingerprint\ServerAPI\Model\VpnResult $data): self { $this->container['data'] = $data; @@ -220,33 +209,31 @@ public function setData(?VpnResult $data): self } /** - * Gets error. - * + * Gets error * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?ProductError + public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError { return $this->container['error']; } /** - * Sets error. + * Sets error * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?ProductError $error): self + public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self { $this->container['error'] = $error; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 0c2835d8..c889b0a7 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -1,16 +1,14 @@ 'string', - 'name' => 'string']; +'name' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'iso_code' => null, - 'name' => null]; +'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'iso_code' => 'isoCode', - 'name' => 'name']; +'name' => 'name' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'iso_code' => 'setIsoCode', - 'name' => 'setName']; +'name' => 'setName' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'iso_code' => 'getIsoCode', - 'name' => 'getName']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'name' => 'getName' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -181,23 +168,25 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets iso_code. - * + * Gets iso_code * @return ?string */ public function getIsoCode(): ?string @@ -206,7 +195,7 @@ public function getIsoCode(): ?string } /** - * Sets iso_code. + * Sets iso_code * * @param ?string $iso_code iso_code * @@ -220,8 +209,7 @@ public function setIsoCode(?string $iso_code): self } /** - * Gets name. - * + * Gets name * @return ?string */ public function getName(): ?string @@ -230,7 +218,7 @@ public function getName(): ?string } /** - * Sets name. + * Sets name * * @param ?string $name name * @@ -242,11 +230,10 @@ public function setName(?string $name): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -256,7 +243,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -266,8 +253,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -281,10 +268,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 3225bda1..88515ccc 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -1,16 +1,14 @@ 'int']; + 'result' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return int */ public function getResult(): int { @@ -204,7 +192,7 @@ public function getResult(): int } /** - * Sets result. + * Sets result * * @param int $result Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score * @@ -216,11 +204,10 @@ public function setResult(int $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index e642bcd4..c5ddb2b0 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -1,16 +1,14 @@ 'bool', - 'anomaly_score' => 'float']; +'anomaly_score' => 'float' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'anomaly_score' => null]; +'anomaly_score' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'anomaly_score' => 'anomalyScore']; +'anomaly_score' => 'anomalyScore' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'anomaly_score' => 'setAnomalyScore']; +'anomaly_score' => 'setAnomalyScore' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'anomaly_score' => 'getAnomalyScore']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'anomaly_score' => 'getAnomalyScore' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -151,7 +117,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -159,7 +125,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -174,6 +140,27 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -183,29 +170,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - if (null === $this->container['anomaly_score']) { + if ($this->container['anomaly_score'] === null) { $invalidProperties[] = "'anomaly_score' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -213,9 +201,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result flag indicating whether browser tampering was detected according to our internal thresholds + * @param bool $result Flag indicating whether browser tampering was detected according to our internal thresholds. * * @return $this */ @@ -227,7 +215,8 @@ public function setResult(bool $result): self } /** - * Gets anomaly_score. + * Gets anomaly_score + * @return float */ public function getAnomalyScore(): float { @@ -235,7 +224,7 @@ public function getAnomalyScore(): float } /** - * Sets anomaly_score. + * Sets anomaly_score * * @param float $anomaly_score Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. * @@ -247,11 +236,10 @@ public function setAnomalyScore(float $anomaly_score): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -261,7 +249,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -271,8 +259,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -286,10 +274,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/TooManyRequestsResponse.php b/src/Model/TooManyRequestsResponse.php index 6034721b..08749e52 100644 --- a/src/Model/TooManyRequestsResponse.php +++ b/src/Model/TooManyRequestsResponse.php @@ -1,16 +1,14 @@ 'string']; + 'error' => 'string' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'error' => null]; + 'error' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'error' => 'error']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'error' => 'setError']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'error' => 'getError']; + protected static array $attributeMap = [ + 'error' => 'error' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'error' => 'setError' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'error' => 'getError' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['error']) { + if ($this->container['error'] === null) { $invalidProperties[] = "'error' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets error. + * Gets error + * @return string */ public function getError(): string { @@ -204,9 +192,9 @@ public function getError(): string } /** - * Sets error. + * Sets error * - * @param string $error error text + * @param string $error Error text. * * @return $this */ @@ -216,11 +204,10 @@ public function setError(string $error): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index c09aeaaf..f40c901a 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,9 +192,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise + * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise. * * @return $this */ @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VelocityIntervalResult.php b/src/Model/VelocityIntervalResult.php index efa97f7d..1acd72cb 100644 --- a/src/Model/VelocityIntervalResult.php +++ b/src/Model/VelocityIntervalResult.php @@ -1,16 +1,14 @@ 'int', - '_1h' => 'int', - '_24h' => 'int']; +'_1h' => 'int', +'_24h' => 'int' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ '_5m' => null, - '_1h' => null, - '_24h' => null]; +'_1h' => null, +'_24h' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ '_5m' => '5m', - '_1h' => '1h', - '_24h' => '24h']; +'_1h' => '1h', +'_24h' => '24h' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ '_5m' => 'set5m', - '_1h' => 'set1h', - '_24h' => 'set24h']; +'_1h' => 'set1h', +'_24h' => 'set24h' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ '_5m' => 'get5m', - '_1h' => 'get1h', - '_24h' => 'get24h']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; - $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; - $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'_1h' => 'get1h', +'_24h' => 'get24h' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -159,7 +123,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -167,7 +131,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -182,6 +146,28 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; + $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; + $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -191,29 +177,30 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['_5m']) { + if ($this->container['_5m'] === null) { $invalidProperties[] = "'_5m' can't be null"; } - if (null === $this->container['_1h']) { + if ($this->container['_1h'] === null) { $invalidProperties[] = "'_1h' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets _5m. + * Gets _5m + * @return int */ public function get5m(): int { @@ -221,7 +208,7 @@ public function get5m(): int } /** - * Sets _5m. + * Sets _5m * * @param int $_5m _5m * @@ -235,7 +222,8 @@ public function set5m(int $_5m): self } /** - * Gets _1h. + * Gets _1h + * @return int */ public function get1h(): int { @@ -243,7 +231,7 @@ public function get1h(): int } /** - * Sets _1h. + * Sets _1h * * @param int $_1h _1h * @@ -257,8 +245,7 @@ public function set1h(int $_1h): self } /** - * Gets _24h. - * + * Gets _24h * @return ?int */ public function get24h(): ?int @@ -267,7 +254,7 @@ public function get24h(): ?int } /** - * Sets _24h. + * Sets _24h * * @param ?int $_24h The `24h` interval of `distinctIp`, `distinctLinkedId`, and `distinctCountry` will be omitted if the number of `events`` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. * @@ -279,11 +266,10 @@ public function set24h(?int $_24h): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -293,7 +279,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -303,8 +289,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -318,10 +304,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VelocityIntervals.php b/src/Model/VelocityIntervals.php index f2a84395..93dbc982 100644 --- a/src/Model/VelocityIntervals.php +++ b/src/Model/VelocityIntervals.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\VelocityIntervalResult']; + 'intervals' => '\Fingerprint\ServerAPI\Model\VelocityIntervalResult' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'intervals' => null]; + 'intervals' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'intervals' => 'intervals']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'intervals' => 'setIntervals']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'intervals' => 'getIntervals']; + protected static array $attributeMap = [ + 'intervals' => 'intervals' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'intervals' => 'setIntervals' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['intervals'] = isset($data['intervals']) ? $data['intervals'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'intervals' => 'getIntervals' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['intervals'] = isset($data['intervals']) ? $data['intervals'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -175,48 +162,49 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + $invalidProperties = []; + + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets intervals. - * + * Gets intervals * @return ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult */ - public function getIntervals(): ?VelocityIntervalResult + public function getIntervals(): ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult { return $this->container['intervals']; } /** - * Sets intervals. + * Sets intervals * * @param ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult $intervals intervals * * @return $this */ - public function setIntervals(?VelocityIntervalResult $intervals): self + public function setIntervals(?\Fingerprint\ServerAPI\Model\VelocityIntervalResult $intervals): self { $this->container['intervals'] = $intervals; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -226,7 +214,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -236,8 +224,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -251,10 +239,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VelocityResult.php b/src/Model/VelocityResult.php index 5e2a665e..339d1b35 100644 --- a/src/Model/VelocityResult.php +++ b/src/Model/VelocityResult.php @@ -1,16 +1,14 @@ '\Fingerprint\ServerAPI\Model\VelocityIntervals', - 'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', - 'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', - 'events' => '\Fingerprint\ServerAPI\Model\VelocityIntervals']; +'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', +'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', +'events' => '\Fingerprint\ServerAPI\Model\VelocityIntervals' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'distinct_ip' => null, - 'distinct_linked_id' => null, - 'distinct_country' => null, - 'events' => null]; +'distinct_linked_id' => null, +'distinct_country' => null, +'events' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'distinct_ip' => 'distinctIp', - 'distinct_linked_id' => 'distinctLinkedId', - 'distinct_country' => 'distinctCountry', - 'events' => 'events']; +'distinct_linked_id' => 'distinctLinkedId', +'distinct_country' => 'distinctCountry', +'events' => 'events' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'distinct_ip' => 'setDistinctIp', - 'distinct_linked_id' => 'setDistinctLinkedId', - 'distinct_country' => 'setDistinctCountry', - 'events' => 'setEvents']; +'distinct_linked_id' => 'setDistinctLinkedId', +'distinct_country' => 'setDistinctCountry', +'events' => 'setEvents' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'distinct_ip' => 'getDistinctIp', - 'distinct_linked_id' => 'getDistinctLinkedId', - 'distinct_country' => 'getDistinctCountry', - 'events' => 'getEvents']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null; - $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null; - $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null; - $this->container['events'] = isset($data['events']) ? $data['events'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'distinct_linked_id' => 'getDistinctLinkedId', +'distinct_country' => 'getDistinctCountry', +'events' => 'getEvents' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -165,7 +128,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -173,7 +136,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -188,6 +151,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null; + $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null; + $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -197,49 +183,50 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['distinct_ip']) { + if ($this->container['distinct_ip'] === null) { $invalidProperties[] = "'distinct_ip' can't be null"; } - if (null === $this->container['distinct_linked_id']) { + if ($this->container['distinct_linked_id'] === null) { $invalidProperties[] = "'distinct_linked_id' can't be null"; } - if (null === $this->container['distinct_country']) { + if ($this->container['distinct_country'] === null) { $invalidProperties[] = "'distinct_country' can't be null"; } - if (null === $this->container['events']) { + if ($this->container['events'] === null) { $invalidProperties[] = "'events' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets distinct_ip. + * Gets distinct_ip + * @return \Fingerprint\ServerAPI\Model\VelocityIntervals */ - public function getDistinctIp(): VelocityIntervals + public function getDistinctIp(): \Fingerprint\ServerAPI\Model\VelocityIntervals { return $this->container['distinct_ip']; } /** - * Sets distinct_ip. + * Sets distinct_ip * - * @param VelocityIntervals $distinct_ip distinct_ip + * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_ip distinct_ip * * @return $this */ - public function setDistinctIp(VelocityIntervals $distinct_ip): self + public function setDistinctIp(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_ip): self { $this->container['distinct_ip'] = $distinct_ip; @@ -247,21 +234,22 @@ public function setDistinctIp(VelocityIntervals $distinct_ip): self } /** - * Gets distinct_linked_id. + * Gets distinct_linked_id + * @return \Fingerprint\ServerAPI\Model\VelocityIntervals */ - public function getDistinctLinkedId(): VelocityIntervals + public function getDistinctLinkedId(): \Fingerprint\ServerAPI\Model\VelocityIntervals { return $this->container['distinct_linked_id']; } /** - * Sets distinct_linked_id. + * Sets distinct_linked_id * - * @param VelocityIntervals $distinct_linked_id distinct_linked_id + * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_linked_id distinct_linked_id * * @return $this */ - public function setDistinctLinkedId(VelocityIntervals $distinct_linked_id): self + public function setDistinctLinkedId(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_linked_id): self { $this->container['distinct_linked_id'] = $distinct_linked_id; @@ -269,21 +257,22 @@ public function setDistinctLinkedId(VelocityIntervals $distinct_linked_id): self } /** - * Gets distinct_country. + * Gets distinct_country + * @return \Fingerprint\ServerAPI\Model\VelocityIntervals */ - public function getDistinctCountry(): VelocityIntervals + public function getDistinctCountry(): \Fingerprint\ServerAPI\Model\VelocityIntervals { return $this->container['distinct_country']; } /** - * Sets distinct_country. + * Sets distinct_country * - * @param VelocityIntervals $distinct_country distinct_country + * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_country distinct_country * * @return $this */ - public function setDistinctCountry(VelocityIntervals $distinct_country): self + public function setDistinctCountry(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_country): self { $this->container['distinct_country'] = $distinct_country; @@ -291,31 +280,31 @@ public function setDistinctCountry(VelocityIntervals $distinct_country): self } /** - * Gets events. + * Gets events + * @return \Fingerprint\ServerAPI\Model\VelocityIntervals */ - public function getEvents(): VelocityIntervals + public function getEvents(): \Fingerprint\ServerAPI\Model\VelocityIntervals { return $this->container['events']; } /** - * Sets events. + * Sets events * - * @param VelocityIntervals $events events + * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $events events * * @return $this */ - public function setEvents(VelocityIntervals $events): self + public function setEvents(\Fingerprint\ServerAPI\Model\VelocityIntervals $events): self { $this->container['events'] = $events; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -325,7 +314,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -335,8 +324,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -350,10 +339,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 644f9144..6b692b62 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -1,16 +1,14 @@ 'bool']; + 'result' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ - 'result' => null]; + 'result' => null ]; /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] + * Array of property to type mappings. Used for (de)serialization */ - protected static array $attributeMap = [ - 'result' => 'result']; + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] + * Array of property to format mappings. Used for (de)serialization */ - protected static array $setters = [ - 'result' => 'setResult']; + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes where the key is the local name, + * and the value is the original name * * @var string[] */ - protected static array $getters = [ - 'result' => 'getResult']; + protected static array $attributeMap = [ + 'result' => 'result' ]; /** - * Associative array for storing property values. + * Array of attributes to setter functions (for deserialization of responses) * - * @var mixed[] + * @var string[] */ - protected array $container = []; + protected static array $setters = [ + 'result' => 'setResult' ]; /** - * Constructor. + * Array of attributes to getter functions (for serialization of requests) * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $getters = [ + 'result' => 'getResult' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -145,7 +112,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -153,7 +120,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -168,6 +135,26 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -177,26 +164,27 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -204,7 +192,7 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * * @param bool $result `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. * @@ -216,11 +204,10 @@ public function setResult(bool $result): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -230,7 +217,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -240,8 +227,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -255,10 +242,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 63ad75b2..843acc7c 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -1,16 +1,14 @@ 'string', - 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', - 'incognito' => 'bool', - 'ip' => 'string', - 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', - 'timestamp' => 'int', - 'time' => '\DateTime', - 'url' => 'string', - 'tag' => 'map[string,object]', - 'linked_id' => 'string', - 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', - 'visitor_found' => 'bool', - 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', - 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ +'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', +'incognito' => 'bool', +'ip' => 'string', +'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', +'timestamp' => 'int', +'time' => '\DateTime', +'url' => 'string', +'tag' => 'map[string,object]', +'linked_id' => 'string', +'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', +'visitor_found' => 'bool', +'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', +'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, - 'browser_details' => null, - 'incognito' => null, - 'ip' => 'ipv4', - 'ip_location' => null, - 'timestamp' => 'int64', - 'time' => 'date-time', - 'url' => null, - 'tag' => null, - 'linked_id' => null, - 'confidence' => null, - 'visitor_found' => null, - 'first_seen_at' => null, - 'last_seen_at' => null]; +'browser_details' => null, +'incognito' => null, +'ip' => 'ipv4', +'ip_location' => null, +'timestamp' => 'int64', +'time' => 'date-time', +'url' => null, +'tag' => null, +'linked_id' => null, +'confidence' => null, +'visitor_found' => null, +'first_seen_at' => null, +'last_seen_at' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', - 'browser_details' => 'browserDetails', - 'incognito' => 'incognito', - 'ip' => 'ip', - 'ip_location' => 'ipLocation', - 'timestamp' => 'timestamp', - 'time' => 'time', - 'url' => 'url', - 'tag' => 'tag', - 'linked_id' => 'linkedId', - 'confidence' => 'confidence', - 'visitor_found' => 'visitorFound', - 'first_seen_at' => 'firstSeenAt', - 'last_seen_at' => 'lastSeenAt']; - - /** - * Array of attributes to setter functions (for deserialization of responses). +'browser_details' => 'browserDetails', +'incognito' => 'incognito', +'ip' => 'ip', +'ip_location' => 'ipLocation', +'timestamp' => 'timestamp', +'time' => 'time', +'url' => 'url', +'tag' => 'tag', +'linked_id' => 'linkedId', +'confidence' => 'confidence', +'visitor_found' => 'visitorFound', +'first_seen_at' => 'firstSeenAt', +'last_seen_at' => 'lastSeenAt' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', - 'browser_details' => 'setBrowserDetails', - 'incognito' => 'setIncognito', - 'ip' => 'setIp', - 'ip_location' => 'setIpLocation', - 'timestamp' => 'setTimestamp', - 'time' => 'setTime', - 'url' => 'setUrl', - 'tag' => 'setTag', - 'linked_id' => 'setLinkedId', - 'confidence' => 'setConfidence', - 'visitor_found' => 'setVisitorFound', - 'first_seen_at' => 'setFirstSeenAt', - 'last_seen_at' => 'setLastSeenAt']; - - /** - * Array of attributes to getter functions (for serialization of requests). +'browser_details' => 'setBrowserDetails', +'incognito' => 'setIncognito', +'ip' => 'setIp', +'ip_location' => 'setIpLocation', +'timestamp' => 'setTimestamp', +'time' => 'setTime', +'url' => 'setUrl', +'tag' => 'setTag', +'linked_id' => 'setLinkedId', +'confidence' => 'setConfidence', +'visitor_found' => 'setVisitorFound', +'first_seen_at' => 'setFirstSeenAt', +'last_seen_at' => 'setLastSeenAt' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', - 'browser_details' => 'getBrowserDetails', - 'incognito' => 'getIncognito', - 'ip' => 'getIp', - 'ip_location' => 'getIpLocation', - 'timestamp' => 'getTimestamp', - 'time' => 'getTime', - 'url' => 'getUrl', - 'tag' => 'getTag', - 'linked_id' => 'getLinkedId', - 'confidence' => 'getConfidence', - 'visitor_found' => 'getVisitorFound', - 'first_seen_at' => 'getFirstSeenAt', - 'last_seen_at' => 'getLastSeenAt']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'browser_details' => 'getBrowserDetails', +'incognito' => 'getIncognito', +'ip' => 'getIp', +'ip_location' => 'getIpLocation', +'timestamp' => 'getTimestamp', +'time' => 'getTime', +'url' => 'getUrl', +'tag' => 'getTag', +'linked_id' => 'getLinkedId', +'confidence' => 'getConfidence', +'visitor_found' => 'getVisitorFound', +'first_seen_at' => 'getFirstSeenAt', +'last_seen_at' => 'getLastSeenAt' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -223,7 +177,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -231,7 +185,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -246,6 +200,39 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -255,53 +242,54 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['request_id']) { + if ($this->container['request_id'] === null) { $invalidProperties[] = "'request_id' can't be null"; } - if (null === $this->container['browser_details']) { + if ($this->container['browser_details'] === null) { $invalidProperties[] = "'browser_details' can't be null"; } - if (null === $this->container['incognito']) { + if ($this->container['incognito'] === null) { $invalidProperties[] = "'incognito' can't be null"; } - if (null === $this->container['ip']) { + if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; } - if (null === $this->container['timestamp']) { + if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['url']) { + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['visitor_found']) { + if ($this->container['visitor_found'] === null) { $invalidProperties[] = "'visitor_found' can't be null"; } - if (null === $this->container['first_seen_at']) { + if ($this->container['first_seen_at'] === null) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if (null === $this->container['last_seen_at']) { + if ($this->container['last_seen_at'] === null) { $invalidProperties[] = "'last_seen_at' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets request_id. + * Gets request_id + * @return string */ public function getRequestId(): string { @@ -309,9 +297,9 @@ public function getRequestId(): string } /** - * Sets request_id. + * Sets request_id * - * @param string $request_id unique identifier of the user's identification request + * @param string $request_id Unique identifier of the user's identification request. * * @return $this */ @@ -323,21 +311,22 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details. + * Gets browser_details + * @return \Fingerprint\ServerAPI\Model\BrowserDetails */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details. + * Sets browser_details * - * @param BrowserDetails $browser_details browser_details + * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(BrowserDetails $browser_details): self + public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -345,7 +334,8 @@ public function setBrowserDetails(BrowserDetails $browser_details): self } /** - * Gets incognito. + * Gets incognito + * @return bool */ public function getIncognito(): bool { @@ -353,9 +343,9 @@ public function getIncognito(): bool } /** - * Sets incognito. + * Sets incognito * - * @param bool $incognito flag if user used incognito session + * @param bool $incognito Flag if user used incognito session. * * @return $this */ @@ -367,7 +357,8 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip. + * Gets ip + * @return string */ public function getIp(): string { @@ -375,7 +366,7 @@ public function getIp(): string } /** - * Sets ip. + * Sets ip * * @param string $ip ip * @@ -389,23 +380,22 @@ public function setIp(string $ip): self } /** - * Gets ip_location. - * + * Gets ip_location * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?DeprecatedIPLocation + public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location. + * Sets ip_location * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?DeprecatedIPLocation $ip_location): self + public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -413,7 +403,8 @@ public function setIpLocation(?DeprecatedIPLocation $ip_location): self } /** - * Gets timestamp. + * Gets timestamp + * @return int */ public function getTimestamp(): int { @@ -421,9 +412,9 @@ public function getTimestamp(): int } /** - * Sets timestamp. + * Sets timestamp * - * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. * * @return $this */ @@ -435,7 +426,8 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -443,9 +435,9 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * - * @param \DateTime $time time expressed according to ISO 8601 in UTC format + * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. * * @return $this */ @@ -457,7 +449,8 @@ public function setTime(\DateTime $time): self } /** - * Gets url. + * Gets url + * @return string */ public function getUrl(): string { @@ -465,9 +458,9 @@ public function getUrl(): string } /** - * Sets url. + * Sets url * - * @param string $url page URL from which the identification request was sent + * @param string $url Page URL from which the identification request was sent. * * @return $this */ @@ -479,8 +472,7 @@ public function setUrl(string $url): self } /** - * Gets tag. - * + * Gets tag * @return ?map[string,object] */ public function getTag(): ?array @@ -489,9 +481,9 @@ public function getTag(): ?array } /** - * Sets tag. + * Sets tag * - * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request. * * @return $this */ @@ -503,8 +495,7 @@ public function setTag(?array $tag): self } /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -513,9 +504,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * - * @param ?string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id A customer-provided id that was sent with identification request. * * @return $this */ @@ -527,23 +518,22 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence. - * + * Gets confidence * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?Confidence + public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence { return $this->container['confidence']; } /** - * Sets confidence. + * Sets confidence * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?Confidence $confidence): self + public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -551,7 +541,8 @@ public function setConfidence(?Confidence $confidence): self } /** - * Gets visitor_found. + * Gets visitor_found + * @return bool */ public function getVisitorFound(): bool { @@ -559,9 +550,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found. + * Sets visitor_found * - * @param bool $visitor_found attribute represents if a visitor had been identified before + * @param bool $visitor_found Attribute represents if a visitor had been identified before. * * @return $this */ @@ -573,21 +564,22 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at. + * Gets first_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at. + * Sets first_seen_at * - * @param SeenAt $first_seen_at first_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(SeenAt $first_seen_at): self + public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -595,31 +587,31 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self } /** - * Gets last_seen_at. + * Gets last_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at. + * Sets last_seen_at * - * @param SeenAt $last_seen_at last_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(SeenAt $last_seen_at): self + public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -629,7 +621,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -639,8 +631,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -654,10 +646,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 2b5651e8..1ce5088a 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -1,16 +1,14 @@ 'bool', - 'origin_timezone' => 'string', - 'origin_country' => 'string', - 'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods']; +'origin_timezone' => 'string', +'origin_country' => 'string', +'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, - 'origin_timezone' => null, - 'origin_country' => null, - 'methods' => null]; +'origin_timezone' => null, +'origin_country' => null, +'methods' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', - 'origin_timezone' => 'originTimezone', - 'origin_country' => 'originCountry', - 'methods' => 'methods']; +'origin_timezone' => 'originTimezone', +'origin_country' => 'originCountry', +'methods' => 'methods' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', - 'origin_timezone' => 'setOriginTimezone', - 'origin_country' => 'setOriginCountry', - 'methods' => 'setMethods']; +'origin_timezone' => 'setOriginTimezone', +'origin_country' => 'setOriginCountry', +'methods' => 'setMethods' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', - 'origin_timezone' => 'getOriginTimezone', - 'origin_country' => 'getOriginCountry', - 'methods' => 'getMethods']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; - $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; - $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'origin_timezone' => 'getOriginTimezone', +'origin_country' => 'getOriginCountry', +'methods' => 'getMethods' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -163,7 +127,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -171,7 +135,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -186,6 +150,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; + $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; + $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -195,32 +182,33 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['result']) { + if ($this->container['result'] === null) { $invalidProperties[] = "'result' can't be null"; } - if (null === $this->container['origin_timezone']) { + if ($this->container['origin_timezone'] === null) { $invalidProperties[] = "'origin_timezone' can't be null"; } - if (null === $this->container['methods']) { + if ($this->container['methods'] === null) { $invalidProperties[] = "'methods' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets result. + * Gets result + * @return bool */ public function getResult(): bool { @@ -228,9 +216,9 @@ public function getResult(): bool } /** - * Sets result. + * Sets result * - * @param bool $result VPN or other anonymizing service has been used when sending the request + * @param bool $result VPN or other anonymizing service has been used when sending the request. * * @return $this */ @@ -242,7 +230,8 @@ public function setResult(bool $result): self } /** - * Gets origin_timezone. + * Gets origin_timezone + * @return string */ public function getOriginTimezone(): string { @@ -250,9 +239,9 @@ public function getOriginTimezone(): string } /** - * Sets origin_timezone. + * Sets origin_timezone * - * @param string $origin_timezone local timezone which is used in timezoneMismatch method + * @param string $origin_timezone Local timezone which is used in timezoneMismatch method. * * @return $this */ @@ -264,8 +253,7 @@ public function setOriginTimezone(string $origin_timezone): self } /** - * Gets origin_country. - * + * Gets origin_country * @return ?string */ public function getOriginCountry(): ?string @@ -274,7 +262,7 @@ public function getOriginCountry(): ?string } /** - * Sets origin_country. + * Sets origin_country * * @param ?string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * @@ -288,31 +276,31 @@ public function setOriginCountry(?string $origin_country): self } /** - * Gets methods. + * Gets methods + * @return \Fingerprint\ServerAPI\Model\VpnResultMethods */ - public function getMethods(): VpnResultMethods + public function getMethods(): \Fingerprint\ServerAPI\Model\VpnResultMethods { return $this->container['methods']; } /** - * Sets methods. + * Sets methods * - * @param VpnResultMethods $methods methods + * @param \Fingerprint\ServerAPI\Model\VpnResultMethods $methods methods * * @return $this */ - public function setMethods(VpnResultMethods $methods): self + public function setMethods(\Fingerprint\ServerAPI\Model\VpnResultMethods $methods): self { $this->container['methods'] = $methods; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -322,7 +310,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -332,8 +320,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -347,10 +335,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 36f39b53..d4062ac5 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -1,16 +1,14 @@ 'bool', - 'public_vpn' => 'bool', - 'auxiliary_mobile' => 'bool', - 'os_mismatch' => 'bool']; +'public_vpn' => 'bool', +'auxiliary_mobile' => 'bool', +'os_mismatch' => 'bool' ]; /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'timezone_mismatch' => null, - 'public_vpn' => null, - 'auxiliary_mobile' => null, - 'os_mismatch' => null]; +'public_vpn' => null, +'auxiliary_mobile' => null, +'os_mismatch' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', - 'public_vpn' => 'publicVPN', - 'auxiliary_mobile' => 'auxiliaryMobile', - 'os_mismatch' => 'osMismatch']; +'public_vpn' => 'publicVPN', +'auxiliary_mobile' => 'auxiliaryMobile', +'os_mismatch' => 'osMismatch' ]; /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', - 'public_vpn' => 'setPublicVpn', - 'auxiliary_mobile' => 'setAuxiliaryMobile', - 'os_mismatch' => 'setOsMismatch']; +'public_vpn' => 'setPublicVpn', +'auxiliary_mobile' => 'setAuxiliaryMobile', +'os_mismatch' => 'setOsMismatch' ]; /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', - 'public_vpn' => 'getPublicVpn', - 'auxiliary_mobile' => 'getAuxiliaryMobile', - 'os_mismatch' => 'getOsMismatch']; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; - $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; - $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; - $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; - } - - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } +'public_vpn' => 'getPublicVpn', +'auxiliary_mobile' => 'getAuxiliaryMobile', +'os_mismatch' => 'getOsMismatch' ]; /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name */ public static function attributeMap(): array { @@ -163,7 +127,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses). + * Array of attributes to setter functions (for deserialization of responses) */ public static function setters(): array { @@ -171,7 +135,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests). + * Array of attributes to getter functions (for serialization of requests) */ public static function getters(): array { @@ -186,6 +150,29 @@ public function getModelName(): string return self::$swaggerModelName; } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; + $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; + $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; + $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; + } + /** * Show all the invalid properties with reasons. * @@ -195,35 +182,36 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['timezone_mismatch']) { + if ($this->container['timezone_mismatch'] === null) { $invalidProperties[] = "'timezone_mismatch' can't be null"; } - if (null === $this->container['public_vpn']) { + if ($this->container['public_vpn'] === null) { $invalidProperties[] = "'public_vpn' can't be null"; } - if (null === $this->container['auxiliary_mobile']) { + if ($this->container['auxiliary_mobile'] === null) { $invalidProperties[] = "'auxiliary_mobile' can't be null"; } - if (null === $this->container['os_mismatch']) { + if ($this->container['os_mismatch'] === null) { $invalidProperties[] = "'os_mismatch' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets timezone_mismatch. + * Gets timezone_mismatch + * @return bool */ public function getTimezoneMismatch(): bool { @@ -231,9 +219,9 @@ public function getTimezoneMismatch(): bool } /** - * Sets timezone_mismatch. + * Sets timezone_mismatch * - * @param bool $timezone_mismatch the browser timezone doesn't match the timezone inferred from the request IP address + * @param bool $timezone_mismatch The browser timezone doesn't match the timezone inferred from the request IP address. * * @return $this */ @@ -245,7 +233,8 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self } /** - * Gets public_vpn. + * Gets public_vpn + * @return bool */ public function getPublicVpn(): bool { @@ -253,9 +242,9 @@ public function getPublicVpn(): bool } /** - * Sets public_vpn. + * Sets public_vpn * - * @param bool $public_vpn request IP address is owned and used by a public VPN service provider + * @param bool $public_vpn Request IP address is owned and used by a public VPN service provider. * * @return $this */ @@ -267,7 +256,8 @@ public function setPublicVpn(bool $public_vpn): self } /** - * Gets auxiliary_mobile. + * Gets auxiliary_mobile + * @return bool */ public function getAuxiliaryMobile(): bool { @@ -275,7 +265,7 @@ public function getAuxiliaryMobile(): bool } /** - * Sets auxiliary_mobile. + * Sets auxiliary_mobile * * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. * @@ -289,7 +279,8 @@ public function setAuxiliaryMobile(bool $auxiliary_mobile): self } /** - * Gets os_mismatch. + * Gets os_mismatch + * @return bool */ public function getOsMismatch(): bool { @@ -297,9 +288,9 @@ public function getOsMismatch(): bool } /** - * Sets os_mismatch. + * Sets os_mismatch * - * @param bool $os_mismatch the browser runs on a different operating system than the operating system inferred from the request network signature + * @param bool $os_mismatch The browser runs on a different operating system than the operating system inferred from the request network signature. * * @return $this */ @@ -309,11 +300,10 @@ public function setOsMismatch(bool $os_mismatch): self return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -323,7 +313,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -333,8 +323,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -348,10 +338,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 585c084a..e677fb3e 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -1,16 +1,14 @@ 'string', - 'client_referrer' => 'string', - 'user_agent' => 'string', - 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', - 'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', - 'incognito' => 'bool', - 'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', - 'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', - 'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', - 'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', - 'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', - 'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', - 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', - 'tor' => '\Fingerprint\ServerAPI\Model\TorResult', - 'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', - 'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', - 'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', - 'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', - 'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', - 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', - 'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', - 'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', - 'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', - 'remote_control' => '\Fingerprint\ServerAPI\Model\RemoteControlResult', - 'velocity' => '\Fingerprint\ServerAPI\Model\VelocityResult', - 'developer_tools' => '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', - 'request_id' => 'string', - 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', - 'ip' => 'string', - 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', - 'timestamp' => 'int', - 'time' => '\DateTime', - 'url' => 'string', - 'tag' => 'map[string,object]', - 'linked_id' => 'string', - 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', - 'visitor_found' => 'bool', - 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', - 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ +'client_referrer' => 'string', +'user_agent' => 'string', +'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', +'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', +'incognito' => 'bool', +'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', +'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', +'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', +'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', +'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', +'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', +'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', +'tor' => '\Fingerprint\ServerAPI\Model\TorResult', +'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', +'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', +'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', +'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', +'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', +'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', +'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', +'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', +'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', +'remote_control' => '\Fingerprint\ServerAPI\Model\RemoteControlResult', +'velocity' => '\Fingerprint\ServerAPI\Model\VelocityResult', +'developer_tools' => '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', +'request_id' => 'string', +'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', +'ip' => 'string', +'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', +'timestamp' => 'int', +'time' => '\DateTime', +'url' => 'string', +'tag' => 'map[string,object]', +'linked_id' => 'string', +'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', +'visitor_found' => 'bool', +'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', +'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ protected static array $swaggerFormats = [ 'visitor_id' => null, - 'client_referrer' => null, - 'user_agent' => null, - 'bot' => null, - 'ip_info' => null, - 'incognito' => null, - 'root_apps' => null, - 'emulator' => null, - 'cloned_app' => null, - 'factory_reset' => null, - 'jailbroken' => null, - 'frida' => null, - 'ip_blocklist' => null, - 'tor' => null, - 'privacy_settings' => null, - 'virtual_machine' => null, - 'vpn' => null, - 'proxy' => null, - 'tampering' => null, - 'raw_device_attributes' => null, - 'high_activity' => null, - 'location_spoofing' => null, - 'suspect_score' => null, - 'remote_control' => null, - 'velocity' => null, - 'developer_tools' => null, - 'request_id' => null, - 'browser_details' => null, - 'ip' => 'ipv4', - 'ip_location' => null, - 'timestamp' => 'int64', - 'time' => 'date-time', - 'url' => null, - 'tag' => null, - 'linked_id' => null, - 'confidence' => null, - 'visitor_found' => null, - 'first_seen_at' => null, - 'last_seen_at' => null]; +'client_referrer' => null, +'user_agent' => null, +'bot' => null, +'ip_info' => null, +'incognito' => null, +'root_apps' => null, +'emulator' => null, +'cloned_app' => null, +'factory_reset' => null, +'jailbroken' => null, +'frida' => null, +'ip_blocklist' => null, +'tor' => null, +'privacy_settings' => null, +'virtual_machine' => null, +'vpn' => null, +'proxy' => null, +'tampering' => null, +'raw_device_attributes' => null, +'high_activity' => null, +'location_spoofing' => null, +'suspect_score' => null, +'remote_control' => null, +'velocity' => null, +'developer_tools' => null, +'request_id' => null, +'browser_details' => null, +'ip' => 'ipv4', +'ip_location' => null, +'timestamp' => 'int64', +'time' => 'date-time', +'url' => null, +'tag' => null, +'linked_id' => null, +'confidence' => null, +'visitor_found' => null, +'first_seen_at' => null, +'last_seen_at' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name. + * and the value is the original name * * @var string[] */ protected static array $attributeMap = [ 'visitor_id' => 'visitorId', - 'client_referrer' => 'clientReferrer', - 'user_agent' => 'userAgent', - 'bot' => 'bot', - 'ip_info' => 'ipInfo', - 'incognito' => 'incognito', - 'root_apps' => 'rootApps', - 'emulator' => 'emulator', - 'cloned_app' => 'clonedApp', - 'factory_reset' => 'factoryReset', - 'jailbroken' => 'jailbroken', - 'frida' => 'frida', - 'ip_blocklist' => 'ipBlocklist', - 'tor' => 'tor', - 'privacy_settings' => 'privacySettings', - 'virtual_machine' => 'virtualMachine', - 'vpn' => 'vpn', - 'proxy' => 'proxy', - 'tampering' => 'tampering', - 'raw_device_attributes' => 'rawDeviceAttributes', - 'high_activity' => 'highActivity', - 'location_spoofing' => 'locationSpoofing', - 'suspect_score' => 'suspectScore', - 'remote_control' => 'remoteControl', - 'velocity' => 'velocity', - 'developer_tools' => 'developerTools', - 'request_id' => 'requestId', - 'browser_details' => 'browserDetails', - 'ip' => 'ip', - 'ip_location' => 'ipLocation', - 'timestamp' => 'timestamp', - 'time' => 'time', - 'url' => 'url', - 'tag' => 'tag', - 'linked_id' => 'linkedId', - 'confidence' => 'confidence', - 'visitor_found' => 'visitorFound', - 'first_seen_at' => 'firstSeenAt', - 'last_seen_at' => 'lastSeenAt']; - - /** - * Array of attributes to setter functions (for deserialization of responses). +'client_referrer' => 'clientReferrer', +'user_agent' => 'userAgent', +'bot' => 'bot', +'ip_info' => 'ipInfo', +'incognito' => 'incognito', +'root_apps' => 'rootApps', +'emulator' => 'emulator', +'cloned_app' => 'clonedApp', +'factory_reset' => 'factoryReset', +'jailbroken' => 'jailbroken', +'frida' => 'frida', +'ip_blocklist' => 'ipBlocklist', +'tor' => 'tor', +'privacy_settings' => 'privacySettings', +'virtual_machine' => 'virtualMachine', +'vpn' => 'vpn', +'proxy' => 'proxy', +'tampering' => 'tampering', +'raw_device_attributes' => 'rawDeviceAttributes', +'high_activity' => 'highActivity', +'location_spoofing' => 'locationSpoofing', +'suspect_score' => 'suspectScore', +'remote_control' => 'remoteControl', +'velocity' => 'velocity', +'developer_tools' => 'developerTools', +'request_id' => 'requestId', +'browser_details' => 'browserDetails', +'ip' => 'ip', +'ip_location' => 'ipLocation', +'timestamp' => 'timestamp', +'time' => 'time', +'url' => 'url', +'tag' => 'tag', +'linked_id' => 'linkedId', +'confidence' => 'confidence', +'visitor_found' => 'visitorFound', +'first_seen_at' => 'firstSeenAt', +'last_seen_at' => 'lastSeenAt' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static array $setters = [ 'visitor_id' => 'setVisitorId', - 'client_referrer' => 'setClientReferrer', - 'user_agent' => 'setUserAgent', - 'bot' => 'setBot', - 'ip_info' => 'setIpInfo', - 'incognito' => 'setIncognito', - 'root_apps' => 'setRootApps', - 'emulator' => 'setEmulator', - 'cloned_app' => 'setClonedApp', - 'factory_reset' => 'setFactoryReset', - 'jailbroken' => 'setJailbroken', - 'frida' => 'setFrida', - 'ip_blocklist' => 'setIpBlocklist', - 'tor' => 'setTor', - 'privacy_settings' => 'setPrivacySettings', - 'virtual_machine' => 'setVirtualMachine', - 'vpn' => 'setVpn', - 'proxy' => 'setProxy', - 'tampering' => 'setTampering', - 'raw_device_attributes' => 'setRawDeviceAttributes', - 'high_activity' => 'setHighActivity', - 'location_spoofing' => 'setLocationSpoofing', - 'suspect_score' => 'setSuspectScore', - 'remote_control' => 'setRemoteControl', - 'velocity' => 'setVelocity', - 'developer_tools' => 'setDeveloperTools', - 'request_id' => 'setRequestId', - 'browser_details' => 'setBrowserDetails', - 'ip' => 'setIp', - 'ip_location' => 'setIpLocation', - 'timestamp' => 'setTimestamp', - 'time' => 'setTime', - 'url' => 'setUrl', - 'tag' => 'setTag', - 'linked_id' => 'setLinkedId', - 'confidence' => 'setConfidence', - 'visitor_found' => 'setVisitorFound', - 'first_seen_at' => 'setFirstSeenAt', - 'last_seen_at' => 'setLastSeenAt']; - - /** - * Array of attributes to getter functions (for serialization of requests). +'client_referrer' => 'setClientReferrer', +'user_agent' => 'setUserAgent', +'bot' => 'setBot', +'ip_info' => 'setIpInfo', +'incognito' => 'setIncognito', +'root_apps' => 'setRootApps', +'emulator' => 'setEmulator', +'cloned_app' => 'setClonedApp', +'factory_reset' => 'setFactoryReset', +'jailbroken' => 'setJailbroken', +'frida' => 'setFrida', +'ip_blocklist' => 'setIpBlocklist', +'tor' => 'setTor', +'privacy_settings' => 'setPrivacySettings', +'virtual_machine' => 'setVirtualMachine', +'vpn' => 'setVpn', +'proxy' => 'setProxy', +'tampering' => 'setTampering', +'raw_device_attributes' => 'setRawDeviceAttributes', +'high_activity' => 'setHighActivity', +'location_spoofing' => 'setLocationSpoofing', +'suspect_score' => 'setSuspectScore', +'remote_control' => 'setRemoteControl', +'velocity' => 'setVelocity', +'developer_tools' => 'setDeveloperTools', +'request_id' => 'setRequestId', +'browser_details' => 'setBrowserDetails', +'ip' => 'setIp', +'ip_location' => 'setIpLocation', +'timestamp' => 'setTimestamp', +'time' => 'setTime', +'url' => 'setUrl', +'tag' => 'setTag', +'linked_id' => 'setLinkedId', +'confidence' => 'setConfidence', +'visitor_found' => 'setVisitorFound', +'first_seen_at' => 'setFirstSeenAt', +'last_seen_at' => 'setLastSeenAt' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static array $getters = [ 'visitor_id' => 'getVisitorId', - 'client_referrer' => 'getClientReferrer', - 'user_agent' => 'getUserAgent', - 'bot' => 'getBot', - 'ip_info' => 'getIpInfo', - 'incognito' => 'getIncognito', - 'root_apps' => 'getRootApps', - 'emulator' => 'getEmulator', - 'cloned_app' => 'getClonedApp', - 'factory_reset' => 'getFactoryReset', - 'jailbroken' => 'getJailbroken', - 'frida' => 'getFrida', - 'ip_blocklist' => 'getIpBlocklist', - 'tor' => 'getTor', - 'privacy_settings' => 'getPrivacySettings', - 'virtual_machine' => 'getVirtualMachine', - 'vpn' => 'getVpn', - 'proxy' => 'getProxy', - 'tampering' => 'getTampering', - 'raw_device_attributes' => 'getRawDeviceAttributes', - 'high_activity' => 'getHighActivity', - 'location_spoofing' => 'getLocationSpoofing', - 'suspect_score' => 'getSuspectScore', - 'remote_control' => 'getRemoteControl', - 'velocity' => 'getVelocity', - 'developer_tools' => 'getDeveloperTools', - 'request_id' => 'getRequestId', - 'browser_details' => 'getBrowserDetails', - 'ip' => 'getIp', - 'ip_location' => 'getIpLocation', - 'timestamp' => 'getTimestamp', - 'time' => 'getTime', - 'url' => 'getUrl', - 'tag' => 'getTag', - 'linked_id' => 'getLinkedId', - 'confidence' => 'getConfidence', - 'visitor_found' => 'getVisitorFound', - 'first_seen_at' => 'getFirstSeenAt', - 'last_seen_at' => 'getLastSeenAt']; - - /** - * Associative array for storing property values. +'client_referrer' => 'getClientReferrer', +'user_agent' => 'getUserAgent', +'bot' => 'getBot', +'ip_info' => 'getIpInfo', +'incognito' => 'getIncognito', +'root_apps' => 'getRootApps', +'emulator' => 'getEmulator', +'cloned_app' => 'getClonedApp', +'factory_reset' => 'getFactoryReset', +'jailbroken' => 'getJailbroken', +'frida' => 'getFrida', +'ip_blocklist' => 'getIpBlocklist', +'tor' => 'getTor', +'privacy_settings' => 'getPrivacySettings', +'virtual_machine' => 'getVirtualMachine', +'vpn' => 'getVpn', +'proxy' => 'getProxy', +'tampering' => 'getTampering', +'raw_device_attributes' => 'getRawDeviceAttributes', +'high_activity' => 'getHighActivity', +'location_spoofing' => 'getLocationSpoofing', +'suspect_score' => 'getSuspectScore', +'remote_control' => 'getRemoteControl', +'velocity' => 'getVelocity', +'developer_tools' => 'getDeveloperTools', +'request_id' => 'getRequestId', +'browser_details' => 'getBrowserDetails', +'ip' => 'getIp', +'ip_location' => 'getIpLocation', +'timestamp' => 'getTimestamp', +'time' => 'getTime', +'url' => 'getUrl', +'tag' => 'getTag', +'linked_id' => 'getLinkedId', +'confidence' => 'getConfidence', +'visitor_found' => 'getVisitorFound', +'first_seen_at' => 'getFirstSeenAt', +'last_seen_at' => 'getLastSeenAt' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + + + + /** + * Associative array for storing property values * * @var mixed[] */ protected array $container = []; /** - * Constructor. + * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(?array $data = null) + public function __construct(array $data = null) { $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; $this->container['client_referrer'] = isset($data['client_referrer']) ? $data['client_referrer'] : null; @@ -332,70 +383,6 @@ public function __construct(?array $data = null) $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; } - /** - * Gets the string presentation of the object. - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } - - /** - * Array of property to type mappings. Used for (de)serialization. - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name. - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses). - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests). - */ - public static function getters(): array - { - return self::$getters; - } - - /** - * The original name of the model. - */ - public function getModelName(): string - { - return self::$swaggerModelName; - } - /** * Show all the invalid properties with reasons. * @@ -405,56 +392,57 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (null === $this->container['visitor_id']) { + if ($this->container['visitor_id'] === null) { $invalidProperties[] = "'visitor_id' can't be null"; } - if (null === $this->container['incognito']) { + if ($this->container['incognito'] === null) { $invalidProperties[] = "'incognito' can't be null"; } - if (null === $this->container['request_id']) { + if ($this->container['request_id'] === null) { $invalidProperties[] = "'request_id' can't be null"; } - if (null === $this->container['browser_details']) { + if ($this->container['browser_details'] === null) { $invalidProperties[] = "'browser_details' can't be null"; } - if (null === $this->container['ip']) { + if ($this->container['ip'] === null) { $invalidProperties[] = "'ip' can't be null"; } - if (null === $this->container['timestamp']) { + if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if (null === $this->container['time']) { + if ($this->container['time'] === null) { $invalidProperties[] = "'time' can't be null"; } - if (null === $this->container['url']) { + if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if (null === $this->container['visitor_found']) { + if ($this->container['visitor_found'] === null) { $invalidProperties[] = "'visitor_found' can't be null"; } - if (null === $this->container['first_seen_at']) { + if ($this->container['first_seen_at'] === null) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if (null === $this->container['last_seen_at']) { + if ($this->container['last_seen_at'] === null) { $invalidProperties[] = "'last_seen_at' can't be null"; } - return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed. + * return true if all passed * * @return bool True if all properties are valid */ public function valid(): bool { - return 0 === count($this->listInvalidProperties()); + return count($this->listInvalidProperties()) === 0; } + /** - * Gets visitor_id. + * Gets visitor_id + * @return string */ public function getVisitorId(): string { @@ -462,7 +450,7 @@ public function getVisitorId(): string } /** - * Sets visitor_id. + * Sets visitor_id * * @param string $visitor_id visitor_id * @@ -476,8 +464,7 @@ public function setVisitorId(string $visitor_id): self } /** - * Gets client_referrer. - * + * Gets client_referrer * @return ?string */ public function getClientReferrer(): ?string @@ -486,7 +473,7 @@ public function getClientReferrer(): ?string } /** - * Sets client_referrer. + * Sets client_referrer * * @param ?string $client_referrer client_referrer * @@ -500,8 +487,7 @@ public function setClientReferrer(?string $client_referrer): self } /** - * Gets user_agent. - * + * Gets user_agent * @return ?string */ public function getUserAgent(): ?string @@ -510,7 +496,7 @@ public function getUserAgent(): ?string } /** - * Sets user_agent. + * Sets user_agent * * @param ?string $user_agent user_agent * @@ -524,23 +510,22 @@ public function setUserAgent(?string $user_agent): self } /** - * Gets bot. - * + * Gets bot * @return ?\Fingerprint\ServerAPI\Model\BotdDetectionResult */ - public function getBot(): ?BotdDetectionResult + public function getBot(): ?\Fingerprint\ServerAPI\Model\BotdDetectionResult { return $this->container['bot']; } /** - * Sets bot. + * Sets bot * * @param ?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ - public function setBot(?BotdDetectionResult $bot): self + public function setBot(?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -548,23 +533,22 @@ public function setBot(?BotdDetectionResult $bot): self } /** - * Gets ip_info. - * + * Gets ip_info * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getIpInfo(): ?IpInfoResult + public function getIpInfo(): ?\Fingerprint\ServerAPI\Model\IpInfoResult { return $this->container['ip_info']; } /** - * Sets ip_info. + * Sets ip_info * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info * * @return $this */ - public function setIpInfo(?IpInfoResult $ip_info): self + public function setIpInfo(?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -572,7 +556,8 @@ public function setIpInfo(?IpInfoResult $ip_info): self } /** - * Gets incognito. + * Gets incognito + * @return bool */ public function getIncognito(): bool { @@ -580,9 +565,9 @@ public function getIncognito(): bool } /** - * Sets incognito. + * Sets incognito * - * @param bool $incognito flag if user used incognito session + * @param bool $incognito Flag if user used incognito session. * * @return $this */ @@ -594,23 +579,22 @@ public function setIncognito(bool $incognito): self } /** - * Gets root_apps. - * + * Gets root_apps * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getRootApps(): ?RootAppsResult + public function getRootApps(): ?\Fingerprint\ServerAPI\Model\RootAppsResult { return $this->container['root_apps']; } /** - * Sets root_apps. + * Sets root_apps * * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps * * @return $this */ - public function setRootApps(?RootAppsResult $root_apps): self + public function setRootApps(?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -618,23 +602,22 @@ public function setRootApps(?RootAppsResult $root_apps): self } /** - * Gets emulator. - * + * Gets emulator * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getEmulator(): ?EmulatorResult + public function getEmulator(): ?\Fingerprint\ServerAPI\Model\EmulatorResult { return $this->container['emulator']; } /** - * Sets emulator. + * Sets emulator * * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator * * @return $this */ - public function setEmulator(?EmulatorResult $emulator): self + public function setEmulator(?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -642,23 +625,22 @@ public function setEmulator(?EmulatorResult $emulator): self } /** - * Gets cloned_app. - * + * Gets cloned_app * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getClonedApp(): ?ClonedAppResult + public function getClonedApp(): ?\Fingerprint\ServerAPI\Model\ClonedAppResult { return $this->container['cloned_app']; } /** - * Sets cloned_app. + * Sets cloned_app * * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app * * @return $this */ - public function setClonedApp(?ClonedAppResult $cloned_app): self + public function setClonedApp(?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -666,23 +648,22 @@ public function setClonedApp(?ClonedAppResult $cloned_app): self } /** - * Gets factory_reset. - * + * Gets factory_reset * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getFactoryReset(): ?FactoryResetResult + public function getFactoryReset(): ?\Fingerprint\ServerAPI\Model\FactoryResetResult { return $this->container['factory_reset']; } /** - * Sets factory_reset. + * Sets factory_reset * * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset * * @return $this */ - public function setFactoryReset(?FactoryResetResult $factory_reset): self + public function setFactoryReset(?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -690,23 +671,22 @@ public function setFactoryReset(?FactoryResetResult $factory_reset): self } /** - * Gets jailbroken. - * + * Gets jailbroken * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getJailbroken(): ?JailbrokenResult + public function getJailbroken(): ?\Fingerprint\ServerAPI\Model\JailbrokenResult { return $this->container['jailbroken']; } /** - * Sets jailbroken. + * Sets jailbroken * * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken * * @return $this */ - public function setJailbroken(?JailbrokenResult $jailbroken): self + public function setJailbroken(?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -714,23 +694,22 @@ public function setJailbroken(?JailbrokenResult $jailbroken): self } /** - * Gets frida. - * + * Gets frida * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getFrida(): ?FridaResult + public function getFrida(): ?\Fingerprint\ServerAPI\Model\FridaResult { return $this->container['frida']; } /** - * Sets frida. + * Sets frida * * @param ?\Fingerprint\ServerAPI\Model\FridaResult $frida frida * * @return $this */ - public function setFrida(?FridaResult $frida): self + public function setFrida(?\Fingerprint\ServerAPI\Model\FridaResult $frida): self { $this->container['frida'] = $frida; @@ -738,23 +717,22 @@ public function setFrida(?FridaResult $frida): self } /** - * Gets ip_blocklist. - * + * Gets ip_blocklist * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getIpBlocklist(): ?IpBlockListResult + public function getIpBlocklist(): ?\Fingerprint\ServerAPI\Model\IpBlockListResult { return $this->container['ip_blocklist']; } /** - * Sets ip_blocklist. + * Sets ip_blocklist * * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self + public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -762,23 +740,22 @@ public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self } /** - * Gets tor. - * + * Gets tor * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getTor(): ?TorResult + public function getTor(): ?\Fingerprint\ServerAPI\Model\TorResult { return $this->container['tor']; } /** - * Sets tor. + * Sets tor * * @param ?\Fingerprint\ServerAPI\Model\TorResult $tor tor * * @return $this */ - public function setTor(?TorResult $tor): self + public function setTor(?\Fingerprint\ServerAPI\Model\TorResult $tor): self { $this->container['tor'] = $tor; @@ -786,23 +763,22 @@ public function setTor(?TorResult $tor): self } /** - * Gets privacy_settings. - * + * Gets privacy_settings * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getPrivacySettings(): ?PrivacySettingsResult + public function getPrivacySettings(): ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult { return $this->container['privacy_settings']; } /** - * Sets privacy_settings. + * Sets privacy_settings * * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): self + public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -810,23 +786,22 @@ public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): se } /** - * Gets virtual_machine. - * + * Gets virtual_machine * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getVirtualMachine(): ?VirtualMachineResult + public function getVirtualMachine(): ?\Fingerprint\ServerAPI\Model\VirtualMachineResult { return $this->container['virtual_machine']; } /** - * Sets virtual_machine. + * Sets virtual_machine * * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self + public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -834,23 +809,22 @@ public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self } /** - * Gets vpn. - * + * Gets vpn * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getVpn(): ?VpnResult + public function getVpn(): ?\Fingerprint\ServerAPI\Model\VpnResult { return $this->container['vpn']; } /** - * Sets vpn. + * Sets vpn * * @param ?\Fingerprint\ServerAPI\Model\VpnResult $vpn vpn * * @return $this */ - public function setVpn(?VpnResult $vpn): self + public function setVpn(?\Fingerprint\ServerAPI\Model\VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -858,23 +832,22 @@ public function setVpn(?VpnResult $vpn): self } /** - * Gets proxy. - * + * Gets proxy * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getProxy(): ?ProxyResult + public function getProxy(): ?\Fingerprint\ServerAPI\Model\ProxyResult { return $this->container['proxy']; } /** - * Sets proxy. + * Sets proxy * * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy * * @return $this */ - public function setProxy(?ProxyResult $proxy): self + public function setProxy(?\Fingerprint\ServerAPI\Model\ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -882,23 +855,22 @@ public function setProxy(?ProxyResult $proxy): self } /** - * Gets tampering. - * + * Gets tampering * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getTampering(): ?TamperingResult + public function getTampering(): ?\Fingerprint\ServerAPI\Model\TamperingResult { return $this->container['tampering']; } /** - * Sets tampering. + * Sets tampering * * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering * * @return $this */ - public function setTampering(?TamperingResult $tampering): self + public function setTampering(?\Fingerprint\ServerAPI\Model\TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -906,23 +878,22 @@ public function setTampering(?TamperingResult $tampering): self } /** - * Gets raw_device_attributes. - * + * Gets raw_device_attributes * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getRawDeviceAttributes(): ?RawDeviceAttributesResult + public function getRawDeviceAttributes(): ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } /** - * Sets raw_device_attributes. + * Sets raw_device_attributes * * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ - public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_attributes): self + public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -930,23 +901,22 @@ public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_at } /** - * Gets high_activity. - * + * Gets high_activity * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getHighActivity(): ?HighActivityResult + public function getHighActivity(): ?\Fingerprint\ServerAPI\Model\HighActivityResult { return $this->container['high_activity']; } /** - * Sets high_activity. + * Sets high_activity * * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity * * @return $this */ - public function setHighActivity(?HighActivityResult $high_activity): self + public function setHighActivity(?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -954,23 +924,22 @@ public function setHighActivity(?HighActivityResult $high_activity): self } /** - * Gets location_spoofing. - * + * Gets location_spoofing * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getLocationSpoofing(): ?LocationSpoofingResult + public function getLocationSpoofing(): ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult { return $this->container['location_spoofing']; } /** - * Sets location_spoofing. + * Sets location_spoofing * * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): self + public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -978,23 +947,22 @@ public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): } /** - * Gets suspect_score. - * + * Gets suspect_score * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getSuspectScore(): ?SuspectScoreResult + public function getSuspectScore(): ?\Fingerprint\ServerAPI\Model\SuspectScoreResult { return $this->container['suspect_score']; } /** - * Sets suspect_score. + * Sets suspect_score * * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score * * @return $this */ - public function setSuspectScore(?SuspectScoreResult $suspect_score): self + public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1002,23 +970,22 @@ public function setSuspectScore(?SuspectScoreResult $suspect_score): self } /** - * Gets remote_control. - * + * Gets remote_control * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult */ - public function getRemoteControl(): ?RemoteControlResult + public function getRemoteControl(): ?\Fingerprint\ServerAPI\Model\RemoteControlResult { return $this->container['remote_control']; } /** - * Sets remote_control. + * Sets remote_control * * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $remote_control remote_control * * @return $this */ - public function setRemoteControl(?RemoteControlResult $remote_control): self + public function setRemoteControl(?\Fingerprint\ServerAPI\Model\RemoteControlResult $remote_control): self { $this->container['remote_control'] = $remote_control; @@ -1026,23 +993,22 @@ public function setRemoteControl(?RemoteControlResult $remote_control): self } /** - * Gets velocity. - * + * Gets velocity * @return ?\Fingerprint\ServerAPI\Model\VelocityResult */ - public function getVelocity(): ?VelocityResult + public function getVelocity(): ?\Fingerprint\ServerAPI\Model\VelocityResult { return $this->container['velocity']; } /** - * Sets velocity. + * Sets velocity * * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $velocity velocity * * @return $this */ - public function setVelocity(?VelocityResult $velocity): self + public function setVelocity(?\Fingerprint\ServerAPI\Model\VelocityResult $velocity): self { $this->container['velocity'] = $velocity; @@ -1050,23 +1016,22 @@ public function setVelocity(?VelocityResult $velocity): self } /** - * Gets developer_tools. - * + * Gets developer_tools * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult */ - public function getDeveloperTools(): ?DeveloperToolsResult + public function getDeveloperTools(): ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult { return $this->container['developer_tools']; } /** - * Sets developer_tools. + * Sets developer_tools * * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $developer_tools developer_tools * * @return $this */ - public function setDeveloperTools(?DeveloperToolsResult $developer_tools): self + public function setDeveloperTools(?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $developer_tools): self { $this->container['developer_tools'] = $developer_tools; @@ -1074,7 +1039,8 @@ public function setDeveloperTools(?DeveloperToolsResult $developer_tools): self } /** - * Gets request_id. + * Gets request_id + * @return string */ public function getRequestId(): string { @@ -1082,9 +1048,9 @@ public function getRequestId(): string } /** - * Sets request_id. + * Sets request_id * - * @param string $request_id unique identifier of the user's identification request + * @param string $request_id Unique identifier of the user's identification request. * * @return $this */ @@ -1096,21 +1062,22 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details. + * Gets browser_details + * @return \Fingerprint\ServerAPI\Model\BrowserDetails */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details. + * Sets browser_details * - * @param BrowserDetails $browser_details browser_details + * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(BrowserDetails $browser_details): self + public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1118,7 +1085,8 @@ public function setBrowserDetails(BrowserDetails $browser_details): self } /** - * Gets ip. + * Gets ip + * @return string */ public function getIp(): string { @@ -1126,7 +1094,7 @@ public function getIp(): string } /** - * Sets ip. + * Sets ip * * @param string $ip ip * @@ -1140,23 +1108,22 @@ public function setIp(string $ip): self } /** - * Gets ip_location. - * + * Gets ip_location * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?DeprecatedIPLocation + public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location. + * Sets ip_location * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?DeprecatedIPLocation $ip_location): self + public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1164,7 +1131,8 @@ public function setIpLocation(?DeprecatedIPLocation $ip_location): self } /** - * Gets timestamp. + * Gets timestamp + * @return int */ public function getTimestamp(): int { @@ -1172,9 +1140,9 @@ public function getTimestamp(): int } /** - * Sets timestamp. + * Sets timestamp * - * @param int $timestamp timestamp of the event with millisecond precision in Unix time + * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. * * @return $this */ @@ -1186,7 +1154,8 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time. + * Gets time + * @return \DateTime */ public function getTime(): \DateTime { @@ -1194,9 +1163,9 @@ public function getTime(): \DateTime } /** - * Sets time. + * Sets time * - * @param \DateTime $time time expressed according to ISO 8601 in UTC format + * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. * * @return $this */ @@ -1208,7 +1177,8 @@ public function setTime(\DateTime $time): self } /** - * Gets url. + * Gets url + * @return string */ public function getUrl(): string { @@ -1216,9 +1186,9 @@ public function getUrl(): string } /** - * Sets url. + * Sets url * - * @param string $url page URL from which the identification request was sent + * @param string $url Page URL from which the identification request was sent. * * @return $this */ @@ -1230,8 +1200,7 @@ public function setUrl(string $url): self } /** - * Gets tag. - * + * Gets tag * @return ?map[string,object] */ public function getTag(): ?array @@ -1240,9 +1209,9 @@ public function getTag(): ?array } /** - * Sets tag. + * Sets tag * - * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request. * * @return $this */ @@ -1254,8 +1223,7 @@ public function setTag(?array $tag): self } /** - * Gets linked_id. - * + * Gets linked_id * @return ?string */ public function getLinkedId(): ?string @@ -1264,9 +1232,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id. + * Sets linked_id * - * @param ?string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id A customer-provided id that was sent with identification request. * * @return $this */ @@ -1278,23 +1246,22 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence. - * + * Gets confidence * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?Confidence + public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence { return $this->container['confidence']; } /** - * Sets confidence. + * Sets confidence * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?Confidence $confidence): self + public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -1302,7 +1269,8 @@ public function setConfidence(?Confidence $confidence): self } /** - * Gets visitor_found. + * Gets visitor_found + * @return bool */ public function getVisitorFound(): bool { @@ -1310,9 +1278,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found. + * Sets visitor_found * - * @param bool $visitor_found attribute represents if a visitor had been identified before + * @param bool $visitor_found Attribute represents if a visitor had been identified before. * * @return $this */ @@ -1324,21 +1292,22 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at. + * Gets first_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at. + * Sets first_seen_at * - * @param SeenAt $first_seen_at first_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(SeenAt $first_seen_at): self + public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1346,31 +1315,31 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self } /** - * Gets last_seen_at. + * Gets last_seen_at + * @return \Fingerprint\ServerAPI\Model\SeenAt */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at. + * Sets last_seen_at * - * @param SeenAt $last_seen_at last_seen_at + * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(SeenAt $last_seen_at): self + public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } - /** * Returns true if offset exists. False otherwise. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetExists($offset): bool { @@ -1380,7 +1349,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetGet($offset): mixed { @@ -1390,8 +1359,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param int $offset Offset - * @param mixed $value Value to be set + * @param integer $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -1405,10 +1374,27 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param int $offset Offset + * @param integer $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } } From 1684e1ab02b3c44ad82c8ec04480dc1388b8e219 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 4 Sep 2024 12:38:38 +0300 Subject: [PATCH 118/118] chore: regenerate from template for v5 --- src/Api/FingerprintApi.php | 978 ++++++++++-------- src/ApiException.php | 28 +- src/Configuration.php | 161 +-- src/Model/ASN.php | 214 ++-- src/Model/BotdDetectionResult.php | 207 ++-- src/Model/BotdResult.php | 303 +++--- src/Model/BrowserDetails.php | 311 +++--- src/Model/ClonedAppResult.php | 188 ++-- src/Model/Common403ErrorResponse.php | 217 ++-- src/Model/Confidence.php | 197 ++-- src/Model/DataCenter.php | 195 ++-- src/Model/DeprecatedIPLocation.php | 332 +++--- src/Model/DeprecatedIPLocationCity.php | 189 ++-- src/Model/DeveloperToolsResult.php | 190 ++-- src/Model/EmulatorResult.php | 188 ++-- src/Model/ErrorCommon403Response.php | 193 ++-- src/Model/ErrorCommon429Response.php | 193 ++-- src/Model/ErrorCommon429ResponseError.php | 203 ++-- src/Model/ErrorEvent404Response.php | 193 ++-- src/Model/ErrorEvent404ResponseError.php | 201 ++-- src/Model/ErrorUpdateEvent400Response.php | 193 ++-- .../ErrorUpdateEvent400ResponseError.php | 205 ++-- src/Model/ErrorUpdateEvent409Response.php | 193 ++-- .../ErrorUpdateEvent409ResponseError.php | 201 ++-- src/Model/ErrorVisitor400Response.php | 193 ++-- src/Model/ErrorVisitor400ResponseError.php | 203 ++-- src/Model/ErrorVisitor404Response.php | 193 ++-- src/Model/ErrorVisitor404ResponseError.php | 201 ++-- src/Model/ErrorVisits403.php | 190 ++-- src/Model/EventResponse.php | 206 ++-- src/Model/EventUpdateRequest.php | 213 ++-- src/Model/FactoryResetResult.php | 197 ++-- src/Model/FridaResult.php | 188 ++-- src/Model/HighActivityResult.php | 199 ++-- src/Model/IPLocation.php | 331 +++--- src/Model/IPLocationCity.php | 189 ++-- src/Model/IdentificationError.php | 205 ++-- src/Model/IncognitoResult.php | 190 ++-- src/Model/IpBlockListResult.php | 205 ++-- src/Model/IpBlockListResultDetails.php | 201 ++-- src/Model/IpInfoResult.php | 205 ++-- src/Model/IpInfoResultV4.php | 245 +++-- src/Model/IpInfoResultV6.php | 245 +++-- src/Model/JailbrokenResult.php | 188 ++-- src/Model/Location.php | 197 ++-- src/Model/LocationSpoofingResult.php | 190 ++-- src/Model/ModelInterface.php | 22 +- src/Model/PrivacySettingsResult.php | 188 ++-- src/Model/ProductError.php | 205 ++-- src/Model/ProductsResponse.php | 667 ++++++------ src/Model/ProductsResponseBotd.php | 204 ++-- src/Model/ProductsResponseIdentification.php | 204 ++-- .../ProductsResponseIdentificationData.php | 494 +++++---- src/Model/ProxyResult.php | 190 ++-- src/Model/RawDeviceAttributesResult.php | 179 ++-- src/Model/RemoteControlResult.php | 188 ++-- src/Model/Response.php | 232 ++--- src/Model/ResponseVisits.php | 473 +++++---- src/Model/RootAppsResult.php | 188 ++-- src/Model/SeenAt.php | 197 ++-- src/Model/SignalResponseClonedApp.php | 204 ++-- src/Model/SignalResponseDeveloperTools.php | 204 ++-- src/Model/SignalResponseEmulator.php | 204 ++-- src/Model/SignalResponseFactoryReset.php | 204 ++-- src/Model/SignalResponseFrida.php | 204 ++-- src/Model/SignalResponseHighActivity.php | 204 ++-- src/Model/SignalResponseIncognito.php | 204 ++-- src/Model/SignalResponseIpBlocklist.php | 204 ++-- src/Model/SignalResponseIpInfo.php | 204 ++-- src/Model/SignalResponseJailbroken.php | 204 ++-- src/Model/SignalResponseLocationSpoofing.php | 204 ++-- src/Model/SignalResponsePrivacySettings.php | 204 ++-- src/Model/SignalResponseProxy.php | 204 ++-- .../SignalResponseRawDeviceAttributes.php | 204 ++-- src/Model/SignalResponseRemoteControl.php | 204 ++-- src/Model/SignalResponseRootApps.php | 204 ++-- src/Model/SignalResponseSuspectScore.php | 204 ++-- src/Model/SignalResponseTampering.php | 204 ++-- src/Model/SignalResponseTor.php | 204 ++-- src/Model/SignalResponseVelocity.php | 204 ++-- src/Model/SignalResponseVirtualMachine.php | 204 ++-- src/Model/SignalResponseVpn.php | 204 ++-- src/Model/Subdivision.php | 196 ++-- src/Model/SuspectScoreResult.php | 188 ++-- src/Model/TamperingResult.php | 199 ++-- src/Model/TooManyRequestsResponse.php | 190 ++-- src/Model/TorResult.php | 190 ++-- src/Model/VelocityIntervalResult.php | 215 ++-- src/Model/VelocityIntervals.php | 193 ++-- src/Model/VelocityResult.php | 260 +++-- src/Model/VirtualMachineResult.php | 188 ++-- src/Model/Visit.php | 471 +++++---- src/Model/VpnResult.php | 243 +++-- src/Model/VpnResultMethods.php | 241 +++-- src/Model/WebhookVisit.php | 944 ++++++++--------- 95 files changed, 10916 insertions(+), 11168 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index efe7553b..444ed1d9 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -1,16 +1,17 @@ client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -67,18 +71,19 @@ public function getConfig(): Configuration return $this->config; } - /** - * Operation deleteVisitorData + * Operation deleteVisitorData. * * Delete data by visitor ID * - * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * + * @return array{ null, \Psr\Http\Message\ResponseInterface } + * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException - * @return array{ null, \Psr\Http\Message\ResponseInterface } */ public function deleteVisitorData(string $visitor_id): array { @@ -87,6 +92,7 @@ public function deleteVisitorData(string $visitor_id): array try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -95,6 +101,7 @@ public function deleteVisitorData(string $visitor_id): array $e->getCode() ); $apiException->setResponseObject($e->getResponse()); + throw $apiException; } @@ -110,60 +117,69 @@ public function deleteVisitorData(string $visitor_id): array $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } return [null, $response]; - } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 400: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - } + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - if ($e->getCode() === 429) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); - } - } + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - throw $e; + break; + + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } + + throw $e; + } } /** - * Operation deleteVisitorDataAsync - * - * Delete data by visitor ID - * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function deleteVisitorDataAsync(string $visitor_id): \GuzzleHttp\Promise\PromiseInterface + * Operation deleteVisitorDataAsync. + * + * Delete data by visitor ID + * + * @param string $visitor_id The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface { $returnType = ''; $request = $this->deleteVisitorDataRequest($visitor_id); @@ -171,7 +187,7 @@ public function deleteVisitorDataAsync(string $visitor_id): \GuzzleHttp\Promise\ return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( - function ($response) use ($returnType, $request) { + function ($response) use ($request) { $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { @@ -184,37 +200,47 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } + return [null, $response]; }, function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 400: + case 400: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor400Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 403: + + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 404: + + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisitor404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 429: + + case 429: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon429Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; } - if ($e->getCode() === 429) { + if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -227,86 +253,18 @@ function ($e) { } /** - * Create request for operation 'deleteVisitorData' + * Operation getEvent. * + * Get event by request ID * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function deleteVisitorDataRequest(string $visitor_id): \GuzzleHttp\Psr7\Request - { - // verify the required parameter 'visitor_id' is set - if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $visitor_id when calling deleteVisitorData' - ); - } - - $resourcePath = '/visitors/{visitor_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - - // path params - if ($visitor_id !== null) { - $resourcePath = str_replace( - '{' . 'visitor_id' . '}', - ObjectSerializer::toPathValue($visitor_id), - $resourcePath - ); - } - - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - - /** - * Operation getEvent + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) * - * Get event by request ID + * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException - * @return array{ \Fingerprint\ServerAPI\Model\EventResponse|null, \Psr\Http\Message\ResponseInterface } */ public function getEvent(string $request_id): array { @@ -315,6 +273,7 @@ public function getEvent(string $request_id): array try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -323,6 +282,7 @@ public function getEvent(string $request_id): array $e->getCode() ); $apiException->setResponseObject($e->getResponse()); + throw $apiException; } @@ -338,58 +298,64 @@ public function getEvent(string $request_id): array $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } - $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; - } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 200: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - } + case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - if ($e->getCode() === 429) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); - } - } + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - throw $e; + break; } + + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } + } + + throw $e; + } } /** - * Operation getEventAsync - * - * Get event by request ID - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function getEventAsync(string $request_id): \GuzzleHttp\Promise\PromiseInterface + * Operation getEventAsync. + * + * Get event by request ID + * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function getEventAsync(string $request_id): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -410,6 +376,7 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } @@ -420,25 +387,31 @@ function ($response) use ($returnType, $request) { function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 200: + case 200: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 403: + + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 404: + + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; } - if ($e->getCode() === 429) { + if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -451,99 +424,32 @@ function ($e) { } /** - * Create request for operation 'getEvent' + * Operation getVisits. * + * Get visits by visitor ID * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function getEventRequest(string $request_id): \GuzzleHttp\Psr7\Request - { - // verify the required parameter 'request_id' is set - if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $request_id when calling getEvent' - ); - } - - $resourcePath = '/events/{request_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - - // path params - if ($request_id !== null) { - $resourcePath = str_replace( - '{' . 'request_id' . '}', - ObjectSerializer::toPathValue($request_id), - $resourcePath - ); - } - - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - - /** - * Operation getVisits + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * - * Get visits by visitor ID + * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * - * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException - * @return array{ \Fingerprint\ServerAPI\Model\Response|null, \Psr\Http\Message\ResponseInterface } */ - public function getVisits(string $visitor_id, string $request_id = null, string $linked_id = null, int $limit = null, string $pagination_key = null, int $before = null): array + public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -552,6 +458,7 @@ public function getVisits(string $visitor_id, string $request_id = null, string $e->getCode() ); $apiException->setResponseObject($e->getResponse()); + throw $apiException; } @@ -567,63 +474,69 @@ public function getVisits(string $visitor_id, string $request_id = null, string $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } - $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; - } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 200: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 429: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - } + case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - if ($e->getCode() === 429) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); - } - } + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; - throw $e; + case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } + + throw $e; + } } /** - * Operation getVisitsAsync - * - * Get visits by visitor ID - * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function getVisitsAsync(string $visitor_id, string $request_id = null, string $linked_id = null, int $limit = null, string $pagination_key = null, int $before = null): \GuzzleHttp\Promise\PromiseInterface + * Operation getVisitsAsync. + * + * Get visits by visitor ID + * + * @param string $visitor_id Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -644,6 +557,7 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } @@ -654,25 +568,31 @@ function ($response) use ($returnType, $request) { function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 200: + case 200: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 403: + + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 429: + + case 429: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\TooManyRequestsResponse'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; } - if ($e->getCode() === 429) { + if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -685,115 +605,28 @@ function ($e) { } /** - * Create request for operation 'getVisits' + * Operation updateEvent. * + * Update an event with a given request ID * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - protected function getVisitsRequest(string $visitor_id, string|null $request_id = null, string|null $linked_id = null, int|null $limit = null, string|null $pagination_key = null, int|null $before = null): \GuzzleHttp\Psr7\Request - { - // verify the required parameter 'visitor_id' is set - if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $visitor_id when calling getVisits' - ); - } - - $resourcePath = '/visitors/{visitor_id}'; - $headers = []; - $queryParams = ['ii' => $this->integration_info]; - $headerParams = []; - $httpBody = ''; - - // query params - if ($request_id !== null) { - $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); - } - // query params - if ($linked_id !== null) { - $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); - } - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); - } - // query params - if ($pagination_key !== null) { - $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); - } - // query params - if ($before !== null) { - $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); - } - - // path params - if ($visitor_id !== null) { - $resourcePath = str_replace( - '{' . 'visitor_id' . '}', - ObjectSerializer::toPathValue($visitor_id), - $resourcePath - ); - } - - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { - $headers['Auth-API-Key'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { - $queryParams['api_key'] = $apiKey; - } - - $defaultHeaders = [ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = http_build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - - /** - * Operation updateEvent + * @param EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) * - * Update an event with a given request ID + * @return array{ null, \Psr\Http\Message\ResponseInterface } * - * @param \Fingerprint\ServerAPI\Model\EventUpdateRequest $body (required) - * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException - * @return array{ null, \Psr\Http\Message\ResponseInterface } */ - public function updateEvent(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): array + public function updateEvent(EventUpdateRequest $body, string $request_id): array { $returnType = ''; $request = $this->updateEventRequest($body, $request_id); try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -802,6 +635,7 @@ public function updateEvent(\Fingerprint\ServerAPI\Model\EventUpdateRequest $bod $e->getCode() ); $apiException->setResponseObject($e->getResponse()); + throw $apiException; } @@ -817,61 +651,70 @@ public function updateEvent(\Fingerprint\ServerAPI\Model\EventUpdateRequest $bod $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } return [null, $response]; - } catch (ApiException $e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 400: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 403: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 404: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - case 409: - $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); - $e->setErrorDetails($errorDetail); - $e->setResponseObject($response); - break; - } + case 400: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - if ($e->getCode() === 429) { - $e->setRetryAfter(1); - if ($response->hasHeader('retry-after')) { - $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); - } - } + break; + + case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - throw $e; + break; + + case 409: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; + } + + if (429 === $e->getCode()) { + $e->setRetryAfter(1); + if ($response->hasHeader('retry-after')) { + $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); + } } + + throw $e; + } } /** - * Operation updateEventAsync - * - * Update an event with a given request ID - * @param \Fingerprint\ServerAPI\Model\EventUpdateRequest $body (required) - * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) - * - * @throws \InvalidArgumentException - * @throws SerializationException - * @throws GuzzleException - * @throws ApiException - */ - public function updateEventAsync(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): \GuzzleHttp\Promise\PromiseInterface + * Operation updateEventAsync. + * + * Update an event with a given request ID + * + * @param EventUpdateRequest $body (required) + * @param string $request_id The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid). (required) + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + public function updateEventAsync(EventUpdateRequest $body, string $request_id): PromiseInterface { $returnType = ''; $request = $this->updateEventRequest($body, $request_id); @@ -879,7 +722,7 @@ public function updateEventAsync(\Fingerprint\ServerAPI\Model\EventUpdateRequest return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( - function ($response) use ($returnType, $request) { + function ($response) use ($request) { $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { @@ -892,37 +735,47 @@ function ($response) use ($returnType, $request) { $statusCode ); $apiException->setResponseObject($response); + throw $apiException; } + return [null, $response]; }, function ($e) { /** @var ResponseInterface $response */ $response = $e->getResponseObject(); + switch ($e->getCode()) { - case 400: + case 400: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 403: + + case 403: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorCommon403Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 404: + + case 404: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; - case 409: + + case 409: $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409Response'); $e->setErrorDetails($errorDetail); $e->setResponseObject($response); + break; } - if ($e->getCode() === 429) { + if (429 === $e->getCode()) { $e->setRetryAfter(1); if ($response->hasHeader('retry-after')) { $e->setRetryAfter((int) $response->getHeader('retry-after')[0]); @@ -935,24 +788,245 @@ function ($e) { } /** - * Create request for operation 'updateEvent' + * Create request for operation 'deleteVisitorData'. + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function deleteVisitorDataRequest(string $visitor_id): Request + { + // verify the required parameter 'visitor_id' is set + if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $visitor_id when calling deleteVisitorData' + ); + } + + $resourcePath = '/visitors/{visitor_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // path params + if (null !== $visitor_id) { + $resourcePath = str_replace( + '{visitor_id}', + ObjectSerializer::toPathValue($visitor_id), + $resourcePath + ); + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if (null !== $apiKey) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if (null !== $apiKey) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + + return new Request( + 'DELETE', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create request for operation 'getEvent'. + * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function getEventRequest(string $request_id): Request + { + // verify the required parameter 'request_id' is set + if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $request_id when calling getEvent' + ); + } + + $resourcePath = '/events/{request_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // path params + if (null !== $request_id) { + $resourcePath = str_replace( + '{request_id}', + ObjectSerializer::toPathValue($request_id), + $resourcePath + ); + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if (null !== $apiKey) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if (null !== $apiKey) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create request for operation 'getVisits'. * + * @throws \InvalidArgumentException + * @throws SerializationException + * @throws GuzzleException + * @throws ApiException + */ + protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request + { + // verify the required parameter 'visitor_id' is set + if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { + throw new \InvalidArgumentException( + 'Missing the required parameter $visitor_id when calling getVisits' + ); + } + + $resourcePath = '/visitors/{visitor_id}'; + $headers = []; + $queryParams = ['ii' => $this->integration_info]; + $headerParams = []; + $httpBody = ''; + + // query params + if (null !== $request_id) { + $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); + } + // query params + if (null !== $linked_id) { + $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); + } + // query params + if (null !== $limit) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); + } + // query params + if (null !== $pagination_key) { + $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); + } + // query params + if (null !== $before) { + $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); + } + + // path params + if (null !== $visitor_id) { + $resourcePath = str_replace( + '{visitor_id}', + ObjectSerializer::toPathValue($visitor_id), + $resourcePath + ); + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); + if (null !== $apiKey) { + $headers['Auth-API-Key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api_key'); + if (null !== $apiKey) { + $queryParams['api_key'] = $apiKey; + } + + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = http_build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create request for operation 'updateEvent'. * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @throws ApiException */ - protected function updateEventRequest(\Fingerprint\ServerAPI\Model\EventUpdateRequest $body, string $request_id): \GuzzleHttp\Psr7\Request + protected function updateEventRequest(EventUpdateRequest $body, string $request_id): Request { // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + if (null === $body || (is_array($body) && 0 === count($body))) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling updateEvent' ); } // verify the required parameter 'request_id' is set - if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { + if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { throw new \InvalidArgumentException( 'Missing the required parameter $request_id when calling updateEvent' ); @@ -964,11 +1038,10 @@ protected function updateEventRequest(\Fingerprint\ServerAPI\Model\EventUpdateRe $headerParams = []; $httpBody = ''; - // path params - if ($request_id !== null) { + if (null !== $request_id) { $resourcePath = str_replace( - '{' . 'request_id' . '}', + '{request_id}', ObjectSerializer::toPathValue($request_id), $resourcePath ); @@ -987,12 +1060,12 @@ protected function updateEventRequest(\Fingerprint\ServerAPI\Model\EventUpdateRe // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $queryParams['api_key'] = $apiKey; } @@ -1011,16 +1084,17 @@ protected function updateEventRequest(\Fingerprint\ServerAPI\Model\EventUpdateRe ); $query = http_build_query($queryParams); + return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); } /** - * Create http client option + * Create http client option. * * @throws \RuntimeException on file opening failure */ @@ -1030,7 +1104,7 @@ protected function createHttpClientOption(): array if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); } } diff --git a/src/ApiException.php b/src/ApiException.php index 289293d3..1905ffe8 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -1,16 +1,17 @@ responseObject = $obj; @@ -83,4 +83,4 @@ public function setRetryAfter(?int $retryAfter): void { $this->retryAfter = $retryAfter; } -} \ No newline at end of file +} diff --git a/src/Configuration.php b/src/Configuration.php index 74227554..7d7ce356 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -1,16 +1,17 @@ apiKeys[$apiKeyIdentifier] = $key; + return $this; } /** - * Gets API key + * Gets API key. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string|null API key or token + * @return null|string API key or token */ public function getApiKey(string $apiKeyIdentifier): ?string { @@ -129,25 +132,24 @@ public function getApiKey(string $apiKeyIdentifier): ?string } /** - * Sets the prefix for API key (e.g. Bearer) + * Sets the prefix for API key (e.g. Bearer). * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } /** - * Gets API key prefix + * Gets API key prefix. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return string|null */ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { @@ -155,7 +157,7 @@ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string } /** - * Sets the access token for OAuth + * Sets the access token for OAuth. * * @param string $accessToken Token for OAuth * @@ -164,11 +166,12 @@ public function getApiKeyPrefix(string $apiKeyIdentifier): ?string public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; + return $this; } /** - * Gets the access token for OAuth + * Gets the access token for OAuth. * * @return string Access token for OAuth */ @@ -178,7 +181,7 @@ public function getAccessToken(): string } /** - * Sets the username for HTTP basic authentication + * Sets the username for HTTP basic authentication. * * @param string $username Username for HTTP basic authentication * @@ -187,11 +190,12 @@ public function getAccessToken(): string public function setUsername(string $username): self { $this->username = $username; + return $this; } /** - * Gets the username for HTTP basic authentication + * Gets the username for HTTP basic authentication. * * @return string Username for HTTP basic authentication */ @@ -201,7 +205,7 @@ public function getUsername(): string } /** - * Sets the password for HTTP basic authentication + * Sets the password for HTTP basic authentication. * * @param string $password Password for HTTP basic authentication * @@ -210,11 +214,12 @@ public function getUsername(): string public function setPassword(string $password): self { $this->password = $password; + return $this; } /** - * Gets the password for HTTP basic authentication + * Gets the password for HTTP basic authentication. * * @return string Password for HTTP basic authentication */ @@ -224,7 +229,7 @@ public function getPassword(): string } /** - * Sets the host + * Sets the host. * * @param string $host Host * @@ -233,11 +238,12 @@ public function getPassword(): string public function setHost(string $host): self { $this->host = $host; + return $this; } /** - * Gets the host + * Gets the host. * * @return string Host */ @@ -247,26 +253,30 @@ public function getHost(): string } /** - * @param $region * @return $this */ public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: - case "as": - case "asia": + case 'as': + case 'asia': $this->setHost(self::REGION_ASIA); + break; + case self::REGION_EUROPE: - case "eu": - case "europe": + case 'eu': + case 'europe': $this->setHost(self::REGION_EUROPE); + break; + default: case self::REGION_GLOBAL: - case "global": + case 'global': $this->setHost(self::REGION_GLOBAL); + break; } @@ -274,11 +284,12 @@ public function setRegion(?string $region = self::REGION_GLOBAL): self } /** - * Sets the user agent of the api client + * Sets the user agent of the api client. * * @param string $userAgent the user agent of the api client * * @return $this + * * @throws \InvalidArgumentException */ public function setUserAgent(string $userAgent): self @@ -288,11 +299,12 @@ public function setUserAgent(string $userAgent): self } $this->userAgent = $userAgent; + return $this; } /** - * Gets the user agent of the api client + * Gets the user agent of the api client. * * @return string user agent */ @@ -302,7 +314,7 @@ public function getUserAgent(): string } /** - * Sets debug flag + * Sets debug flag. * * @param bool $debug Debug flag * @@ -311,13 +323,12 @@ public function getUserAgent(): string public function setDebug(bool $debug): self { $this->debug = $debug; + return $this; } /** - * Gets the debug flag - * - * @return bool + * Gets the debug flag. */ public function getDebug(): bool { @@ -325,7 +336,7 @@ public function getDebug(): bool } /** - * Sets the debug file + * Sets the debug file. * * @param string $debugFile Debug file * @@ -334,13 +345,12 @@ public function getDebug(): bool public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; + return $this; } /** - * Gets the debug file - * - * @return string + * Gets the debug file. */ public function getDebugFile(): string { @@ -348,7 +358,7 @@ public function getDebugFile(): string } /** - * Sets the temp folder path + * Sets the temp folder path. * * @param string $tempFolderPath Temp folder path * @@ -357,11 +367,12 @@ public function getDebugFile(): string public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; + return $this; } /** - * Gets the temp folder path + * Gets the temp folder path. * * @return string Temp folder path */ @@ -371,15 +382,11 @@ public function getTempFolderPath(): string } /** - * Gets the default configuration instance, with apiKey and host params - * - * @param $api_key - * @param $region - * @return Configuration + * Gets the default configuration instance, with apiKey and host params. */ public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { - if (self::$defaultConfiguration === null) { + if (null === self::$defaultConfiguration) { self::$defaultConfiguration = new Configuration(); } @@ -390,11 +397,9 @@ public static function getDefaultConfiguration(?string $api_key = null, ?string } /** - * Sets the detault configuration instance + * Sets the detault configuration instance. * * @param Configuration $config An instance of the Configuration Object - * - * @return void */ public static function setDefaultConfiguration(Configuration $config): void { @@ -402,44 +407,44 @@ public static function setDefaultConfiguration(Configuration $config): void } /** - * Gets the essential information for debugging + * Gets the essential information for debugging. * * @return string The report for debugging */ public static function toDebugReport(): string { - $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 3' . PHP_EOL; - $report .= ' SDK Package Version: dev-5.0.0-1' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; + $report .= ' OS: '.php_uname().PHP_EOL; + $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; + $report .= ' OpenAPI Spec Version: 3'.PHP_EOL; + $report .= ' SDK Package Version: dev-5.0.0-1'.PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } /** - * Get API key (with prefix if set) + * Get API key (with prefix if set). * * @param string $apiKeyIdentifier name of apikey * - * @return string|null API key with the prefix + * @return null|string API key with the prefix */ public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); - if ($apiKey === null) { + if (null === $apiKey) { return null; } - if ($prefix === null) { + if (null === $prefix) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; + $keyWithPrefix = $prefix.' '.$apiKey; } return $keyWithPrefix; } -} \ No newline at end of file +} diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 047feb46..6e544e45 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -1,14 +1,16 @@ 'string', -'network' => 'string', -'name' => 'string' ]; + 'network' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'asn' => null, -'network' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'network' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'asn' => 'asn', -'network' => 'network', -'name' => 'name' ]; + 'network' => 'network', + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'asn' => 'setAsn', -'network' => 'setNetwork', -'name' => 'setName' ]; + 'network' => 'setNetwork', + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'asn' => 'getAsn', -'network' => 'getNetwork', -'name' => 'getName' ]; + 'network' => 'getNetwork', + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['network'] = isset($data['network']) ? $data['network'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -122,7 +157,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -130,7 +165,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -145,28 +180,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['network'] = isset($data['network']) ? $data['network'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -176,30 +189,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['asn'] === null) { + if (null === $this->container['asn']) { $invalidProperties[] = "'asn' can't be null"; } - if ($this->container['network'] === null) { + if (null === $this->container['network']) { $invalidProperties[] = "'network' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets asn - * @return string + * Gets asn. */ public function getAsn(): string { @@ -207,7 +219,7 @@ public function getAsn(): string } /** - * Sets asn + * Sets asn. * * @param string $asn asn * @@ -221,8 +233,7 @@ public function setAsn(string $asn): self } /** - * Gets network - * @return string + * Gets network. */ public function getNetwork(): string { @@ -230,7 +241,7 @@ public function getNetwork(): string } /** - * Sets network + * Sets network. * * @param string $network network * @@ -244,7 +255,8 @@ public function setNetwork(string $network): self } /** - * Gets name + * Gets name. + * * @return ?string */ public function getName(): ?string @@ -253,7 +265,7 @@ public function getName(): ?string } /** - * Sets name + * Sets name. * * @param ?string $name name * @@ -265,10 +277,11 @@ public function setName(?string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -278,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -288,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -303,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index a10a0694..27120931 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -1,14 +1,16 @@ 'string', -'type' => 'string' ]; + 'type' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'type' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'type' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'type' => 'type' ]; + 'type' => 'type']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'type' => 'setType' ]; + 'type' => 'setType']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'type' => 'getType' ]; + 'type' => 'getType']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -118,7 +157,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -126,7 +165,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -141,12 +180,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const RESULT_NOT_DETECTED = 'notDetected'; -const RESULT_GOOD = 'good'; -const RESULT_BAD = 'bad'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -154,27 +189,8 @@ public function getResultAllowableValues(): array { return [ self::RESULT_NOT_DETECTED, -self::RESULT_GOOD, -self::RESULT_BAD, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; + self::RESULT_GOOD, + self::RESULT_BAD, ]; } /** @@ -186,7 +202,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } $allowedValues = $this->getResultAllowableValues(); @@ -202,19 +218,17 @@ public function listInvalidProperties(): array /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return string + * Gets result. */ public function getResult(): string { @@ -222,7 +236,7 @@ public function getResult(): string } /** - * Sets result + * Sets result. * * @param string $result Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on * @@ -245,7 +259,8 @@ public function setResult(string $result): self } /** - * Gets type + * Gets type. + * * @return ?string */ public function getType(): ?string @@ -254,7 +269,7 @@ public function getType(): ?string } /** - * Sets type + * Sets type. * * @param ?string $type type * @@ -266,10 +281,11 @@ public function setType(?string $type): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -279,7 +295,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -289,8 +305,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -304,27 +320,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index fa60626e..178a37d2 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -1,14 +1,16 @@ 'string', -'time' => '\DateTime', -'url' => 'string', -'user_agent' => 'string', -'request_id' => 'string', -'linked_id' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'ip' => 'ipv4', -'time' => 'date-time', -'url' => null, -'user_agent' => null, -'request_id' => null, -'linked_id' => null, -'bot' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + 'time' => '\DateTime', + 'url' => 'string', + 'user_agent' => 'string', + 'request_id' => 'string', + 'linked_id' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'ip' => 'ipv4', + 'time' => 'date-time', + 'url' => null, + 'user_agent' => null, + 'request_id' => null, + 'linked_id' => null, + 'bot' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'ip' => 'ip', -'time' => 'time', -'url' => 'url', -'user_agent' => 'userAgent', -'request_id' => 'requestId', -'linked_id' => 'linkedId', -'bot' => 'bot' ]; + 'time' => 'time', + 'url' => 'url', + 'user_agent' => 'userAgent', + 'request_id' => 'requestId', + 'linked_id' => 'linkedId', + 'bot' => 'bot']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'ip' => 'setIp', -'time' => 'setTime', -'url' => 'setUrl', -'user_agent' => 'setUserAgent', -'request_id' => 'setRequestId', -'linked_id' => 'setLinkedId', -'bot' => 'setBot' ]; + 'time' => 'setTime', + 'url' => 'setUrl', + 'user_agent' => 'setUserAgent', + 'request_id' => 'setRequestId', + 'linked_id' => 'setLinkedId', + 'bot' => 'setBot']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'ip' => 'getIp', -'time' => 'getTime', -'url' => 'getUrl', -'user_agent' => 'getUserAgent', -'request_id' => 'getRequestId', -'linked_id' => 'getLinkedId', -'bot' => 'getBot' ]; + 'time' => 'getTime', + 'url' => 'getUrl', + 'user_agent' => 'getUserAgent', + 'request_id' => 'getRequestId', + 'linked_id' => 'getLinkedId', + 'bot' => 'getBot']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -143,7 +183,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -151,7 +191,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -166,32 +206,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -201,42 +215,41 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['bot'] === null) { + if (null === $this->container['bot']) { $invalidProperties[] = "'bot' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets ip - * @return string + * Gets ip. */ public function getIp(): string { @@ -244,9 +257,9 @@ public function getIp(): string } /** - * Sets ip + * Sets ip. * - * @param string $ip IP address of the requesting browser or bot. + * @param string $ip IP address of the requesting browser or bot * * @return $this */ @@ -258,8 +271,7 @@ public function setIp(string $ip): self } /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -267,7 +279,7 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * * @param \DateTime $time Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible * @@ -281,8 +293,7 @@ public function setTime(\DateTime $time): self } /** - * Gets url - * @return string + * Gets url. */ public function getUrl(): string { @@ -290,9 +301,9 @@ public function getUrl(): string } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which identification request was sent. + * @param string $url page URL from which identification request was sent * * @return $this */ @@ -304,8 +315,7 @@ public function setUrl(string $url): self } /** - * Gets user_agent - * @return string + * Gets user_agent. */ public function getUserAgent(): string { @@ -313,7 +323,7 @@ public function getUserAgent(): string } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -327,8 +337,7 @@ public function setUserAgent(string $user_agent): self } /** - * Gets request_id - * @return string + * Gets request_id. */ public function getRequestId(): string { @@ -336,7 +345,7 @@ public function getRequestId(): string } /** - * Sets request_id + * Sets request_id. * * @param string $request_id request_id * @@ -350,7 +359,8 @@ public function setRequestId(string $request_id): self } /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -359,7 +369,7 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * * @param ?string $linked_id linked_id * @@ -373,31 +383,31 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets bot - * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult + * Gets bot. */ - public function getBot(): \Fingerprint\ServerAPI\Model\BotdDetectionResult + public function getBot(): BotdDetectionResult { return $this->container['bot']; } /** - * Sets bot + * Sets bot. * - * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot + * @param BotdDetectionResult $bot bot * * @return $this */ - public function setBot(\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot): self + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -407,7 +417,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -417,8 +427,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -432,27 +442,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index cdfa5fa6..d04d9bc8 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -1,14 +1,16 @@ 'string', -'browser_major_version' => 'string', -'browser_full_version' => 'string', -'os' => 'string', -'os_version' => 'string', -'device' => 'string', -'user_agent' => 'string', -'bot_probability' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'browser_name' => null, -'browser_major_version' => null, -'browser_full_version' => null, -'os' => null, -'os_version' => null, -'device' => null, -'user_agent' => null, -'bot_probability' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + 'browser_major_version' => 'string', + 'browser_full_version' => 'string', + 'os' => 'string', + 'os_version' => 'string', + 'device' => 'string', + 'user_agent' => 'string', + 'bot_probability' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'browser_name' => null, + 'browser_major_version' => null, + 'browser_full_version' => null, + 'os' => null, + 'os_version' => null, + 'device' => null, + 'user_agent' => null, + 'bot_probability' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'browser_name' => 'browserName', -'browser_major_version' => 'browserMajorVersion', -'browser_full_version' => 'browserFullVersion', -'os' => 'os', -'os_version' => 'osVersion', -'device' => 'device', -'user_agent' => 'userAgent', -'bot_probability' => 'botProbability' ]; + 'browser_major_version' => 'browserMajorVersion', + 'browser_full_version' => 'browserFullVersion', + 'os' => 'os', + 'os_version' => 'osVersion', + 'device' => 'device', + 'user_agent' => 'userAgent', + 'bot_probability' => 'botProbability']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'browser_name' => 'setBrowserName', -'browser_major_version' => 'setBrowserMajorVersion', -'browser_full_version' => 'setBrowserFullVersion', -'os' => 'setOs', -'os_version' => 'setOsVersion', -'device' => 'setDevice', -'user_agent' => 'setUserAgent', -'bot_probability' => 'setBotProbability' ]; + 'browser_major_version' => 'setBrowserMajorVersion', + 'browser_full_version' => 'setBrowserFullVersion', + 'os' => 'setOs', + 'os_version' => 'setOsVersion', + 'device' => 'setDevice', + 'user_agent' => 'setUserAgent', + 'bot_probability' => 'setBotProbability']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'browser_name' => 'getBrowserName', -'browser_major_version' => 'getBrowserMajorVersion', -'browser_full_version' => 'getBrowserFullVersion', -'os' => 'getOs', -'os_version' => 'getOsVersion', -'device' => 'getDevice', -'user_agent' => 'getUserAgent', -'bot_probability' => 'getBotProbability' ]; + 'browser_major_version' => 'getBrowserMajorVersion', + 'browser_full_version' => 'getBrowserFullVersion', + 'os' => 'getOs', + 'os_version' => 'getOsVersion', + 'device' => 'getDevice', + 'user_agent' => 'getUserAgent', + 'bot_probability' => 'getBotProbability']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; + $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; + $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; + $this->container['os'] = isset($data['os']) ? $data['os'] : null; + $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; + $this->container['device'] = isset($data['device']) ? $data['device'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -147,7 +187,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -155,7 +195,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -170,33 +210,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; - $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; - $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; - $this->container['os'] = isset($data['os']) ? $data['os'] : null; - $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; - $this->container['device'] = isset($data['device']) ? $data['device'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -206,45 +219,44 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['browser_name'] === null) { + if (null === $this->container['browser_name']) { $invalidProperties[] = "'browser_name' can't be null"; } - if ($this->container['browser_major_version'] === null) { + if (null === $this->container['browser_major_version']) { $invalidProperties[] = "'browser_major_version' can't be null"; } - if ($this->container['browser_full_version'] === null) { + if (null === $this->container['browser_full_version']) { $invalidProperties[] = "'browser_full_version' can't be null"; } - if ($this->container['os'] === null) { + if (null === $this->container['os']) { $invalidProperties[] = "'os' can't be null"; } - if ($this->container['os_version'] === null) { + if (null === $this->container['os_version']) { $invalidProperties[] = "'os_version' can't be null"; } - if ($this->container['device'] === null) { + if (null === $this->container['device']) { $invalidProperties[] = "'device' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets browser_name - * @return string + * Gets browser_name. */ public function getBrowserName(): string { @@ -252,7 +264,7 @@ public function getBrowserName(): string } /** - * Sets browser_name + * Sets browser_name. * * @param string $browser_name browser_name * @@ -266,8 +278,7 @@ public function setBrowserName(string $browser_name): self } /** - * Gets browser_major_version - * @return string + * Gets browser_major_version. */ public function getBrowserMajorVersion(): string { @@ -275,7 +286,7 @@ public function getBrowserMajorVersion(): string } /** - * Sets browser_major_version + * Sets browser_major_version. * * @param string $browser_major_version browser_major_version * @@ -289,8 +300,7 @@ public function setBrowserMajorVersion(string $browser_major_version): self } /** - * Gets browser_full_version - * @return string + * Gets browser_full_version. */ public function getBrowserFullVersion(): string { @@ -298,7 +308,7 @@ public function getBrowserFullVersion(): string } /** - * Sets browser_full_version + * Sets browser_full_version. * * @param string $browser_full_version browser_full_version * @@ -312,8 +322,7 @@ public function setBrowserFullVersion(string $browser_full_version): self } /** - * Gets os - * @return string + * Gets os. */ public function getOs(): string { @@ -321,7 +330,7 @@ public function getOs(): string } /** - * Sets os + * Sets os. * * @param string $os os * @@ -335,8 +344,7 @@ public function setOs(string $os): self } /** - * Gets os_version - * @return string + * Gets os_version. */ public function getOsVersion(): string { @@ -344,7 +352,7 @@ public function getOsVersion(): string } /** - * Sets os_version + * Sets os_version. * * @param string $os_version os_version * @@ -358,8 +366,7 @@ public function setOsVersion(string $os_version): self } /** - * Gets device - * @return string + * Gets device. */ public function getDevice(): string { @@ -367,7 +374,7 @@ public function getDevice(): string } /** - * Sets device + * Sets device. * * @param string $device device * @@ -381,8 +388,7 @@ public function setDevice(string $device): self } /** - * Gets user_agent - * @return string + * Gets user_agent. */ public function getUserAgent(): string { @@ -390,7 +396,7 @@ public function getUserAgent(): string } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -404,7 +410,8 @@ public function setUserAgent(string $user_agent): self } /** - * Gets bot_probability + * Gets bot_probability. + * * @return ?int */ public function getBotProbability(): ?int @@ -413,7 +420,7 @@ public function getBotProbability(): ?int } /** - * Sets bot_probability + * Sets bot_probability. * * @param ?int $bot_probability bot_probability * @@ -425,10 +432,11 @@ public function setBotProbability(?int $bot_probability): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -438,7 +446,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -448,8 +456,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -463,27 +471,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index c8fe6616..61fd7c2d 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result Android specific cloned application detection. There are 2 values: • `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). • `false` - No signs of cloned application detected or the client is not Android. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Common403ErrorResponse.php b/src/Model/Common403ErrorResponse.php index d6eb6180..f8e5fd06 100644 --- a/src/Model/Common403ErrorResponse.php +++ b/src/Model/Common403ErrorResponse.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +157,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +165,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,14 +180,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_TOKEN_REQUIRED = 'TokenRequired'; -const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; -const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; -const CODE_WRONG_REGION = 'WrongRegion'; -const CODE_FEATURE_NOT_ENABLED = 'FeatureNotEnabled'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -155,29 +189,10 @@ public function getCodeAllowableValues(): array { return [ self::CODE_TOKEN_REQUIRED, -self::CODE_TOKEN_NOT_FOUND, -self::CODE_SUBSCRIPTION_NOT_ACTIVE, -self::CODE_WRONG_REGION, -self::CODE_FEATURE_NOT_ENABLED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_TOKEN_NOT_FOUND, + self::CODE_SUBSCRIPTION_NOT_ACTIVE, + self::CODE_WRONG_REGION, + self::CODE_FEATURE_NOT_ENABLED, ]; } /** @@ -189,7 +204,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -200,27 +215,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -228,7 +242,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - No Fingerprint application found for specified secret key * `SubscriptionNotActive` - Fingerprint application is not active * `WrongRegion` - server and application region differ * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application * @@ -251,8 +265,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -260,7 +273,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -272,10 +285,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -285,7 +299,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -295,8 +309,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -310,27 +324,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index aaf47b96..9aeb20db 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -1,14 +1,16 @@ 'float', -'revision' => 'string' ]; + 'revision' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'score' => 'float', -'revision' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'revision' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'score' => 'score', -'revision' => 'revision' ]; + 'revision' => 'revision']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'score' => 'setScore', -'revision' => 'setRevision' ]; + 'revision' => 'setRevision']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'score' => 'getScore', -'revision' => 'getRevision' ]; + 'revision' => 'getRevision']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['score'] = isset($data['score']) ? $data['score'] : null; + $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['score'] = isset($data['score']) ? $data['score'] : null; - $this->container['revision'] = isset($data['revision']) ? $data['revision'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,27 +183,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['score'] === null) { + if (null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets score - * @return float + * Gets score. */ public function getScore(): float { @@ -198,9 +210,9 @@ public function getScore(): float } /** - * Sets score + * Sets score. * - * @param float $score The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. + * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification * * @return $this */ @@ -212,7 +224,8 @@ public function setScore(float $score): self } /** - * Gets revision + * Gets revision. + * * @return ?string */ public function getRevision(): ?string @@ -221,7 +234,7 @@ public function getRevision(): ?string } /** - * Sets revision + * Sets revision. * * @param ?string $revision The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. * @@ -233,10 +246,11 @@ public function setRevision(?string $revision): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -246,7 +260,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -256,8 +270,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -271,27 +285,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 1030a02d..1b8c9294 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -1,14 +1,16 @@ 'bool', -'name' => 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,27 +183,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -198,7 +210,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result result * @@ -212,7 +224,8 @@ public function setResult(bool $result): self } /** - * Gets name + * Gets name. + * * @return ?string */ public function getName(): ?string @@ -221,7 +234,7 @@ public function getName(): ?string } /** - * Sets name + * Sets name. * * @param ?string $name name * @@ -233,10 +246,11 @@ public function setName(?string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -246,7 +260,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -256,8 +270,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -271,27 +285,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index af591b58..9739584c 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -1,14 +1,16 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -153,7 +195,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -161,7 +203,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -176,34 +218,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -211,25 +225,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. + * * @return ?int */ public function getAccuracyRadius(): ?int @@ -238,9 +250,9 @@ public function getAccuracyRadius(): ?int } /** - * Sets accuracy_radius + * Sets accuracy_radius. * - * @param ?int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -252,7 +264,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self } /** - * Gets latitude + * Gets latitude. + * * @return ?double */ public function getLatitude(): ?float @@ -261,7 +274,7 @@ public function getLatitude(): ?float } /** - * Sets latitude + * Sets latitude. * * @param ?double $latitude latitude * @@ -275,7 +288,8 @@ public function setLatitude(?float $latitude): self } /** - * Gets longitude + * Gets longitude. + * * @return ?double */ public function getLongitude(): ?float @@ -284,7 +298,7 @@ public function getLongitude(): ?float } /** - * Sets longitude + * Sets longitude. * * @param ?double $longitude longitude * @@ -298,7 +312,8 @@ public function setLongitude(?float $longitude): self } /** - * Gets postal_code + * Gets postal_code. + * * @return ?string */ public function getPostalCode(): ?string @@ -307,7 +322,7 @@ public function getPostalCode(): ?string } /** - * Sets postal_code + * Sets postal_code. * * @param ?string $postal_code postal_code * @@ -321,7 +336,8 @@ public function setPostalCode(?string $postal_code): self } /** - * Gets timezone + * Gets timezone. + * * @return ?string */ public function getTimezone(): ?string @@ -330,7 +346,7 @@ public function getTimezone(): ?string } /** - * Sets timezone + * Sets timezone. * * @param ?string $timezone timezone * @@ -344,22 +360,23 @@ public function setTimezone(?string $timezone): self } /** - * Gets city + * Gets city. + * * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity */ - public function getCity(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity + public function getCity(): ?DeprecatedIPLocationCity { return $this->container['city']; } /** - * Sets city + * Sets city. * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city * * @return $this */ - public function setCity(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city): self + public function setCity(?DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -367,22 +384,23 @@ public function setCity(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $ } /** - * Gets country + * Gets country. + * * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry(): ?\Fingerprint\ServerAPI\Model\Location + public function getCountry(): ?Location { return $this->container['country']; } /** - * Sets country + * Sets country. * * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -390,22 +408,23 @@ public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): sel } /** - * Gets continent + * Gets continent. + * * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent(): ?\Fingerprint\ServerAPI\Model\Location + public function getContinent(): ?Location { return $this->container['continent']; } /** - * Sets continent + * Sets continent. * * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -413,7 +432,8 @@ public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): } /** - * Gets subdivisions + * Gets subdivisions. + * * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array @@ -422,7 +442,7 @@ public function getSubdivisions(): ?array } /** - * Sets subdivisions + * Sets subdivisions. * * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -434,10 +454,11 @@ public function setSubdivisions(?array $subdivisions): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -447,7 +468,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -457,8 +478,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -472,27 +493,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 97c9f39d..fdffb4e1 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -1,14 +1,16 @@ 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,25 +175,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. + * * @return ?string */ public function getName(): ?string @@ -189,7 +200,7 @@ public function getName(): ?string } /** - * Sets name + * Sets name. * * @param ?string $name name * @@ -201,10 +212,11 @@ public function setName(?string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeveloperToolsResult.php b/src/Model/DeveloperToolsResult.php index 6342ba3d..2047bf72 100644 --- a/src/Model/DeveloperToolsResult.php +++ b/src/Model/DeveloperToolsResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,9 +204,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. + * @param bool $result `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise * * @return $this */ @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 9e48be6a..0a4398fd 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected or the client is not Android. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorCommon403Response.php b/src/Model/ErrorCommon403Response.php index ae7cf089..1afa5e6e 100644 --- a/src/Model/ErrorCommon403Response.php +++ b/src/Model/ErrorCommon403Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\Common403ErrorResponse' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\Common403ErrorResponse']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse */ - public function getError(): ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse + public function getError(): ?Common403ErrorResponse { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\Common403ErrorResponse $error): self + public function setError(?Common403ErrorResponse $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorCommon429Response.php b/src/Model/ErrorCommon429Response.php index d8a8849b..d2dc070d 100644 --- a/src/Model/ErrorCommon429Response.php +++ b/src/Model/ErrorCommon429Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError + public function getError(): ?ErrorCommon429ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError $error): self + public function setError(?ErrorCommon429ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorCommon429ResponseError.php b/src/Model/ErrorCommon429ResponseError.php index 2c0876f3..f214c931 100644 --- a/src/Model/ErrorCommon429ResponseError.php +++ b/src/Model/ErrorCommon429ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,10 +176,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -153,25 +187,6 @@ public function getCodeAllowableValues(): array self::CODE_TOO_MANY_REQUESTS, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,7 +196,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -192,27 +207,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -220,9 +234,9 @@ public function getCode(): string } /** - * Sets code + * Sets code. * - * @param string $code Error code: * `TooManyRequests` - The request is throttled. + * @param string $code error code: * `TooManyRequests` - The request is throttled * * @return $this */ @@ -243,8 +257,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -252,7 +265,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -264,10 +277,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -277,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -287,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -302,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 15bee5ac..b03ce283 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError + public function getError(): ?ErrorEvent404ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error): self + public function setError(?ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index e661426b..0337f0bd 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,10 +176,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -153,25 +187,6 @@ public function getCodeAllowableValues(): array self::CODE_REQUEST_NOT_FOUND, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,7 +196,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -192,27 +207,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -220,7 +234,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. * @@ -243,8 +257,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -252,7 +265,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -264,10 +277,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -277,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -287,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -302,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorUpdateEvent400Response.php b/src/Model/ErrorUpdateEvent400Response.php index 60fe57f8..06737e39 100644 --- a/src/Model/ErrorUpdateEvent400Response.php +++ b/src/Model/ErrorUpdateEvent400Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError + public function getError(): ?ErrorUpdateEvent400ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError $error): self + public function setError(?ErrorUpdateEvent400ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorUpdateEvent400ResponseError.php b/src/Model/ErrorUpdateEvent400ResponseError.php index f925dc06..ec5eedb8 100644 --- a/src/Model/ErrorUpdateEvent400ResponseError.php +++ b/src/Model/ErrorUpdateEvent400ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +154,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +162,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,11 +177,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_REQUEST_CANNOT_BE_PARSED = 'RequestCannotBeParsed'; -const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -152,26 +186,7 @@ public function getCodeAllowableValues(): array { return [ self::CODE_REQUEST_CANNOT_BE_PARSED, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -183,7 +198,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -194,27 +209,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -222,7 +236,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `RequestCannotBeParsed` - the JSON content of the request contains some errors that prevented us from parsing it (wrong type/surpassed limits) * `Failed` - the event is more than 10 days old and cannot be updated * @@ -245,8 +259,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -254,7 +267,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message Details about the underlying issue with the input payload * @@ -266,10 +279,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -279,7 +293,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -289,8 +303,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -304,27 +318,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorUpdateEvent409Response.php b/src/Model/ErrorUpdateEvent409Response.php index da9fa971..5e1a0590 100644 --- a/src/Model/ErrorUpdateEvent409Response.php +++ b/src/Model/ErrorUpdateEvent409Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError + public function getError(): ?ErrorUpdateEvent409ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError $error): self + public function setError(?ErrorUpdateEvent409ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorUpdateEvent409ResponseError.php b/src/Model/ErrorUpdateEvent409ResponseError.php index b4751b36..7104bb91 100644 --- a/src/Model/ErrorUpdateEvent409ResponseError.php +++ b/src/Model/ErrorUpdateEvent409ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,10 +176,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_STATE_NOT_READY = 'StateNotReady'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -153,25 +187,6 @@ public function getCodeAllowableValues(): array self::CODE_STATE_NOT_READY, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,7 +196,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -192,27 +207,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -220,7 +234,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `StateNotReady` - The event specified with request id is not ready for updates yet. Try again. This error happens in rare cases when update API is called immediately after receiving the request id on the client. In case you need to send information right away, we recommend using the JS agent API instead. * @@ -243,8 +257,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -252,7 +265,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -264,10 +277,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -277,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -287,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -302,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisitor400Response.php b/src/Model/ErrorVisitor400Response.php index 512678d4..8add5b42 100644 --- a/src/Model/ErrorVisitor400Response.php +++ b/src/Model/ErrorVisitor400Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError + public function getError(): ?ErrorVisitor400ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError $error): self + public function setError(?ErrorVisitor400ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisitor400ResponseError.php b/src/Model/ErrorVisitor400ResponseError.php index 54b82983..f3a7511d 100644 --- a/src/Model/ErrorVisitor400ResponseError.php +++ b/src/Model/ErrorVisitor400ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,10 +176,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_REQUEST_CANNOT_BE_PARSED = 'RequestCannotBeParsed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -153,25 +187,6 @@ public function getCodeAllowableValues(): array self::CODE_REQUEST_CANNOT_BE_PARSED, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,7 +196,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -192,27 +207,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -220,9 +234,9 @@ public function getCode(): string } /** - * Sets code + * Sets code. * - * @param string $code Error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format. + * @param string $code error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format * * @return $this */ @@ -243,8 +257,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -252,7 +265,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -264,10 +277,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -277,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -287,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -302,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisitor404Response.php b/src/Model/ErrorVisitor404Response.php index d158162e..d0eac080 100644 --- a/src/Model/ErrorVisitor404Response.php +++ b/src/Model/ErrorVisitor404Response.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => '\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError + public function getError(): ?ErrorVisitor404ResponseError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError $error): self + public function setError(?ErrorVisitor404ResponseError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisitor404ResponseError.php b/src/Model/ErrorVisitor404ResponseError.php index 760519e8..6365d384 100644 --- a/src/Model/ErrorVisitor404ResponseError.php +++ b/src/Model/ErrorVisitor404ResponseError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,10 +176,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_VISITOR_NOT_FOUND = 'VisitorNotFound'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -153,25 +187,6 @@ public function getCodeAllowableValues(): array self::CODE_VISITOR_NOT_FOUND, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,7 +196,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -192,27 +207,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -220,7 +234,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. * @@ -243,8 +257,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -252,7 +265,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -264,10 +277,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -277,7 +291,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -287,8 +301,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -302,27 +316,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index c1456afa..297998f3 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -1,14 +1,16 @@ 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error - * @return string + * Gets error. */ public function getError(): string { @@ -192,9 +204,9 @@ public function getError(): string } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -204,10 +216,11 @@ public function setError(string $error): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 281763ee..ee5b3fbe 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponse', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'products' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'products' => 'products', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'products' => 'setProducts', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'products' => 'getProducts', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -118,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -126,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -141,27 +176,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['products'] = isset($data['products']) ? $data['products'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -171,41 +185,40 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['products'] === null) { + if (null === $this->container['products']) { $invalidProperties[] = "'products' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets products - * @return \Fingerprint\ServerAPI\Model\ProductsResponse + * Gets products. */ - public function getProducts(): \Fingerprint\ServerAPI\Model\ProductsResponse + public function getProducts(): ProductsResponse { return $this->container['products']; } /** - * Sets products + * Sets products. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products + * @param ProductsResponse $products products * * @return $this */ - public function setProducts(\Fingerprint\ServerAPI\Model\ProductsResponse $products): self + public function setProducts(ProductsResponse $products): self { $this->container['products'] = $products; @@ -213,31 +226,33 @@ public function setProducts(\Fingerprint\ServerAPI\Model\ProductsResponse $produ } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -247,7 +262,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -257,8 +272,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -272,27 +287,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EventUpdateRequest.php b/src/Model/EventUpdateRequest.php index ce14cc6a..ebcd6941 100644 --- a/src/Model/EventUpdateRequest.php +++ b/src/Model/EventUpdateRequest.php @@ -1,14 +1,16 @@ 'string', -'tag' => 'object', -'suspect' => 'bool' ]; + 'tag' => 'object', + 'suspect' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'linked_id' => null, -'tag' => null, -'suspect' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'tag' => null, + 'suspect' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'linked_id' => 'linkedId', -'tag' => 'tag', -'suspect' => 'suspect' ]; + 'tag' => 'tag', + 'suspect' => 'suspect']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'linked_id' => 'setLinkedId', -'tag' => 'setTag', -'suspect' => 'setSuspect' ]; + 'tag' => 'setTag', + 'suspect' => 'setSuspect']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'linked_id' => 'getLinkedId', -'tag' => 'getTag', -'suspect' => 'getSuspect' ]; + 'tag' => 'getTag', + 'suspect' => 'getSuspect']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -122,7 +157,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -130,7 +165,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -145,28 +180,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -174,25 +187,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -201,7 +212,7 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * * @param ?string $linked_id LinkedID value to assign to the existing event * @@ -215,7 +226,8 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets tag + * Gets tag. + * * @return ?object */ public function getTag(): ?object @@ -224,7 +236,7 @@ public function getTag(): ?object } /** - * Sets tag + * Sets tag. * * @param ?object $tag Full `tag` value to be set to the existing event. Replaces any existing `tag` payload completely. * @@ -238,7 +250,8 @@ public function setTag(?object $tag): self } /** - * Gets suspect + * Gets suspect. + * * @return ?bool */ public function getSuspect(): ?bool @@ -247,7 +260,7 @@ public function getSuspect(): ?bool } /** - * Sets suspect + * Sets suspect. * * @param ?bool $suspect Suspect flag indicating observed suspicious or fraudulent event * @@ -259,10 +272,11 @@ public function setSuspect(?bool $suspect): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -272,7 +286,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -282,8 +296,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -297,27 +311,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index d055ab72..8d6872fa 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -1,14 +1,16 @@ '\DateTime', -'timestamp' => 'int' ]; + 'timestamp' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'time' => 'date-time', -'timestamp' => 'int64' ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'timestamp' => 'int64']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'time' => 'time', -'timestamp' => 'timestamp' ]; + 'timestamp' => 'timestamp']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'time' => 'setTime', -'timestamp' => 'setTimestamp' ]; + 'timestamp' => 'setTimestamp']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'time' => 'getTime', -'timestamp' => 'getTimestamp' ]; + 'timestamp' => 'getTimestamp']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -201,7 +213,7 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * * @param \DateTime $time Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. * @@ -215,8 +227,7 @@ public function setTime(\DateTime $time): self } /** - * Gets timestamp - * @return int + * Gets timestamp. */ public function getTimestamp(): int { @@ -224,7 +235,7 @@ public function getTimestamp(): int } /** - * Sets timestamp + * Sets timestamp. * * @param int $timestamp This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. * @@ -236,10 +247,11 @@ public function setTimestamp(int $timestamp): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 639f1c72..ad511bad 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: • `true` - Frida detected • `false` - No signs of Frida or the client is not a mobile device. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index cb7d57d5..20879925 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -1,14 +1,16 @@ 'bool', -'daily_requests' => 'float' ]; + 'daily_requests' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'daily_requests' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'daily_requests' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'daily_requests' => 'dailyRequests' ]; + 'daily_requests' => 'dailyRequests']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'daily_requests' => 'setDailyRequests' ]; + 'daily_requests' => 'setDailyRequests']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'daily_requests' => 'getDailyRequests' ]; + 'daily_requests' => 'getDailyRequests']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,27 +183,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -198,9 +210,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a high activity visitor. + * @param bool $result flag indicating whether the request came from a high activity visitor * * @return $this */ @@ -212,7 +224,8 @@ public function setResult(bool $result): self } /** - * Gets daily_requests + * Gets daily_requests. + * * @return ?float */ public function getDailyRequests(): ?float @@ -221,9 +234,9 @@ public function getDailyRequests(): ?float } /** - * Sets daily_requests + * Sets daily_requests. * - * @param ?float $daily_requests Number of requests from the same visitor in the previous day. + * @param ?float $daily_requests number of requests from the same visitor in the previous day * * @return $this */ @@ -233,10 +246,11 @@ public function setDailyRequests(?float $daily_requests): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -246,7 +260,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -256,8 +270,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -271,27 +285,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 04335f39..6f769e05 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -1,14 +1,16 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -152,7 +193,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -160,7 +201,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -175,34 +216,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -210,25 +223,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. + * * @return ?int */ public function getAccuracyRadius(): ?int @@ -237,9 +248,9 @@ public function getAccuracyRadius(): ?int } /** - * Sets accuracy_radius + * Sets accuracy_radius. * - * @param ?int $accuracy_radius The IP address is likely to be within this radius (in km) of the specified location. + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -251,7 +262,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self } /** - * Gets latitude + * Gets latitude. + * * @return ?double */ public function getLatitude(): ?float @@ -260,7 +272,7 @@ public function getLatitude(): ?float } /** - * Sets latitude + * Sets latitude. * * @param ?double $latitude latitude * @@ -274,7 +286,8 @@ public function setLatitude(?float $latitude): self } /** - * Gets longitude + * Gets longitude. + * * @return ?double */ public function getLongitude(): ?float @@ -283,7 +296,7 @@ public function getLongitude(): ?float } /** - * Sets longitude + * Sets longitude. * * @param ?double $longitude longitude * @@ -297,7 +310,8 @@ public function setLongitude(?float $longitude): self } /** - * Gets postal_code + * Gets postal_code. + * * @return ?string */ public function getPostalCode(): ?string @@ -306,7 +320,7 @@ public function getPostalCode(): ?string } /** - * Sets postal_code + * Sets postal_code. * * @param ?string $postal_code postal_code * @@ -320,7 +334,8 @@ public function setPostalCode(?string $postal_code): self } /** - * Gets timezone + * Gets timezone. + * * @return ?string */ public function getTimezone(): ?string @@ -329,7 +344,7 @@ public function getTimezone(): ?string } /** - * Sets timezone + * Sets timezone. * * @param ?string $timezone timezone * @@ -343,22 +358,23 @@ public function setTimezone(?string $timezone): self } /** - * Gets city + * Gets city. + * * @return ?\Fingerprint\ServerAPI\Model\IPLocationCity */ - public function getCity(): ?\Fingerprint\ServerAPI\Model\IPLocationCity + public function getCity(): ?IPLocationCity { return $this->container['city']; } /** - * Sets city + * Sets city. * * @param ?\Fingerprint\ServerAPI\Model\IPLocationCity $city city * * @return $this */ - public function setCity(?\Fingerprint\ServerAPI\Model\IPLocationCity $city): self + public function setCity(?IPLocationCity $city): self { $this->container['city'] = $city; @@ -366,22 +382,23 @@ public function setCity(?\Fingerprint\ServerAPI\Model\IPLocationCity $city): sel } /** - * Gets country + * Gets country. + * * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry(): ?\Fingerprint\ServerAPI\Model\Location + public function getCountry(): ?Location { return $this->container['country']; } /** - * Sets country + * Sets country. * * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -389,22 +406,23 @@ public function setCountry(?\Fingerprint\ServerAPI\Model\Location $country): sel } /** - * Gets continent + * Gets continent. + * * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent(): ?\Fingerprint\ServerAPI\Model\Location + public function getContinent(): ?Location { return $this->container['continent']; } /** - * Sets continent + * Sets continent. * * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -412,7 +430,8 @@ public function setContinent(?\Fingerprint\ServerAPI\Model\Location $continent): } /** - * Gets subdivisions + * Gets subdivisions. + * * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array @@ -421,7 +440,7 @@ public function getSubdivisions(): ?array } /** - * Sets subdivisions + * Sets subdivisions. * * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -433,10 +452,11 @@ public function setSubdivisions(?array $subdivisions): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -446,7 +466,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -456,8 +476,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -471,27 +491,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 483126fd..c0637bf3 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -1,14 +1,16 @@ 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,25 +175,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. + * * @return ?string */ public function getName(): ?string @@ -189,7 +200,7 @@ public function getName(): ?string } /** - * Sets name + * Sets name. * * @param ?string $name name * @@ -201,10 +212,11 @@ public function setName(?string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 6756d091..c8890cc4 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +154,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +162,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,11 +177,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; -const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -152,26 +186,7 @@ public function getCodeAllowableValues(): array { return [ self::CODE__429_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -183,7 +198,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -194,27 +209,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -222,7 +236,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -245,8 +259,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -254,7 +267,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -266,10 +279,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -279,7 +293,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -289,8 +303,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -304,27 +318,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index f162b8f7..6299cc93 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,9 +204,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise. + * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise * * @return $this */ @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 0a5308d6..c6131829 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -1,14 +1,16 @@ 'bool', -'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails' ]; + 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'details' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'details' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'details' => 'details' ]; + 'details' => 'details']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'details' => 'setDetails' ]; + 'details' => 'setDetails']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'details' => 'getDetails' ]; + 'details' => 'getDetails']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['details'] = isset($data['details']) ? $data['details'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['details'] === null) { + if (null === $this->container['details']) { $invalidProperties[] = "'details' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -201,9 +213,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. + * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise * * @return $this */ @@ -215,31 +227,31 @@ public function setResult(bool $result): self } /** - * Gets details - * @return \Fingerprint\ServerAPI\Model\IpBlockListResultDetails + * Gets details. */ - public function getDetails(): \Fingerprint\ServerAPI\Model\IpBlockListResultDetails + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } /** - * Sets details + * Sets details. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details details + * @param IpBlockListResultDetails $details details * * @return $this */ - public function setDetails(\Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details): self + public function setDetails(IpBlockListResultDetails $details): self { $this->container['details'] = $details; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 572299c8..0695fbc1 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -1,14 +1,16 @@ 'bool', -'attack_source' => 'bool' ]; + 'attack_source' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'email_spam' => null, -'attack_source' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'attack_source' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'email_spam' => 'emailSpam', -'attack_source' => 'attackSource' ]; + 'attack_source' => 'attackSource']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'email_spam' => 'setEmailSpam', -'attack_source' => 'setAttackSource' ]; + 'attack_source' => 'setAttackSource']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'email_spam' => 'getEmailSpam', -'attack_source' => 'getAttackSource' ]; + 'attack_source' => 'getAttackSource']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; + $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; - $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['email_spam'] === null) { + if (null === $this->container['email_spam']) { $invalidProperties[] = "'email_spam' can't be null"; } - if ($this->container['attack_source'] === null) { + if (null === $this->container['attack_source']) { $invalidProperties[] = "'attack_source' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets email_spam - * @return bool + * Gets email_spam. */ public function getEmailSpam(): bool { @@ -201,9 +213,9 @@ public function getEmailSpam(): bool } /** - * Sets email_spam + * Sets email_spam. * - * @param bool $email_spam IP address was part of a known email spam attack (SMTP). + * @param bool $email_spam IP address was part of a known email spam attack (SMTP) * * @return $this */ @@ -215,8 +227,7 @@ public function setEmailSpam(bool $email_spam): self } /** - * Gets attack_source - * @return bool + * Gets attack_source. */ public function getAttackSource(): bool { @@ -224,9 +235,9 @@ public function getAttackSource(): bool } /** - * Sets attack_source + * Sets attack_source. * - * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS). + * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS) * * @return $this */ @@ -236,10 +247,11 @@ public function setAttackSource(bool $attack_source): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index d67942e8..2a6a7d98 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpInfoResultV4', -'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6' ]; + 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'v4' => null, -'v6' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'v6' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'v4' => 'v4', -'v6' => 'v6' ]; + 'v6' => 'v6']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'v4' => 'setV4', -'v6' => 'setV6' ]; + 'v6' => 'setV6']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'v4' => 'getV4', -'v6' => 'getV6' ]; + 'v6' => 'getV6']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; + $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -118,7 +153,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -126,7 +161,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -141,27 +176,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; - $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -169,40 +183,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets v4 + * Gets v4. + * * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 */ - public function getV4(): ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 + public function getV4(): ?IpInfoResultV4 { return $this->container['v4']; } /** - * Sets v4 + * Sets v4. * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 * * @return $this */ - public function setV4(?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4): self + public function setV4(?IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -210,31 +222,33 @@ public function setV4(?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4): self } /** - * Gets v6 + * Gets v6. + * * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 */ - public function getV6(): ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 + public function getV6(): ?IpInfoResultV6 { return $this->container['v6']; } /** - * Sets v6 + * Sets v6. * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 * * @return $this */ - public function setV6(?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6): self + public function setV6(?IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -244,7 +258,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -254,8 +268,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -269,27 +283,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 2b1613c0..8a2f36d3 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -1,14 +1,16 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'address' => 'ipv4', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -127,7 +163,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -135,7 +171,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -150,29 +186,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -182,30 +195,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address - * @return string + * Gets address. */ public function getAddress(): string { @@ -213,7 +225,7 @@ public function getAddress(): string } /** - * Sets address + * Sets address. * * @param string $address address * @@ -227,22 +239,21 @@ public function setAddress(string $address): self } /** - * Gets geolocation - * @return \Fingerprint\ServerAPI\Model\IPLocation + * Gets geolocation. */ - public function getGeolocation(): \Fingerprint\ServerAPI\Model\IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ - public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -250,22 +261,23 @@ public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocat } /** - * Gets asn + * Gets asn. + * * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn(): ?\Fingerprint\ServerAPI\Model\ASN + public function getAsn(): ?ASN { return $this->container['asn']; } /** - * Sets asn + * Sets asn. * * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -273,31 +285,33 @@ public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self } /** - * Gets datacenter + * Gets datacenter. + * * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter(): ?\Fingerprint\ServerAPI\Model\DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } /** - * Sets datacenter + * Sets datacenter. * * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter(?\Fingerprint\ServerAPI\Model\DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -307,7 +321,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -317,8 +331,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -332,27 +346,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index a4778893..0774ae9c 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -1,14 +1,16 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'address' => 'ipv6', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -127,7 +163,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -135,7 +171,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -150,29 +186,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -182,30 +195,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address - * @return string + * Gets address. */ public function getAddress(): string { @@ -213,7 +225,7 @@ public function getAddress(): string } /** - * Sets address + * Sets address. * * @param string $address address * @@ -227,22 +239,21 @@ public function setAddress(string $address): self } /** - * Gets geolocation - * @return \Fingerprint\ServerAPI\Model\IPLocation + * Gets geolocation. */ - public function getGeolocation(): \Fingerprint\ServerAPI\Model\IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ - public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -250,22 +261,23 @@ public function setGeolocation(\Fingerprint\ServerAPI\Model\IPLocation $geolocat } /** - * Gets asn + * Gets asn. + * * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn(): ?\Fingerprint\ServerAPI\Model\ASN + public function getAsn(): ?ASN { return $this->container['asn']; } /** - * Sets asn + * Sets asn. * * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -273,31 +285,33 @@ public function setAsn(?\Fingerprint\ServerAPI\Model\ASN $asn): self } /** - * Gets datacenter + * Gets datacenter. + * * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter(): ?\Fingerprint\ServerAPI\Model\DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } /** - * Sets datacenter + * Sets datacenter. * * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter(?\Fingerprint\ServerAPI\Model\DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -307,7 +321,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -317,8 +331,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -332,27 +346,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 0aa11da2..fa94ca4d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result iOS specific jailbreak detection. There are 2 values: • `true` - Jailbreak detected • `false` - No signs of jailbreak or the client is not iOS. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Location.php b/src/Model/Location.php index 85cda839..10af00e7 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -1,14 +1,16 @@ 'string', -'name' => 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } - if ($this->container['name'] === null) { + if (null === $this->container['name']) { $invalidProperties[] = "'name' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -201,7 +213,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code code * @@ -215,8 +227,7 @@ public function setCode(string $code): self } /** - * Gets name - * @return string + * Gets name. */ public function getName(): string { @@ -224,7 +235,7 @@ public function getName(): string } /** - * Sets name + * Sets name. * * @param string $name name * @@ -236,10 +247,11 @@ public function setName(string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 5a0e8ce1..fb7e697c 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,9 +204,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a mobile device with location spoofing enabled. + * @param bool $result flag indicating whether the request came from a mobile device with location spoofing enabled * * @return $this */ @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index c6adaf20..0156c76d 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -1,17 +1,18 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 2cf9817c..5a0879e9 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -1,14 +1,16 @@ 'string', -'message' => 'string' ]; + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +154,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +162,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,11 +177,8 @@ public function getModelName(): string return self::$swaggerModelName; } - const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; -const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -152,26 +186,7 @@ public function getCodeAllowableValues(): array { return [ self::CODE_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -183,7 +198,7 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -194,27 +209,26 @@ public function listInvalidProperties(): array ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code - * @return string + * Gets code. */ public function getCode(): string { @@ -222,7 +236,7 @@ public function getCode(): string } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -245,8 +259,7 @@ public function setCode(string $code): self } /** - * Gets message - * @return string + * Gets message. */ public function getMessage(): string { @@ -254,7 +267,7 @@ public function getMessage(): string } /** - * Sets message + * Sets message. * * @param string $message message * @@ -266,10 +279,11 @@ public function setMessage(string $message): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -279,7 +293,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -289,8 +303,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -304,27 +318,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index d832b8c5..16649fd8 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', -'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', -'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', -'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', -'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', -'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', -'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', -'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', -'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', -'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', -'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', -'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', -'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', -'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', -'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes', -'remote_control' => '\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl', -'velocity' => '\Fingerprint\ServerAPI\Model\SignalResponseVelocity', -'developer_tools' => '\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', + 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', + 'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', + 'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', + 'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', + 'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', + 'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', + 'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', + 'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', + 'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', + 'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes', + 'remote_control' => '\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl', + 'velocity' => '\Fingerprint\ServerAPI\Model\SignalResponseVelocity', + 'developer_tools' => '\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'identification' => null, -'botd' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'raw_device_attributes' => null, -'remote_control' => null, -'velocity' => null, -'developer_tools' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'botd' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'raw_device_attributes' => null, + 'remote_control' => null, + 'velocity' => null, + 'developer_tools' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'identification' => 'identification', -'botd' => 'botd', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'raw_device_attributes' => 'rawDeviceAttributes', -'remote_control' => 'remoteControl', -'velocity' => 'velocity', -'developer_tools' => 'developerTools' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'botd' => 'botd', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'raw_device_attributes' => 'rawDeviceAttributes', + 'remote_control' => 'remoteControl', + 'velocity' => 'velocity', + 'developer_tools' => 'developerTools']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'identification' => 'setIdentification', -'botd' => 'setBotd', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'raw_device_attributes' => 'setRawDeviceAttributes', -'remote_control' => 'setRemoteControl', -'velocity' => 'setVelocity', -'developer_tools' => 'setDeveloperTools' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'botd' => 'setBotd', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'raw_device_attributes' => 'setRawDeviceAttributes', + 'remote_control' => 'setRemoteControl', + 'velocity' => 'setVelocity', + 'developer_tools' => 'setDeveloperTools']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'identification' => 'getIdentification', -'botd' => 'getBotd', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'raw_device_attributes' => 'getRawDeviceAttributes', -'remote_control' => 'getRemoteControl', -'velocity' => 'getVelocity', -'developer_tools' => 'getDeveloperTools' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - */ - public static function getters(): array - { - return self::$getters; - } - - /** - * The original name of the model. - */ - public function getModelName(): string - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values + 'botd' => 'getBotd', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'raw_device_attributes' => 'getRawDeviceAttributes', + 'remote_control' => 'getRemoteControl', + 'velocity' => 'getVelocity', + 'developer_tools' => 'getDeveloperTools']; + + /** + * Associative array for storing property values. * * @var mixed[] */ protected array $container = []; /** - * Constructor + * Constructor. * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; @@ -294,6 +244,70 @@ public function __construct(array $data = null) $this->container['developer_tools'] = isset($data['developer_tools']) ? $data['developer_tools'] : null; } + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + /** * Show all the invalid properties with reasons. * @@ -301,40 +315,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets identification + * Gets identification. + * * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification */ - public function getIdentification(): ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification + public function getIdentification(): ?ProductsResponseIdentification { return $this->container['identification']; } /** - * Sets identification + * Sets identification. * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification * * @return $this */ - public function setIdentification(?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification): self + public function setIdentification(?ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -342,22 +354,23 @@ public function setIdentification(?\Fingerprint\ServerAPI\Model\ProductsResponse } /** - * Gets botd + * Gets botd. + * * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd */ - public function getBotd(): ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd + public function getBotd(): ?ProductsResponseBotd { return $this->container['botd']; } /** - * Sets botd + * Sets botd. * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd * * @return $this */ - public function setBotd(?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd): self + public function setBotd(?ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -365,22 +378,23 @@ public function setBotd(?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd } /** - * Gets ip_info + * Gets ip_info. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo */ - public function getIpInfo(): ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo + public function getIpInfo(): ?SignalResponseIpInfo { return $this->container['ip_info']; } /** - * Sets ip_info + * Sets ip_info. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info * * @return $this */ - public function setIpInfo(?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info): self + public function setIpInfo(?SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -388,22 +402,23 @@ public function setIpInfo(?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip } /** - * Gets incognito + * Gets incognito. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito */ - public function getIncognito(): ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito + public function getIncognito(): ?SignalResponseIncognito { return $this->container['incognito']; } /** - * Sets incognito + * Sets incognito. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito * * @return $this */ - public function setIncognito(?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito): self + public function setIncognito(?SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -411,22 +426,23 @@ public function setIncognito(?\Fingerprint\ServerAPI\Model\SignalResponseIncogni } /** - * Gets root_apps + * Gets root_apps. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps */ - public function getRootApps(): ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps + public function getRootApps(): ?SignalResponseRootApps { return $this->container['root_apps']; } /** - * Sets root_apps + * Sets root_apps. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps * * @return $this */ - public function setRootApps(?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps): self + public function setRootApps(?SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -434,22 +450,23 @@ public function setRootApps(?\Fingerprint\ServerAPI\Model\SignalResponseRootApps } /** - * Gets emulator + * Gets emulator. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator */ - public function getEmulator(): ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator + public function getEmulator(): ?SignalResponseEmulator { return $this->container['emulator']; } /** - * Sets emulator + * Sets emulator. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator * * @return $this */ - public function setEmulator(?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator): self + public function setEmulator(?SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -457,22 +474,23 @@ public function setEmulator(?\Fingerprint\ServerAPI\Model\SignalResponseEmulator } /** - * Gets cloned_app + * Gets cloned_app. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp */ - public function getClonedApp(): ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp + public function getClonedApp(): ?SignalResponseClonedApp { return $this->container['cloned_app']; } /** - * Sets cloned_app + * Sets cloned_app. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ - public function setClonedApp(?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app): self + public function setClonedApp(?SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -480,22 +498,23 @@ public function setClonedApp(?\Fingerprint\ServerAPI\Model\SignalResponseClonedA } /** - * Gets factory_reset + * Gets factory_reset. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset */ - public function getFactoryReset(): ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset + public function getFactoryReset(): ?SignalResponseFactoryReset { return $this->container['factory_reset']; } /** - * Sets factory_reset + * Sets factory_reset. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ - public function setFactoryReset(?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset): self + public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -503,22 +522,23 @@ public function setFactoryReset(?\Fingerprint\ServerAPI\Model\SignalResponseFact } /** - * Gets jailbroken + * Gets jailbroken. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken */ - public function getJailbroken(): ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken + public function getJailbroken(): ?SignalResponseJailbroken { return $this->container['jailbroken']; } /** - * Sets jailbroken + * Sets jailbroken. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ - public function setJailbroken(?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken): self + public function setJailbroken(?SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -526,22 +546,23 @@ public function setJailbroken(?\Fingerprint\ServerAPI\Model\SignalResponseJailbr } /** - * Gets frida + * Gets frida. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFrida */ - public function getFrida(): ?\Fingerprint\ServerAPI\Model\SignalResponseFrida + public function getFrida(): ?SignalResponseFrida { return $this->container['frida']; } /** - * Sets frida + * Sets frida. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida * * @return $this */ - public function setFrida(?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida): self + public function setFrida(?SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -549,22 +570,23 @@ public function setFrida(?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frid } /** - * Gets ip_blocklist + * Gets ip_blocklist. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist */ - public function getIpBlocklist(): ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist + public function getIpBlocklist(): ?SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } /** - * Sets ip_blocklist + * Sets ip_blocklist. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist): self + public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -572,22 +594,23 @@ public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\SignalResponseIpBlo } /** - * Gets tor + * Gets tor. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTor */ - public function getTor(): ?\Fingerprint\ServerAPI\Model\SignalResponseTor + public function getTor(): ?SignalResponseTor { return $this->container['tor']; } /** - * Sets tor + * Sets tor. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor * * @return $this */ - public function setTor(?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor): self + public function setTor(?SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -595,22 +618,23 @@ public function setTor(?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor): se } /** - * Gets privacy_settings + * Gets privacy_settings. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings */ - public function getPrivacySettings(): ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings + public function getPrivacySettings(): ?SignalResponsePrivacySettings { return $this->container['privacy_settings']; } /** - * Sets privacy_settings + * Sets privacy_settings. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings): self + public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -618,22 +642,23 @@ public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\SignalResponseP } /** - * Gets virtual_machine + * Gets virtual_machine. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine */ - public function getVirtualMachine(): ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine + public function getVirtualMachine(): ?SignalResponseVirtualMachine { return $this->container['virtual_machine']; } /** - * Sets virtual_machine + * Sets virtual_machine. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine): self + public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -641,22 +666,23 @@ public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\SignalResponseVi } /** - * Gets vpn + * Gets vpn. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVpn */ - public function getVpn(): ?\Fingerprint\ServerAPI\Model\SignalResponseVpn + public function getVpn(): ?SignalResponseVpn { return $this->container['vpn']; } /** - * Sets vpn + * Sets vpn. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn * * @return $this */ - public function setVpn(?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn): self + public function setVpn(?SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -664,22 +690,23 @@ public function setVpn(?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn): se } /** - * Gets proxy + * Gets proxy. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseProxy */ - public function getProxy(): ?\Fingerprint\ServerAPI\Model\SignalResponseProxy + public function getProxy(): ?SignalResponseProxy { return $this->container['proxy']; } /** - * Sets proxy + * Sets proxy. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy * * @return $this */ - public function setProxy(?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy): self + public function setProxy(?SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -687,22 +714,23 @@ public function setProxy(?\Fingerprint\ServerAPI\Model\SignalResponseProxy $prox } /** - * Gets tampering + * Gets tampering. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTampering */ - public function getTampering(): ?\Fingerprint\ServerAPI\Model\SignalResponseTampering + public function getTampering(): ?SignalResponseTampering { return $this->container['tampering']; } /** - * Sets tampering + * Sets tampering. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering * * @return $this */ - public function setTampering(?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering): self + public function setTampering(?SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -710,22 +738,23 @@ public function setTampering(?\Fingerprint\ServerAPI\Model\SignalResponseTamperi } /** - * Gets high_activity + * Gets high_activity. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity */ - public function getHighActivity(): ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity + public function getHighActivity(): ?SignalResponseHighActivity { return $this->container['high_activity']; } /** - * Sets high_activity + * Sets high_activity. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity * * @return $this */ - public function setHighActivity(?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity): self + public function setHighActivity(?SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -733,22 +762,23 @@ public function setHighActivity(?\Fingerprint\ServerAPI\Model\SignalResponseHigh } /** - * Gets location_spoofing + * Gets location_spoofing. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing */ - public function getLocationSpoofing(): ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing + public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } /** - * Sets location_spoofing + * Sets location_spoofing. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing): self + public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -756,22 +786,23 @@ public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\SignalResponse } /** - * Gets suspect_score + * Gets suspect_score. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore */ - public function getSuspectScore(): ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore + public function getSuspectScore(): ?SignalResponseSuspectScore { return $this->container['suspect_score']; } /** - * Sets suspect_score + * Sets suspect_score. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ - public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score): self + public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -779,22 +810,23 @@ public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SignalResponseSusp } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes */ - public function getRawDeviceAttributes(): ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes + public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ - public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes): self + public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -802,22 +834,23 @@ public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\SignalRespo } /** - * Gets remote_control + * Gets remote_control. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl */ - public function getRemoteControl(): ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl + public function getRemoteControl(): ?SignalResponseRemoteControl { return $this->container['remote_control']; } /** - * Sets remote_control + * Sets remote_control. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl $remote_control remote_control * * @return $this */ - public function setRemoteControl(?\Fingerprint\ServerAPI\Model\SignalResponseRemoteControl $remote_control): self + public function setRemoteControl(?SignalResponseRemoteControl $remote_control): self { $this->container['remote_control'] = $remote_control; @@ -825,22 +858,23 @@ public function setRemoteControl(?\Fingerprint\ServerAPI\Model\SignalResponseRem } /** - * Gets velocity + * Gets velocity. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity */ - public function getVelocity(): ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity + public function getVelocity(): ?SignalResponseVelocity { return $this->container['velocity']; } /** - * Sets velocity + * Sets velocity. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVelocity $velocity velocity * * @return $this */ - public function setVelocity(?\Fingerprint\ServerAPI\Model\SignalResponseVelocity $velocity): self + public function setVelocity(?SignalResponseVelocity $velocity): self { $this->container['velocity'] = $velocity; @@ -848,31 +882,33 @@ public function setVelocity(?\Fingerprint\ServerAPI\Model\SignalResponseVelocity } /** - * Gets developer_tools + * Gets developer_tools. + * * @return ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools */ - public function getDeveloperTools(): ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools + public function getDeveloperTools(): ?SignalResponseDeveloperTools { return $this->container['developer_tools']; } /** - * Sets developer_tools + * Sets developer_tools. * * @param ?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools $developer_tools developer_tools * * @return $this */ - public function setDeveloperTools(?\Fingerprint\ServerAPI\Model\SignalResponseDeveloperTools $developer_tools): self + public function setDeveloperTools(?SignalResponseDeveloperTools $developer_tools): self { $this->container['developer_tools'] = $developer_tools; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -882,7 +918,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -892,8 +928,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -907,27 +943,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index b8501ba2..7d8255c1 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\BotdResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\BotdResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\BotdResult + public function getData(): ?BotdResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\BotdResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\BotdResult $data): self + public function setData(?BotdResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\BotdResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index a76bf9fd..dfec88dc 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData */ - public function getData(): ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData + public function getData(): ?ProductsResponseIdentificationData { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data): self + public function setData(?ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\ProductsResponseIdentifica } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index cf18766d..1bf397fc 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -1,14 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'visitor_id' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'visitor_id' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null, -'visitor_id' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null, + 'visitor_id' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt', -'visitor_id' => 'visitorId' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt', + 'visitor_id' => 'visitorId']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt', -'visitor_id' => 'setVisitorId' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt', + 'visitor_id' => 'setVisitorId']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt', -'visitor_id' => 'getVisitorId' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt', + 'visitor_id' => 'getVisitorId']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -182,7 +229,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -190,7 +237,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -205,40 +252,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -248,60 +261,59 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id - * @return string + * Gets request_id. */ public function getRequestId(): string { @@ -309,9 +321,9 @@ public function getRequestId(): string } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -323,22 +335,21 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * Gets browser_details. */ - public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -346,8 +357,7 @@ public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $b } /** - * Gets incognito - * @return bool + * Gets incognito. */ public function getIncognito(): bool { @@ -355,9 +365,9 @@ public function getIncognito(): bool } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -369,8 +379,7 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip - * @return string + * Gets ip. */ public function getIp(): string { @@ -378,7 +387,7 @@ public function getIp(): string } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -392,22 +401,23 @@ public function setIp(string $ip): self } /** - * Gets ip_location + * Gets ip_location. + * * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location + * Sets ip_location. * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -415,8 +425,7 @@ public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation } /** - * Gets timestamp - * @return int + * Gets timestamp. */ public function getTimestamp(): int { @@ -424,9 +433,9 @@ public function getTimestamp(): int } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -438,8 +447,7 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -447,9 +455,9 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -461,8 +469,7 @@ public function setTime(\DateTime $time): self } /** - * Gets url - * @return string + * Gets url. */ public function getUrl(): string { @@ -470,9 +477,9 @@ public function getUrl(): string } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -484,7 +491,8 @@ public function setUrl(string $url): self } /** - * Gets tag + * Gets tag. + * * @return map[string,object] */ public function getTag(): array @@ -493,9 +501,9 @@ public function getTag(): array } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -507,7 +515,8 @@ public function setTag(array $tag): self } /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -516,9 +525,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * - * @param ?string $linked_id A customer-provided id that was sent with identification request. + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -530,22 +539,23 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence + * Gets confidence. + * * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } /** - * Sets confidence + * Sets confidence. * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -553,8 +563,7 @@ public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confiden } /** - * Gets visitor_found - * @return bool + * Gets visitor_found. */ public function getVisitorFound(): bool { @@ -562,9 +571,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -576,22 +585,21 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets first_seen_at. */ - public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -599,22 +607,21 @@ public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_a } /** - * Gets last_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets last_seen_at. */ - public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -622,8 +629,7 @@ public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at) } /** - * Gets visitor_id - * @return string + * Gets visitor_id. */ public function getVisitorId(): string { @@ -631,9 +637,9 @@ public function getVisitorId(): string } /** - * Sets visitor_id + * Sets visitor_id. * - * @param string $visitor_id String of 20 characters that uniquely identifies the visitor's browser. + * @param string $visitor_id string of 20 characters that uniquely identifies the visitor's browser * * @return $this */ @@ -643,10 +649,11 @@ public function setVisitorId(string $visitor_id): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -656,7 +663,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -666,8 +673,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -681,27 +688,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 6ce3b94d..0ba7fc50 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,9 +204,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise. + * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise * * @return $this */ @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1457f572..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -1,14 +1,16 @@ listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -191,7 +201,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -201,8 +211,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -216,27 +226,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RemoteControlResult.php b/src/Model/RemoteControlResult.php index 3ee7b1c1..125baf85 100644 --- a/src/Model/RemoteControlResult.php +++ b/src/Model/RemoteControlResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Response.php b/src/Model/Response.php index e8629528..2aa4f347 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -1,14 +1,16 @@ 'string', -'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', -'last_timestamp' => 'int', -'pagination_key' => 'string' ]; + 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', + 'last_timestamp' => 'int', + 'pagination_key' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'visitor_id' => null, -'visits' => null, -'last_timestamp' => 'int64', -'pagination_key' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'visits' => null, + 'last_timestamp' => 'int64', + 'pagination_key' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'visitor_id' => 'visitorId', -'visits' => 'visits', -'last_timestamp' => 'lastTimestamp', -'pagination_key' => 'paginationKey' ]; + 'visits' => 'visits', + 'last_timestamp' => 'lastTimestamp', + 'pagination_key' => 'paginationKey']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'visitor_id' => 'setVisitorId', -'visits' => 'setVisits', -'last_timestamp' => 'setLastTimestamp', -'pagination_key' => 'setPaginationKey' ]; + 'visits' => 'setVisits', + 'last_timestamp' => 'setLastTimestamp', + 'pagination_key' => 'setPaginationKey']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'visitor_id' => 'getVisitorId', -'visits' => 'getVisits', -'last_timestamp' => 'getLastTimestamp', -'pagination_key' => 'getPaginationKey' ]; + 'visits' => 'getVisits', + 'last_timestamp' => 'getLastTimestamp', + 'pagination_key' => 'getPaginationKey']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; + $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; + $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -128,7 +165,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -136,7 +173,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -151,29 +188,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; - $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; - $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,30 +197,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['visits'] === null) { + if (null === $this->container['visits']) { $invalidProperties[] = "'visits' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id - * @return string + * Gets visitor_id. */ public function getVisitorId(): string { @@ -214,7 +227,7 @@ public function getVisitorId(): string } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -228,7 +241,8 @@ public function setVisitorId(string $visitor_id): self } /** - * Gets visits + * Gets visits. + * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ public function getVisits(): array @@ -237,7 +251,7 @@ public function getVisits(): array } /** - * Sets visits + * Sets visits. * * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits * @@ -251,7 +265,8 @@ public function setVisits(array $visits): self } /** - * Gets last_timestamp + * Gets last_timestamp. + * * @return ?int */ public function getLastTimestamp(): ?int @@ -260,7 +275,7 @@ public function getLastTimestamp(): ?int } /** - * Sets last_timestamp + * Sets last_timestamp. * * @param ?int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. * @@ -274,7 +289,8 @@ public function setLastTimestamp(?int $last_timestamp): self } /** - * Gets pagination_key + * Gets pagination_key. + * * @return ?string */ public function getPaginationKey(): ?string @@ -283,7 +299,7 @@ public function getPaginationKey(): ?string } /** - * Sets pagination_key + * Sets pagination_key. * * @param ?string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. * @@ -295,10 +311,11 @@ public function setPaginationKey(?string $pagination_key): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -308,7 +325,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -318,8 +335,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -333,27 +350,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 86f7dab5..e3b67f55 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -1,14 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -177,7 +223,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -185,7 +231,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -200,39 +246,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -242,57 +255,56 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id - * @return string + * Gets request_id. */ public function getRequestId(): string { @@ -300,9 +312,9 @@ public function getRequestId(): string } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -314,22 +326,21 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * Gets browser_details. */ - public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -337,8 +348,7 @@ public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $b } /** - * Gets incognito - * @return bool + * Gets incognito. */ public function getIncognito(): bool { @@ -346,9 +356,9 @@ public function getIncognito(): bool } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -360,8 +370,7 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip - * @return string + * Gets ip. */ public function getIp(): string { @@ -369,7 +378,7 @@ public function getIp(): string } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -383,22 +392,23 @@ public function setIp(string $ip): self } /** - * Gets ip_location + * Gets ip_location. + * * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location + * Sets ip_location. * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -406,8 +416,7 @@ public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation } /** - * Gets timestamp - * @return int + * Gets timestamp. */ public function getTimestamp(): int { @@ -415,9 +424,9 @@ public function getTimestamp(): int } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -429,8 +438,7 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -438,9 +446,9 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -452,8 +460,7 @@ public function setTime(\DateTime $time): self } /** - * Gets url - * @return string + * Gets url. */ public function getUrl(): string { @@ -461,9 +468,9 @@ public function getUrl(): string } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -475,7 +482,8 @@ public function setUrl(string $url): self } /** - * Gets tag + * Gets tag. + * * @return map[string,object] */ public function getTag(): array @@ -484,9 +492,9 @@ public function getTag(): array } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -498,7 +506,8 @@ public function setTag(array $tag): self } /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -507,9 +516,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * - * @param ?string $linked_id A customer-provided id that was sent with identification request. + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -521,22 +530,23 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence + * Gets confidence. + * * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } /** - * Sets confidence + * Sets confidence. * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -544,8 +554,7 @@ public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confiden } /** - * Gets visitor_found - * @return bool + * Gets visitor_found. */ public function getVisitorFound(): bool { @@ -553,9 +562,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -567,22 +576,21 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets first_seen_at. */ - public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -590,31 +598,31 @@ public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_a } /** - * Gets last_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets last_seen_at. */ - public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -624,7 +632,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -634,8 +642,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -649,27 +657,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 6d631491..6c1c82cf 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected or the client isn't Android. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index fa16f96b..29de802d 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -1,14 +1,16 @@ '\DateTime', -'subscription' => '\DateTime' ]; + 'subscription' => '\DateTime']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'global' => 'date-time', -'subscription' => 'date-time' ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'subscription' => 'date-time']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'global' => 'global', -'subscription' => 'subscription' ]; + 'subscription' => 'subscription']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'global' => 'setGlobal', -'subscription' => 'setSubscription' ]; + 'subscription' => 'setSubscription']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'global' => 'getGlobal', -'subscription' => 'getSubscription' ]; + 'subscription' => 'getSubscription']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['global'] = isset($data['global']) ? $data['global'] : null; + $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['global'] = isset($data['global']) ? $data['global'] : null; - $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['global'] === null) { + if (null === $this->container['global']) { $invalidProperties[] = "'global' can't be null"; } - if ($this->container['subscription'] === null) { + if (null === $this->container['subscription']) { $invalidProperties[] = "'subscription' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets global - * @return \DateTime + * Gets global. */ public function getGlobal(): \DateTime { @@ -201,7 +213,7 @@ public function getGlobal(): \DateTime } /** - * Sets global + * Sets global. * * @param \DateTime $global global * @@ -215,8 +227,7 @@ public function setGlobal(\DateTime $global): self } /** - * Gets subscription - * @return \DateTime + * Gets subscription. */ public function getSubscription(): \DateTime { @@ -224,7 +235,7 @@ public function getSubscription(): \DateTime } /** - * Sets subscription + * Sets subscription. * * @param \DateTime $subscription subscription * @@ -236,10 +247,11 @@ public function setSubscription(\DateTime $subscription): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 471945c9..0edbcaf2 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\ClonedAppResult + public function getData(): ?ClonedAppResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\ClonedAppResult $data): self + public function setData(?ClonedAppResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\ClonedAppResult $data): se } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseDeveloperTools.php b/src/Model/SignalResponseDeveloperTools.php index eff6cb94..d25d3207 100644 --- a/src/Model/SignalResponseDeveloperTools.php +++ b/src/Model/SignalResponseDeveloperTools.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult + public function getData(): ?DeveloperToolsResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data): self + public function setData(?DeveloperToolsResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $data } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 91c5b1f4..15d6b196 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\EmulatorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\EmulatorResult + public function getData(): ?EmulatorResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\EmulatorResult $data): self + public function setData(?EmulatorResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\EmulatorResult $data): sel } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 793f39ba..95f0737a 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\FactoryResetResult + public function getData(): ?FactoryResetResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\FactoryResetResult $data): self + public function setData(?FactoryResetResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\FactoryResetResult $data): } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index d0435ba8..86aba169 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\FridaResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\FridaResult + public function getData(): ?FridaResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\FridaResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\FridaResult $data): self + public function setData(?FridaResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\FridaResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 83d6e166..9a1e755a 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\HighActivityResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\HighActivityResult + public function getData(): ?HighActivityResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\HighActivityResult $data): self + public function setData(?HighActivityResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\HighActivityResult $data): } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index df00b265..e8e87138 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\IncognitoResult', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\IncognitoResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\IncognitoResult + public function getData(): ?IncognitoResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\IncognitoResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\IncognitoResult $data): self + public function setData(?IncognitoResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\IncognitoResult $data): se } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index e57be30f..00a37d29 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\IpBlockListResult + public function getData(): ?IpBlockListResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\IpBlockListResult $data): self + public function setData(?IpBlockListResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\IpBlockListResult $data): } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 125e4034..48e5fa40 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpInfoResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\IpInfoResult + public function getData(): ?IpInfoResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\IpInfoResult $data): self + public function setData(?IpInfoResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\IpInfoResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index e201df53..5d33f2fe 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\JailbrokenResult + public function getData(): ?JailbrokenResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\JailbrokenResult $data): self + public function setData(?JailbrokenResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\JailbrokenResult $data): s } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 9af2dbd1..aef5b071 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult + public function getData(): ?LocationSpoofingResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data): self + public function setData(?LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $da } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 938fec13..a97c78aa 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult + public function getData(): ?PrivacySettingsResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data): self + public function setData(?PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $dat } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 9cc61fa5..0f354989 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProxyResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\ProxyResult + public function getData(): ?ProxyResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\ProxyResult $data): self + public function setData(?ProxyResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\ProxyResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index ccc566d6..68a20adc 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + public function getData(): array { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data): self + public function setData(?array $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRemoteControl.php b/src/Model/SignalResponseRemoteControl.php index b214d614..afec1f39 100644 --- a/src/Model/SignalResponseRemoteControl.php +++ b/src/Model/SignalResponseRemoteControl.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\RemoteControlResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\RemoteControlResult + public function getData(): ?RemoteControlResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\RemoteControlResult $data): self + public function setData(?RemoteControlResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\RemoteControlResult $data) } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index fdcd2dcf..d5ed6c79 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\RootAppsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\RootAppsResult + public function getData(): ?RootAppsResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\RootAppsResult $data): self + public function setData(?RootAppsResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\RootAppsResult $data): sel } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index df2b1429..3614acf0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\SuspectScoreResult + public function getData(): ?SuspectScoreResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data): self + public function setData(?SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data): } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index b0a97571..68c818ea 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\TamperingResult', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\TamperingResult + public function getData(): ?TamperingResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\TamperingResult $data): self + public function setData(?TamperingResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\TamperingResult $data): se } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index f6571172..06ac9768 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\TorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\TorResult + public function getData(): ?TorResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\TorResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\TorResult $data): self + public function setData(?TorResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\TorResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVelocity.php b/src/Model/SignalResponseVelocity.php index 07d6e801..3ccfbdbe 100644 --- a/src/Model/SignalResponseVelocity.php +++ b/src/Model/SignalResponseVelocity.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\VelocityResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\VelocityResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\VelocityResult + public function getData(): ?VelocityResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\VelocityResult $data): self + public function setData(?VelocityResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\VelocityResult $data): sel } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 83933a73..906eedd2 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\VirtualMachineResult + public function getData(): ?VirtualMachineResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data): self + public function setData(?VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 1fd9bdb8..b96d13c5 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\VpnResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,40 +181,38 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. + * * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getData(): ?\Fingerprint\ServerAPI\Model\VpnResult + public function getData(): ?VpnResult { return $this->container['data']; } /** - * Sets data + * Sets data. * * @param ?\Fingerprint\ServerAPI\Model\VpnResult $data data * * @return $this */ - public function setData(?\Fingerprint\ServerAPI\Model\VpnResult $data): self + public function setData(?VpnResult $data): self { $this->container['data'] = $data; @@ -209,31 +220,33 @@ public function setData(?\Fingerprint\ServerAPI\Model\VpnResult $data): self } /** - * Gets error + * Gets error. + * * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError(): ?\Fingerprint\ServerAPI\Model\ProductError + public function getError(): ?ProductError { return $this->container['error']; } /** - * Sets error + * Sets error. * * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError(?\Fingerprint\ServerAPI\Model\ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index c889b0a7..0c2835d8 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -1,14 +1,16 @@ 'string', -'name' => 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'iso_code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'iso_code' => 'isoCode', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'iso_code' => 'setIsoCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'iso_code' => 'getIsoCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -168,25 +181,23 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets iso_code + * Gets iso_code. + * * @return ?string */ public function getIsoCode(): ?string @@ -195,7 +206,7 @@ public function getIsoCode(): ?string } /** - * Sets iso_code + * Sets iso_code. * * @param ?string $iso_code iso_code * @@ -209,7 +220,8 @@ public function setIsoCode(?string $iso_code): self } /** - * Gets name + * Gets name. + * * @return ?string */ public function getName(): ?string @@ -218,7 +230,7 @@ public function getName(): ?string } /** - * Sets name + * Sets name. * * @param ?string $name name * @@ -230,10 +242,11 @@ public function setName(?string $name): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -243,7 +256,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -253,8 +266,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -268,27 +281,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 88515ccc..3225bda1 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -1,14 +1,16 @@ 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return int + * Gets result. */ public function getResult(): int { @@ -192,7 +204,7 @@ public function getResult(): int } /** - * Sets result + * Sets result. * * @param int $result Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score * @@ -204,10 +216,11 @@ public function setResult(int $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index c5ddb2b0..e642bcd4 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -1,14 +1,16 @@ 'bool', -'anomaly_score' => 'float' ]; + 'anomaly_score' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'anomaly_score' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'anomaly_score' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'anomaly_score' => 'anomalyScore' ]; + 'anomaly_score' => 'anomalyScore']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'anomaly_score' => 'setAnomalyScore' ]; + 'anomaly_score' => 'setAnomalyScore']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'anomaly_score' => 'getAnomalyScore' ]; + 'anomaly_score' => 'getAnomalyScore']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -117,7 +151,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -125,7 +159,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -140,27 +174,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -170,30 +183,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['anomaly_score'] === null) { + if (null === $this->container['anomaly_score']) { $invalidProperties[] = "'anomaly_score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -201,9 +213,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether browser tampering was detected according to our internal thresholds. + * @param bool $result flag indicating whether browser tampering was detected according to our internal thresholds * * @return $this */ @@ -215,8 +227,7 @@ public function setResult(bool $result): self } /** - * Gets anomaly_score - * @return float + * Gets anomaly_score. */ public function getAnomalyScore(): float { @@ -224,7 +235,7 @@ public function getAnomalyScore(): float } /** - * Sets anomaly_score + * Sets anomaly_score. * * @param float $anomaly_score Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. * @@ -236,10 +247,11 @@ public function setAnomalyScore(float $anomaly_score): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -249,7 +261,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -259,8 +271,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -274,27 +286,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TooManyRequestsResponse.php b/src/Model/TooManyRequestsResponse.php index 08749e52..6034721b 100644 --- a/src/Model/TooManyRequestsResponse.php +++ b/src/Model/TooManyRequestsResponse.php @@ -1,14 +1,16 @@ 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error - * @return string + * Gets error. */ public function getError(): string { @@ -192,9 +204,9 @@ public function getError(): string } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -204,10 +216,11 @@ public function setError(string $error): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index f40c901a..c09aeaaf 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,9 +204,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise. + * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise * * @return $this */ @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VelocityIntervalResult.php b/src/Model/VelocityIntervalResult.php index 1acd72cb..efa97f7d 100644 --- a/src/Model/VelocityIntervalResult.php +++ b/src/Model/VelocityIntervalResult.php @@ -1,14 +1,16 @@ 'int', -'_1h' => 'int', -'_24h' => 'int' ]; + '_1h' => 'int', + '_24h' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ '_5m' => null, -'_1h' => null, -'_24h' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + '_1h' => null, + '_24h' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ '_5m' => '5m', -'_1h' => '1h', -'_24h' => '24h' ]; + '_1h' => '1h', + '_24h' => '24h']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ '_5m' => 'set5m', -'_1h' => 'set1h', -'_24h' => 'set24h' ]; + '_1h' => 'set1h', + '_24h' => 'set24h']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ '_5m' => 'get5m', -'_1h' => 'get1h', -'_24h' => 'get24h' ]; + '_1h' => 'get1h', + '_24h' => 'get24h']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; + $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; + $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -123,7 +159,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -131,7 +167,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -146,28 +182,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['_5m'] = isset($data['_5m']) ? $data['_5m'] : null; - $this->container['_1h'] = isset($data['_1h']) ? $data['_1h'] : null; - $this->container['_24h'] = isset($data['_24h']) ? $data['_24h'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -177,30 +191,29 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['_5m'] === null) { + if (null === $this->container['_5m']) { $invalidProperties[] = "'_5m' can't be null"; } - if ($this->container['_1h'] === null) { + if (null === $this->container['_1h']) { $invalidProperties[] = "'_1h' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets _5m - * @return int + * Gets _5m. */ public function get5m(): int { @@ -208,7 +221,7 @@ public function get5m(): int } /** - * Sets _5m + * Sets _5m. * * @param int $_5m _5m * @@ -222,8 +235,7 @@ public function set5m(int $_5m): self } /** - * Gets _1h - * @return int + * Gets _1h. */ public function get1h(): int { @@ -231,7 +243,7 @@ public function get1h(): int } /** - * Sets _1h + * Sets _1h. * * @param int $_1h _1h * @@ -245,7 +257,8 @@ public function set1h(int $_1h): self } /** - * Gets _24h + * Gets _24h. + * * @return ?int */ public function get24h(): ?int @@ -254,7 +267,7 @@ public function get24h(): ?int } /** - * Sets _24h + * Sets _24h. * * @param ?int $_24h The `24h` interval of `distinctIp`, `distinctLinkedId`, and `distinctCountry` will be omitted if the number of `events`` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. * @@ -266,10 +279,11 @@ public function set24h(?int $_24h): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -279,7 +293,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -289,8 +303,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -304,27 +318,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VelocityIntervals.php b/src/Model/VelocityIntervals.php index 93dbc982..f2a84395 100644 --- a/src/Model/VelocityIntervals.php +++ b/src/Model/VelocityIntervals.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\VelocityIntervalResult' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'intervals' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'intervals' => '\Fingerprint\ServerAPI\Model\VelocityIntervalResult']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'intervals' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'intervals' => 'intervals' ]; + 'intervals' => 'intervals']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'intervals' => 'setIntervals' ]; + 'intervals' => 'setIntervals']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'intervals' => 'getIntervals' ]; + 'intervals' => 'getIntervals']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['intervals'] = isset($data['intervals']) ? $data['intervals'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['intervals'] = isset($data['intervals']) ? $data['intervals'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -162,49 +175,48 @@ public function __construct(array $data = null) */ public function listInvalidProperties(): array { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets intervals + * Gets intervals. + * * @return ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult */ - public function getIntervals(): ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult + public function getIntervals(): ?VelocityIntervalResult { return $this->container['intervals']; } /** - * Sets intervals + * Sets intervals. * * @param ?\Fingerprint\ServerAPI\Model\VelocityIntervalResult $intervals intervals * * @return $this */ - public function setIntervals(?\Fingerprint\ServerAPI\Model\VelocityIntervalResult $intervals): self + public function setIntervals(?VelocityIntervalResult $intervals): self { $this->container['intervals'] = $intervals; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -214,7 +226,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -224,8 +236,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -239,27 +251,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VelocityResult.php b/src/Model/VelocityResult.php index 339d1b35..5e2a665e 100644 --- a/src/Model/VelocityResult.php +++ b/src/Model/VelocityResult.php @@ -1,14 +1,16 @@ '\Fingerprint\ServerAPI\Model\VelocityIntervals', -'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', -'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', -'events' => '\Fingerprint\ServerAPI\Model\VelocityIntervals' ]; + 'distinct_linked_id' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', + 'distinct_country' => '\Fingerprint\ServerAPI\Model\VelocityIntervals', + 'events' => '\Fingerprint\ServerAPI\Model\VelocityIntervals']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'distinct_ip' => null, -'distinct_linked_id' => null, -'distinct_country' => null, -'events' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'distinct_linked_id' => null, + 'distinct_country' => null, + 'events' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'distinct_ip' => 'distinctIp', -'distinct_linked_id' => 'distinctLinkedId', -'distinct_country' => 'distinctCountry', -'events' => 'events' ]; + 'distinct_linked_id' => 'distinctLinkedId', + 'distinct_country' => 'distinctCountry', + 'events' => 'events']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'distinct_ip' => 'setDistinctIp', -'distinct_linked_id' => 'setDistinctLinkedId', -'distinct_country' => 'setDistinctCountry', -'events' => 'setEvents' ]; + 'distinct_linked_id' => 'setDistinctLinkedId', + 'distinct_country' => 'setDistinctCountry', + 'events' => 'setEvents']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'distinct_ip' => 'getDistinctIp', -'distinct_linked_id' => 'getDistinctLinkedId', -'distinct_country' => 'getDistinctCountry', -'events' => 'getEvents' ]; + 'distinct_linked_id' => 'getDistinctLinkedId', + 'distinct_country' => 'getDistinctCountry', + 'events' => 'getEvents']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null; + $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null; + $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null; + $this->container['events'] = isset($data['events']) ? $data['events'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -128,7 +165,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -136,7 +173,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -151,29 +188,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['distinct_ip'] = isset($data['distinct_ip']) ? $data['distinct_ip'] : null; - $this->container['distinct_linked_id'] = isset($data['distinct_linked_id']) ? $data['distinct_linked_id'] : null; - $this->container['distinct_country'] = isset($data['distinct_country']) ? $data['distinct_country'] : null; - $this->container['events'] = isset($data['events']) ? $data['events'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -183,50 +197,49 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['distinct_ip'] === null) { + if (null === $this->container['distinct_ip']) { $invalidProperties[] = "'distinct_ip' can't be null"; } - if ($this->container['distinct_linked_id'] === null) { + if (null === $this->container['distinct_linked_id']) { $invalidProperties[] = "'distinct_linked_id' can't be null"; } - if ($this->container['distinct_country'] === null) { + if (null === $this->container['distinct_country']) { $invalidProperties[] = "'distinct_country' can't be null"; } - if ($this->container['events'] === null) { + if (null === $this->container['events']) { $invalidProperties[] = "'events' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets distinct_ip - * @return \Fingerprint\ServerAPI\Model\VelocityIntervals + * Gets distinct_ip. */ - public function getDistinctIp(): \Fingerprint\ServerAPI\Model\VelocityIntervals + public function getDistinctIp(): VelocityIntervals { return $this->container['distinct_ip']; } /** - * Sets distinct_ip + * Sets distinct_ip. * - * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_ip distinct_ip + * @param VelocityIntervals $distinct_ip distinct_ip * * @return $this */ - public function setDistinctIp(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_ip): self + public function setDistinctIp(VelocityIntervals $distinct_ip): self { $this->container['distinct_ip'] = $distinct_ip; @@ -234,22 +247,21 @@ public function setDistinctIp(\Fingerprint\ServerAPI\Model\VelocityIntervals $di } /** - * Gets distinct_linked_id - * @return \Fingerprint\ServerAPI\Model\VelocityIntervals + * Gets distinct_linked_id. */ - public function getDistinctLinkedId(): \Fingerprint\ServerAPI\Model\VelocityIntervals + public function getDistinctLinkedId(): VelocityIntervals { return $this->container['distinct_linked_id']; } /** - * Sets distinct_linked_id + * Sets distinct_linked_id. * - * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_linked_id distinct_linked_id + * @param VelocityIntervals $distinct_linked_id distinct_linked_id * * @return $this */ - public function setDistinctLinkedId(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_linked_id): self + public function setDistinctLinkedId(VelocityIntervals $distinct_linked_id): self { $this->container['distinct_linked_id'] = $distinct_linked_id; @@ -257,22 +269,21 @@ public function setDistinctLinkedId(\Fingerprint\ServerAPI\Model\VelocityInterva } /** - * Gets distinct_country - * @return \Fingerprint\ServerAPI\Model\VelocityIntervals + * Gets distinct_country. */ - public function getDistinctCountry(): \Fingerprint\ServerAPI\Model\VelocityIntervals + public function getDistinctCountry(): VelocityIntervals { return $this->container['distinct_country']; } /** - * Sets distinct_country + * Sets distinct_country. * - * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_country distinct_country + * @param VelocityIntervals $distinct_country distinct_country * * @return $this */ - public function setDistinctCountry(\Fingerprint\ServerAPI\Model\VelocityIntervals $distinct_country): self + public function setDistinctCountry(VelocityIntervals $distinct_country): self { $this->container['distinct_country'] = $distinct_country; @@ -280,31 +291,31 @@ public function setDistinctCountry(\Fingerprint\ServerAPI\Model\VelocityInterval } /** - * Gets events - * @return \Fingerprint\ServerAPI\Model\VelocityIntervals + * Gets events. */ - public function getEvents(): \Fingerprint\ServerAPI\Model\VelocityIntervals + public function getEvents(): VelocityIntervals { return $this->container['events']; } /** - * Sets events + * Sets events. * - * @param \Fingerprint\ServerAPI\Model\VelocityIntervals $events events + * @param VelocityIntervals $events events * * @return $this */ - public function setEvents(\Fingerprint\ServerAPI\Model\VelocityIntervals $events): self + public function setEvents(VelocityIntervals $events): self { $this->container['events'] = $events; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -314,7 +325,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -324,8 +335,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -339,27 +350,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 6b692b62..644f9144 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -1,14 +1,16 @@ 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static array $swaggerFormats = [ - 'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } + protected static array $swaggerTypes = [ + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + protected static array $swaggerFormats = [ + 'result' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ - 'result' => 'result' ]; + 'result' => 'result']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ - 'result' => 'setResult' ]; + 'result' => 'setResult']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ - 'result' => 'getResult' ]; + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -112,7 +145,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -120,7 +153,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -135,26 +168,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -164,27 +177,26 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -192,7 +204,7 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. * @@ -204,10 +216,11 @@ public function setResult(bool $result): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -217,7 +230,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -227,8 +240,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -242,27 +255,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 843acc7c..63ad75b2 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -1,14 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -177,7 +223,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -185,7 +231,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -200,39 +246,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -242,54 +255,53 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id - * @return string + * Gets request_id. */ public function getRequestId(): string { @@ -297,9 +309,9 @@ public function getRequestId(): string } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -311,22 +323,21 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * Gets browser_details. */ - public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -334,8 +345,7 @@ public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $b } /** - * Gets incognito - * @return bool + * Gets incognito. */ public function getIncognito(): bool { @@ -343,9 +353,9 @@ public function getIncognito(): bool } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -357,8 +367,7 @@ public function setIncognito(bool $incognito): self } /** - * Gets ip - * @return string + * Gets ip. */ public function getIp(): string { @@ -366,7 +375,7 @@ public function getIp(): string } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -380,22 +389,23 @@ public function setIp(string $ip): self } /** - * Gets ip_location + * Gets ip_location. + * * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location + * Sets ip_location. * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -403,8 +413,7 @@ public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation } /** - * Gets timestamp - * @return int + * Gets timestamp. */ public function getTimestamp(): int { @@ -412,9 +421,9 @@ public function getTimestamp(): int } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -426,8 +435,7 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -435,9 +443,9 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -449,8 +457,7 @@ public function setTime(\DateTime $time): self } /** - * Gets url - * @return string + * Gets url. */ public function getUrl(): string { @@ -458,9 +465,9 @@ public function getUrl(): string } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -472,7 +479,8 @@ public function setUrl(string $url): self } /** - * Gets tag + * Gets tag. + * * @return ?map[string,object] */ public function getTag(): ?array @@ -481,9 +489,9 @@ public function getTag(): ?array } /** - * Sets tag + * Sets tag. * - * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -495,7 +503,8 @@ public function setTag(?array $tag): self } /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -504,9 +513,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * - * @param ?string $linked_id A customer-provided id that was sent with identification request. + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -518,22 +527,23 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence + * Gets confidence. + * * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } /** - * Sets confidence + * Sets confidence. * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -541,8 +551,7 @@ public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confiden } /** - * Gets visitor_found - * @return bool + * Gets visitor_found. */ public function getVisitorFound(): bool { @@ -550,9 +559,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -564,22 +573,21 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets first_seen_at. */ - public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -587,31 +595,31 @@ public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_a } /** - * Gets last_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets last_seen_at. */ - public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -621,7 +629,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -631,8 +639,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -646,27 +654,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 1ce5088a..2b5651e8 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -1,14 +1,16 @@ 'bool', -'origin_timezone' => 'string', -'origin_country' => 'string', -'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods' ]; + 'origin_timezone' => 'string', + 'origin_country' => 'string', + 'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'result' => null, -'origin_timezone' => null, -'origin_country' => null, -'methods' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'origin_timezone' => null, + 'origin_country' => null, + 'methods' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'result' => 'result', -'origin_timezone' => 'originTimezone', -'origin_country' => 'originCountry', -'methods' => 'methods' ]; + 'origin_timezone' => 'originTimezone', + 'origin_country' => 'originCountry', + 'methods' => 'methods']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'result' => 'setResult', -'origin_timezone' => 'setOriginTimezone', -'origin_country' => 'setOriginCountry', -'methods' => 'setMethods' ]; + 'origin_timezone' => 'setOriginTimezone', + 'origin_country' => 'setOriginCountry', + 'methods' => 'setMethods']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'result' => 'getResult', -'origin_timezone' => 'getOriginTimezone', -'origin_country' => 'getOriginCountry', -'methods' => 'getMethods' ]; + 'origin_timezone' => 'getOriginTimezone', + 'origin_country' => 'getOriginCountry', + 'methods' => 'getMethods']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; + $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; + $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -127,7 +163,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -135,7 +171,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -150,29 +186,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; - $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; - $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -182,33 +195,32 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['origin_timezone'] === null) { + if (null === $this->container['origin_timezone']) { $invalidProperties[] = "'origin_timezone' can't be null"; } - if ($this->container['methods'] === null) { + if (null === $this->container['methods']) { $invalidProperties[] = "'methods' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result - * @return bool + * Gets result. */ public function getResult(): bool { @@ -216,9 +228,9 @@ public function getResult(): bool } /** - * Sets result + * Sets result. * - * @param bool $result VPN or other anonymizing service has been used when sending the request. + * @param bool $result VPN or other anonymizing service has been used when sending the request * * @return $this */ @@ -230,8 +242,7 @@ public function setResult(bool $result): self } /** - * Gets origin_timezone - * @return string + * Gets origin_timezone. */ public function getOriginTimezone(): string { @@ -239,9 +250,9 @@ public function getOriginTimezone(): string } /** - * Sets origin_timezone + * Sets origin_timezone. * - * @param string $origin_timezone Local timezone which is used in timezoneMismatch method. + * @param string $origin_timezone local timezone which is used in timezoneMismatch method * * @return $this */ @@ -253,7 +264,8 @@ public function setOriginTimezone(string $origin_timezone): self } /** - * Gets origin_country + * Gets origin_country. + * * @return ?string */ public function getOriginCountry(): ?string @@ -262,7 +274,7 @@ public function getOriginCountry(): ?string } /** - * Sets origin_country + * Sets origin_country. * * @param ?string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * @@ -276,31 +288,31 @@ public function setOriginCountry(?string $origin_country): self } /** - * Gets methods - * @return \Fingerprint\ServerAPI\Model\VpnResultMethods + * Gets methods. */ - public function getMethods(): \Fingerprint\ServerAPI\Model\VpnResultMethods + public function getMethods(): VpnResultMethods { return $this->container['methods']; } /** - * Sets methods + * Sets methods. * - * @param \Fingerprint\ServerAPI\Model\VpnResultMethods $methods methods + * @param VpnResultMethods $methods methods * * @return $this */ - public function setMethods(\Fingerprint\ServerAPI\Model\VpnResultMethods $methods): self + public function setMethods(VpnResultMethods $methods): self { $this->container['methods'] = $methods; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -310,7 +322,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -320,8 +332,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -335,27 +347,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index d4062ac5..36f39b53 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -1,14 +1,16 @@ 'bool', -'public_vpn' => 'bool', -'auxiliary_mobile' => 'bool', -'os_mismatch' => 'bool' ]; + 'public_vpn' => 'bool', + 'auxiliary_mobile' => 'bool', + 'os_mismatch' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'timezone_mismatch' => null, -'public_vpn' => null, -'auxiliary_mobile' => null, -'os_mismatch' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'public_vpn' => null, + 'auxiliary_mobile' => null, + 'os_mismatch' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', -'public_vpn' => 'publicVPN', -'auxiliary_mobile' => 'auxiliaryMobile', -'os_mismatch' => 'osMismatch' ]; + 'public_vpn' => 'publicVPN', + 'auxiliary_mobile' => 'auxiliaryMobile', + 'os_mismatch' => 'osMismatch']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', -'public_vpn' => 'setPublicVpn', -'auxiliary_mobile' => 'setAuxiliaryMobile', -'os_mismatch' => 'setOsMismatch' ]; + 'public_vpn' => 'setPublicVpn', + 'auxiliary_mobile' => 'setAuxiliaryMobile', + 'os_mismatch' => 'setOsMismatch']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', -'public_vpn' => 'getPublicVpn', -'auxiliary_mobile' => 'getAuxiliaryMobile', -'os_mismatch' => 'getOsMismatch' ]; + 'public_vpn' => 'getPublicVpn', + 'auxiliary_mobile' => 'getAuxiliaryMobile', + 'os_mismatch' => 'getOsMismatch']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected array $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; + $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; + $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; + $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; + } + + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. */ public static function attributeMap(): array { @@ -127,7 +163,7 @@ public static function attributeMap(): array } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). */ public static function setters(): array { @@ -135,7 +171,7 @@ public static function setters(): array } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). */ public static function getters(): array { @@ -150,29 +186,6 @@ public function getModelName(): string return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected array $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; - $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; - $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; - $this->container['os_mismatch'] = isset($data['os_mismatch']) ? $data['os_mismatch'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -182,36 +195,35 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['timezone_mismatch'] === null) { + if (null === $this->container['timezone_mismatch']) { $invalidProperties[] = "'timezone_mismatch' can't be null"; } - if ($this->container['public_vpn'] === null) { + if (null === $this->container['public_vpn']) { $invalidProperties[] = "'public_vpn' can't be null"; } - if ($this->container['auxiliary_mobile'] === null) { + if (null === $this->container['auxiliary_mobile']) { $invalidProperties[] = "'auxiliary_mobile' can't be null"; } - if ($this->container['os_mismatch'] === null) { + if (null === $this->container['os_mismatch']) { $invalidProperties[] = "'os_mismatch' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets timezone_mismatch - * @return bool + * Gets timezone_mismatch. */ public function getTimezoneMismatch(): bool { @@ -219,9 +231,9 @@ public function getTimezoneMismatch(): bool } /** - * Sets timezone_mismatch + * Sets timezone_mismatch. * - * @param bool $timezone_mismatch The browser timezone doesn't match the timezone inferred from the request IP address. + * @param bool $timezone_mismatch the browser timezone doesn't match the timezone inferred from the request IP address * * @return $this */ @@ -233,8 +245,7 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self } /** - * Gets public_vpn - * @return bool + * Gets public_vpn. */ public function getPublicVpn(): bool { @@ -242,9 +253,9 @@ public function getPublicVpn(): bool } /** - * Sets public_vpn + * Sets public_vpn. * - * @param bool $public_vpn Request IP address is owned and used by a public VPN service provider. + * @param bool $public_vpn request IP address is owned and used by a public VPN service provider * * @return $this */ @@ -256,8 +267,7 @@ public function setPublicVpn(bool $public_vpn): self } /** - * Gets auxiliary_mobile - * @return bool + * Gets auxiliary_mobile. */ public function getAuxiliaryMobile(): bool { @@ -265,7 +275,7 @@ public function getAuxiliaryMobile(): bool } /** - * Sets auxiliary_mobile + * Sets auxiliary_mobile. * * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. * @@ -279,8 +289,7 @@ public function setAuxiliaryMobile(bool $auxiliary_mobile): self } /** - * Gets os_mismatch - * @return bool + * Gets os_mismatch. */ public function getOsMismatch(): bool { @@ -288,9 +297,9 @@ public function getOsMismatch(): bool } /** - * Sets os_mismatch + * Sets os_mismatch. * - * @param bool $os_mismatch The browser runs on a different operating system than the operating system inferred from the request network signature. + * @param bool $os_mismatch the browser runs on a different operating system than the operating system inferred from the request network signature * * @return $this */ @@ -300,10 +309,11 @@ public function setOsMismatch(bool $os_mismatch): self return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -313,7 +323,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -323,8 +333,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -338,27 +348,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index e677fb3e..585c084a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -1,14 +1,16 @@ 'string', -'client_referrer' => 'string', -'user_agent' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', -'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', -'incognito' => 'bool', -'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', -'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', -'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'tor' => '\Fingerprint\ServerAPI\Model\TorResult', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', -'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', -'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'remote_control' => '\Fingerprint\ServerAPI\Model\RemoteControlResult', -'velocity' => '\Fingerprint\ServerAPI\Model\VelocityResult', -'developer_tools' => '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', -'request_id' => 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + 'client_referrer' => 'string', + 'user_agent' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', + 'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', + 'incognito' => 'bool', + 'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', + 'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', + 'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', + 'tor' => '\Fingerprint\ServerAPI\Model\TorResult', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', + 'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', + 'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', + 'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', + 'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'remote_control' => '\Fingerprint\ServerAPI\Model\RemoteControlResult', + 'velocity' => '\Fingerprint\ServerAPI\Model\VelocityResult', + 'developer_tools' => '\Fingerprint\ServerAPI\Model\DeveloperToolsResult', + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static array $swaggerFormats = [ 'visitor_id' => null, -'client_referrer' => null, -'user_agent' => null, -'bot' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'raw_device_attributes' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'remote_control' => null, -'velocity' => null, -'developer_tools' => null, -'request_id' => null, -'browser_details' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - */ - public static function swaggerTypes(): array - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - */ - public static function swaggerFormats(): array - { - return self::$swaggerFormats; - } + 'client_referrer' => null, + 'user_agent' => null, + 'bot' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'raw_device_attributes' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'remote_control' => null, + 'velocity' => null, + 'developer_tools' => null, + 'request_id' => null, + 'browser_details' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static array $attributeMap = [ 'visitor_id' => 'visitorId', -'client_referrer' => 'clientReferrer', -'user_agent' => 'userAgent', -'bot' => 'bot', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'raw_device_attributes' => 'rawDeviceAttributes', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'remote_control' => 'remoteControl', -'velocity' => 'velocity', -'developer_tools' => 'developerTools', -'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'client_referrer' => 'clientReferrer', + 'user_agent' => 'userAgent', + 'bot' => 'bot', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'raw_device_attributes' => 'rawDeviceAttributes', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'remote_control' => 'remoteControl', + 'velocity' => 'velocity', + 'developer_tools' => 'developerTools', + 'request_id' => 'requestId', + 'browser_details' => 'browserDetails', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static array $setters = [ 'visitor_id' => 'setVisitorId', -'client_referrer' => 'setClientReferrer', -'user_agent' => 'setUserAgent', -'bot' => 'setBot', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'raw_device_attributes' => 'setRawDeviceAttributes', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'remote_control' => 'setRemoteControl', -'velocity' => 'setVelocity', -'developer_tools' => 'setDeveloperTools', -'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'client_referrer' => 'setClientReferrer', + 'user_agent' => 'setUserAgent', + 'bot' => 'setBot', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'raw_device_attributes' => 'setRawDeviceAttributes', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'remote_control' => 'setRemoteControl', + 'velocity' => 'setVelocity', + 'developer_tools' => 'setDeveloperTools', + 'request_id' => 'setRequestId', + 'browser_details' => 'setBrowserDetails', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static array $getters = [ 'visitor_id' => 'getVisitorId', -'client_referrer' => 'getClientReferrer', -'user_agent' => 'getUserAgent', -'bot' => 'getBot', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'raw_device_attributes' => 'getRawDeviceAttributes', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'remote_control' => 'getRemoteControl', -'velocity' => 'getVelocity', -'developer_tools' => 'getDeveloperTools', -'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - */ - public static function getters(): array - { - return self::$getters; - } - - /** - * The original name of the model. - */ - public function getModelName(): string - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values + 'client_referrer' => 'getClientReferrer', + 'user_agent' => 'getUserAgent', + 'bot' => 'getBot', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'raw_device_attributes' => 'getRawDeviceAttributes', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'remote_control' => 'getRemoteControl', + 'velocity' => 'getVelocity', + 'developer_tools' => 'getDeveloperTools', + 'request_id' => 'getRequestId', + 'browser_details' => 'getBrowserDetails', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. * * @var mixed[] */ protected array $container = []; /** - * Constructor + * Constructor. * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; $this->container['client_referrer'] = isset($data['client_referrer']) ? $data['client_referrer'] : null; @@ -383,6 +332,70 @@ public function __construct(array $data = null) $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; } + /** + * Gets the string presentation of the object. + */ + public function __toString(): string + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + */ + public static function swaggerTypes(): array + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + */ + public static function swaggerFormats(): array + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * The original name of the model. + */ + public function getModelName(): string + { + return self::$swaggerModelName; + } + /** * Show all the invalid properties with reasons. * @@ -392,57 +405,56 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid(): bool { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id - * @return string + * Gets visitor_id. */ public function getVisitorId(): string { @@ -450,7 +462,7 @@ public function getVisitorId(): string } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -464,7 +476,8 @@ public function setVisitorId(string $visitor_id): self } /** - * Gets client_referrer + * Gets client_referrer. + * * @return ?string */ public function getClientReferrer(): ?string @@ -473,7 +486,7 @@ public function getClientReferrer(): ?string } /** - * Sets client_referrer + * Sets client_referrer. * * @param ?string $client_referrer client_referrer * @@ -487,7 +500,8 @@ public function setClientReferrer(?string $client_referrer): self } /** - * Gets user_agent + * Gets user_agent. + * * @return ?string */ public function getUserAgent(): ?string @@ -496,7 +510,7 @@ public function getUserAgent(): ?string } /** - * Sets user_agent + * Sets user_agent. * * @param ?string $user_agent user_agent * @@ -510,22 +524,23 @@ public function setUserAgent(?string $user_agent): self } /** - * Gets bot + * Gets bot. + * * @return ?\Fingerprint\ServerAPI\Model\BotdDetectionResult */ - public function getBot(): ?\Fingerprint\ServerAPI\Model\BotdDetectionResult + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } /** - * Sets bot + * Sets bot. * * @param ?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ - public function setBot(?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot): self + public function setBot(?BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -533,22 +548,23 @@ public function setBot(?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot): } /** - * Gets ip_info + * Gets ip_info. + * * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getIpInfo(): ?\Fingerprint\ServerAPI\Model\IpInfoResult + public function getIpInfo(): ?IpInfoResult { return $this->container['ip_info']; } /** - * Sets ip_info + * Sets ip_info. * * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info * * @return $this */ - public function setIpInfo(?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info): self + public function setIpInfo(?IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -556,8 +572,7 @@ public function setIpInfo(?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info): } /** - * Gets incognito - * @return bool + * Gets incognito. */ public function getIncognito(): bool { @@ -565,9 +580,9 @@ public function getIncognito(): bool } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -579,22 +594,23 @@ public function setIncognito(bool $incognito): self } /** - * Gets root_apps + * Gets root_apps. + * * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getRootApps(): ?\Fingerprint\ServerAPI\Model\RootAppsResult + public function getRootApps(): ?RootAppsResult { return $this->container['root_apps']; } /** - * Sets root_apps + * Sets root_apps. * * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps * * @return $this */ - public function setRootApps(?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps): self + public function setRootApps(?RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -602,22 +618,23 @@ public function setRootApps(?\Fingerprint\ServerAPI\Model\RootAppsResult $root_a } /** - * Gets emulator + * Gets emulator. + * * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getEmulator(): ?\Fingerprint\ServerAPI\Model\EmulatorResult + public function getEmulator(): ?EmulatorResult { return $this->container['emulator']; } /** - * Sets emulator + * Sets emulator. * * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator * * @return $this */ - public function setEmulator(?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator): self + public function setEmulator(?EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -625,22 +642,23 @@ public function setEmulator(?\Fingerprint\ServerAPI\Model\EmulatorResult $emulat } /** - * Gets cloned_app + * Gets cloned_app. + * * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getClonedApp(): ?\Fingerprint\ServerAPI\Model\ClonedAppResult + public function getClonedApp(): ?ClonedAppResult { return $this->container['cloned_app']; } /** - * Sets cloned_app + * Sets cloned_app. * * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app * * @return $this */ - public function setClonedApp(?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app): self + public function setClonedApp(?ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -648,22 +666,23 @@ public function setClonedApp(?\Fingerprint\ServerAPI\Model\ClonedAppResult $clon } /** - * Gets factory_reset + * Gets factory_reset. + * * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getFactoryReset(): ?\Fingerprint\ServerAPI\Model\FactoryResetResult + public function getFactoryReset(): ?FactoryResetResult { return $this->container['factory_reset']; } /** - * Sets factory_reset + * Sets factory_reset. * * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset * * @return $this */ - public function setFactoryReset(?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset): self + public function setFactoryReset(?FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -671,22 +690,23 @@ public function setFactoryReset(?\Fingerprint\ServerAPI\Model\FactoryResetResult } /** - * Gets jailbroken + * Gets jailbroken. + * * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getJailbroken(): ?\Fingerprint\ServerAPI\Model\JailbrokenResult + public function getJailbroken(): ?JailbrokenResult { return $this->container['jailbroken']; } /** - * Sets jailbroken + * Sets jailbroken. * * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken * * @return $this */ - public function setJailbroken(?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken): self + public function setJailbroken(?JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -694,22 +714,23 @@ public function setJailbroken(?\Fingerprint\ServerAPI\Model\JailbrokenResult $ja } /** - * Gets frida + * Gets frida. + * * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getFrida(): ?\Fingerprint\ServerAPI\Model\FridaResult + public function getFrida(): ?FridaResult { return $this->container['frida']; } /** - * Sets frida + * Sets frida. * * @param ?\Fingerprint\ServerAPI\Model\FridaResult $frida frida * * @return $this */ - public function setFrida(?\Fingerprint\ServerAPI\Model\FridaResult $frida): self + public function setFrida(?FridaResult $frida): self { $this->container['frida'] = $frida; @@ -717,22 +738,23 @@ public function setFrida(?\Fingerprint\ServerAPI\Model\FridaResult $frida): self } /** - * Gets ip_blocklist + * Gets ip_blocklist. + * * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getIpBlocklist(): ?\Fingerprint\ServerAPI\Model\IpBlockListResult + public function getIpBlocklist(): ?IpBlockListResult { return $this->container['ip_blocklist']; } /** - * Sets ip_blocklist + * Sets ip_blocklist. * * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist): self + public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -740,22 +762,23 @@ public function setIpBlocklist(?\Fingerprint\ServerAPI\Model\IpBlockListResult $ } /** - * Gets tor + * Gets tor. + * * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getTor(): ?\Fingerprint\ServerAPI\Model\TorResult + public function getTor(): ?TorResult { return $this->container['tor']; } /** - * Sets tor + * Sets tor. * * @param ?\Fingerprint\ServerAPI\Model\TorResult $tor tor * * @return $this */ - public function setTor(?\Fingerprint\ServerAPI\Model\TorResult $tor): self + public function setTor(?TorResult $tor): self { $this->container['tor'] = $tor; @@ -763,22 +786,23 @@ public function setTor(?\Fingerprint\ServerAPI\Model\TorResult $tor): self } /** - * Gets privacy_settings + * Gets privacy_settings. + * * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getPrivacySettings(): ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult + public function getPrivacySettings(): ?PrivacySettingsResult { return $this->container['privacy_settings']; } /** - * Sets privacy_settings + * Sets privacy_settings. * * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings): self + public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -786,22 +810,23 @@ public function setPrivacySettings(?\Fingerprint\ServerAPI\Model\PrivacySettings } /** - * Gets virtual_machine + * Gets virtual_machine. + * * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getVirtualMachine(): ?\Fingerprint\ServerAPI\Model\VirtualMachineResult + public function getVirtualMachine(): ?VirtualMachineResult { return $this->container['virtual_machine']; } /** - * Sets virtual_machine + * Sets virtual_machine. * * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine): self + public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -809,22 +834,23 @@ public function setVirtualMachine(?\Fingerprint\ServerAPI\Model\VirtualMachineRe } /** - * Gets vpn + * Gets vpn. + * * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getVpn(): ?\Fingerprint\ServerAPI\Model\VpnResult + public function getVpn(): ?VpnResult { return $this->container['vpn']; } /** - * Sets vpn + * Sets vpn. * * @param ?\Fingerprint\ServerAPI\Model\VpnResult $vpn vpn * * @return $this */ - public function setVpn(?\Fingerprint\ServerAPI\Model\VpnResult $vpn): self + public function setVpn(?VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -832,22 +858,23 @@ public function setVpn(?\Fingerprint\ServerAPI\Model\VpnResult $vpn): self } /** - * Gets proxy + * Gets proxy. + * * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getProxy(): ?\Fingerprint\ServerAPI\Model\ProxyResult + public function getProxy(): ?ProxyResult { return $this->container['proxy']; } /** - * Sets proxy + * Sets proxy. * * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy * * @return $this */ - public function setProxy(?\Fingerprint\ServerAPI\Model\ProxyResult $proxy): self + public function setProxy(?ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -855,22 +882,23 @@ public function setProxy(?\Fingerprint\ServerAPI\Model\ProxyResult $proxy): self } /** - * Gets tampering + * Gets tampering. + * * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getTampering(): ?\Fingerprint\ServerAPI\Model\TamperingResult + public function getTampering(): ?TamperingResult { return $this->container['tampering']; } /** - * Sets tampering + * Sets tampering. * * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering * * @return $this */ - public function setTampering(?\Fingerprint\ServerAPI\Model\TamperingResult $tampering): self + public function setTampering(?TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -878,22 +906,23 @@ public function setTampering(?\Fingerprint\ServerAPI\Model\TamperingResult $tamp } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. + * * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getRawDeviceAttributes(): ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ - public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes): self + public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -901,22 +930,23 @@ public function setRawDeviceAttributes(?\Fingerprint\ServerAPI\Model\RawDeviceAt } /** - * Gets high_activity + * Gets high_activity. + * * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getHighActivity(): ?\Fingerprint\ServerAPI\Model\HighActivityResult + public function getHighActivity(): ?HighActivityResult { return $this->container['high_activity']; } /** - * Sets high_activity + * Sets high_activity. * * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity * * @return $this */ - public function setHighActivity(?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity): self + public function setHighActivity(?HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -924,22 +954,23 @@ public function setHighActivity(?\Fingerprint\ServerAPI\Model\HighActivityResult } /** - * Gets location_spoofing + * Gets location_spoofing. + * * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getLocationSpoofing(): ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult + public function getLocationSpoofing(): ?LocationSpoofingResult { return $this->container['location_spoofing']; } /** - * Sets location_spoofing + * Sets location_spoofing. * * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing): self + public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -947,22 +978,23 @@ public function setLocationSpoofing(?\Fingerprint\ServerAPI\Model\LocationSpoofi } /** - * Gets suspect_score + * Gets suspect_score. + * * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getSuspectScore(): ?\Fingerprint\ServerAPI\Model\SuspectScoreResult + public function getSuspectScore(): ?SuspectScoreResult { return $this->container['suspect_score']; } /** - * Sets suspect_score + * Sets suspect_score. * * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score * * @return $this */ - public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score): self + public function setSuspectScore(?SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -970,22 +1002,23 @@ public function setSuspectScore(?\Fingerprint\ServerAPI\Model\SuspectScoreResult } /** - * Gets remote_control + * Gets remote_control. + * * @return ?\Fingerprint\ServerAPI\Model\RemoteControlResult */ - public function getRemoteControl(): ?\Fingerprint\ServerAPI\Model\RemoteControlResult + public function getRemoteControl(): ?RemoteControlResult { return $this->container['remote_control']; } /** - * Sets remote_control + * Sets remote_control. * * @param ?\Fingerprint\ServerAPI\Model\RemoteControlResult $remote_control remote_control * * @return $this */ - public function setRemoteControl(?\Fingerprint\ServerAPI\Model\RemoteControlResult $remote_control): self + public function setRemoteControl(?RemoteControlResult $remote_control): self { $this->container['remote_control'] = $remote_control; @@ -993,22 +1026,23 @@ public function setRemoteControl(?\Fingerprint\ServerAPI\Model\RemoteControlResu } /** - * Gets velocity + * Gets velocity. + * * @return ?\Fingerprint\ServerAPI\Model\VelocityResult */ - public function getVelocity(): ?\Fingerprint\ServerAPI\Model\VelocityResult + public function getVelocity(): ?VelocityResult { return $this->container['velocity']; } /** - * Sets velocity + * Sets velocity. * * @param ?\Fingerprint\ServerAPI\Model\VelocityResult $velocity velocity * * @return $this */ - public function setVelocity(?\Fingerprint\ServerAPI\Model\VelocityResult $velocity): self + public function setVelocity(?VelocityResult $velocity): self { $this->container['velocity'] = $velocity; @@ -1016,22 +1050,23 @@ public function setVelocity(?\Fingerprint\ServerAPI\Model\VelocityResult $veloci } /** - * Gets developer_tools + * Gets developer_tools. + * * @return ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult */ - public function getDeveloperTools(): ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult + public function getDeveloperTools(): ?DeveloperToolsResult { return $this->container['developer_tools']; } /** - * Sets developer_tools + * Sets developer_tools. * * @param ?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $developer_tools developer_tools * * @return $this */ - public function setDeveloperTools(?\Fingerprint\ServerAPI\Model\DeveloperToolsResult $developer_tools): self + public function setDeveloperTools(?DeveloperToolsResult $developer_tools): self { $this->container['developer_tools'] = $developer_tools; @@ -1039,8 +1074,7 @@ public function setDeveloperTools(?\Fingerprint\ServerAPI\Model\DeveloperToolsRe } /** - * Gets request_id - * @return string + * Gets request_id. */ public function getRequestId(): string { @@ -1048,9 +1082,9 @@ public function getRequestId(): string } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -1062,22 +1096,21 @@ public function setRequestId(string $request_id): self } /** - * Gets browser_details - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * Gets browser_details. */ - public function getBrowserDetails(): \Fingerprint\ServerAPI\Model\BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ - public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1085,8 +1118,7 @@ public function setBrowserDetails(\Fingerprint\ServerAPI\Model\BrowserDetails $b } /** - * Gets ip - * @return string + * Gets ip. */ public function getIp(): string { @@ -1094,7 +1126,7 @@ public function getIp(): string } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -1108,22 +1140,23 @@ public function setIp(string $ip): self } /** - * Gets ip_location + * Gets ip_location. + * * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation(): ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } /** - * Sets ip_location + * Sets ip_location. * * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1131,8 +1164,7 @@ public function setIpLocation(?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation } /** - * Gets timestamp - * @return int + * Gets timestamp. */ public function getTimestamp(): int { @@ -1140,9 +1172,9 @@ public function getTimestamp(): int } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -1154,8 +1186,7 @@ public function setTimestamp(int $timestamp): self } /** - * Gets time - * @return \DateTime + * Gets time. */ public function getTime(): \DateTime { @@ -1163,9 +1194,9 @@ public function getTime(): \DateTime } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -1177,8 +1208,7 @@ public function setTime(\DateTime $time): self } /** - * Gets url - * @return string + * Gets url. */ public function getUrl(): string { @@ -1186,9 +1216,9 @@ public function getUrl(): string } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -1200,7 +1230,8 @@ public function setUrl(string $url): self } /** - * Gets tag + * Gets tag. + * * @return ?map[string,object] */ public function getTag(): ?array @@ -1209,9 +1240,9 @@ public function getTag(): ?array } /** - * Sets tag + * Sets tag. * - * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param ?map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -1223,7 +1254,8 @@ public function setTag(?array $tag): self } /** - * Gets linked_id + * Gets linked_id. + * * @return ?string */ public function getLinkedId(): ?string @@ -1232,9 +1264,9 @@ public function getLinkedId(): ?string } /** - * Sets linked_id + * Sets linked_id. * - * @param ?string $linked_id A customer-provided id that was sent with identification request. + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -1246,22 +1278,23 @@ public function setLinkedId(?string $linked_id): self } /** - * Gets confidence + * Gets confidence. + * * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence(): ?\Fingerprint\ServerAPI\Model\Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } /** - * Sets confidence + * Sets confidence. * * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -1269,8 +1302,7 @@ public function setConfidence(?\Fingerprint\ServerAPI\Model\Confidence $confiden } /** - * Gets visitor_found - * @return bool + * Gets visitor_found. */ public function getVisitorFound(): bool { @@ -1278,9 +1310,9 @@ public function getVisitorFound(): bool } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -1292,22 +1324,21 @@ public function setVisitorFound(bool $visitor_found): self } /** - * Gets first_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets first_seen_at. */ - public function getFirstSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ - public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1315,31 +1346,31 @@ public function setFirstSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $first_seen_a } /** - * Gets last_seen_at - * @return \Fingerprint\ServerAPI\Model\SeenAt + * Gets last_seen_at. */ - public function getLastSeenAt(): \Fingerprint\ServerAPI\Model\SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ - public function setLastSeenAt(\Fingerprint\ServerAPI\Model\SeenAt $last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -1349,7 +1380,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetGet($offset): mixed { @@ -1359,8 +1390,8 @@ public function offsetGet($offset): mixed /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set + * @param int $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, mixed $value): void { @@ -1374,27 +1405,10 @@ public function offsetSet($offset, mixed $value): void /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset */ public function offsetUnset($offset): void { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } }