From 29cb26c3f50bfa035ca750948bb92a2299f579bd Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 11:56:37 +0300 Subject: [PATCH] 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,