From d2fde0f57313c29efaaf789248c882bc020e13e5 Mon Sep 17 00:00:00 2001 From: GoPlusBot Date: Thu, 22 Jan 2026 04:20:03 +0000 Subject: [PATCH] Update client code for 109be66a51885a34c40cdbb7b6d17b8688990d94 --- src/lib/client/Api/LockControllerApi.php | 849 ++++++++++++++++++ src/lib/client/Api/PublicControllerApi.php | 373 ++++++++ .../client/Api/SecWareOpenControllerApi.php | 660 ++++++++++++++ .../Api/TransactionSecurityControllerApi.php | 373 ++++++++ src/lib/client/Model/AddressInfo.php | 330 +++++++ src/lib/client/Model/AllowanceChange.php | 390 ++++++++ .../client/Model/DustAttackDetectionReq.php | 330 +++++++ src/lib/client/Model/ERC20BalanceChange.php | 330 +++++++ src/lib/client/Model/ERC20Change.php | 330 +++++++ src/lib/client/Model/ERC721BalanceChange.php | 330 +++++++ src/lib/client/Model/ERC721Change.php | 360 ++++++++ src/lib/client/Model/Flag.php | 330 +++++++ src/lib/client/Model/LogEntry.php | 360 ++++++++ src/lib/client/Model/NativeBalanceChange.php | 330 +++++++ src/lib/client/Model/NativeChange.php | 360 ++++++++ src/lib/client/Model/OpenScanAddressResp.php | 330 +++++++ .../Model/PageResponseTaNftLockerLockInfo.php | 390 ++++++++ .../PageResponseTaTokenLockerLockInfo.php | 390 ++++++++ .../PageResponseV4NftLockerLockInfos.php | 390 ++++++++ .../ResponseWrapperDustAttackDetection.php | 360 ++++++++ ...sponseWrapperDustAttackDetectionResult.php | 331 +++++++ .../Model/ResponseWrapperGetScanResult.php | 360 ++++++++ .../ResponseWrapperGetScanResultResult.php | 661 ++++++++++++++ ...pperGetScanResultResultAddressPoisoned.php | 330 +++++++ ...nResultResultAddressPoisonedRiskDetail.php | 330 +++++++ ...WrapperGetScanResultResultApprovalRisk.php | 330 +++++++ ...tScanResultResultApprovalRiskErc20Risk.php | 450 ++++++++++ ...ScanResultResultApprovalRiskRiskDetail.php | 300 +++++++ ...pperGetScanResultResultStablecoinDepeg.php | 330 +++++++ ...nResultResultStablecoinDepegRiskDetail.php | 360 ++++++++ ...apperGetScanResultResultTokenAttention.php | 330 +++++++ ...anResultResultTokenAttentionRiskDetail.php | 330 +++++++ .../ResponseWrapperOpenScanAddressResp.php | 360 ++++++++ ...WrapperPageResponseTaNftLockerLockInfo.php | 360 ++++++++ ...apperPageResponseTaTokenLockerLockInfo.php | 360 ++++++++ ...rapperPageResponseV4NftLockerLockInfos.php | 360 ++++++++ ...onseWrapperTransactionSecurityResponse.php | 360 ++++++++ .../ResponseWrapperV4LpLockerLockInfoResp.php | 360 ++++++++ .../client/Model/ResponseWrapperstring.php | 360 ++++++++ src/lib/client/Model/TaNftLockerLockInfo.php | 541 +++++++++++ .../client/Model/TaTokenLockerLockInfo.php | 541 +++++++++++ .../Model/TransactionSecurityRequest.php | 630 +++++++++++++ .../Model/TransactionSecurityResponse.php | 660 ++++++++++++++ .../client/Model/V4LpLockerLockInfoResp.php | 480 ++++++++++ src/lib/client/Model/V4NftLockerLockInfos.php | 421 +++++++++ 45 files changed, 18130 insertions(+) create mode 100644 src/lib/client/Api/PublicControllerApi.php create mode 100644 src/lib/client/Api/SecWareOpenControllerApi.php create mode 100644 src/lib/client/Api/TransactionSecurityControllerApi.php create mode 100644 src/lib/client/Model/AddressInfo.php create mode 100644 src/lib/client/Model/AllowanceChange.php create mode 100644 src/lib/client/Model/DustAttackDetectionReq.php create mode 100644 src/lib/client/Model/ERC20BalanceChange.php create mode 100644 src/lib/client/Model/ERC20Change.php create mode 100644 src/lib/client/Model/ERC721BalanceChange.php create mode 100644 src/lib/client/Model/ERC721Change.php create mode 100644 src/lib/client/Model/Flag.php create mode 100644 src/lib/client/Model/LogEntry.php create mode 100644 src/lib/client/Model/NativeBalanceChange.php create mode 100644 src/lib/client/Model/NativeChange.php create mode 100644 src/lib/client/Model/OpenScanAddressResp.php create mode 100644 src/lib/client/Model/PageResponseTaNftLockerLockInfo.php create mode 100644 src/lib/client/Model/PageResponseTaTokenLockerLockInfo.php create mode 100644 src/lib/client/Model/PageResponseV4NftLockerLockInfos.php create mode 100644 src/lib/client/Model/ResponseWrapperDustAttackDetection.php create mode 100644 src/lib/client/Model/ResponseWrapperDustAttackDetectionResult.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResult.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResult.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisoned.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRisk.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskErc20Risk.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskRiskDetail.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepeg.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttention.php create mode 100644 src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttentionRiskDetail.php create mode 100644 src/lib/client/Model/ResponseWrapperOpenScanAddressResp.php create mode 100644 src/lib/client/Model/ResponseWrapperPageResponseTaNftLockerLockInfo.php create mode 100644 src/lib/client/Model/ResponseWrapperPageResponseTaTokenLockerLockInfo.php create mode 100644 src/lib/client/Model/ResponseWrapperPageResponseV4NftLockerLockInfos.php create mode 100644 src/lib/client/Model/ResponseWrapperTransactionSecurityResponse.php create mode 100644 src/lib/client/Model/ResponseWrapperV4LpLockerLockInfoResp.php create mode 100644 src/lib/client/Model/ResponseWrapperstring.php create mode 100644 src/lib/client/Model/TaNftLockerLockInfo.php create mode 100644 src/lib/client/Model/TaTokenLockerLockInfo.php create mode 100644 src/lib/client/Model/TransactionSecurityRequest.php create mode 100644 src/lib/client/Model/TransactionSecurityResponse.php create mode 100644 src/lib/client/Model/V4LpLockerLockInfoResp.php create mode 100644 src/lib/client/Model/V4NftLockerLockInfos.php diff --git a/src/lib/client/Api/LockControllerApi.php b/src/lib/client/Api/LockControllerApi.php index 1ef9910..a5834c8 100644 --- a/src/lib/client/Api/LockControllerApi.php +++ b/src/lib/client/Api/LockControllerApi.php @@ -86,6 +86,279 @@ public function getConfig() return $this->config; } + /** + * Operation getNftLockerLockInfosListUsingGET + * + * get lpv3 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperPageResponseTaNftLockerLockInfo + */ + public function getNftLockerLockInfosListUsingGET($page_num, $page_size) + { + list($response) = $this->getNftLockerLockInfosListUsingGETWithHttpInfo($page_num, $page_size); + return $response; + } + + /** + * Operation getNftLockerLockInfosListUsingGETWithHttpInfo + * + * get lpv3 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperPageResponseTaNftLockerLockInfo, HTTP status code, HTTP response headers (array of strings) + */ + public function getNftLockerLockInfosListUsingGETWithHttpInfo($page_num, $page_size) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperPageResponseTaNftLockerLockInfo'; + $request = $this->getNftLockerLockInfosListUsingGETRequest($page_num, $page_size); + + 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(), + '\Swagger\Client\Model\ResponseWrapperPageResponseTaNftLockerLockInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getNftLockerLockInfosListUsingGETAsync + * + * get lpv3 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNftLockerLockInfosListUsingGETAsync($page_num, $page_size) + { + return $this->getNftLockerLockInfosListUsingGETAsyncWithHttpInfo($page_num, $page_size) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getNftLockerLockInfosListUsingGETAsyncWithHttpInfo + * + * get lpv3 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNftLockerLockInfosListUsingGETAsyncWithHttpInfo($page_num, $page_size) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperPageResponseTaNftLockerLockInfo'; + $request = $this->getNftLockerLockInfosListUsingGETRequest($page_num, $page_size); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'getNftLockerLockInfosListUsingGET' + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getNftLockerLockInfosListUsingGETRequest($page_num, $page_size) + { + // verify the required parameter 'page_num' is set + if ($page_num === null || (is_array($page_num) && count($page_num) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_num when calling getNftLockerLockInfosListUsingGET' + ); + } + // verify the required parameter 'page_size' is set + if ($page_size === null || (is_array($page_size) && count($page_size) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_size when calling getNftLockerLockInfosListUsingGET' + ); + } + + $resourcePath = '/open/api/v1/locks/lpv3s'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($page_num !== null) { + $queryParams['pageNum'] = ObjectSerializer::toQueryValue($page_num, 'int32'); + } + // query params + if ($page_size !== null) { + $queryParams['pageSize'] = ObjectSerializer::toQueryValue($page_size, 'int32'); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getNftLockersUsingGET * @@ -710,6 +983,582 @@ protected function getTokenLockersUsingGETRequest($chain_id, $page_num, $page_si ); } + /** + * Operation getV4NftLockerLockInfosListUsingGET + * + * get lpv4 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperPageResponseV4NftLockerLockInfos + */ + public function getV4NftLockerLockInfosListUsingGET($page_num, $page_size) + { + list($response) = $this->getV4NftLockerLockInfosListUsingGETWithHttpInfo($page_num, $page_size); + return $response; + } + + /** + * Operation getV4NftLockerLockInfosListUsingGETWithHttpInfo + * + * get lpv4 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperPageResponseV4NftLockerLockInfos, HTTP status code, HTTP response headers (array of strings) + */ + public function getV4NftLockerLockInfosListUsingGETWithHttpInfo($page_num, $page_size) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperPageResponseV4NftLockerLockInfos'; + $request = $this->getV4NftLockerLockInfosListUsingGETRequest($page_num, $page_size); + + 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(), + '\Swagger\Client\Model\ResponseWrapperPageResponseV4NftLockerLockInfos', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getV4NftLockerLockInfosListUsingGETAsync + * + * get lpv4 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getV4NftLockerLockInfosListUsingGETAsync($page_num, $page_size) + { + return $this->getV4NftLockerLockInfosListUsingGETAsyncWithHttpInfo($page_num, $page_size) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getV4NftLockerLockInfosListUsingGETAsyncWithHttpInfo + * + * get lpv4 locker infos + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getV4NftLockerLockInfosListUsingGETAsyncWithHttpInfo($page_num, $page_size) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperPageResponseV4NftLockerLockInfos'; + $request = $this->getV4NftLockerLockInfosListUsingGETRequest($page_num, $page_size); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'getV4NftLockerLockInfosListUsingGET' + * + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getV4NftLockerLockInfosListUsingGETRequest($page_num, $page_size) + { + // verify the required parameter 'page_num' is set + if ($page_num === null || (is_array($page_num) && count($page_num) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_num when calling getV4NftLockerLockInfosListUsingGET' + ); + } + // verify the required parameter 'page_size' is set + if ($page_size === null || (is_array($page_size) && count($page_size) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_size when calling getV4NftLockerLockInfosListUsingGET' + ); + } + + $resourcePath = '/open/api/v1/locks/lpv4s'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($page_num !== null) { + $queryParams['pageNum'] = ObjectSerializer::toQueryValue($page_num, 'int32'); + } + // query params + if ($page_size !== null) { + $queryParams['pageSize'] = ObjectSerializer::toQueryValue($page_size, 'int32'); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getV4NftLockersUsingGET + * + * get v4 nft locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_id poolId (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperV4LpLockerLockInfoResp + */ + public function getV4NftLockersUsingGET($chain_id, $page_num, $page_size, $pool_id) + { + list($response) = $this->getV4NftLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $pool_id); + return $response; + } + + /** + * Operation getV4NftLockersUsingGETWithHttpInfo + * + * get v4 nft locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_id poolId (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperV4LpLockerLockInfoResp, HTTP status code, HTTP response headers (array of strings) + */ + public function getV4NftLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $pool_id) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperV4LpLockerLockInfoResp'; + $request = $this->getV4NftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_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() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ResponseWrapperV4LpLockerLockInfoResp', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getV4NftLockersUsingGETAsync + * + * get v4 nft locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_id poolId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getV4NftLockersUsingGETAsync($chain_id, $page_num, $page_size, $pool_id) + { + return $this->getV4NftLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $pool_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getV4NftLockersUsingGETAsyncWithHttpInfo + * + * get v4 nft locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_id poolId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getV4NftLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $pool_id) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperV4LpLockerLockInfoResp'; + $request = $this->getV4NftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_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() + ); + } + ); + } + + /** + * Create request for operation 'getV4NftLockersUsingGET' + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_id poolId (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getV4NftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_id) + { + // verify the required parameter 'chain_id' is set + if ($chain_id === null || (is_array($chain_id) && count($chain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $chain_id when calling getV4NftLockersUsingGET' + ); + } + // verify the required parameter 'page_num' is set + if ($page_num === null || (is_array($page_num) && count($page_num) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_num when calling getV4NftLockersUsingGET' + ); + } + // verify the required parameter 'page_size' is set + if ($page_size === null || (is_array($page_size) && count($page_size) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $page_size when calling getV4NftLockersUsingGET' + ); + } + // verify the required parameter 'pool_id' is set + if ($pool_id === null || (is_array($pool_id) && count($pool_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pool_id when calling getV4NftLockersUsingGET' + ); + } + + $resourcePath = '/open/api/v1/locks/lpv4'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($chain_id !== null) { + $queryParams['chainId'] = ObjectSerializer::toQueryValue($chain_id, null); + } + // query params + if ($page_num !== null) { + $queryParams['pageNum'] = ObjectSerializer::toQueryValue($page_num, 'int32'); + } + // query params + if ($page_size !== null) { + $queryParams['pageSize'] = ObjectSerializer::toQueryValue($page_size, 'int32'); + } + // query params + if ($pool_id !== null) { + $queryParams['poolId'] = ObjectSerializer::toQueryValue($pool_id, null); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/src/lib/client/Api/PublicControllerApi.php b/src/lib/client/Api/PublicControllerApi.php new file mode 100644 index 0000000..9de8d65 --- /dev/null +++ b/src/lib/client/Api/PublicControllerApi.php @@ -0,0 +1,373 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation dustAttackDetectionUsingPOST + * + * dustAttackDetection + * + * @param \Swagger\Client\Model\DustAttackDetectionReq $body req (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperDustAttackDetection + */ + public function dustAttackDetectionUsingPOST($body, $authorization = null) + { + list($response) = $this->dustAttackDetectionUsingPOSTWithHttpInfo($body, $authorization); + return $response; + } + + /** + * Operation dustAttackDetectionUsingPOSTWithHttpInfo + * + * dustAttackDetection + * + * @param \Swagger\Client\Model\DustAttackDetectionReq $body req (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperDustAttackDetection, HTTP status code, HTTP response headers (array of strings) + */ + public function dustAttackDetectionUsingPOSTWithHttpInfo($body, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperDustAttackDetection'; + $request = $this->dustAttackDetectionUsingPOSTRequest($body, $authorization); + + 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(), + '\Swagger\Client\Model\ResponseWrapperDustAttackDetection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation dustAttackDetectionUsingPOSTAsync + * + * dustAttackDetection + * + * @param \Swagger\Client\Model\DustAttackDetectionReq $body req (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dustAttackDetectionUsingPOSTAsync($body, $authorization = null) + { + return $this->dustAttackDetectionUsingPOSTAsyncWithHttpInfo($body, $authorization) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation dustAttackDetectionUsingPOSTAsyncWithHttpInfo + * + * dustAttackDetection + * + * @param \Swagger\Client\Model\DustAttackDetectionReq $body req (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function dustAttackDetectionUsingPOSTAsyncWithHttpInfo($body, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperDustAttackDetection'; + $request = $this->dustAttackDetectionUsingPOSTRequest($body, $authorization); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'dustAttackDetectionUsingPOST' + * + * @param \Swagger\Client\Model\DustAttackDetectionReq $body req (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function dustAttackDetectionUsingPOSTRequest($body, $authorization = null) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling dustAttackDetectionUsingPOST' + ); + } + + $resourcePath = '/api/v1/dust_attack_detection'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // header params + if ($authorization !== null) { + $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); + } + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * 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; + } +} diff --git a/src/lib/client/Api/SecWareOpenControllerApi.php b/src/lib/client/Api/SecWareOpenControllerApi.php new file mode 100644 index 0000000..9f08438 --- /dev/null +++ b/src/lib/client/Api/SecWareOpenControllerApi.php @@ -0,0 +1,660 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getScanResultUsingGET + * + * Get address scan result + * + * @param string $request_id request_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperGetScanResult + */ + public function getScanResultUsingGET($request_id, $authorization = null) + { + list($response) = $this->getScanResultUsingGETWithHttpInfo($request_id, $authorization); + return $response; + } + + /** + * Operation getScanResultUsingGETWithHttpInfo + * + * Get address scan result + * + * @param string $request_id request_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperGetScanResult, HTTP status code, HTTP response headers (array of strings) + */ + public function getScanResultUsingGETWithHttpInfo($request_id, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperGetScanResult'; + $request = $this->getScanResultUsingGETRequest($request_id, $authorization); + + 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(), + '\Swagger\Client\Model\ResponseWrapperGetScanResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScanResultUsingGETAsync + * + * Get address scan result + * + * @param string $request_id request_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScanResultUsingGETAsync($request_id, $authorization = null) + { + return $this->getScanResultUsingGETAsyncWithHttpInfo($request_id, $authorization) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScanResultUsingGETAsyncWithHttpInfo + * + * Get address scan result + * + * @param string $request_id request_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScanResultUsingGETAsyncWithHttpInfo($request_id, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperGetScanResult'; + $request = $this->getScanResultUsingGETRequest($request_id, $authorization); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'getScanResultUsingGET' + * + * @param string $request_id request_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScanResultUsingGETRequest($request_id, $authorization = null) + { + // 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 getScanResultUsingGET' + ); + } + + $resourcePath = '/api/v1/address/result'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($request_id !== null) { + $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); + } + // header params + if ($authorization !== null) { + $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation scanAddressUsingGET + * + * Start address security scan + * + * @param string $address address (required) + * @param string $chain_id chain_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperOpenScanAddressResp + */ + public function scanAddressUsingGET($address, $chain_id, $authorization = null) + { + list($response) = $this->scanAddressUsingGETWithHttpInfo($address, $chain_id, $authorization); + return $response; + } + + /** + * Operation scanAddressUsingGETWithHttpInfo + * + * Start address security scan + * + * @param string $address address (required) + * @param string $chain_id chain_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperOpenScanAddressResp, HTTP status code, HTTP response headers (array of strings) + */ + public function scanAddressUsingGETWithHttpInfo($address, $chain_id, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperOpenScanAddressResp'; + $request = $this->scanAddressUsingGETRequest($address, $chain_id, $authorization); + + 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(), + '\Swagger\Client\Model\ResponseWrapperOpenScanAddressResp', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation scanAddressUsingGETAsync + * + * Start address security scan + * + * @param string $address address (required) + * @param string $chain_id chain_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function scanAddressUsingGETAsync($address, $chain_id, $authorization = null) + { + return $this->scanAddressUsingGETAsyncWithHttpInfo($address, $chain_id, $authorization) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation scanAddressUsingGETAsyncWithHttpInfo + * + * Start address security scan + * + * @param string $address address (required) + * @param string $chain_id chain_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function scanAddressUsingGETAsyncWithHttpInfo($address, $chain_id, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperOpenScanAddressResp'; + $request = $this->scanAddressUsingGETRequest($address, $chain_id, $authorization); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'scanAddressUsingGET' + * + * @param string $address address (required) + * @param string $chain_id chain_id (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function scanAddressUsingGETRequest($address, $chain_id, $authorization = null) + { + // verify the required parameter 'address' is set + if ($address === null || (is_array($address) && count($address) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $address when calling scanAddressUsingGET' + ); + } + // verify the required parameter 'chain_id' is set + if ($chain_id === null || (is_array($chain_id) && count($chain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $chain_id when calling scanAddressUsingGET' + ); + } + + $resourcePath = '/api/v1/address/scan/{chain_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($address !== null) { + $queryParams['address'] = ObjectSerializer::toQueryValue($address, null); + } + // header params + if ($authorization !== null) { + $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); + } + + // path params + if ($chain_id !== null) { + $resourcePath = str_replace( + '{' . 'chain_id' . '}', + ObjectSerializer::toPathValue($chain_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['*/*'], + [] + ); + } + + // 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * 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; + } +} diff --git a/src/lib/client/Api/TransactionSecurityControllerApi.php b/src/lib/client/Api/TransactionSecurityControllerApi.php new file mode 100644 index 0000000..6cd30be --- /dev/null +++ b/src/lib/client/Api/TransactionSecurityControllerApi.php @@ -0,0 +1,373 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getTransactionSecurityInfoUsingPOST + * + * Transaction Simulation + * + * @param \Swagger\Client\Model\TransactionSecurityRequest $body transactionSecurityRequest (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperTransactionSecurityResponse + */ + public function getTransactionSecurityInfoUsingPOST($body, $authorization = null) + { + list($response) = $this->getTransactionSecurityInfoUsingPOSTWithHttpInfo($body, $authorization); + return $response; + } + + /** + * Operation getTransactionSecurityInfoUsingPOSTWithHttpInfo + * + * Transaction Simulation + * + * @param \Swagger\Client\Model\TransactionSecurityRequest $body transactionSecurityRequest (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperTransactionSecurityResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getTransactionSecurityInfoUsingPOSTWithHttpInfo($body, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperTransactionSecurityResponse'; + $request = $this->getTransactionSecurityInfoUsingPOSTRequest($body, $authorization); + + 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(), + '\Swagger\Client\Model\ResponseWrapperTransactionSecurityResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTransactionSecurityInfoUsingPOSTAsync + * + * Transaction Simulation + * + * @param \Swagger\Client\Model\TransactionSecurityRequest $body transactionSecurityRequest (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransactionSecurityInfoUsingPOSTAsync($body, $authorization = null) + { + return $this->getTransactionSecurityInfoUsingPOSTAsyncWithHttpInfo($body, $authorization) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTransactionSecurityInfoUsingPOSTAsyncWithHttpInfo + * + * Transaction Simulation + * + * @param \Swagger\Client\Model\TransactionSecurityRequest $body transactionSecurityRequest (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTransactionSecurityInfoUsingPOSTAsyncWithHttpInfo($body, $authorization = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperTransactionSecurityResponse'; + $request = $this->getTransactionSecurityInfoUsingPOSTRequest($body, $authorization); + + 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() + ); + } + ); + } + + /** + * Create request for operation 'getTransactionSecurityInfoUsingPOST' + * + * @param \Swagger\Client\Model\TransactionSecurityRequest $body transactionSecurityRequest (required) + * @param string $authorization Authorization (test:Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTransactionSecurityInfoUsingPOSTRequest($body, $authorization = null) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling getTransactionSecurityInfoUsingPOST' + ); + } + + $resourcePath = '/api/v1/transaction_simulation'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // header params + if ($authorization !== null) { + $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); + } + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['*/*'] + ); + } 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 = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * 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; + } +} diff --git a/src/lib/client/Model/AddressInfo.php b/src/lib/client/Model/AddressInfo.php new file mode 100644 index 0000000..6d5df12 --- /dev/null +++ b/src/lib/client/Model/AddressInfo.php @@ -0,0 +1,330 @@ + 'string', + 'storage_keys' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'storage_keys' => 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 = [ + 'address' => 'address', + 'storage_keys' => 'storage_keys' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'storage_keys' => 'setStorageKeys' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'storage_keys' => 'getStorageKeys' + ]; + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['storage_keys'] = isset($data['storage_keys']) ? $data['storage_keys'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets storage_keys + * + * @return string[] + */ + public function getStorageKeys() + { + return $this->container['storage_keys']; + } + + /** + * Sets storage_keys + * + * @param string[] $storage_keys storage_keys + * + * @return $this + */ + public function setStorageKeys($storage_keys) + { + $this->container['storage_keys'] = $storage_keys; + + 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)); + } +} diff --git a/src/lib/client/Model/AllowanceChange.php b/src/lib/client/Model/AllowanceChange.php new file mode 100644 index 0000000..6b0e572 --- /dev/null +++ b/src/lib/client/Model/AllowanceChange.php @@ -0,0 +1,390 @@ + 'string', + 'contract_address' => 'string', + 'owner' => 'string', + 'spender' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'amount' => null, + 'contract_address' => null, + 'owner' => null, + 'spender' => 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 = [ + 'amount' => 'amount', + 'contract_address' => 'contract_address', + 'owner' => 'owner', + 'spender' => 'spender' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'contract_address' => 'setContractAddress', + 'owner' => 'setOwner', + 'spender' => 'setSpender' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'contract_address' => 'getContractAddress', + 'owner' => 'getOwner', + 'spender' => 'getSpender' + ]; + + /** + * 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['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['contract_address'] = isset($data['contract_address']) ? $data['contract_address'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['spender'] = isset($data['spender']) ? $data['spender'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 amount + * + * @return string + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount amount + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets contract_address + * + * @return string + */ + public function getContractAddress() + { + return $this->container['contract_address']; + } + + /** + * Sets contract_address + * + * @param string $contract_address contract_address + * + * @return $this + */ + public function setContractAddress($contract_address) + { + $this->container['contract_address'] = $contract_address; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner owner + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets spender + * + * @return string + */ + public function getSpender() + { + return $this->container['spender']; + } + + /** + * Sets spender + * + * @param string $spender spender + * + * @return $this + */ + public function setSpender($spender) + { + $this->container['spender'] = $spender; + + 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)); + } +} diff --git a/src/lib/client/Model/DustAttackDetectionReq.php b/src/lib/client/Model/DustAttackDetectionReq.php new file mode 100644 index 0000000..707eaa9 --- /dev/null +++ b/src/lib/client/Model/DustAttackDetectionReq.php @@ -0,0 +1,330 @@ + 'string', + 'to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'from' => null, + 'to' => 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 = [ + 'from' => 'from', + 'to' => 'to' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'from' => 'setFrom', + 'to' => 'setTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'from' => 'getFrom', + 'to' => 'getTo' + ]; + + /** + * 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['from'] = isset($data['from']) ? $data['from'] : null; + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 from + * + * @return string + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from from + * + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to to + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + 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)); + } +} diff --git a/src/lib/client/Model/ERC20BalanceChange.php b/src/lib/client/Model/ERC20BalanceChange.php new file mode 100644 index 0000000..2148a2c --- /dev/null +++ b/src/lib/client/Model/ERC20BalanceChange.php @@ -0,0 +1,330 @@ + 'string', + 'erc20_change' => '\Swagger\Client\Model\ERC20Change[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'erc20_change' => 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 = [ + 'address' => 'address', + 'erc20_change' => 'erc20_change' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'erc20_change' => 'setErc20Change' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'erc20_change' => 'getErc20Change' + ]; + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['erc20_change'] = isset($data['erc20_change']) ? $data['erc20_change'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets erc20_change + * + * @return \Swagger\Client\Model\ERC20Change[] + */ + public function getErc20Change() + { + return $this->container['erc20_change']; + } + + /** + * Sets erc20_change + * + * @param \Swagger\Client\Model\ERC20Change[] $erc20_change erc20_change + * + * @return $this + */ + public function setErc20Change($erc20_change) + { + $this->container['erc20_change'] = $erc20_change; + + 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)); + } +} diff --git a/src/lib/client/Model/ERC20Change.php b/src/lib/client/Model/ERC20Change.php new file mode 100644 index 0000000..f97643b --- /dev/null +++ b/src/lib/client/Model/ERC20Change.php @@ -0,0 +1,330 @@ + 'string', + 'token_address' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'change' => null, + 'token_address' => 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 = [ + 'change' => 'change', + 'token_address' => 'token_address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'change' => 'setChange', + 'token_address' => 'setTokenAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'change' => 'getChange', + 'token_address' => 'getTokenAddress' + ]; + + /** + * 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['change'] = isset($data['change']) ? $data['change'] : null; + $this->container['token_address'] = isset($data['token_address']) ? $data['token_address'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 change + * + * @return string + */ + public function getChange() + { + return $this->container['change']; + } + + /** + * Sets change + * + * @param string $change change + * + * @return $this + */ + public function setChange($change) + { + $this->container['change'] = $change; + + return $this; + } + + /** + * Gets token_address + * + * @return string + */ + public function getTokenAddress() + { + return $this->container['token_address']; + } + + /** + * Sets token_address + * + * @param string $token_address token_address + * + * @return $this + */ + public function setTokenAddress($token_address) + { + $this->container['token_address'] = $token_address; + + 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)); + } +} diff --git a/src/lib/client/Model/ERC721BalanceChange.php b/src/lib/client/Model/ERC721BalanceChange.php new file mode 100644 index 0000000..6051b7d --- /dev/null +++ b/src/lib/client/Model/ERC721BalanceChange.php @@ -0,0 +1,330 @@ + 'string', + 'erc721_change' => '\Swagger\Client\Model\ERC721Change[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'erc721_change' => 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 = [ + 'address' => 'address', + 'erc721_change' => 'erc721_change' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'erc721_change' => 'setErc721Change' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'erc721_change' => 'getErc721Change' + ]; + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['erc721_change'] = isset($data['erc721_change']) ? $data['erc721_change'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets erc721_change + * + * @return \Swagger\Client\Model\ERC721Change[] + */ + public function getErc721Change() + { + return $this->container['erc721_change']; + } + + /** + * Sets erc721_change + * + * @param \Swagger\Client\Model\ERC721Change[] $erc721_change erc721_change + * + * @return $this + */ + public function setErc721Change($erc721_change) + { + $this->container['erc721_change'] = $erc721_change; + + 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)); + } +} diff --git a/src/lib/client/Model/ERC721Change.php b/src/lib/client/Model/ERC721Change.php new file mode 100644 index 0000000..21889a9 --- /dev/null +++ b/src/lib/client/Model/ERC721Change.php @@ -0,0 +1,360 @@ + 'bool', + 'token_address' => 'string', + 'token_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'received' => null, + 'token_address' => null, + 'token_id' => 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 = [ + 'received' => 'received', + 'token_address' => 'token_address', + 'token_id' => 'token_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'received' => 'setReceived', + 'token_address' => 'setTokenAddress', + 'token_id' => 'setTokenId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'received' => 'getReceived', + 'token_address' => 'getTokenAddress', + 'token_id' => 'getTokenId' + ]; + + /** + * 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['received'] = isset($data['received']) ? $data['received'] : null; + $this->container['token_address'] = isset($data['token_address']) ? $data['token_address'] : null; + $this->container['token_id'] = isset($data['token_id']) ? $data['token_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 received + * + * @return bool + */ + public function getReceived() + { + return $this->container['received']; + } + + /** + * Sets received + * + * @param bool $received received + * + * @return $this + */ + public function setReceived($received) + { + $this->container['received'] = $received; + + return $this; + } + + /** + * Gets token_address + * + * @return string + */ + public function getTokenAddress() + { + return $this->container['token_address']; + } + + /** + * Sets token_address + * + * @param string $token_address token_address + * + * @return $this + */ + public function setTokenAddress($token_address) + { + $this->container['token_address'] = $token_address; + + return $this; + } + + /** + * Gets token_id + * + * @return string + */ + public function getTokenId() + { + return $this->container['token_id']; + } + + /** + * Sets token_id + * + * @param string $token_id token_id + * + * @return $this + */ + public function setTokenId($token_id) + { + $this->container['token_id'] = $token_id; + + 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)); + } +} diff --git a/src/lib/client/Model/Flag.php b/src/lib/client/Model/Flag.php new file mode 100644 index 0000000..c759d18 --- /dev/null +++ b/src/lib/client/Model/Flag.php @@ -0,0 +1,330 @@ + 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'message' => null, + 'type' => 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 = [ + 'message' => 'message', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'message' => 'setMessage', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'message' => 'getMessage', + 'type' => 'getType' + ]; + + /** + * 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['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + 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)); + } +} diff --git a/src/lib/client/Model/LogEntry.php b/src/lib/client/Model/LogEntry.php new file mode 100644 index 0000000..0e61e66 --- /dev/null +++ b/src/lib/client/Model/LogEntry.php @@ -0,0 +1,360 @@ + 'string', + 'data' => 'string', + 'topics' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'data' => null, + 'topics' => 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 = [ + 'address' => 'address', + 'data' => 'data', + 'topics' => 'topics' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'data' => 'setData', + 'topics' => 'setTopics' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'data' => 'getData', + 'topics' => 'getTopics' + ]; + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['topics'] = isset($data['topics']) ? $data['topics'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets data + * + * @return string + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param string $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets topics + * + * @return string[] + */ + public function getTopics() + { + return $this->container['topics']; + } + + /** + * Sets topics + * + * @param string[] $topics topics + * + * @return $this + */ + public function setTopics($topics) + { + $this->container['topics'] = $topics; + + 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)); + } +} diff --git a/src/lib/client/Model/NativeBalanceChange.php b/src/lib/client/Model/NativeBalanceChange.php new file mode 100644 index 0000000..20b0a91 --- /dev/null +++ b/src/lib/client/Model/NativeBalanceChange.php @@ -0,0 +1,330 @@ + 'string', + 'native_change' => '\Swagger\Client\Model\NativeChange' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'native_change' => 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 = [ + 'address' => 'address', + 'native_change' => 'native_change' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'native_change' => 'setNativeChange' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'native_change' => 'getNativeChange' + ]; + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['native_change'] = isset($data['native_change']) ? $data['native_change'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets native_change + * + * @return \Swagger\Client\Model\NativeChange + */ + public function getNativeChange() + { + return $this->container['native_change']; + } + + /** + * Sets native_change + * + * @param \Swagger\Client\Model\NativeChange $native_change native_change + * + * @return $this + */ + public function setNativeChange($native_change) + { + $this->container['native_change'] = $native_change; + + 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)); + } +} diff --git a/src/lib/client/Model/NativeChange.php b/src/lib/client/Model/NativeChange.php new file mode 100644 index 0000000..c7e0771 --- /dev/null +++ b/src/lib/client/Model/NativeChange.php @@ -0,0 +1,360 @@ + 'string', + 'before' => 'string', + 'change' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'after' => null, + 'before' => null, + 'change' => 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 = [ + 'after' => 'after', + 'before' => 'before', + 'change' => 'change' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'after' => 'setAfter', + 'before' => 'setBefore', + 'change' => 'setChange' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'after' => 'getAfter', + 'before' => 'getBefore', + 'change' => 'getChange' + ]; + + /** + * 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['after'] = isset($data['after']) ? $data['after'] : null; + $this->container['before'] = isset($data['before']) ? $data['before'] : null; + $this->container['change'] = isset($data['change']) ? $data['change'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 after + * + * @return string + */ + public function getAfter() + { + return $this->container['after']; + } + + /** + * Sets after + * + * @param string $after after + * + * @return $this + */ + public function setAfter($after) + { + $this->container['after'] = $after; + + return $this; + } + + /** + * Gets before + * + * @return string + */ + public function getBefore() + { + return $this->container['before']; + } + + /** + * Sets before + * + * @param string $before before + * + * @return $this + */ + public function setBefore($before) + { + $this->container['before'] = $before; + + return $this; + } + + /** + * Gets change + * + * @return string + */ + public function getChange() + { + return $this->container['change']; + } + + /** + * Sets change + * + * @param string $change change + * + * @return $this + */ + public function setChange($change) + { + $this->container['change'] = $change; + + 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)); + } +} diff --git a/src/lib/client/Model/OpenScanAddressResp.php b/src/lib/client/Model/OpenScanAddressResp.php new file mode 100644 index 0000000..878f657 --- /dev/null +++ b/src/lib/client/Model/OpenScanAddressResp.php @@ -0,0 +1,330 @@ + 'string', + 'status' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'request_id' => null, + 'status' => 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 = [ + 'request_id' => 'request_id', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'request_id' => 'setRequestId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'request_id' => 'getRequestId', + 'status' => 'getStatus' + ]; + + /** + * 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['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 request_id + * + * @return string + */ + public function getRequestId() + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string $request_id request_id + * + * @return $this + */ + public function setRequestId($request_id) + { + $this->container['request_id'] = $request_id; + + return $this; + } + + /** + * Gets status + * + * @return bool + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param bool $status status + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + 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)); + } +} diff --git a/src/lib/client/Model/PageResponseTaNftLockerLockInfo.php b/src/lib/client/Model/PageResponseTaNftLockerLockInfo.php new file mode 100644 index 0000000..44dd65b --- /dev/null +++ b/src/lib/client/Model/PageResponseTaNftLockerLockInfo.php @@ -0,0 +1,390 @@ + '\Swagger\Client\Model\TaNftLockerLockInfo[]', + 'page_num' => 'int', + 'page_size' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'list' => null, + 'page_num' => 'int32', + 'page_size' => 'int32', + 'total_count' => 'int32' + ]; + + /** + * 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 = [ + 'list' => 'list', + 'page_num' => 'pageNum', + 'page_size' => 'pageSize', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList', + 'page_num' => 'setPageNum', + 'page_size' => 'setPageSize', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList', + 'page_num' => 'getPageNum', + 'page_size' => 'getPageSize', + 'total_count' => 'getTotalCount' + ]; + + /** + * 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['list'] = isset($data['list']) ? $data['list'] : null; + $this->container['page_num'] = isset($data['page_num']) ? $data['page_num'] : null; + $this->container['page_size'] = isset($data['page_size']) ? $data['page_size'] : null; + $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 list + * + * @return \Swagger\Client\Model\TaNftLockerLockInfo[] + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \Swagger\Client\Model\TaNftLockerLockInfo[] $list list + * + * @return $this + */ + public function setList($list) + { + $this->container['list'] = $list; + + return $this; + } + + /** + * Gets page_num + * + * @return int + */ + public function getPageNum() + { + return $this->container['page_num']; + } + + /** + * Sets page_num + * + * @param int $page_num page_num + * + * @return $this + */ + public function setPageNum($page_num) + { + $this->container['page_num'] = $page_num; + + return $this; + } + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize() + { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size page_size + * + * @return $this + */ + public function setPageSize($page_size) + { + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count total_count + * + * @return $this + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + 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)); + } +} diff --git a/src/lib/client/Model/PageResponseTaTokenLockerLockInfo.php b/src/lib/client/Model/PageResponseTaTokenLockerLockInfo.php new file mode 100644 index 0000000..40c380b --- /dev/null +++ b/src/lib/client/Model/PageResponseTaTokenLockerLockInfo.php @@ -0,0 +1,390 @@ + '\Swagger\Client\Model\TaTokenLockerLockInfo[]', + 'page_num' => 'int', + 'page_size' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'list' => null, + 'page_num' => 'int32', + 'page_size' => 'int32', + 'total_count' => 'int32' + ]; + + /** + * 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 = [ + 'list' => 'list', + 'page_num' => 'pageNum', + 'page_size' => 'pageSize', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList', + 'page_num' => 'setPageNum', + 'page_size' => 'setPageSize', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList', + 'page_num' => 'getPageNum', + 'page_size' => 'getPageSize', + 'total_count' => 'getTotalCount' + ]; + + /** + * 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['list'] = isset($data['list']) ? $data['list'] : null; + $this->container['page_num'] = isset($data['page_num']) ? $data['page_num'] : null; + $this->container['page_size'] = isset($data['page_size']) ? $data['page_size'] : null; + $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 list + * + * @return \Swagger\Client\Model\TaTokenLockerLockInfo[] + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \Swagger\Client\Model\TaTokenLockerLockInfo[] $list list + * + * @return $this + */ + public function setList($list) + { + $this->container['list'] = $list; + + return $this; + } + + /** + * Gets page_num + * + * @return int + */ + public function getPageNum() + { + return $this->container['page_num']; + } + + /** + * Sets page_num + * + * @param int $page_num page_num + * + * @return $this + */ + public function setPageNum($page_num) + { + $this->container['page_num'] = $page_num; + + return $this; + } + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize() + { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size page_size + * + * @return $this + */ + public function setPageSize($page_size) + { + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count total_count + * + * @return $this + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + 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)); + } +} diff --git a/src/lib/client/Model/PageResponseV4NftLockerLockInfos.php b/src/lib/client/Model/PageResponseV4NftLockerLockInfos.php new file mode 100644 index 0000000..3cb098d --- /dev/null +++ b/src/lib/client/Model/PageResponseV4NftLockerLockInfos.php @@ -0,0 +1,390 @@ + '\Swagger\Client\Model\V4NftLockerLockInfos[]', + 'page_num' => 'int', + 'page_size' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'list' => null, + 'page_num' => 'int32', + 'page_size' => 'int32', + 'total_count' => 'int32' + ]; + + /** + * 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 = [ + 'list' => 'list', + 'page_num' => 'pageNum', + 'page_size' => 'pageSize', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList', + 'page_num' => 'setPageNum', + 'page_size' => 'setPageSize', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList', + 'page_num' => 'getPageNum', + 'page_size' => 'getPageSize', + 'total_count' => 'getTotalCount' + ]; + + /** + * 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['list'] = isset($data['list']) ? $data['list'] : null; + $this->container['page_num'] = isset($data['page_num']) ? $data['page_num'] : null; + $this->container['page_size'] = isset($data['page_size']) ? $data['page_size'] : null; + $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 list + * + * @return \Swagger\Client\Model\V4NftLockerLockInfos[] + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \Swagger\Client\Model\V4NftLockerLockInfos[] $list list + * + * @return $this + */ + public function setList($list) + { + $this->container['list'] = $list; + + return $this; + } + + /** + * Gets page_num + * + * @return int + */ + public function getPageNum() + { + return $this->container['page_num']; + } + + /** + * Sets page_num + * + * @param int $page_num page_num + * + * @return $this + */ + public function setPageNum($page_num) + { + $this->container['page_num'] = $page_num; + + return $this; + } + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize() + { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size page_size + * + * @return $this + */ + public function setPageSize($page_size) + { + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count total_count + * + * @return $this + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperDustAttackDetection.php b/src/lib/client/Model/ResponseWrapperDustAttackDetection.php new file mode 100644 index 0000000..251001b --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperDustAttackDetection.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\ResponseWrapperDustAttackDetectionResult' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\ResponseWrapperDustAttackDetectionResult + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\ResponseWrapperDustAttackDetectionResult $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperDustAttackDetectionResult.php b/src/lib/client/Model/ResponseWrapperDustAttackDetectionResult.php new file mode 100644 index 0000000..0281f2d --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperDustAttackDetectionResult.php @@ -0,0 +1,331 @@ + 'string', + 'is_under_attack' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'attack_hash' => null, + 'is_under_attack' => 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 = [ + 'attack_hash' => 'attack_hash', + 'is_under_attack' => 'is_under_attack' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attack_hash' => 'setAttackHash', + 'is_under_attack' => 'setIsUnderAttack' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attack_hash' => 'getAttackHash', + 'is_under_attack' => 'getIsUnderAttack' + ]; + + /** + * 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['attack_hash'] = isset($data['attack_hash']) ? $data['attack_hash'] : null; + $this->container['is_under_attack'] = isset($data['is_under_attack']) ? $data['is_under_attack'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 attack_hash + * + * @return string + */ + public function getAttackHash() + { + return $this->container['attack_hash']; + } + + /** + * Sets attack_hash + * + * @param string $attack_hash 0/1 + * + * @return $this + */ + public function setAttackHash($attack_hash) + { + $this->container['attack_hash'] = $attack_hash; + + return $this; + } + + /** + * Gets is_under_attack + * + * @return string + */ + public function getIsUnderAttack() + { + return $this->container['is_under_attack']; + } + + /** + * Sets is_under_attack + * + * @param string $is_under_attack 0/1 + * + * @return $this + */ + public function setIsUnderAttack($is_under_attack) + { + $this->container['is_under_attack'] = $is_under_attack; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResult.php b/src/lib/client/Model/ResponseWrapperGetScanResult.php new file mode 100644 index 0000000..c7647de --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResult.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResult' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResult + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResult $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResult.php b/src/lib/client/Model/ResponseWrapperGetScanResultResult.php new file mode 100644 index 0000000..cfacd52 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResult.php @@ -0,0 +1,661 @@ + 'string', + 'approval_risk' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRisk', + 'token_attention' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention', + 'nft_attention' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention', + 'stablecoin_depeg' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepeg', + 'address_poisoned' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned', + 'excessive_gas_fee' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned', + 'nft_risk' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention', + 'nft_stolen' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned', + 'scan_time' => 'string', + 'request_id' => 'string', + 'token_risk' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention', + 'risky_address_interaction' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'chain_id' => null, + 'approval_risk' => null, + 'token_attention' => null, + 'nft_attention' => null, + 'stablecoin_depeg' => null, + 'address_poisoned' => null, + 'excessive_gas_fee' => null, + 'nft_risk' => null, + 'nft_stolen' => null, + 'scan_time' => null, + 'request_id' => null, + 'token_risk' => null, + 'risky_address_interaction' => 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 = [ + 'chain_id' => 'chain_id', + 'approval_risk' => 'approval_risk', + 'token_attention' => 'token_attention', + 'nft_attention' => 'nft_attention', + 'stablecoin_depeg' => 'stablecoin_depeg', + 'address_poisoned' => 'address_poisoned', + 'excessive_gas_fee' => 'excessive_gas_fee', + 'nft_risk' => 'nft_risk', + 'nft_stolen' => 'nft_stolen', + 'scan_time' => 'scan_time', + 'request_id' => 'request_id', + 'token_risk' => 'token_risk', + 'risky_address_interaction' => 'risky_address_interaction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'chain_id' => 'setChainId', + 'approval_risk' => 'setApprovalRisk', + 'token_attention' => 'setTokenAttention', + 'nft_attention' => 'setNftAttention', + 'stablecoin_depeg' => 'setStablecoinDepeg', + 'address_poisoned' => 'setAddressPoisoned', + 'excessive_gas_fee' => 'setExcessiveGasFee', + 'nft_risk' => 'setNftRisk', + 'nft_stolen' => 'setNftStolen', + 'scan_time' => 'setScanTime', + 'request_id' => 'setRequestId', + 'token_risk' => 'setTokenRisk', + 'risky_address_interaction' => 'setRiskyAddressInteraction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'chain_id' => 'getChainId', + 'approval_risk' => 'getApprovalRisk', + 'token_attention' => 'getTokenAttention', + 'nft_attention' => 'getNftAttention', + 'stablecoin_depeg' => 'getStablecoinDepeg', + 'address_poisoned' => 'getAddressPoisoned', + 'excessive_gas_fee' => 'getExcessiveGasFee', + 'nft_risk' => 'getNftRisk', + 'nft_stolen' => 'getNftStolen', + 'scan_time' => 'getScanTime', + 'request_id' => 'getRequestId', + 'token_risk' => 'getTokenRisk', + 'risky_address_interaction' => 'getRiskyAddressInteraction' + ]; + + /** + * 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['chain_id'] = isset($data['chain_id']) ? $data['chain_id'] : null; + $this->container['approval_risk'] = isset($data['approval_risk']) ? $data['approval_risk'] : null; + $this->container['token_attention'] = isset($data['token_attention']) ? $data['token_attention'] : null; + $this->container['nft_attention'] = isset($data['nft_attention']) ? $data['nft_attention'] : null; + $this->container['stablecoin_depeg'] = isset($data['stablecoin_depeg']) ? $data['stablecoin_depeg'] : null; + $this->container['address_poisoned'] = isset($data['address_poisoned']) ? $data['address_poisoned'] : null; + $this->container['excessive_gas_fee'] = isset($data['excessive_gas_fee']) ? $data['excessive_gas_fee'] : null; + $this->container['nft_risk'] = isset($data['nft_risk']) ? $data['nft_risk'] : null; + $this->container['nft_stolen'] = isset($data['nft_stolen']) ? $data['nft_stolen'] : null; + $this->container['scan_time'] = isset($data['scan_time']) ? $data['scan_time'] : null; + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['token_risk'] = isset($data['token_risk']) ? $data['token_risk'] : null; + $this->container['risky_address_interaction'] = isset($data['risky_address_interaction']) ? $data['risky_address_interaction'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 chain_id + * + * @return string + */ + public function getChainId() + { + return $this->container['chain_id']; + } + + /** + * Sets chain_id + * + * @param string $chain_id Chain ID + * + * @return $this + */ + public function setChainId($chain_id) + { + $this->container['chain_id'] = $chain_id; + + return $this; + } + + /** + * Gets approval_risk + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRisk + */ + public function getApprovalRisk() + { + return $this->container['approval_risk']; + } + + /** + * Sets approval_risk + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRisk $approval_risk approval_risk + * + * @return $this + */ + public function setApprovalRisk($approval_risk) + { + $this->container['approval_risk'] = $approval_risk; + + return $this; + } + + /** + * Gets token_attention + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention + */ + public function getTokenAttention() + { + return $this->container['token_attention']; + } + + /** + * Sets token_attention + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention $token_attention token_attention + * + * @return $this + */ + public function setTokenAttention($token_attention) + { + $this->container['token_attention'] = $token_attention; + + return $this; + } + + /** + * Gets nft_attention + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention + */ + public function getNftAttention() + { + return $this->container['nft_attention']; + } + + /** + * Sets nft_attention + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention $nft_attention nft_attention + * + * @return $this + */ + public function setNftAttention($nft_attention) + { + $this->container['nft_attention'] = $nft_attention; + + return $this; + } + + /** + * Gets stablecoin_depeg + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepeg + */ + public function getStablecoinDepeg() + { + return $this->container['stablecoin_depeg']; + } + + /** + * Sets stablecoin_depeg + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepeg $stablecoin_depeg stablecoin_depeg + * + * @return $this + */ + public function setStablecoinDepeg($stablecoin_depeg) + { + $this->container['stablecoin_depeg'] = $stablecoin_depeg; + + return $this; + } + + /** + * Gets address_poisoned + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned + */ + public function getAddressPoisoned() + { + return $this->container['address_poisoned']; + } + + /** + * Sets address_poisoned + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned $address_poisoned address_poisoned + * + * @return $this + */ + public function setAddressPoisoned($address_poisoned) + { + $this->container['address_poisoned'] = $address_poisoned; + + return $this; + } + + /** + * Gets excessive_gas_fee + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned + */ + public function getExcessiveGasFee() + { + return $this->container['excessive_gas_fee']; + } + + /** + * Sets excessive_gas_fee + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned $excessive_gas_fee excessive_gas_fee + * + * @return $this + */ + public function setExcessiveGasFee($excessive_gas_fee) + { + $this->container['excessive_gas_fee'] = $excessive_gas_fee; + + return $this; + } + + /** + * Gets nft_risk + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention + */ + public function getNftRisk() + { + return $this->container['nft_risk']; + } + + /** + * Sets nft_risk + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention $nft_risk nft_risk + * + * @return $this + */ + public function setNftRisk($nft_risk) + { + $this->container['nft_risk'] = $nft_risk; + + return $this; + } + + /** + * Gets nft_stolen + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned + */ + public function getNftStolen() + { + return $this->container['nft_stolen']; + } + + /** + * Sets nft_stolen + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned $nft_stolen nft_stolen + * + * @return $this + */ + public function setNftStolen($nft_stolen) + { + $this->container['nft_stolen'] = $nft_stolen; + + return $this; + } + + /** + * Gets scan_time + * + * @return string + */ + public function getScanTime() + { + return $this->container['scan_time']; + } + + /** + * Sets scan_time + * + * @param string $scan_time Scan initiation time. UTC+0. + * + * @return $this + */ + public function setScanTime($scan_time) + { + $this->container['scan_time'] = $scan_time; + + return $this; + } + + /** + * Gets request_id + * + * @return string + */ + public function getRequestId() + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string $request_id Request ID + * + * @return $this + */ + public function setRequestId($request_id) + { + $this->container['request_id'] = $request_id; + + return $this; + } + + /** + * Gets token_risk + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention + */ + public function getTokenRisk() + { + return $this->container['token_risk']; + } + + /** + * Sets token_risk + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttention $token_risk token_risk + * + * @return $this + */ + public function setTokenRisk($token_risk) + { + $this->container['token_risk'] = $token_risk; + + return $this; + } + + /** + * Gets risky_address_interaction + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned + */ + public function getRiskyAddressInteraction() + { + return $this->container['risky_address_interaction']; + } + + /** + * Sets risky_address_interaction + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisoned $risky_address_interaction risky_address_interaction + * + * @return $this + */ + public function setRiskyAddressInteraction($risky_address_interaction) + { + $this->container['risky_address_interaction'] = $risky_address_interaction; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisoned.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisoned.php new file mode 100644 index 0000000..9a43a40 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisoned.php @@ -0,0 +1,330 @@ + 'int', + 'risk_detail' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'risk_num' => 'int32', + 'risk_detail' => 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 = [ + 'risk_num' => 'risk_num', + 'risk_detail' => 'risk_detail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'risk_num' => 'setRiskNum', + 'risk_detail' => 'setRiskDetail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'risk_num' => 'getRiskNum', + 'risk_detail' => 'getRiskDetail' + ]; + + /** + * 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['risk_num'] = isset($data['risk_num']) ? $data['risk_num'] : null; + $this->container['risk_detail'] = isset($data['risk_detail']) ? $data['risk_detail'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 risk_num + * + * @return int + */ + public function getRiskNum() + { + return $this->container['risk_num']; + } + + /** + * Sets risk_num + * + * @param int $risk_num risk_num + * + * @return $this + */ + public function setRiskNum($risk_num) + { + $this->container['risk_num'] = $risk_num; + + return $this; + } + + /** + * Gets risk_detail + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail[] + */ + public function getRiskDetail() + { + return $this->container['risk_detail']; + } + + /** + * Sets risk_detail + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail[] $risk_detail risk_detail + * + * @return $this + */ + public function setRiskDetail($risk_detail) + { + $this->container['risk_detail'] = $risk_detail; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail.php new file mode 100644 index 0000000..095a837 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultAddressPoisonedRiskDetail.php @@ -0,0 +1,330 @@ + 'string', + 'transaction_hash' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'transaction_time' => null, + 'transaction_hash' => 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 = [ + 'transaction_time' => 'transaction_time', + 'transaction_hash' => 'transaction_hash' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'transaction_time' => 'setTransactionTime', + 'transaction_hash' => 'setTransactionHash' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'transaction_time' => 'getTransactionTime', + 'transaction_hash' => 'getTransactionHash' + ]; + + /** + * 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['transaction_time'] = isset($data['transaction_time']) ? $data['transaction_time'] : null; + $this->container['transaction_hash'] = isset($data['transaction_hash']) ? $data['transaction_hash'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 transaction_time + * + * @return string + */ + public function getTransactionTime() + { + return $this->container['transaction_time']; + } + + /** + * Sets transaction_time + * + * @param string $transaction_time transaction_time + * + * @return $this + */ + public function setTransactionTime($transaction_time) + { + $this->container['transaction_time'] = $transaction_time; + + return $this; + } + + /** + * Gets transaction_hash + * + * @return string + */ + public function getTransactionHash() + { + return $this->container['transaction_hash']; + } + + /** + * Sets transaction_hash + * + * @param string $transaction_hash transaction_hash + * + * @return $this + */ + public function setTransactionHash($transaction_hash) + { + $this->container['transaction_hash'] = $transaction_hash; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRisk.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRisk.php new file mode 100644 index 0000000..678d005 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRisk.php @@ -0,0 +1,330 @@ + 'int', + 'risk_detail' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskRiskDetail[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'risk_num' => 'int32', + 'risk_detail' => 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 = [ + 'risk_num' => 'risk_num', + 'risk_detail' => 'risk_detail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'risk_num' => 'setRiskNum', + 'risk_detail' => 'setRiskDetail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'risk_num' => 'getRiskNum', + 'risk_detail' => 'getRiskDetail' + ]; + + /** + * 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['risk_num'] = isset($data['risk_num']) ? $data['risk_num'] : null; + $this->container['risk_detail'] = isset($data['risk_detail']) ? $data['risk_detail'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 risk_num + * + * @return int + */ + public function getRiskNum() + { + return $this->container['risk_num']; + } + + /** + * Sets risk_num + * + * @param int $risk_num risk_num + * + * @return $this + */ + public function setRiskNum($risk_num) + { + $this->container['risk_num'] = $risk_num; + + return $this; + } + + /** + * Gets risk_detail + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskRiskDetail[] + */ + public function getRiskDetail() + { + return $this->container['risk_detail']; + } + + /** + * Sets risk_detail + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskRiskDetail[] $risk_detail risk_detail + * + * @return $this + */ + public function setRiskDetail($risk_detail) + { + $this->container['risk_detail'] = $risk_detail; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskErc20Risk.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskErc20Risk.php new file mode 100644 index 0000000..815ffff --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskErc20Risk.php @@ -0,0 +1,450 @@ + 'string', + 'token_address' => 'string', + 'token_symbol' => 'string', + 'approved_amount' => 'string', + 'transaction_hash' => 'string', + 'approved_address' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'transaction_time' => null, + 'token_address' => null, + 'token_symbol' => null, + 'approved_amount' => null, + 'transaction_hash' => null, + 'approved_address' => 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 = [ + 'transaction_time' => 'transaction_time', + 'token_address' => 'token_address', + 'token_symbol' => 'token_symbol', + 'approved_amount' => 'approved_amount', + 'transaction_hash' => 'transaction_hash', + 'approved_address' => 'approved_address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'transaction_time' => 'setTransactionTime', + 'token_address' => 'setTokenAddress', + 'token_symbol' => 'setTokenSymbol', + 'approved_amount' => 'setApprovedAmount', + 'transaction_hash' => 'setTransactionHash', + 'approved_address' => 'setApprovedAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'transaction_time' => 'getTransactionTime', + 'token_address' => 'getTokenAddress', + 'token_symbol' => 'getTokenSymbol', + 'approved_amount' => 'getApprovedAmount', + 'transaction_hash' => 'getTransactionHash', + 'approved_address' => 'getApprovedAddress' + ]; + + /** + * 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['transaction_time'] = isset($data['transaction_time']) ? $data['transaction_time'] : null; + $this->container['token_address'] = isset($data['token_address']) ? $data['token_address'] : null; + $this->container['token_symbol'] = isset($data['token_symbol']) ? $data['token_symbol'] : null; + $this->container['approved_amount'] = isset($data['approved_amount']) ? $data['approved_amount'] : null; + $this->container['transaction_hash'] = isset($data['transaction_hash']) ? $data['transaction_hash'] : null; + $this->container['approved_address'] = isset($data['approved_address']) ? $data['approved_address'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 transaction_time + * + * @return string + */ + public function getTransactionTime() + { + return $this->container['transaction_time']; + } + + /** + * Sets transaction_time + * + * @param string $transaction_time transaction_time + * + * @return $this + */ + public function setTransactionTime($transaction_time) + { + $this->container['transaction_time'] = $transaction_time; + + return $this; + } + + /** + * Gets token_address + * + * @return string + */ + public function getTokenAddress() + { + return $this->container['token_address']; + } + + /** + * Sets token_address + * + * @param string $token_address token_address + * + * @return $this + */ + public function setTokenAddress($token_address) + { + $this->container['token_address'] = $token_address; + + return $this; + } + + /** + * Gets token_symbol + * + * @return string + */ + public function getTokenSymbol() + { + return $this->container['token_symbol']; + } + + /** + * Sets token_symbol + * + * @param string $token_symbol token_symbol + * + * @return $this + */ + public function setTokenSymbol($token_symbol) + { + $this->container['token_symbol'] = $token_symbol; + + return $this; + } + + /** + * Gets approved_amount + * + * @return string + */ + public function getApprovedAmount() + { + return $this->container['approved_amount']; + } + + /** + * Sets approved_amount + * + * @param string $approved_amount approved_amount + * + * @return $this + */ + public function setApprovedAmount($approved_amount) + { + $this->container['approved_amount'] = $approved_amount; + + return $this; + } + + /** + * Gets transaction_hash + * + * @return string + */ + public function getTransactionHash() + { + return $this->container['transaction_hash']; + } + + /** + * Sets transaction_hash + * + * @param string $transaction_hash transaction_hash + * + * @return $this + */ + public function setTransactionHash($transaction_hash) + { + $this->container['transaction_hash'] = $transaction_hash; + + return $this; + } + + /** + * Gets approved_address + * + * @return string + */ + public function getApprovedAddress() + { + return $this->container['approved_address']; + } + + /** + * Sets approved_address + * + * @param string $approved_address approved_address + * + * @return $this + */ + public function setApprovedAddress($approved_address) + { + $this->container['approved_address'] = $approved_address; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskRiskDetail.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskRiskDetail.php new file mode 100644 index 0000000..308f2d6 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultApprovalRiskRiskDetail.php @@ -0,0 +1,300 @@ + '\Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskErc20Risk[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'erc20_risk' => 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 = [ + 'erc20_risk' => 'erc20_risk' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'erc20_risk' => 'setErc20Risk' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'erc20_risk' => 'getErc20Risk' + ]; + + /** + * 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['erc20_risk'] = isset($data['erc20_risk']) ? $data['erc20_risk'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 erc20_risk + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskErc20Risk[] + */ + public function getErc20Risk() + { + return $this->container['erc20_risk']; + } + + /** + * Sets erc20_risk + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultApprovalRiskErc20Risk[] $erc20_risk erc20_risk + * + * @return $this + */ + public function setErc20Risk($erc20_risk) + { + $this->container['erc20_risk'] = $erc20_risk; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepeg.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepeg.php new file mode 100644 index 0000000..4f06bed --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepeg.php @@ -0,0 +1,330 @@ + 'int', + 'risk_detail' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'risk_num' => 'int32', + 'risk_detail' => 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 = [ + 'risk_num' => 'risk_num', + 'risk_detail' => 'risk_detail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'risk_num' => 'setRiskNum', + 'risk_detail' => 'setRiskDetail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'risk_num' => 'getRiskNum', + 'risk_detail' => 'getRiskDetail' + ]; + + /** + * 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['risk_num'] = isset($data['risk_num']) ? $data['risk_num'] : null; + $this->container['risk_detail'] = isset($data['risk_detail']) ? $data['risk_detail'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 risk_num + * + * @return int + */ + public function getRiskNum() + { + return $this->container['risk_num']; + } + + /** + * Sets risk_num + * + * @param int $risk_num risk_num + * + * @return $this + */ + public function setRiskNum($risk_num) + { + $this->container['risk_num'] = $risk_num; + + return $this; + } + + /** + * Gets risk_detail + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail[] + */ + public function getRiskDetail() + { + return $this->container['risk_detail']; + } + + /** + * Sets risk_detail + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail[] $risk_detail risk_detail + * + * @return $this + */ + public function setRiskDetail($risk_detail) + { + $this->container['risk_detail'] = $risk_detail; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail.php new file mode 100644 index 0000000..bc15347 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultStablecoinDepegRiskDetail.php @@ -0,0 +1,360 @@ + 'string', + 'token_address' => 'string', + 'token_symbol' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'fall_percent' => null, + 'token_address' => null, + 'token_symbol' => 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 = [ + 'fall_percent' => 'fall_percent', + 'token_address' => 'token_address', + 'token_symbol' => 'token_symbol' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fall_percent' => 'setFallPercent', + 'token_address' => 'setTokenAddress', + 'token_symbol' => 'setTokenSymbol' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fall_percent' => 'getFallPercent', + 'token_address' => 'getTokenAddress', + 'token_symbol' => 'getTokenSymbol' + ]; + + /** + * 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['fall_percent'] = isset($data['fall_percent']) ? $data['fall_percent'] : null; + $this->container['token_address'] = isset($data['token_address']) ? $data['token_address'] : null; + $this->container['token_symbol'] = isset($data['token_symbol']) ? $data['token_symbol'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 fall_percent + * + * @return string + */ + public function getFallPercent() + { + return $this->container['fall_percent']; + } + + /** + * Sets fall_percent + * + * @param string $fall_percent fall_percent + * + * @return $this + */ + public function setFallPercent($fall_percent) + { + $this->container['fall_percent'] = $fall_percent; + + return $this; + } + + /** + * Gets token_address + * + * @return string + */ + public function getTokenAddress() + { + return $this->container['token_address']; + } + + /** + * Sets token_address + * + * @param string $token_address token_address + * + * @return $this + */ + public function setTokenAddress($token_address) + { + $this->container['token_address'] = $token_address; + + return $this; + } + + /** + * Gets token_symbol + * + * @return string + */ + public function getTokenSymbol() + { + return $this->container['token_symbol']; + } + + /** + * Sets token_symbol + * + * @param string $token_symbol token_symbol + * + * @return $this + */ + public function setTokenSymbol($token_symbol) + { + $this->container['token_symbol'] = $token_symbol; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttention.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttention.php new file mode 100644 index 0000000..a45d983 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttention.php @@ -0,0 +1,330 @@ + 'int', + 'risk_detail' => '\Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttentionRiskDetail[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'risk_num' => 'int32', + 'risk_detail' => 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 = [ + 'risk_num' => 'risk_num', + 'risk_detail' => 'risk_detail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'risk_num' => 'setRiskNum', + 'risk_detail' => 'setRiskDetail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'risk_num' => 'getRiskNum', + 'risk_detail' => 'getRiskDetail' + ]; + + /** + * 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['risk_num'] = isset($data['risk_num']) ? $data['risk_num'] : null; + $this->container['risk_detail'] = isset($data['risk_detail']) ? $data['risk_detail'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 risk_num + * + * @return int + */ + public function getRiskNum() + { + return $this->container['risk_num']; + } + + /** + * Sets risk_num + * + * @param int $risk_num risk_num + * + * @return $this + */ + public function setRiskNum($risk_num) + { + $this->container['risk_num'] = $risk_num; + + return $this; + } + + /** + * Gets risk_detail + * + * @return \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttentionRiskDetail[] + */ + public function getRiskDetail() + { + return $this->container['risk_detail']; + } + + /** + * Sets risk_detail + * + * @param \Swagger\Client\Model\ResponseWrapperGetScanResultResultTokenAttentionRiskDetail[] $risk_detail risk_detail + * + * @return $this + */ + public function setRiskDetail($risk_detail) + { + $this->container['risk_detail'] = $risk_detail; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttentionRiskDetail.php b/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttentionRiskDetail.php new file mode 100644 index 0000000..df421d0 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperGetScanResultResultTokenAttentionRiskDetail.php @@ -0,0 +1,330 @@ + 'string', + 'token_symbol' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'token_address' => null, + 'token_symbol' => 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 = [ + 'token_address' => 'token_address', + 'token_symbol' => 'token_symbol' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'token_address' => 'setTokenAddress', + 'token_symbol' => 'setTokenSymbol' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'token_address' => 'getTokenAddress', + 'token_symbol' => 'getTokenSymbol' + ]; + + /** + * 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['token_address'] = isset($data['token_address']) ? $data['token_address'] : null; + $this->container['token_symbol'] = isset($data['token_symbol']) ? $data['token_symbol'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 token_address + * + * @return string + */ + public function getTokenAddress() + { + return $this->container['token_address']; + } + + /** + * Sets token_address + * + * @param string $token_address token_address + * + * @return $this + */ + public function setTokenAddress($token_address) + { + $this->container['token_address'] = $token_address; + + return $this; + } + + /** + * Gets token_symbol + * + * @return string + */ + public function getTokenSymbol() + { + return $this->container['token_symbol']; + } + + /** + * Sets token_symbol + * + * @param string $token_symbol token_symbol + * + * @return $this + */ + public function setTokenSymbol($token_symbol) + { + $this->container['token_symbol'] = $token_symbol; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperOpenScanAddressResp.php b/src/lib/client/Model/ResponseWrapperOpenScanAddressResp.php new file mode 100644 index 0000000..d8f8294 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperOpenScanAddressResp.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\OpenScanAddressResp' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\OpenScanAddressResp + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\OpenScanAddressResp $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPageResponseTaNftLockerLockInfo.php b/src/lib/client/Model/ResponseWrapperPageResponseTaNftLockerLockInfo.php new file mode 100644 index 0000000..f82e5ff --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPageResponseTaNftLockerLockInfo.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\PageResponseTaNftLockerLockInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\PageResponseTaNftLockerLockInfo + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\PageResponseTaNftLockerLockInfo $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPageResponseTaTokenLockerLockInfo.php b/src/lib/client/Model/ResponseWrapperPageResponseTaTokenLockerLockInfo.php new file mode 100644 index 0000000..1c790d3 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPageResponseTaTokenLockerLockInfo.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\PageResponseTaTokenLockerLockInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\PageResponseTaTokenLockerLockInfo + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\PageResponseTaTokenLockerLockInfo $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPageResponseV4NftLockerLockInfos.php b/src/lib/client/Model/ResponseWrapperPageResponseV4NftLockerLockInfos.php new file mode 100644 index 0000000..c5c4016 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPageResponseV4NftLockerLockInfos.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\PageResponseV4NftLockerLockInfos' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\PageResponseV4NftLockerLockInfos + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\PageResponseV4NftLockerLockInfos $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperTransactionSecurityResponse.php b/src/lib/client/Model/ResponseWrapperTransactionSecurityResponse.php new file mode 100644 index 0000000..d9d6329 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperTransactionSecurityResponse.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\TransactionSecurityResponse' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\TransactionSecurityResponse + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\TransactionSecurityResponse $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperV4LpLockerLockInfoResp.php b/src/lib/client/Model/ResponseWrapperV4LpLockerLockInfoResp.php new file mode 100644 index 0000000..9a94cb1 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperV4LpLockerLockInfoResp.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\V4LpLockerLockInfoResp' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\V4LpLockerLockInfoResp + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\V4LpLockerLockInfoResp $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperstring.php b/src/lib/client/Model/ResponseWrapperstring.php new file mode 100644 index 0000000..fdf72b0 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperstring.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'code' => 'int32', + 'message' => null, + 'result' => 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 = [ + 'code' => 'code', + 'message' => 'message', + 'result' => 'result' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'code' => 'setCode', + 'message' => 'setMessage', + 'result' => 'setResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'code' => 'getCode', + 'message' => 'getMessage', + 'result' => 'getResult' + ]; + + /** + * 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['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code Code 1:Success + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message Response message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets result + * + * @return string + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param string $result Response result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + 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)); + } +} diff --git a/src/lib/client/Model/TaNftLockerLockInfo.php b/src/lib/client/Model/TaNftLockerLockInfo.php new file mode 100644 index 0000000..dee58c0 --- /dev/null +++ b/src/lib/client/Model/TaNftLockerLockInfo.php @@ -0,0 +1,541 @@ + 'int', + 'liquidity' => 'float', + 'lock_id' => 'string', + 'locked_percent' => 'string', + 'nft_id' => 'string', + 'nft_position_manager' => 'string', + 'owner' => 'string', + 'pool' => 'string', + 'start_time' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'end_time' => 'int64', + 'liquidity' => null, + 'lock_id' => null, + 'locked_percent' => null, + 'nft_id' => null, + 'nft_position_manager' => null, + 'owner' => null, + 'pool' => null, + 'start_time' => 'int64' + ]; + + /** + * 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 = [ + 'end_time' => 'endTime', + 'liquidity' => 'liquidity', + 'lock_id' => 'lockId', + 'locked_percent' => 'lockedPercent', + 'nft_id' => 'nftId', + 'nft_position_manager' => 'nftPositionManager', + 'owner' => 'owner', + 'pool' => 'pool', + 'start_time' => 'startTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'end_time' => 'setEndTime', + 'liquidity' => 'setLiquidity', + 'lock_id' => 'setLockId', + 'locked_percent' => 'setLockedPercent', + 'nft_id' => 'setNftId', + 'nft_position_manager' => 'setNftPositionManager', + 'owner' => 'setOwner', + 'pool' => 'setPool', + 'start_time' => 'setStartTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'end_time' => 'getEndTime', + 'liquidity' => 'getLiquidity', + 'lock_id' => 'getLockId', + 'locked_percent' => 'getLockedPercent', + 'nft_id' => 'getNftId', + 'nft_position_manager' => 'getNftPositionManager', + 'owner' => 'getOwner', + 'pool' => 'getPool', + 'start_time' => 'getStartTime' + ]; + + /** + * 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['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['liquidity'] = isset($data['liquidity']) ? $data['liquidity'] : null; + $this->container['lock_id'] = isset($data['lock_id']) ? $data['lock_id'] : null; + $this->container['locked_percent'] = isset($data['locked_percent']) ? $data['locked_percent'] : null; + $this->container['nft_id'] = isset($data['nft_id']) ? $data['nft_id'] : null; + $this->container['nft_position_manager'] = isset($data['nft_position_manager']) ? $data['nft_position_manager'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['pool'] = isset($data['pool']) ? $data['pool'] : null; + $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 end_time + * + * @return int + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param int $end_time 解锁时间戳 + * + * @return $this + */ + public function setEndTime($end_time) + { + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets liquidity + * + * @return float + */ + public function getLiquidity() + { + return $this->container['liquidity']; + } + + /** + * Sets liquidity + * + * @param float $liquidity liquidity + * + * @return $this + */ + public function setLiquidity($liquidity) + { + $this->container['liquidity'] = $liquidity; + + return $this; + } + + /** + * Gets lock_id + * + * @return string + */ + public function getLockId() + { + return $this->container['lock_id']; + } + + /** + * Sets lock_id + * + * @param string $lock_id lock id + * + * @return $this + */ + public function setLockId($lock_id) + { + $this->container['lock_id'] = $lock_id; + + return $this; + } + + /** + * Gets locked_percent + * + * @return string + */ + public function getLockedPercent() + { + return $this->container['locked_percent']; + } + + /** + * Sets locked_percent + * + * @param string $locked_percent 锁仓比例 + * + * @return $this + */ + public function setLockedPercent($locked_percent) + { + $this->container['locked_percent'] = $locked_percent; + + return $this; + } + + /** + * Gets nft_id + * + * @return string + */ + public function getNftId() + { + return $this->container['nft_id']; + } + + /** + * Sets nft_id + * + * @param string $nft_id nft id + * + * @return $this + */ + public function setNftId($nft_id) + { + $this->container['nft_id'] = $nft_id; + + return $this; + } + + /** + * Gets nft_position_manager + * + * @return string + */ + public function getNftPositionManager() + { + return $this->container['nft_position_manager']; + } + + /** + * Sets nft_position_manager + * + * @param string $nft_position_manager nft Position Manager + * + * @return $this + */ + public function setNftPositionManager($nft_position_manager) + { + $this->container['nft_position_manager'] = $nft_position_manager; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner user address + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets pool + * + * @return string + */ + public function getPool() + { + return $this->container['pool']; + } + + /** + * Sets pool + * + * @param string $pool pool address + * + * @return $this + */ + public function setPool($pool) + { + $this->container['pool'] = $pool; + + return $this; + } + + /** + * Gets start_time + * + * @return int + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param int $start_time 开始时间戳 + * + * @return $this + */ + public function setStartTime($start_time) + { + $this->container['start_time'] = $start_time; + + 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)); + } +} diff --git a/src/lib/client/Model/TaTokenLockerLockInfo.php b/src/lib/client/Model/TaTokenLockerLockInfo.php new file mode 100644 index 0000000..d3780d3 --- /dev/null +++ b/src/lib/client/Model/TaTokenLockerLockInfo.php @@ -0,0 +1,541 @@ + 'string', + 'end_time' => 'int', + 'is_lp_token' => 'int', + 'lock_id' => 'string', + 'locked_percent' => 'string', + 'owner' => 'string', + 'start_time' => 'int', + 'token' => 'string', + 'unlocked_amount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'amount' => null, + 'end_time' => 'int64', + 'is_lp_token' => 'int32', + 'lock_id' => null, + 'locked_percent' => null, + 'owner' => null, + 'start_time' => 'int64', + 'token' => null, + 'unlocked_amount' => 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 = [ + 'amount' => 'amount', + 'end_time' => 'endTime', + 'is_lp_token' => 'isLpToken', + 'lock_id' => 'lockId', + 'locked_percent' => 'lockedPercent', + 'owner' => 'owner', + 'start_time' => 'startTime', + 'token' => 'token', + 'unlocked_amount' => 'unlockedAmount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'end_time' => 'setEndTime', + 'is_lp_token' => 'setIsLpToken', + 'lock_id' => 'setLockId', + 'locked_percent' => 'setLockedPercent', + 'owner' => 'setOwner', + 'start_time' => 'setStartTime', + 'token' => 'setToken', + 'unlocked_amount' => 'setUnlockedAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'end_time' => 'getEndTime', + 'is_lp_token' => 'getIsLpToken', + 'lock_id' => 'getLockId', + 'locked_percent' => 'getLockedPercent', + 'owner' => 'getOwner', + 'start_time' => 'getStartTime', + 'token' => 'getToken', + 'unlocked_amount' => 'getUnlockedAmount' + ]; + + /** + * 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['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['is_lp_token'] = isset($data['is_lp_token']) ? $data['is_lp_token'] : null; + $this->container['lock_id'] = isset($data['lock_id']) ? $data['lock_id'] : null; + $this->container['locked_percent'] = isset($data['locked_percent']) ? $data['locked_percent'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + $this->container['token'] = isset($data['token']) ? $data['token'] : null; + $this->container['unlocked_amount'] = isset($data['unlocked_amount']) ? $data['unlocked_amount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 amount + * + * @return string + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount amount + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets end_time + * + * @return int + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param int $end_time endTime + * + * @return $this + */ + public function setEndTime($end_time) + { + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets is_lp_token + * + * @return int + */ + public function getIsLpToken() + { + return $this->container['is_lp_token']; + } + + /** + * Sets is_lp_token + * + * @param int $is_lp_token is lp token -1:unknow,0:no,1:yes + * + * @return $this + */ + public function setIsLpToken($is_lp_token) + { + $this->container['is_lp_token'] = $is_lp_token; + + return $this; + } + + /** + * Gets lock_id + * + * @return string + */ + public function getLockId() + { + return $this->container['lock_id']; + } + + /** + * Sets lock_id + * + * @param string $lock_id lock id + * + * @return $this + */ + public function setLockId($lock_id) + { + $this->container['lock_id'] = $lock_id; + + return $this; + } + + /** + * Gets locked_percent + * + * @return string + */ + public function getLockedPercent() + { + return $this->container['locked_percent']; + } + + /** + * Sets locked_percent + * + * @param string $locked_percent lockedPercent + * + * @return $this + */ + public function setLockedPercent($locked_percent) + { + $this->container['locked_percent'] = $locked_percent; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner user address + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets start_time + * + * @return int + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param int $start_time startTime + * + * @return $this + */ + public function setStartTime($start_time) + { + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token token contract address + * + * @return $this + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Gets unlocked_amount + * + * @return string + */ + public function getUnlockedAmount() + { + return $this->container['unlocked_amount']; + } + + /** + * Sets unlocked_amount + * + * @param string $unlocked_amount unlockedAmount + * + * @return $this + */ + public function setUnlockedAmount($unlocked_amount) + { + $this->container['unlocked_amount'] = $unlocked_amount; + + 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)); + } +} diff --git a/src/lib/client/Model/TransactionSecurityRequest.php b/src/lib/client/Model/TransactionSecurityRequest.php new file mode 100644 index 0000000..a3208ed --- /dev/null +++ b/src/lib/client/Model/TransactionSecurityRequest.php @@ -0,0 +1,630 @@ + '\Swagger\Client\Model\AddressInfo[]', + 'chain_id' => 'string', + 'data' => 'string', + 'from' => 'string', + 'gas_limit' => 'string', + 'gas_price' => 'string', + 'max_fee_per_gas' => 'string', + 'max_priority_fee_per_gas' => 'string', + 'nonce' => 'string', + 'to' => 'string', + 'url' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'access_list' => null, + 'chain_id' => null, + 'data' => null, + 'from' => null, + 'gas_limit' => null, + 'gas_price' => null, + 'max_fee_per_gas' => null, + 'max_priority_fee_per_gas' => null, + 'nonce' => null, + 'to' => null, + 'url' => null, + 'value' => 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 = [ + 'access_list' => 'access_list', + 'chain_id' => 'chain_id', + 'data' => 'data', + 'from' => 'from', + 'gas_limit' => 'gas_limit', + 'gas_price' => 'gas_price', + 'max_fee_per_gas' => 'max_fee_per_gas', + 'max_priority_fee_per_gas' => 'max_priority_fee_per_gas', + 'nonce' => 'nonce', + 'to' => 'to', + 'url' => 'url', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'access_list' => 'setAccessList', + 'chain_id' => 'setChainId', + 'data' => 'setData', + 'from' => 'setFrom', + 'gas_limit' => 'setGasLimit', + 'gas_price' => 'setGasPrice', + 'max_fee_per_gas' => 'setMaxFeePerGas', + 'max_priority_fee_per_gas' => 'setMaxPriorityFeePerGas', + 'nonce' => 'setNonce', + 'to' => 'setTo', + 'url' => 'setUrl', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'access_list' => 'getAccessList', + 'chain_id' => 'getChainId', + 'data' => 'getData', + 'from' => 'getFrom', + 'gas_limit' => 'getGasLimit', + 'gas_price' => 'getGasPrice', + 'max_fee_per_gas' => 'getMaxFeePerGas', + 'max_priority_fee_per_gas' => 'getMaxPriorityFeePerGas', + 'nonce' => 'getNonce', + 'to' => 'getTo', + 'url' => 'getUrl', + 'value' => 'getValue' + ]; + + /** + * 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['access_list'] = isset($data['access_list']) ? $data['access_list'] : null; + $this->container['chain_id'] = isset($data['chain_id']) ? $data['chain_id'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['from'] = isset($data['from']) ? $data['from'] : null; + $this->container['gas_limit'] = isset($data['gas_limit']) ? $data['gas_limit'] : null; + $this->container['gas_price'] = isset($data['gas_price']) ? $data['gas_price'] : null; + $this->container['max_fee_per_gas'] = isset($data['max_fee_per_gas']) ? $data['max_fee_per_gas'] : null; + $this->container['max_priority_fee_per_gas'] = isset($data['max_priority_fee_per_gas']) ? $data['max_priority_fee_per_gas'] : null; + $this->container['nonce'] = isset($data['nonce']) ? $data['nonce'] : null; + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 access_list + * + * @return \Swagger\Client\Model\AddressInfo[] + */ + public function getAccessList() + { + return $this->container['access_list']; + } + + /** + * Sets access_list + * + * @param \Swagger\Client\Model\AddressInfo[] $access_list access_list + * + * @return $this + */ + public function setAccessList($access_list) + { + $this->container['access_list'] = $access_list; + + return $this; + } + + /** + * Gets chain_id + * + * @return string + */ + public function getChainId() + { + return $this->container['chain_id']; + } + + /** + * Sets chain_id + * + * @param string $chain_id chain_id + * + * @return $this + */ + public function setChainId($chain_id) + { + $this->container['chain_id'] = $chain_id; + + return $this; + } + + /** + * Gets data + * + * @return string + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param string $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from from + * + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets gas_limit + * + * @return string + */ + public function getGasLimit() + { + return $this->container['gas_limit']; + } + + /** + * Sets gas_limit + * + * @param string $gas_limit gas_limit + * + * @return $this + */ + public function setGasLimit($gas_limit) + { + $this->container['gas_limit'] = $gas_limit; + + return $this; + } + + /** + * Gets gas_price + * + * @return string + */ + public function getGasPrice() + { + return $this->container['gas_price']; + } + + /** + * Sets gas_price + * + * @param string $gas_price gas_price + * + * @return $this + */ + public function setGasPrice($gas_price) + { + $this->container['gas_price'] = $gas_price; + + return $this; + } + + /** + * Gets max_fee_per_gas + * + * @return string + */ + public function getMaxFeePerGas() + { + return $this->container['max_fee_per_gas']; + } + + /** + * Sets max_fee_per_gas + * + * @param string $max_fee_per_gas max_fee_per_gas + * + * @return $this + */ + public function setMaxFeePerGas($max_fee_per_gas) + { + $this->container['max_fee_per_gas'] = $max_fee_per_gas; + + return $this; + } + + /** + * Gets max_priority_fee_per_gas + * + * @return string + */ + public function getMaxPriorityFeePerGas() + { + return $this->container['max_priority_fee_per_gas']; + } + + /** + * Sets max_priority_fee_per_gas + * + * @param string $max_priority_fee_per_gas max_priority_fee_per_gas + * + * @return $this + */ + public function setMaxPriorityFeePerGas($max_priority_fee_per_gas) + { + $this->container['max_priority_fee_per_gas'] = $max_priority_fee_per_gas; + + return $this; + } + + /** + * Gets nonce + * + * @return string + */ + public function getNonce() + { + return $this->container['nonce']; + } + + /** + * Sets nonce + * + * @param string $nonce nonce + * + * @return $this + */ + public function setNonce($nonce) + { + $this->container['nonce'] = $nonce; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to to + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url url + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + 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)); + } +} diff --git a/src/lib/client/Model/TransactionSecurityResponse.php b/src/lib/client/Model/TransactionSecurityResponse.php new file mode 100644 index 0000000..82a6027 --- /dev/null +++ b/src/lib/client/Model/TransactionSecurityResponse.php @@ -0,0 +1,660 @@ + '\Swagger\Client\Model\AllowanceChange[]', + 'erc20_balance_changes' => '\Swagger\Client\Model\ERC20BalanceChange[]', + 'erc721_balance_changes' => '\Swagger\Client\Model\ERC721BalanceChange[]', + 'flagged' => '\Swagger\Client\Model\Flag[]', + 'is_revert' => 'bool', + 'is_simulated' => 'bool', + 'logs' => '\Swagger\Client\Model\LogEntry[]', + 'native_balance_changes' => '\Swagger\Client\Model\NativeBalanceChange[]', + 'revert_reason' => 'string', + 'simulate_failed_reason' => 'string', + 'suspicious_addresses' => '\Swagger\Client\Model\AddressInfo[]', + 'suspicious_url' => 'bool', + 'used_gas' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'erc20_allowance_changes' => null, + 'erc20_balance_changes' => null, + 'erc721_balance_changes' => null, + 'flagged' => null, + 'is_revert' => null, + 'is_simulated' => null, + 'logs' => null, + 'native_balance_changes' => null, + 'revert_reason' => null, + 'simulate_failed_reason' => null, + 'suspicious_addresses' => null, + 'suspicious_url' => null, + 'used_gas' => 'int64' + ]; + + /** + * 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 = [ + 'erc20_allowance_changes' => 'erc20_allowance_changes', + 'erc20_balance_changes' => 'erc20_balance_changes', + 'erc721_balance_changes' => 'erc721_balance_changes', + 'flagged' => 'flagged', + 'is_revert' => 'is_revert', + 'is_simulated' => 'is_simulated', + 'logs' => 'logs', + 'native_balance_changes' => 'native_balance_changes', + 'revert_reason' => 'revert_reason', + 'simulate_failed_reason' => 'simulate_failed_reason', + 'suspicious_addresses' => 'suspicious_addresses', + 'suspicious_url' => 'suspicious_url', + 'used_gas' => 'used_gas' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'erc20_allowance_changes' => 'setErc20AllowanceChanges', + 'erc20_balance_changes' => 'setErc20BalanceChanges', + 'erc721_balance_changes' => 'setErc721BalanceChanges', + 'flagged' => 'setFlagged', + 'is_revert' => 'setIsRevert', + 'is_simulated' => 'setIsSimulated', + 'logs' => 'setLogs', + 'native_balance_changes' => 'setNativeBalanceChanges', + 'revert_reason' => 'setRevertReason', + 'simulate_failed_reason' => 'setSimulateFailedReason', + 'suspicious_addresses' => 'setSuspiciousAddresses', + 'suspicious_url' => 'setSuspiciousUrl', + 'used_gas' => 'setUsedGas' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'erc20_allowance_changes' => 'getErc20AllowanceChanges', + 'erc20_balance_changes' => 'getErc20BalanceChanges', + 'erc721_balance_changes' => 'getErc721BalanceChanges', + 'flagged' => 'getFlagged', + 'is_revert' => 'getIsRevert', + 'is_simulated' => 'getIsSimulated', + 'logs' => 'getLogs', + 'native_balance_changes' => 'getNativeBalanceChanges', + 'revert_reason' => 'getRevertReason', + 'simulate_failed_reason' => 'getSimulateFailedReason', + 'suspicious_addresses' => 'getSuspiciousAddresses', + 'suspicious_url' => 'getSuspiciousUrl', + 'used_gas' => 'getUsedGas' + ]; + + /** + * 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['erc20_allowance_changes'] = isset($data['erc20_allowance_changes']) ? $data['erc20_allowance_changes'] : null; + $this->container['erc20_balance_changes'] = isset($data['erc20_balance_changes']) ? $data['erc20_balance_changes'] : null; + $this->container['erc721_balance_changes'] = isset($data['erc721_balance_changes']) ? $data['erc721_balance_changes'] : null; + $this->container['flagged'] = isset($data['flagged']) ? $data['flagged'] : null; + $this->container['is_revert'] = isset($data['is_revert']) ? $data['is_revert'] : null; + $this->container['is_simulated'] = isset($data['is_simulated']) ? $data['is_simulated'] : null; + $this->container['logs'] = isset($data['logs']) ? $data['logs'] : null; + $this->container['native_balance_changes'] = isset($data['native_balance_changes']) ? $data['native_balance_changes'] : null; + $this->container['revert_reason'] = isset($data['revert_reason']) ? $data['revert_reason'] : null; + $this->container['simulate_failed_reason'] = isset($data['simulate_failed_reason']) ? $data['simulate_failed_reason'] : null; + $this->container['suspicious_addresses'] = isset($data['suspicious_addresses']) ? $data['suspicious_addresses'] : null; + $this->container['suspicious_url'] = isset($data['suspicious_url']) ? $data['suspicious_url'] : null; + $this->container['used_gas'] = isset($data['used_gas']) ? $data['used_gas'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 erc20_allowance_changes + * + * @return \Swagger\Client\Model\AllowanceChange[] + */ + public function getErc20AllowanceChanges() + { + return $this->container['erc20_allowance_changes']; + } + + /** + * Sets erc20_allowance_changes + * + * @param \Swagger\Client\Model\AllowanceChange[] $erc20_allowance_changes erc20_allowance_changes + * + * @return $this + */ + public function setErc20AllowanceChanges($erc20_allowance_changes) + { + $this->container['erc20_allowance_changes'] = $erc20_allowance_changes; + + return $this; + } + + /** + * Gets erc20_balance_changes + * + * @return \Swagger\Client\Model\ERC20BalanceChange[] + */ + public function getErc20BalanceChanges() + { + return $this->container['erc20_balance_changes']; + } + + /** + * Sets erc20_balance_changes + * + * @param \Swagger\Client\Model\ERC20BalanceChange[] $erc20_balance_changes erc20_balance_changes + * + * @return $this + */ + public function setErc20BalanceChanges($erc20_balance_changes) + { + $this->container['erc20_balance_changes'] = $erc20_balance_changes; + + return $this; + } + + /** + * Gets erc721_balance_changes + * + * @return \Swagger\Client\Model\ERC721BalanceChange[] + */ + public function getErc721BalanceChanges() + { + return $this->container['erc721_balance_changes']; + } + + /** + * Sets erc721_balance_changes + * + * @param \Swagger\Client\Model\ERC721BalanceChange[] $erc721_balance_changes erc721_balance_changes + * + * @return $this + */ + public function setErc721BalanceChanges($erc721_balance_changes) + { + $this->container['erc721_balance_changes'] = $erc721_balance_changes; + + return $this; + } + + /** + * Gets flagged + * + * @return \Swagger\Client\Model\Flag[] + */ + public function getFlagged() + { + return $this->container['flagged']; + } + + /** + * Sets flagged + * + * @param \Swagger\Client\Model\Flag[] $flagged flagged + * + * @return $this + */ + public function setFlagged($flagged) + { + $this->container['flagged'] = $flagged; + + return $this; + } + + /** + * Gets is_revert + * + * @return bool + */ + public function getIsRevert() + { + return $this->container['is_revert']; + } + + /** + * Sets is_revert + * + * @param bool $is_revert is_revert + * + * @return $this + */ + public function setIsRevert($is_revert) + { + $this->container['is_revert'] = $is_revert; + + return $this; + } + + /** + * Gets is_simulated + * + * @return bool + */ + public function getIsSimulated() + { + return $this->container['is_simulated']; + } + + /** + * Sets is_simulated + * + * @param bool $is_simulated is_simulated + * + * @return $this + */ + public function setIsSimulated($is_simulated) + { + $this->container['is_simulated'] = $is_simulated; + + return $this; + } + + /** + * Gets logs + * + * @return \Swagger\Client\Model\LogEntry[] + */ + public function getLogs() + { + return $this->container['logs']; + } + + /** + * Sets logs + * + * @param \Swagger\Client\Model\LogEntry[] $logs logs + * + * @return $this + */ + public function setLogs($logs) + { + $this->container['logs'] = $logs; + + return $this; + } + + /** + * Gets native_balance_changes + * + * @return \Swagger\Client\Model\NativeBalanceChange[] + */ + public function getNativeBalanceChanges() + { + return $this->container['native_balance_changes']; + } + + /** + * Sets native_balance_changes + * + * @param \Swagger\Client\Model\NativeBalanceChange[] $native_balance_changes native_balance_changes + * + * @return $this + */ + public function setNativeBalanceChanges($native_balance_changes) + { + $this->container['native_balance_changes'] = $native_balance_changes; + + return $this; + } + + /** + * Gets revert_reason + * + * @return string + */ + public function getRevertReason() + { + return $this->container['revert_reason']; + } + + /** + * Sets revert_reason + * + * @param string $revert_reason revert_reason + * + * @return $this + */ + public function setRevertReason($revert_reason) + { + $this->container['revert_reason'] = $revert_reason; + + return $this; + } + + /** + * Gets simulate_failed_reason + * + * @return string + */ + public function getSimulateFailedReason() + { + return $this->container['simulate_failed_reason']; + } + + /** + * Sets simulate_failed_reason + * + * @param string $simulate_failed_reason simulate_failed_reason + * + * @return $this + */ + public function setSimulateFailedReason($simulate_failed_reason) + { + $this->container['simulate_failed_reason'] = $simulate_failed_reason; + + return $this; + } + + /** + * Gets suspicious_addresses + * + * @return \Swagger\Client\Model\AddressInfo[] + */ + public function getSuspiciousAddresses() + { + return $this->container['suspicious_addresses']; + } + + /** + * Sets suspicious_addresses + * + * @param \Swagger\Client\Model\AddressInfo[] $suspicious_addresses suspicious_addresses + * + * @return $this + */ + public function setSuspiciousAddresses($suspicious_addresses) + { + $this->container['suspicious_addresses'] = $suspicious_addresses; + + return $this; + } + + /** + * Gets suspicious_url + * + * @return bool + */ + public function getSuspiciousUrl() + { + return $this->container['suspicious_url']; + } + + /** + * Sets suspicious_url + * + * @param bool $suspicious_url suspicious_url + * + * @return $this + */ + public function setSuspiciousUrl($suspicious_url) + { + $this->container['suspicious_url'] = $suspicious_url; + + return $this; + } + + /** + * Gets used_gas + * + * @return int + */ + public function getUsedGas() + { + return $this->container['used_gas']; + } + + /** + * Sets used_gas + * + * @param int $used_gas used_gas + * + * @return $this + */ + public function setUsedGas($used_gas) + { + $this->container['used_gas'] = $used_gas; + + 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)); + } +} diff --git a/src/lib/client/Model/V4LpLockerLockInfoResp.php b/src/lib/client/Model/V4LpLockerLockInfoResp.php new file mode 100644 index 0000000..eda3bb5 --- /dev/null +++ b/src/lib/client/Model/V4LpLockerLockInfoResp.php @@ -0,0 +1,480 @@ + 'int', + 'lock_id' => 'string', + 'nft_id' => 'string', + 'nft_position_manager' => 'string', + 'owner' => 'string', + 'pool_id' => 'string', + 'start_time' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'end_time' => 'int64', + 'lock_id' => null, + 'nft_id' => null, + 'nft_position_manager' => null, + 'owner' => null, + 'pool_id' => null, + 'start_time' => 'int64' + ]; + + /** + * 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 = [ + 'end_time' => 'endTime', + 'lock_id' => 'lockId', + 'nft_id' => 'nftId', + 'nft_position_manager' => 'nftPositionManager', + 'owner' => 'owner', + 'pool_id' => 'poolId', + 'start_time' => 'startTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'end_time' => 'setEndTime', + 'lock_id' => 'setLockId', + 'nft_id' => 'setNftId', + 'nft_position_manager' => 'setNftPositionManager', + 'owner' => 'setOwner', + 'pool_id' => 'setPoolId', + 'start_time' => 'setStartTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'end_time' => 'getEndTime', + 'lock_id' => 'getLockId', + 'nft_id' => 'getNftId', + 'nft_position_manager' => 'getNftPositionManager', + 'owner' => 'getOwner', + 'pool_id' => 'getPoolId', + 'start_time' => 'getStartTime' + ]; + + /** + * 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['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['lock_id'] = isset($data['lock_id']) ? $data['lock_id'] : null; + $this->container['nft_id'] = isset($data['nft_id']) ? $data['nft_id'] : null; + $this->container['nft_position_manager'] = isset($data['nft_position_manager']) ? $data['nft_position_manager'] : null; + $this->container['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['pool_id'] = isset($data['pool_id']) ? $data['pool_id'] : null; + $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 end_time + * + * @return int + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param int $end_time 解锁时间戳 + * + * @return $this + */ + public function setEndTime($end_time) + { + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets lock_id + * + * @return string + */ + public function getLockId() + { + return $this->container['lock_id']; + } + + /** + * Sets lock_id + * + * @param string $lock_id lock id + * + * @return $this + */ + public function setLockId($lock_id) + { + $this->container['lock_id'] = $lock_id; + + return $this; + } + + /** + * Gets nft_id + * + * @return string + */ + public function getNftId() + { + return $this->container['nft_id']; + } + + /** + * Sets nft_id + * + * @param string $nft_id nft id + * + * @return $this + */ + public function setNftId($nft_id) + { + $this->container['nft_id'] = $nft_id; + + return $this; + } + + /** + * Gets nft_position_manager + * + * @return string + */ + public function getNftPositionManager() + { + return $this->container['nft_position_manager']; + } + + /** + * Sets nft_position_manager + * + * @param string $nft_position_manager nft Position Manager + * + * @return $this + */ + public function setNftPositionManager($nft_position_manager) + { + $this->container['nft_position_manager'] = $nft_position_manager; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner user address + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets pool_id + * + * @return string + */ + public function getPoolId() + { + return $this->container['pool_id']; + } + + /** + * Sets pool_id + * + * @param string $pool_id pool id + * + * @return $this + */ + public function setPoolId($pool_id) + { + $this->container['pool_id'] = $pool_id; + + return $this; + } + + /** + * Gets start_time + * + * @return int + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param int $start_time 开始时间戳 + * + * @return $this + */ + public function setStartTime($start_time) + { + $this->container['start_time'] = $start_time; + + 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)); + } +} diff --git a/src/lib/client/Model/V4NftLockerLockInfos.php b/src/lib/client/Model/V4NftLockerLockInfos.php new file mode 100644 index 0000000..8e11cea --- /dev/null +++ b/src/lib/client/Model/V4NftLockerLockInfos.php @@ -0,0 +1,421 @@ + 'string', + 'lock_list' => '\Swagger\Client\Model\TaNftLockerLockInfo[]', + 'nft_position_manager' => 'string', + 'pool_id' => 'string', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'chain_id' => null, + 'lock_list' => null, + 'nft_position_manager' => null, + 'pool_id' => null, + 'url' => 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 = [ + 'chain_id' => 'chainId', + 'lock_list' => 'lockList', + 'nft_position_manager' => 'nftPositionManager', + 'pool_id' => 'poolId', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'chain_id' => 'setChainId', + 'lock_list' => 'setLockList', + 'nft_position_manager' => 'setNftPositionManager', + 'pool_id' => 'setPoolId', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'chain_id' => 'getChainId', + 'lock_list' => 'getLockList', + 'nft_position_manager' => 'getNftPositionManager', + 'pool_id' => 'getPoolId', + 'url' => 'getUrl' + ]; + + /** + * 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['chain_id'] = isset($data['chain_id']) ? $data['chain_id'] : null; + $this->container['lock_list'] = isset($data['lock_list']) ? $data['lock_list'] : null; + $this->container['nft_position_manager'] = isset($data['nft_position_manager']) ? $data['nft_position_manager'] : null; + $this->container['pool_id'] = isset($data['pool_id']) ? $data['pool_id'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 chain_id + * + * @return string + */ + public function getChainId() + { + return $this->container['chain_id']; + } + + /** + * Sets chain_id + * + * @param string $chain_id chain id + * + * @return $this + */ + public function setChainId($chain_id) + { + $this->container['chain_id'] = $chain_id; + + return $this; + } + + /** + * Gets lock_list + * + * @return \Swagger\Client\Model\TaNftLockerLockInfo[] + */ + public function getLockList() + { + return $this->container['lock_list']; + } + + /** + * Sets lock_list + * + * @param \Swagger\Client\Model\TaNftLockerLockInfo[] $lock_list lock info list + * + * @return $this + */ + public function setLockList($lock_list) + { + $this->container['lock_list'] = $lock_list; + + return $this; + } + + /** + * Gets nft_position_manager + * + * @return string + */ + public function getNftPositionManager() + { + return $this->container['nft_position_manager']; + } + + /** + * Sets nft_position_manager + * + * @param string $nft_position_manager nft Position Manager + * + * @return $this + */ + public function setNftPositionManager($nft_position_manager) + { + $this->container['nft_position_manager'] = $nft_position_manager; + + return $this; + } + + /** + * Gets pool_id + * + * @return string + */ + public function getPoolId() + { + return $this->container['pool_id']; + } + + /** + * Sets pool_id + * + * @param string $pool_id pool id + * + * @return $this + */ + public function setPoolId($pool_id) + { + $this->container['pool_id'] = $pool_id; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url url + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + 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)); + } +}