diff --git a/src/lib/client/Api/ApproveControllerV1Api.php b/src/lib/client/Api/ApproveAPIV1Api.php similarity index 83% rename from src/lib/client/Api/ApproveControllerV1Api.php rename to src/lib/client/Api/ApproveAPIV1Api.php index b4d376e..af773e7 100644 --- a/src/lib/client/Api/ApproveControllerV1Api.php +++ b/src/lib/client/Api/ApproveAPIV1Api.php @@ -1,6 +1,6 @@ client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getNftLockersUsingGET + * + * Get lpv3 locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_address poolAddress (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperNftLockerResponse + */ + public function getNftLockersUsingGET($chain_id, $page_num, $page_size, $pool_address) + { + list($response) = $this->getNftLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $pool_address); + return $response; + } + + /** + * Operation getNftLockersUsingGETWithHttpInfo + * + * Get lpv3 locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_address poolAddress (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperNftLockerResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getNftLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $pool_address) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperNftLockerResponse'; + $request = $this->getNftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_address); + + 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\ResponseWrapperNftLockerResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getNftLockersUsingGETAsync + * + * Get lpv3 locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_address poolAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNftLockersUsingGETAsync($chain_id, $page_num, $page_size, $pool_address) + { + return $this->getNftLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $pool_address) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getNftLockersUsingGETAsyncWithHttpInfo + * + * Get lpv3 locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_address poolAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNftLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $pool_address) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperNftLockerResponse'; + $request = $this->getNftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_address); + + 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 'getNftLockersUsingGET' + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $pool_address poolAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getNftLockersUsingGETRequest($chain_id, $page_num, $page_size, $pool_address) + { + // 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 getNftLockersUsingGET' + ); + } + // 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 getNftLockersUsingGET' + ); + } + // 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 getNftLockersUsingGET' + ); + } + // verify the required parameter 'pool_address' is set + if ($pool_address === null || (is_array($pool_address) && count($pool_address) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pool_address when calling getNftLockersUsingGET' + ); + } + + $resourcePath = '/open/api/v1/locks/lpv3'; + $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_address !== null) { + $queryParams['poolAddress'] = ObjectSerializer::toQueryValue($pool_address, 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 + ); + } + + /** + * Operation getTokenLockersUsingGET + * + * Get token locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $token_address tokenAddress (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperTokenLockerResponse + */ + public function getTokenLockersUsingGET($chain_id, $page_num, $page_size, $token_address) + { + list($response) = $this->getTokenLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $token_address); + return $response; + } + + /** + * Operation getTokenLockersUsingGETWithHttpInfo + * + * Get token locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $token_address tokenAddress (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperTokenLockerResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getTokenLockersUsingGETWithHttpInfo($chain_id, $page_num, $page_size, $token_address) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperTokenLockerResponse'; + $request = $this->getTokenLockersUsingGETRequest($chain_id, $page_num, $page_size, $token_address); + + 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\ResponseWrapperTokenLockerResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTokenLockersUsingGETAsync + * + * Get token locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $token_address tokenAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTokenLockersUsingGETAsync($chain_id, $page_num, $page_size, $token_address) + { + return $this->getTokenLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $token_address) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTokenLockersUsingGETAsyncWithHttpInfo + * + * Get token locker info + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $token_address tokenAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTokenLockersUsingGETAsyncWithHttpInfo($chain_id, $page_num, $page_size, $token_address) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperTokenLockerResponse'; + $request = $this->getTokenLockersUsingGETRequest($chain_id, $page_num, $page_size, $token_address); + + 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 'getTokenLockersUsingGET' + * + * @param string $chain_id chainId (required) + * @param int $page_num pageNum (required) + * @param int $page_size pageSize (required) + * @param string $token_address tokenAddress (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getTokenLockersUsingGETRequest($chain_id, $page_num, $page_size, $token_address) + { + // 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 getTokenLockersUsingGET' + ); + } + // 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 getTokenLockersUsingGET' + ); + } + // 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 getTokenLockersUsingGET' + ); + } + // verify the required parameter 'token_address' is set + if ($token_address === null || (is_array($token_address) && count($token_address) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $token_address when calling getTokenLockersUsingGET' + ); + } + + $resourcePath = '/open/api/v1/locks/token'; + $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 ($token_address !== null) { + $queryParams['tokenAddress'] = ObjectSerializer::toQueryValue($token_address, 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 + * + * @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/NftControllerApi.php b/src/lib/client/Api/NftControllerApi.php index 5865ce9..a58bd66 100644 --- a/src/lib/client/Api/NftControllerApi.php +++ b/src/lib/client/Api/NftControllerApi.php @@ -93,7 +93,7 @@ public function getConfig() * * @param string $chain_id The chain_id of the blockchain.\"1\" means Ethereum; \"10\" means Optimism;\"25\" means Cronos;\"56\" means BSC; \"100\" means Gnosis;\"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom;\"321\" means KCC;\"324\" means zkSync Era; \"201022\" means FON;\"42161\" means Arbitrum; \"43114\" means Avalanche;\"59144\" means Linea Mainnet;\"8453\" Base;\"5000\" Mantle; (required) * @param string $contract_addresses NFT contract address (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $token_id tokenId (optional) * * @throws \Swagger\Client\ApiException on non-2xx response @@ -113,7 +113,7 @@ public function getNftInfoUsingGET1($chain_id, $contract_addresses, $authorizati * * @param string $chain_id The chain_id of the blockchain.\"1\" means Ethereum; \"10\" means Optimism;\"25\" means Cronos;\"56\" means BSC; \"100\" means Gnosis;\"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom;\"321\" means KCC;\"324\" means zkSync Era; \"201022\" means FON;\"42161\" means Arbitrum; \"43114\" means Avalanche;\"59144\" means Linea Mainnet;\"8453\" Base;\"5000\" Mantle; (required) * @param string $contract_addresses NFT contract address (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $token_id tokenId (optional) * * @throws \Swagger\Client\ApiException on non-2xx response @@ -191,7 +191,7 @@ public function getNftInfoUsingGET1WithHttpInfo($chain_id, $contract_addresses, * * @param string $chain_id The chain_id of the blockchain.\"1\" means Ethereum; \"10\" means Optimism;\"25\" means Cronos;\"56\" means BSC; \"100\" means Gnosis;\"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom;\"321\" means KCC;\"324\" means zkSync Era; \"201022\" means FON;\"42161\" means Arbitrum; \"43114\" means Avalanche;\"59144\" means Linea Mainnet;\"8453\" Base;\"5000\" Mantle; (required) * @param string $contract_addresses NFT contract address (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $token_id tokenId (optional) * * @throws \InvalidArgumentException @@ -214,7 +214,7 @@ function ($response) { * * @param string $chain_id The chain_id of the blockchain.\"1\" means Ethereum; \"10\" means Optimism;\"25\" means Cronos;\"56\" means BSC; \"100\" means Gnosis;\"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom;\"321\" means KCC;\"324\" means zkSync Era; \"201022\" means FON;\"42161\" means Arbitrum; \"43114\" means Avalanche;\"59144\" means Linea Mainnet;\"8453\" Base;\"5000\" Mantle; (required) * @param string $contract_addresses NFT contract address (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $token_id tokenId (optional) * * @throws \InvalidArgumentException @@ -267,7 +267,7 @@ function ($exception) { * * @param string $chain_id The chain_id of the blockchain.\"1\" means Ethereum; \"10\" means Optimism;\"25\" means Cronos;\"56\" means BSC; \"100\" means Gnosis;\"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom;\"321\" means KCC;\"324\" means zkSync Era; \"201022\" means FON;\"42161\" means Arbitrum; \"43114\" means Avalanche;\"59144\" means Linea Mainnet;\"8453\" Base;\"5000\" Mantle; (required) * @param string $contract_addresses NFT contract address (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $token_id tokenId (optional) * * @throws \InvalidArgumentException diff --git a/src/lib/client/Api/TokenControllerV1Api.php b/src/lib/client/Api/TokenControllerV1Api.php index 758874a..41b9fa6 100644 --- a/src/lib/client/Api/TokenControllerV1Api.php +++ b/src/lib/client/Api/TokenControllerV1Api.php @@ -91,7 +91,7 @@ public function getConfig() * * Get the list of chains supported by different functions. * - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $name API name. (optional) * * @throws \Swagger\Client\ApiException on non-2xx response @@ -109,7 +109,7 @@ public function getChainsListUsingGET($authorization = null, $name = null) * * Get the list of chains supported by different functions. * - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $name API name. (optional) * * @throws \Swagger\Client\ApiException on non-2xx response @@ -185,7 +185,7 @@ public function getChainsListUsingGETWithHttpInfo($authorization = null, $name = * * Get the list of chains supported by different functions. * - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $name API name. (optional) * * @throws \InvalidArgumentException @@ -206,7 +206,7 @@ function ($response) { * * Get the list of chains supported by different functions. * - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $name API name. (optional) * * @throws \InvalidArgumentException @@ -257,7 +257,7 @@ function ($exception) { /** * Create request for operation 'getChainsListUsingGET' * - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * @param string $name API name. (optional) * * @throws \InvalidArgumentException @@ -352,9 +352,9 @@ protected function getChainsListUsingGETRequest($authorization = null, $name = n * * Get token's security and risk data. * - * @param string $chain_id The chain_id of the blockchain. \"1\" means Ethereum; \"10\" means Optimism; \"25\" means Cronos; \"56\" means BSC; \"66\" means OKC; \"100\" means Gnosis; \"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom; \"321\" means KCC; \"324\" means zkSync Era; \"10001\" means ETHW; \"201022\" means FON; \"42161\" means Arbitrum; \"43114\" means Avalanche; \"59144\" means Linea Mainnet; \"8453\" Base; \"tron\" means Tron; \"534352\" means Scroll; \"204\" means opBNB; (required) + * @param string $chain_id The chain_id of the blockchain. To check the corresponding blockchain name for a given chain_id, please visit: https://docs.gopluslabs.io/reference/response-details-9 (required) * @param string $contract_addresses The contract address of tokens. (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -371,9 +371,9 @@ public function tokenSecurityUsingGET1($chain_id, $contract_addresses, $authoriz * * Get token's security and risk data. * - * @param string $chain_id The chain_id of the blockchain. \"1\" means Ethereum; \"10\" means Optimism; \"25\" means Cronos; \"56\" means BSC; \"66\" means OKC; \"100\" means Gnosis; \"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom; \"321\" means KCC; \"324\" means zkSync Era; \"10001\" means ETHW; \"201022\" means FON; \"42161\" means Arbitrum; \"43114\" means Avalanche; \"59144\" means Linea Mainnet; \"8453\" Base; \"tron\" means Tron; \"534352\" means Scroll; \"204\" means opBNB; (required) + * @param string $chain_id The chain_id of the blockchain. To check the corresponding blockchain name for a given chain_id, please visit: https://docs.gopluslabs.io/reference/response-details-9 (required) * @param string $contract_addresses The contract address of tokens. (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -448,9 +448,9 @@ public function tokenSecurityUsingGET1WithHttpInfo($chain_id, $contract_addresse * * Get token's security and risk data. * - * @param string $chain_id The chain_id of the blockchain. \"1\" means Ethereum; \"10\" means Optimism; \"25\" means Cronos; \"56\" means BSC; \"66\" means OKC; \"100\" means Gnosis; \"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom; \"321\" means KCC; \"324\" means zkSync Era; \"10001\" means ETHW; \"201022\" means FON; \"42161\" means Arbitrum; \"43114\" means Avalanche; \"59144\" means Linea Mainnet; \"8453\" Base; \"tron\" means Tron; \"534352\" means Scroll; \"204\" means opBNB; (required) + * @param string $chain_id The chain_id of the blockchain. To check the corresponding blockchain name for a given chain_id, please visit: https://docs.gopluslabs.io/reference/response-details-9 (required) * @param string $contract_addresses The contract address of tokens. (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -470,9 +470,9 @@ function ($response) { * * Get token's security and risk data. * - * @param string $chain_id The chain_id of the blockchain. \"1\" means Ethereum; \"10\" means Optimism; \"25\" means Cronos; \"56\" means BSC; \"66\" means OKC; \"100\" means Gnosis; \"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom; \"321\" means KCC; \"324\" means zkSync Era; \"10001\" means ETHW; \"201022\" means FON; \"42161\" means Arbitrum; \"43114\" means Avalanche; \"59144\" means Linea Mainnet; \"8453\" Base; \"tron\" means Tron; \"534352\" means Scroll; \"204\" means opBNB; (required) + * @param string $chain_id The chain_id of the blockchain. To check the corresponding blockchain name for a given chain_id, please visit: https://docs.gopluslabs.io/reference/response-details-9 (required) * @param string $contract_addresses The contract address of tokens. (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -522,9 +522,9 @@ function ($exception) { /** * Create request for operation 'tokenSecurityUsingGET1' * - * @param string $chain_id The chain_id of the blockchain. \"1\" means Ethereum; \"10\" means Optimism; \"25\" means Cronos; \"56\" means BSC; \"66\" means OKC; \"100\" means Gnosis; \"128\" means HECO; \"137\" means Polygon; \"250\" means Fantom; \"321\" means KCC; \"324\" means zkSync Era; \"10001\" means ETHW; \"201022\" means FON; \"42161\" means Arbitrum; \"43114\" means Avalanche; \"59144\" means Linea Mainnet; \"8453\" Base; \"tron\" means Tron; \"534352\" means Scroll; \"204\" means opBNB; (required) + * @param string $chain_id The chain_id of the blockchain. To check the corresponding blockchain name for a given chain_id, please visit: https://docs.gopluslabs.io/reference/response-details-9 (required) * @param string $contract_addresses The contract address of tokens. (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/src/lib/client/Api/TokenSecurityAPIForSolanaBetaApi.php b/src/lib/client/Api/TokenSecurityAPIForSolanaBetaApi.php new file mode 100644 index 0000000..69c633a --- /dev/null +++ b/src/lib/client/Api/TokenSecurityAPIForSolanaBetaApi.php @@ -0,0 +1,365 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation solanaTokenSecurityUsingGET + * + * Get token's security and risk data. + * + * @param string $contract_addresses The contract address of solana tokens. (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurity + */ + public function solanaTokenSecurityUsingGET($contract_addresses) + { + list($response) = $this->solanaTokenSecurityUsingGETWithHttpInfo($contract_addresses); + return $response; + } + + /** + * Operation solanaTokenSecurityUsingGETWithHttpInfo + * + * Get token's security and risk data. + * + * @param string $contract_addresses The contract address of solana tokens. (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurity, HTTP status code, HTTP response headers (array of strings) + */ + public function solanaTokenSecurityUsingGETWithHttpInfo($contract_addresses) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurity'; + $request = $this->solanaTokenSecurityUsingGETRequest($contract_addresses); + + 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\ResponseWrapperSolanaTokenSecurity', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation solanaTokenSecurityUsingGETAsync + * + * Get token's security and risk data. + * + * @param string $contract_addresses The contract address of solana tokens. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function solanaTokenSecurityUsingGETAsync($contract_addresses) + { + return $this->solanaTokenSecurityUsingGETAsyncWithHttpInfo($contract_addresses) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation solanaTokenSecurityUsingGETAsyncWithHttpInfo + * + * Get token's security and risk data. + * + * @param string $contract_addresses The contract address of solana tokens. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function solanaTokenSecurityUsingGETAsyncWithHttpInfo($contract_addresses) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurity'; + $request = $this->solanaTokenSecurityUsingGETRequest($contract_addresses); + + 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 'solanaTokenSecurityUsingGET' + * + * @param string $contract_addresses The contract address of solana tokens. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function solanaTokenSecurityUsingGETRequest($contract_addresses) + { + // verify the required parameter 'contract_addresses' is set + if ($contract_addresses === null || (is_array($contract_addresses) && count($contract_addresses) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $contract_addresses when calling solanaTokenSecurityUsingGET' + ); + } + + $resourcePath = '/api/v1/solana/token_security'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($contract_addresses !== null) { + $queryParams['contract_addresses'] = ObjectSerializer::toQueryValue($contract_addresses, 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 + * + * @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/TokenSecurityAPIForSuiApi.php b/src/lib/client/Api/TokenSecurityAPIForSuiApi.php new file mode 100644 index 0000000..5ecb91e --- /dev/null +++ b/src/lib/client/Api/TokenSecurityAPIForSuiApi.php @@ -0,0 +1,359 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation suiTokenSecurityUsingGET + * + * Get token's security and risk data. + * + * @param string $contract_addresses contract_addresses (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperSuiTokenSecurity + */ + public function suiTokenSecurityUsingGET($contract_addresses = null) + { + list($response) = $this->suiTokenSecurityUsingGETWithHttpInfo($contract_addresses); + return $response; + } + + /** + * Operation suiTokenSecurityUsingGETWithHttpInfo + * + * Get token's security and risk data. + * + * @param string $contract_addresses contract_addresses (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperSuiTokenSecurity, HTTP status code, HTTP response headers (array of strings) + */ + public function suiTokenSecurityUsingGETWithHttpInfo($contract_addresses = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurity'; + $request = $this->suiTokenSecurityUsingGETRequest($contract_addresses); + + 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\ResponseWrapperSuiTokenSecurity', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation suiTokenSecurityUsingGETAsync + * + * Get token's security and risk data. + * + * @param string $contract_addresses contract_addresses (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function suiTokenSecurityUsingGETAsync($contract_addresses = null) + { + return $this->suiTokenSecurityUsingGETAsyncWithHttpInfo($contract_addresses) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation suiTokenSecurityUsingGETAsyncWithHttpInfo + * + * Get token's security and risk data. + * + * @param string $contract_addresses contract_addresses (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function suiTokenSecurityUsingGETAsyncWithHttpInfo($contract_addresses = null) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurity'; + $request = $this->suiTokenSecurityUsingGETRequest($contract_addresses); + + 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 'suiTokenSecurityUsingGET' + * + * @param string $contract_addresses contract_addresses (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function suiTokenSecurityUsingGETRequest($contract_addresses = null) + { + + $resourcePath = '/api/v1/sui/token_security'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($contract_addresses !== null) { + $queryParams['contract_addresses'] = ObjectSerializer::toQueryValue($contract_addresses, 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 + * + * @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/TransactionSimulationForSolanaApi.php b/src/lib/client/Api/TransactionSimulationForSolanaApi.php new file mode 100644 index 0000000..7a24550 --- /dev/null +++ b/src/lib/client/Api/TransactionSimulationForSolanaApi.php @@ -0,0 +1,364 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation prerunTxUsingPOST + * + * Check for potential risks in the transaction + * + * @param \Swagger\Client\Model\SolanaPrerunTxRequest $body request (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ResponseWrapperSolanaPrerunTxResponse + */ + public function prerunTxUsingPOST($body) + { + list($response) = $this->prerunTxUsingPOSTWithHttpInfo($body); + return $response; + } + + /** + * Operation prerunTxUsingPOSTWithHttpInfo + * + * Check for potential risks in the transaction + * + * @param \Swagger\Client\Model\SolanaPrerunTxRequest $body request (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ResponseWrapperSolanaPrerunTxResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function prerunTxUsingPOSTWithHttpInfo($body) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSolanaPrerunTxResponse'; + $request = $this->prerunTxUsingPOSTRequest($body); + + 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\ResponseWrapperSolanaPrerunTxResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation prerunTxUsingPOSTAsync + * + * Check for potential risks in the transaction + * + * @param \Swagger\Client\Model\SolanaPrerunTxRequest $body request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function prerunTxUsingPOSTAsync($body) + { + return $this->prerunTxUsingPOSTAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation prerunTxUsingPOSTAsyncWithHttpInfo + * + * Check for potential risks in the transaction + * + * @param \Swagger\Client\Model\SolanaPrerunTxRequest $body request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function prerunTxUsingPOSTAsyncWithHttpInfo($body) + { + $returnType = '\Swagger\Client\Model\ResponseWrapperSolanaPrerunTxResponse'; + $request = $this->prerunTxUsingPOSTRequest($body); + + 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 'prerunTxUsingPOST' + * + * @param \Swagger\Client\Model\SolanaPrerunTxRequest $body request (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function prerunTxUsingPOSTRequest($body) + { + // 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 prerunTxUsingPOST' + ); + } + + $resourcePath = '/pis/api/v1/solana/pre_execution'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // 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/WebsiteControllerApi.php b/src/lib/client/Api/WebsiteControllerApi.php index a48d034..29c5c94 100644 --- a/src/lib/client/Api/WebsiteControllerApi.php +++ b/src/lib/client/Api/WebsiteControllerApi.php @@ -92,7 +92,7 @@ public function getConfig() * Check if the the url is a phishing site * * @param string $url Url (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -110,7 +110,7 @@ public function phishingSiteUsingGET($url, $authorization = null) * Check if the the url is a phishing site * * @param string $url Url (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -186,7 +186,7 @@ public function phishingSiteUsingGETWithHttpInfo($url, $authorization = null) * Check if the the url is a phishing site * * @param string $url Url (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -207,7 +207,7 @@ function ($response) { * Check if the the url is a phishing site * * @param string $url Url (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -258,7 +258,7 @@ function ($exception) { * Create request for operation 'phishingSiteUsingGET' * * @param string $url Url (required) - * @param string $authorization Authorization (test: Bearer 81|9ihH8JzEuFu4MQ9DjWmH5WrNCPW...) (optional) + * @param string $authorization Authorization token in the format: Bearer <token> (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/src/lib/client/Model/NewAllowance.php b/src/lib/client/Model/NewAllowance.php new file mode 100644 index 0000000..515669a --- /dev/null +++ b/src/lib/client/Model/NewAllowance.php @@ -0,0 +1,450 @@ + 'string', + 'post_amount' => 'string', + 'allowance_change' => 'string', + 'spender' => 'string', + 'risky_spender' => 'int', + 'pre_amount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner' => null, + 'post_amount' => null, + 'allowance_change' => null, + 'spender' => null, + 'risky_spender' => 'int32', + 'pre_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 = [ + 'owner' => 'owner', + 'post_amount' => 'post_amount', + 'allowance_change' => 'allowance_change', + 'spender' => 'spender', + 'risky_spender' => 'risky_spender', + 'pre_amount' => 'pre_amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner' => 'setOwner', + 'post_amount' => 'setPostAmount', + 'allowance_change' => 'setAllowanceChange', + 'spender' => 'setSpender', + 'risky_spender' => 'setRiskySpender', + 'pre_amount' => 'setPreAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner' => 'getOwner', + 'post_amount' => 'getPostAmount', + 'allowance_change' => 'getAllowanceChange', + 'spender' => 'getSpender', + 'risky_spender' => 'getRiskySpender', + 'pre_amount' => 'getPreAmount' + ]; + + /** + * 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['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['post_amount'] = isset($data['post_amount']) ? $data['post_amount'] : null; + $this->container['allowance_change'] = isset($data['allowance_change']) ? $data['allowance_change'] : null; + $this->container['spender'] = isset($data['spender']) ? $data['spender'] : null; + $this->container['risky_spender'] = isset($data['risky_spender']) ? $data['risky_spender'] : null; + $this->container['pre_amount'] = isset($data['pre_amount']) ? $data['pre_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 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 post_amount + * + * @return string + */ + public function getPostAmount() + { + return $this->container['post_amount']; + } + + /** + * Sets post_amount + * + * @param string $post_amount post_amount + * + * @return $this + */ + public function setPostAmount($post_amount) + { + $this->container['post_amount'] = $post_amount; + + return $this; + } + + /** + * Gets allowance_change + * + * @return string + */ + public function getAllowanceChange() + { + return $this->container['allowance_change']; + } + + /** + * Sets allowance_change + * + * @param string $allowance_change allowance_change + * + * @return $this + */ + public function setAllowanceChange($allowance_change) + { + $this->container['allowance_change'] = $allowance_change; + + 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; + } + + /** + * Gets risky_spender + * + * @return int + */ + public function getRiskySpender() + { + return $this->container['risky_spender']; + } + + /** + * Sets risky_spender + * + * @param int $risky_spender risky_spender + * + * @return $this + */ + public function setRiskySpender($risky_spender) + { + $this->container['risky_spender'] = $risky_spender; + + return $this; + } + + /** + * Gets pre_amount + * + * @return string + */ + public function getPreAmount() + { + return $this->container['pre_amount']; + } + + /** + * Sets pre_amount + * + * @param string $pre_amount pre_amount + * + * @return $this + */ + public function setPreAmount($pre_amount) + { + $this->container['pre_amount'] = $pre_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/NftLockerResponse.php b/src/lib/client/Model/NftLockerResponse.php new file mode 100644 index 0000000..3ace789 --- /dev/null +++ b/src/lib/client/Model/NftLockerResponse.php @@ -0,0 +1,330 @@ + '\Swagger\Client\Model\TaNftLockerLockInfoobject[]', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'list' => null, + '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', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList', + '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['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\TaNftLockerLockInfoobject[] + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \Swagger\Client\Model\TaNftLockerLockInfoobject[] $list list + * + * @return $this + */ + public function setList($list) + { + $this->container['list'] = $list; + + 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/ResponseWrapperNftLockerResponse.php b/src/lib/client/Model/ResponseWrapperNftLockerResponse.php new file mode 100644 index 0000000..d5b251e --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperNftLockerResponse.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\NftLockerResponse' + ]; + + /** + * 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\NftLockerResponse + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\NftLockerResponse $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/ResponseWrapperSolanaPrerunTxResponse.php b/src/lib/client/Model/ResponseWrapperSolanaPrerunTxResponse.php new file mode 100644 index 0000000..ad7f6e1 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaPrerunTxResponse.php @@ -0,0 +1,360 @@ + '\Swagger\Client\Model\SolanaPrerunTxResponse', + 'code' => 'int', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'result' => null, + 'code' => 'int32', + 'message' => 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 = [ + 'result' => 'result', + 'code' => 'code', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'result' => 'setResult', + 'code' => 'setCode', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult', + 'code' => 'getCode', + 'message' => 'getMessage' + ]; + + /** + * 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['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @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 result + * + * @return \Swagger\Client\Model\SolanaPrerunTxResponse + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\SolanaPrerunTxResponse $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + + /** + * 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; + } + /** + * 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/ResponseWrapperSolanaTokenSecurity.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurity.php new file mode 100644 index 0000000..5450119 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurity.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => 'map[string,\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityResult]' + ]; + + /** + * 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 map[string,\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityResult] + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param map[string,\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityResult] $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/ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority.php new file mode 100644 index 0000000..1524aa5 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityClosable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityClosable.php new file mode 100644 index 0000000..c619343 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityClosable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityClosableAuthority.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityClosableAuthority.php new file mode 100644 index 0000000..ed103f0 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityClosableAuthority.php @@ -0,0 +1,330 @@ + 'string', + 'malicious_address' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'malicious_address' => '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 = [ + 'address' => 'address', + 'malicious_address' => 'malicious_address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'malicious_address' => 'setMaliciousAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'malicious_address' => 'getMaliciousAddress' + ]; + + /** + * 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['malicious_address'] = isset($data['malicious_address']) ? $data['malicious_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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address Address with upgrade authority + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets malicious_address + * + * @return int + */ + public function getMaliciousAddress() + { + return $this->container['malicious_address']; + } + + /** + * Sets malicious_address + * + * @param int $malicious_address Indicates whether the address is malicious, \"1\" means yes. + * + * @return $this + */ + public function setMaliciousAddress($malicious_address) + { + $this->container['malicious_address'] = $malicious_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/ResponseWrapperSolanaTokenSecurityCreator.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityCreator.php new file mode 100644 index 0000000..302840f --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityCreator.php @@ -0,0 +1,330 @@ + 'string', + 'malicious_address' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'malicious_address' => '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 = [ + 'address' => 'address', + 'malicious_address' => 'malicious_address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'malicious_address' => 'setMaliciousAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'malicious_address' => 'getMaliciousAddress' + ]; + + /** + * 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['malicious_address'] = isset($data['malicious_address']) ? $data['malicious_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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address Address of the creator. + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets malicious_address + * + * @return int + */ + public function getMaliciousAddress() + { + return $this->container['malicious_address']; + } + + /** + * Sets malicious_address + * + * @param int $malicious_address Indicates whether the address is malicious, \"1\" means yes. + * + * @return $this + */ + public function setMaliciousAddress($malicious_address) + { + $this->container['malicious_address'] = $malicious_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/ResponseWrapperSolanaTokenSecurityDay.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDay.php new file mode 100644 index 0000000..0cec58a --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDay.php @@ -0,0 +1,361 @@ + 'string', + 'price_min' => 'string', + 'price_max' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'volume' => null, + 'price_min' => null, + 'price_max' => 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 = [ + 'volume' => 'volume', + 'price_min' => 'price_min', + 'price_max' => 'price_max' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'volume' => 'setVolume', + 'price_min' => 'setPriceMin', + 'price_max' => 'setPriceMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'volume' => 'getVolume', + 'price_min' => 'getPriceMin', + 'price_max' => 'getPriceMax' + ]; + + /** + * 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['volume'] = isset($data['volume']) ? $data['volume'] : null; + $this->container['price_min'] = isset($data['price_min']) ? $data['price_min'] : null; + $this->container['price_max'] = isset($data['price_max']) ? $data['price_max'] : 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 volume + * + * @return string + */ + public function getVolume() + { + return $this->container['volume']; + } + + /** + * Sets volume + * + * @param string $volume The volume of transactions during this period. + * + * @return $this + */ + public function setVolume($volume) + { + $this->container['volume'] = $volume; + + return $this; + } + + /** + * Gets price_min + * + * @return string + */ + public function getPriceMin() + { + return $this->container['price_min']; + } + + /** + * Sets price_min + * + * @param string $price_min Minimum price during this period. + * + * @return $this + */ + public function setPriceMin($price_min) + { + $this->container['price_min'] = $price_min; + + return $this; + } + + /** + * Gets price_max + * + * @return string + */ + public function getPriceMax() + { + return $this->container['price_max']; + } + + /** + * Sets price_max + * + * @param string $price_max Maximum price during this period. + * + * @return $this + */ + public function setPriceMax($price_max) + { + $this->container['price_max'] = $price_max; + + 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/ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable.php new file mode 100644 index 0000000..b42e2e7 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityDex.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDex.php new file mode 100644 index 0000000..7345e94 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityDex.php @@ -0,0 +1,600 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityWeek', + 'month' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMonth', + 'price' => 'string', + 'open_time' => 'string', + 'id' => 'string', + 'tvl' => 'string', + 'type' => 'string', + 'dex_name' => 'string', + 'day' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDay', + 'lp_amount' => 'string', + 'fee_rate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'week' => null, + 'month' => null, + 'price' => null, + 'open_time' => null, + 'id' => null, + 'tvl' => null, + 'type' => null, + 'dex_name' => null, + 'day' => null, + 'lp_amount' => null, + 'fee_rate' => 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 = [ + 'week' => 'week', + 'month' => 'month', + 'price' => 'price', + 'open_time' => 'open_time', + 'id' => 'id', + 'tvl' => 'tvl', + 'type' => 'type', + 'dex_name' => 'dex_name', + 'day' => 'day', + 'lp_amount' => 'lp_amount', + 'fee_rate' => 'fee_rate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'week' => 'setWeek', + 'month' => 'setMonth', + 'price' => 'setPrice', + 'open_time' => 'setOpenTime', + 'id' => 'setId', + 'tvl' => 'setTvl', + 'type' => 'setType', + 'dex_name' => 'setDexName', + 'day' => 'setDay', + 'lp_amount' => 'setLpAmount', + 'fee_rate' => 'setFeeRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'week' => 'getWeek', + 'month' => 'getMonth', + 'price' => 'getPrice', + 'open_time' => 'getOpenTime', + 'id' => 'getId', + 'tvl' => 'getTvl', + 'type' => 'getType', + 'dex_name' => 'getDexName', + 'day' => 'getDay', + 'lp_amount' => 'getLpAmount', + 'fee_rate' => 'getFeeRate' + ]; + + /** + * 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['week'] = isset($data['week']) ? $data['week'] : null; + $this->container['month'] = isset($data['month']) ? $data['month'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['open_time'] = isset($data['open_time']) ? $data['open_time'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['tvl'] = isset($data['tvl']) ? $data['tvl'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['dex_name'] = isset($data['dex_name']) ? $data['dex_name'] : null; + $this->container['day'] = isset($data['day']) ? $data['day'] : null; + $this->container['lp_amount'] = isset($data['lp_amount']) ? $data['lp_amount'] : null; + $this->container['fee_rate'] = isset($data['fee_rate']) ? $data['fee_rate'] : 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 week + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityWeek + */ + public function getWeek() + { + return $this->container['week']; + } + + /** + * Sets week + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityWeek $week week + * + * @return $this + */ + public function setWeek($week) + { + $this->container['week'] = $week; + + return $this; + } + + /** + * Gets month + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMonth + */ + public function getMonth() + { + return $this->container['month']; + } + + /** + * Sets month + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMonth $month month + * + * @return $this + */ + public function setMonth($month) + { + $this->container['month'] = $month; + + return $this; + } + + /** + * Gets price + * + * @return string + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param string $price Current price (Unitless, count by two tokens in the pool). + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets open_time + * + * @return string + */ + public function getOpenTime() + { + return $this->container['open_time']; + } + + /** + * Sets open_time + * + * @param string $open_time The epoch when trading is opened. + * + * @return $this + */ + public function setOpenTime($open_time) + { + $this->container['open_time'] = $open_time; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Address of the liquidity pool. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets tvl + * + * @return string + */ + public function getTvl() + { + return $this->container['tvl']; + } + + /** + * Sets tvl + * + * @param string $tvl Total value locked (TVL) in the liquidity pool. + * + * @return $this + */ + public function setTvl($tvl) + { + $this->container['tvl'] = $tvl; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of the DEX, could be \"standard\" or \"concentrated\". + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets dex_name + * + * @return string + */ + public function getDexName() + { + return $this->container['dex_name']; + } + + /** + * Sets dex_name + * + * @param string $dex_name Name of the DEX. + * + * @return $this + */ + public function setDexName($dex_name) + { + $this->container['dex_name'] = $dex_name; + + return $this; + } + + /** + * Gets day + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDay + */ + public function getDay() + { + return $this->container['day']; + } + + /** + * Sets day + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDay $day day + * + * @return $this + */ + public function setDay($day) + { + $this->container['day'] = $day; + + return $this; + } + + /** + * Gets lp_amount + * + * @return string + */ + public function getLpAmount() + { + return $this->container['lp_amount']; + } + + /** + * Sets lp_amount + * + * @param string $lp_amount Total amount of liquidity provider tokens, only shown when type is \"standard\" + * + * @return $this + */ + public function setLpAmount($lp_amount) + { + $this->container['lp_amount'] = $lp_amount; + + return $this; + } + + /** + * Gets fee_rate + * + * @return string + */ + public function getFeeRate() + { + return $this->container['fee_rate']; + } + + /** + * Sets fee_rate + * + * @param string $fee_rate Transaction fee rate. + * + * @return $this + */ + public function setFeeRate($fee_rate) + { + $this->container['fee_rate'] = $fee_rate; + + 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/ResponseWrapperSolanaTokenSecurityFreezable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityFreezable.php new file mode 100644 index 0000000..69467bd --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityFreezable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityLpHolders.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityLpHolders.php new file mode 100644 index 0000000..54aa24e --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityLpHolders.php @@ -0,0 +1,390 @@ + 'string', + 'token_account' => 'string', + 'tag' => 'string', + 'percent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'balance' => null, + 'token_account' => null, + 'tag' => null, + 'percent' => 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 = [ + 'balance' => 'balance', + 'token_account' => 'token_account', + 'tag' => 'tag', + 'percent' => 'percent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balance' => 'setBalance', + 'token_account' => 'setTokenAccount', + 'tag' => 'setTag', + 'percent' => 'setPercent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balance' => 'getBalance', + 'token_account' => 'getTokenAccount', + 'tag' => 'getTag', + 'percent' => 'getPercent' + ]; + + /** + * 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['balance'] = isset($data['balance']) ? $data['balance'] : null; + $this->container['token_account'] = isset($data['token_account']) ? $data['token_account'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['percent'] = isset($data['percent']) ? $data['percent'] : 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 balance + * + * @return string + */ + public function getBalance() + { + return $this->container['balance']; + } + + /** + * Sets balance + * + * @param string $balance Amount of tokens held. + * + * @return $this + */ + public function setBalance($balance) + { + $this->container['balance'] = $balance; + + return $this; + } + + /** + * Gets token_account + * + * @return string + */ + public function getTokenAccount() + { + return $this->container['token_account']; + } + + /** + * Sets token_account + * + * @param string $token_account Address of the holder. + * + * @return $this + */ + public function setTokenAccount($token_account) + { + $this->container['token_account'] = $token_account; + + return $this; + } + + /** + * Gets tag + * + * @return string + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string $tag Tag information of the holder. + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets percent + * + * @return string + */ + public function getPercent() + { + return $this->container['percent']; + } + + /** + * Sets percent + * + * @param string $percent Percentage of total supply held. + * + * @return $this + */ + public function setPercent($percent) + { + $this->container['percent'] = $percent; + + 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/ResponseWrapperSolanaTokenSecurityMetadata.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMetadata.php new file mode 100644 index 0000000..89fd140 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMetadata.php @@ -0,0 +1,391 @@ + 'string', + 'name' => 'string', + 'description' => 'string', + 'uri' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'symbol' => null, + 'name' => null, + 'description' => null, + 'uri' => 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 = [ + 'symbol' => 'symbol', + 'name' => 'name', + 'description' => 'description', + 'uri' => 'uri' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'symbol' => 'setSymbol', + 'name' => 'setName', + 'description' => 'setDescription', + 'uri' => 'setUri' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'symbol' => 'getSymbol', + 'name' => 'getName', + 'description' => 'getDescription', + 'uri' => 'getUri' + ]; + + /** + * 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['symbol'] = isset($data['symbol']) ? $data['symbol'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['uri'] = isset($data['uri']) ? $data['uri'] : 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 symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol Symbol of the token. + * + * @return $this + */ + public function setSymbol($symbol) + { + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the token. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of the token. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets uri + * + * @return string + */ + public function getUri() + { + return $this->container['uri']; + } + + /** + * Sets uri + * + * @param string $uri URI pointing to related token information. + * + * @return $this + */ + public function setUri($uri) + { + $this->container['uri'] = $uri; + + 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/ResponseWrapperSolanaTokenSecurityMetadataMutable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMetadataMutable.php new file mode 100644 index 0000000..d50fde3 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMetadataMutable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'metadata_upgrade_authority' => 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 = [ + 'metadata_upgrade_authority' => 'metadata_upgrade_authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'metadata_upgrade_authority' => 'setMetadataUpgradeAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'metadata_upgrade_authority' => 'getMetadataUpgradeAuthority', + '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['metadata_upgrade_authority'] = isset($data['metadata_upgrade_authority']) ? $data['metadata_upgrade_authority'] : 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 metadata_upgrade_authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getMetadataUpgradeAuthority() + { + return $this->container['metadata_upgrade_authority']; + } + + /** + * Sets metadata_upgrade_authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $metadata_upgrade_authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setMetadataUpgradeAuthority($metadata_upgrade_authority) + { + $this->container['metadata_upgrade_authority'] = $metadata_upgrade_authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityMintable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMintable.php new file mode 100644 index 0000000..846e17e --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMintable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityMonth.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMonth.php new file mode 100644 index 0000000..a93f130 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityMonth.php @@ -0,0 +1,361 @@ + 'string', + 'price_min' => 'string', + 'price_max' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'volume' => null, + 'price_min' => null, + 'price_max' => 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 = [ + 'volume' => 'volume', + 'price_min' => 'price_min', + 'price_max' => 'price_max' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'volume' => 'setVolume', + 'price_min' => 'setPriceMin', + 'price_max' => 'setPriceMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'volume' => 'getVolume', + 'price_min' => 'getPriceMin', + 'price_max' => 'getPriceMax' + ]; + + /** + * 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['volume'] = isset($data['volume']) ? $data['volume'] : null; + $this->container['price_min'] = isset($data['price_min']) ? $data['price_min'] : null; + $this->container['price_max'] = isset($data['price_max']) ? $data['price_max'] : 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 volume + * + * @return string + */ + public function getVolume() + { + return $this->container['volume']; + } + + /** + * Sets volume + * + * @param string $volume The volume of transactions during this period. + * + * @return $this + */ + public function setVolume($volume) + { + $this->container['volume'] = $volume; + + return $this; + } + + /** + * Gets price_min + * + * @return string + */ + public function getPriceMin() + { + return $this->container['price_min']; + } + + /** + * Sets price_min + * + * @param string $price_min Minimum price during this period. + * + * @return $this + */ + public function setPriceMin($price_min) + { + $this->container['price_min'] = $price_min; + + return $this; + } + + /** + * Gets price_max + * + * @return string + */ + public function getPriceMax() + { + return $this->container['price_max']; + } + + /** + * Sets price_max + * + * @param string $price_max Maximum price during this period. + * + * @return $this + */ + public function setPriceMax($price_max) + { + $this->container['price_max'] = $price_max; + + 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/ResponseWrapperSolanaTokenSecurityResult.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityResult.php new file mode 100644 index 0000000..ab4a393 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityResult.php @@ -0,0 +1,811 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadata', + 'creator' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityCreator[]', + 'lp_holders' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[]', + 'closable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosable', + 'transfer_hook' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHook[]', + 'transfer_hook_upgradable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHookUpgradable', + 'trusted_token' => 'string', + 'default_account_state_upgradable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable', + 'none_transferable' => 'string', + 'default_account_state' => 'string', + 'mintable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMintable', + 'balance_mutable_authority' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority', + 'transfer_fee' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFee', + 'holders' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[]', + 'freezable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityFreezable', + 'metadata_mutable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadataMutable', + 'dex' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDex[]', + 'transfer_fee_upgradable' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'metadata' => null, + 'creator' => null, + 'lp_holders' => null, + 'closable' => null, + 'transfer_hook' => null, + 'transfer_hook_upgradable' => null, + 'trusted_token' => null, + 'default_account_state_upgradable' => null, + 'none_transferable' => null, + 'default_account_state' => null, + 'mintable' => null, + 'balance_mutable_authority' => null, + 'transfer_fee' => null, + 'holders' => null, + 'freezable' => null, + 'metadata_mutable' => null, + 'dex' => null, + 'transfer_fee_upgradable' => 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 = [ + 'metadata' => 'metadata', + 'creator' => 'creator', + 'lp_holders' => 'lp_holders', + 'closable' => 'closable', + 'transfer_hook' => 'transfer_hook', + 'transfer_hook_upgradable' => 'transfer_hook_upgradable', + 'trusted_token' => 'trusted_token', + 'default_account_state_upgradable' => 'default_account_state_upgradable', + 'none_transferable' => 'none_transferable', + 'default_account_state' => 'default_account_state', + 'mintable' => 'mintable', + 'balance_mutable_authority' => 'balance_mutable_authority', + 'transfer_fee' => 'transfer_fee', + 'holders' => 'holders', + 'freezable' => 'freezable', + 'metadata_mutable' => 'metadata_mutable', + 'dex' => 'dex', + 'transfer_fee_upgradable' => 'transfer_fee_upgradable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'metadata' => 'setMetadata', + 'creator' => 'setCreator', + 'lp_holders' => 'setLpHolders', + 'closable' => 'setClosable', + 'transfer_hook' => 'setTransferHook', + 'transfer_hook_upgradable' => 'setTransferHookUpgradable', + 'trusted_token' => 'setTrustedToken', + 'default_account_state_upgradable' => 'setDefaultAccountStateUpgradable', + 'none_transferable' => 'setNoneTransferable', + 'default_account_state' => 'setDefaultAccountState', + 'mintable' => 'setMintable', + 'balance_mutable_authority' => 'setBalanceMutableAuthority', + 'transfer_fee' => 'setTransferFee', + 'holders' => 'setHolders', + 'freezable' => 'setFreezable', + 'metadata_mutable' => 'setMetadataMutable', + 'dex' => 'setDex', + 'transfer_fee_upgradable' => 'setTransferFeeUpgradable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'metadata' => 'getMetadata', + 'creator' => 'getCreator', + 'lp_holders' => 'getLpHolders', + 'closable' => 'getClosable', + 'transfer_hook' => 'getTransferHook', + 'transfer_hook_upgradable' => 'getTransferHookUpgradable', + 'trusted_token' => 'getTrustedToken', + 'default_account_state_upgradable' => 'getDefaultAccountStateUpgradable', + 'none_transferable' => 'getNoneTransferable', + 'default_account_state' => 'getDefaultAccountState', + 'mintable' => 'getMintable', + 'balance_mutable_authority' => 'getBalanceMutableAuthority', + 'transfer_fee' => 'getTransferFee', + 'holders' => 'getHolders', + 'freezable' => 'getFreezable', + 'metadata_mutable' => 'getMetadataMutable', + 'dex' => 'getDex', + 'transfer_fee_upgradable' => 'getTransferFeeUpgradable' + ]; + + /** + * 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['metadata'] = isset($data['metadata']) ? $data['metadata'] : null; + $this->container['creator'] = isset($data['creator']) ? $data['creator'] : null; + $this->container['lp_holders'] = isset($data['lp_holders']) ? $data['lp_holders'] : null; + $this->container['closable'] = isset($data['closable']) ? $data['closable'] : null; + $this->container['transfer_hook'] = isset($data['transfer_hook']) ? $data['transfer_hook'] : null; + $this->container['transfer_hook_upgradable'] = isset($data['transfer_hook_upgradable']) ? $data['transfer_hook_upgradable'] : null; + $this->container['trusted_token'] = isset($data['trusted_token']) ? $data['trusted_token'] : null; + $this->container['default_account_state_upgradable'] = isset($data['default_account_state_upgradable']) ? $data['default_account_state_upgradable'] : null; + $this->container['none_transferable'] = isset($data['none_transferable']) ? $data['none_transferable'] : null; + $this->container['default_account_state'] = isset($data['default_account_state']) ? $data['default_account_state'] : null; + $this->container['mintable'] = isset($data['mintable']) ? $data['mintable'] : null; + $this->container['balance_mutable_authority'] = isset($data['balance_mutable_authority']) ? $data['balance_mutable_authority'] : null; + $this->container['transfer_fee'] = isset($data['transfer_fee']) ? $data['transfer_fee'] : null; + $this->container['holders'] = isset($data['holders']) ? $data['holders'] : null; + $this->container['freezable'] = isset($data['freezable']) ? $data['freezable'] : null; + $this->container['metadata_mutable'] = isset($data['metadata_mutable']) ? $data['metadata_mutable'] : null; + $this->container['dex'] = isset($data['dex']) ? $data['dex'] : null; + $this->container['transfer_fee_upgradable'] = isset($data['transfer_fee_upgradable']) ? $data['transfer_fee_upgradable'] : 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 metadata + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadata + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadata $metadata metadata + * + * @return $this + */ + public function setMetadata($metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets creator + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityCreator[] + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityCreator[] $creator Contains information about the token creators. + * + * @return $this + */ + public function setCreator($creator) + { + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets lp_holders + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[] + */ + public function getLpHolders() + { + return $this->container['lp_holders']; + } + + /** + * Sets lp_holders + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[] $lp_holders List of top10 liquidity holders and their balances of the largest main token(SOL, USDC, USDT) liquidity pool. + * + * @return $this + */ + public function setLpHolders($lp_holders) + { + $this->container['lp_holders'] = $lp_holders; + + return $this; + } + + /** + * Gets closable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosable + */ + public function getClosable() + { + return $this->container['closable']; + } + + /** + * Sets closable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosable $closable closable + * + * @return $this + */ + public function setClosable($closable) + { + $this->container['closable'] = $closable; + + return $this; + } + + /** + * Gets transfer_hook + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHook[] + */ + public function getTransferHook() + { + return $this->container['transfer_hook']; + } + + /** + * Sets transfer_hook + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHook[] $transfer_hook If there is any external hook in the token programme.(Notice: Hook may block user from trading) + * + * @return $this + */ + public function setTransferHook($transfer_hook) + { + $this->container['transfer_hook'] = $transfer_hook; + + return $this; + } + + /** + * Gets transfer_hook_upgradable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHookUpgradable + */ + public function getTransferHookUpgradable() + { + return $this->container['transfer_hook_upgradable']; + } + + /** + * Sets transfer_hook_upgradable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferHookUpgradable $transfer_hook_upgradable transfer_hook_upgradable + * + * @return $this + */ + public function setTransferHookUpgradable($transfer_hook_upgradable) + { + $this->container['transfer_hook_upgradable'] = $transfer_hook_upgradable; + + return $this; + } + + /** + * Gets trusted_token + * + * @return string + */ + public function getTrustedToken() + { + return $this->container['trusted_token']; + } + + /** + * Sets trusted_token + * + * @param string $trusted_token If the token is a famous and trustworthy one. \"1\" means yes. + * + * @return $this + */ + public function setTrustedToken($trusted_token) + { + $this->container['trusted_token'] = $trusted_token; + + return $this; + } + + /** + * Gets default_account_state_upgradable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable + */ + public function getDefaultAccountStateUpgradable() + { + return $this->container['default_account_state_upgradable']; + } + + /** + * Sets default_account_state_upgradable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDefaultAccountStateUpgradable $default_account_state_upgradable default_account_state_upgradable + * + * @return $this + */ + public function setDefaultAccountStateUpgradable($default_account_state_upgradable) + { + $this->container['default_account_state_upgradable'] = $default_account_state_upgradable; + + return $this; + } + + /** + * Gets none_transferable + * + * @return string + */ + public function getNoneTransferable() + { + return $this->container['none_transferable']; + } + + /** + * Sets none_transferable + * + * @param string $none_transferable Indicates whether the token is non-transferable, \"1\" means non-transferable, \"0\" means transferable + * + * @return $this + */ + public function setNoneTransferable($none_transferable) + { + $this->container['none_transferable'] = $none_transferable; + + return $this; + } + + /** + * Gets default_account_state + * + * @return string + */ + public function getDefaultAccountState() + { + return $this->container['default_account_state']; + } + + /** + * Sets default_account_state + * + * @param string $default_account_state The default state of newly created accounts. \"0\" for Uninitialized, \"1\" for Initialized, \"2\" for Frozen.(Notice: Uninitialized (0): The token is newly created and not ready for use. It cannot perform any token operations and typically needs to be initialized to become active. Initialized (1): The token is fully ready for use and can engage in normal token transactions. Most token operations require the account to be in this state. Frozen (2): All the account that created whe the token is \"frozen\" would be locked and prohibited from performing any token transactions or operations, usually for security or compliance reasons, until it is manually unfrozen.) + * + * @return $this + */ + public function setDefaultAccountState($default_account_state) + { + $this->container['default_account_state'] = $default_account_state; + + return $this; + } + + /** + * Gets mintable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMintable + */ + public function getMintable() + { + return $this->container['mintable']; + } + + /** + * Sets mintable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMintable $mintable mintable + * + * @return $this + */ + public function setMintable($mintable) + { + $this->container['mintable'] = $mintable; + + return $this; + } + + /** + * Gets balance_mutable_authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority + */ + public function getBalanceMutableAuthority() + { + return $this->container['balance_mutable_authority']; + } + + /** + * Sets balance_mutable_authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityBalanceMutableAuthority $balance_mutable_authority balance_mutable_authority + * + * @return $this + */ + public function setBalanceMutableAuthority($balance_mutable_authority) + { + $this->container['balance_mutable_authority'] = $balance_mutable_authority; + + return $this; + } + + /** + * Gets transfer_fee + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFee + */ + public function getTransferFee() + { + return $this->container['transfer_fee']; + } + + /** + * Sets transfer_fee + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFee $transfer_fee transfer_fee + * + * @return $this + */ + public function setTransferFee($transfer_fee) + { + $this->container['transfer_fee'] = $transfer_fee; + + return $this; + } + + /** + * Gets holders + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[] + */ + public function getHolders() + { + return $this->container['holders']; + } + + /** + * Sets holders + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityLpHolders[] $holders List of top 10 addresses holding the token and their balances. + * + * @return $this + */ + public function setHolders($holders) + { + $this->container['holders'] = $holders; + + return $this; + } + + /** + * Gets freezable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityFreezable + */ + public function getFreezable() + { + return $this->container['freezable']; + } + + /** + * Sets freezable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityFreezable $freezable freezable + * + * @return $this + */ + public function setFreezable($freezable) + { + $this->container['freezable'] = $freezable; + + return $this; + } + + /** + * Gets metadata_mutable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadataMutable + */ + public function getMetadataMutable() + { + return $this->container['metadata_mutable']; + } + + /** + * Sets metadata_mutable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityMetadataMutable $metadata_mutable metadata_mutable + * + * @return $this + */ + public function setMetadataMutable($metadata_mutable) + { + $this->container['metadata_mutable'] = $metadata_mutable; + + return $this; + } + + /** + * Gets dex + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDex[] + */ + public function getDex() + { + return $this->container['dex']; + } + + /** + * Sets dex + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityDex[] $dex Dex Info + * + * @return $this + */ + public function setDex($dex) + { + $this->container['dex'] = $dex; + + return $this; + } + + /** + * Gets transfer_fee_upgradable + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable + */ + public function getTransferFeeUpgradable() + { + return $this->container['transfer_fee_upgradable']; + } + + /** + * Sets transfer_fee_upgradable + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable $transfer_fee_upgradable transfer_fee_upgradable + * + * @return $this + */ + public function setTransferFeeUpgradable($transfer_fee_upgradable) + { + $this->container['transfer_fee_upgradable'] = $transfer_fee_upgradable; + + 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/ResponseWrapperSolanaTokenSecurityTransferFee.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFee.php new file mode 100644 index 0000000..e782874 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFee.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate[]', + 'current_fee_rate' => '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'scheduled_fee_rate' => null, + 'current_fee_rate' => 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 = [ + 'scheduled_fee_rate' => 'scheduled_fee_rate', + 'current_fee_rate' => 'current_fee_rate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheduled_fee_rate' => 'setScheduledFeeRate', + 'current_fee_rate' => 'setCurrentFeeRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheduled_fee_rate' => 'getScheduledFeeRate', + 'current_fee_rate' => 'getCurrentFeeRate' + ]; + + /** + * 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['scheduled_fee_rate'] = isset($data['scheduled_fee_rate']) ? $data['scheduled_fee_rate'] : null; + $this->container['current_fee_rate'] = isset($data['current_fee_rate']) ? $data['current_fee_rate'] : 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 scheduled_fee_rate + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate[] + */ + public function getScheduledFeeRate() + { + return $this->container['scheduled_fee_rate']; + } + + /** + * Sets scheduled_fee_rate + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate[] $scheduled_fee_rate Scheduled changes to transfer fee rates. + * + * @return $this + */ + public function setScheduledFeeRate($scheduled_fee_rate) + { + $this->container['scheduled_fee_rate'] = $scheduled_fee_rate; + + return $this; + } + + /** + * Gets current_fee_rate + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate + */ + public function getCurrentFeeRate() + { + return $this->container['current_fee_rate']; + } + + /** + * Sets current_fee_rate + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate $current_fee_rate current_fee_rate + * + * @return $this + */ + public function setCurrentFeeRate($current_fee_rate) + { + $this->container['current_fee_rate'] = $current_fee_rate; + + 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/ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate.php new file mode 100644 index 0000000..cc8b40e --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeCurrentFeeRate.php @@ -0,0 +1,331 @@ + 'string', + 'fee_rate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'maximum_fee' => null, + 'fee_rate' => 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 = [ + 'maximum_fee' => 'maximum_fee', + 'fee_rate' => 'fee_rate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'maximum_fee' => 'setMaximumFee', + 'fee_rate' => 'setFeeRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'maximum_fee' => 'getMaximumFee', + 'fee_rate' => 'getFeeRate' + ]; + + /** + * 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['maximum_fee'] = isset($data['maximum_fee']) ? $data['maximum_fee'] : null; + $this->container['fee_rate'] = isset($data['fee_rate']) ? $data['fee_rate'] : 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 maximum_fee + * + * @return string + */ + public function getMaximumFee() + { + return $this->container['maximum_fee']; + } + + /** + * Sets maximum_fee + * + * @param string $maximum_fee Maximum fee amount for a single transaction. + * + * @return $this + */ + public function setMaximumFee($maximum_fee) + { + $this->container['maximum_fee'] = $maximum_fee; + + return $this; + } + + /** + * Gets fee_rate + * + * @return string + */ + public function getFeeRate() + { + return $this->container['fee_rate']; + } + + /** + * Sets fee_rate + * + * @param string $fee_rate Fee rate (expressed as a ratio, e.g., 0.02 means 2%) + * + * @return $this + */ + public function setFeeRate($fee_rate) + { + $this->container['fee_rate'] = $fee_rate; + + 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/ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate.php new file mode 100644 index 0000000..097a67e --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeScheduledFeeRate.php @@ -0,0 +1,360 @@ + 'string', + 'epoch' => 'string', + 'fee_rate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'maximum_fee' => null, + 'epoch' => null, + 'fee_rate' => 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 = [ + 'maximum_fee' => 'maximum_fee', + 'epoch' => 'epoch', + 'fee_rate' => 'fee_rate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'maximum_fee' => 'setMaximumFee', + 'epoch' => 'setEpoch', + 'fee_rate' => 'setFeeRate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'maximum_fee' => 'getMaximumFee', + 'epoch' => 'getEpoch', + 'fee_rate' => 'getFeeRate' + ]; + + /** + * 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['maximum_fee'] = isset($data['maximum_fee']) ? $data['maximum_fee'] : null; + $this->container['epoch'] = isset($data['epoch']) ? $data['epoch'] : null; + $this->container['fee_rate'] = isset($data['fee_rate']) ? $data['fee_rate'] : 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 maximum_fee + * + * @return string + */ + public function getMaximumFee() + { + return $this->container['maximum_fee']; + } + + /** + * Sets maximum_fee + * + * @param string $maximum_fee Maximum fee amount for a single transaction. + * + * @return $this + */ + public function setMaximumFee($maximum_fee) + { + $this->container['maximum_fee'] = $maximum_fee; + + return $this; + } + + /** + * Gets epoch + * + * @return string + */ + public function getEpoch() + { + return $this->container['epoch']; + } + + /** + * Sets epoch + * + * @param string $epoch The epoch at which the fee rate will take effect. + * + * @return $this + */ + public function setEpoch($epoch) + { + $this->container['epoch'] = $epoch; + + return $this; + } + + /** + * Gets fee_rate + * + * @return string + */ + public function getFeeRate() + { + return $this->container['fee_rate']; + } + + /** + * Sets fee_rate + * + * @param string $fee_rate Fee rate (expressed as a ratio, e.g., 0.02 means 2%) + * + * @return $this + */ + public function setFeeRate($fee_rate) + { + $this->container['fee_rate'] = $fee_rate; + + 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/ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable.php new file mode 100644 index 0000000..64e7956 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferFeeUpgradable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityTransferHook.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferHook.php new file mode 100644 index 0000000..74a6d6d --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferHook.php @@ -0,0 +1,330 @@ + 'string', + 'malicious_address' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'malicious_address' => '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 = [ + 'address' => 'address', + 'malicious_address' => 'malicious_address' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'malicious_address' => 'setMaliciousAddress' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'malicious_address' => 'getMaliciousAddress' + ]; + + /** + * 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['malicious_address'] = isset($data['malicious_address']) ? $data['malicious_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 address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address Address of the hook. + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets malicious_address + * + * @return int + */ + public function getMaliciousAddress() + { + return $this->container['malicious_address']; + } + + /** + * Sets malicious_address + * + * @param int $malicious_address Indicates whether the address is malicious, \"1\" means yes. + * + * @return $this + */ + public function setMaliciousAddress($malicious_address) + { + $this->container['malicious_address'] = $malicious_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/ResponseWrapperSolanaTokenSecurityTransferHookUpgradable.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferHookUpgradable.php new file mode 100644 index 0000000..8395466 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityTransferHookUpgradable.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'authority' => 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 = [ + 'authority' => 'authority', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authority' => 'setAuthority', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authority' => 'getAuthority', + '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['authority'] = isset($data['authority']) ? $data['authority'] : 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 authority + * + * @return \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param \Swagger\Client\Model\ResponseWrapperSolanaTokenSecurityClosableAuthority[] $authority Information on metadata upgrade authority. + * + * @return $this + */ + public function setAuthority($authority) + { + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSolanaTokenSecurityWeek.php b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityWeek.php new file mode 100644 index 0000000..716072d --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSolanaTokenSecurityWeek.php @@ -0,0 +1,361 @@ + 'string', + 'price_min' => 'string', + 'price_max' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'volume' => null, + 'price_min' => null, + 'price_max' => 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 = [ + 'volume' => 'volume', + 'price_min' => 'price_min', + 'price_max' => 'price_max' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'volume' => 'setVolume', + 'price_min' => 'setPriceMin', + 'price_max' => 'setPriceMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'volume' => 'getVolume', + 'price_min' => 'getPriceMin', + 'price_max' => 'getPriceMax' + ]; + + /** + * 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['volume'] = isset($data['volume']) ? $data['volume'] : null; + $this->container['price_min'] = isset($data['price_min']) ? $data['price_min'] : null; + $this->container['price_max'] = isset($data['price_max']) ? $data['price_max'] : 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 volume + * + * @return string + */ + public function getVolume() + { + return $this->container['volume']; + } + + /** + * Sets volume + * + * @param string $volume The volume of transactions during this period. + * + * @return $this + */ + public function setVolume($volume) + { + $this->container['volume'] = $volume; + + return $this; + } + + /** + * Gets price_min + * + * @return string + */ + public function getPriceMin() + { + return $this->container['price_min']; + } + + /** + * Sets price_min + * + * @param string $price_min Minimum price during this period. + * + * @return $this + */ + public function setPriceMin($price_min) + { + $this->container['price_min'] = $price_min; + + return $this; + } + + /** + * Gets price_max + * + * @return string + */ + public function getPriceMax() + { + return $this->container['price_max']; + } + + /** + * Sets price_max + * + * @param string $price_max Maximum price during this period. + * + * @return $this + */ + public function setPriceMax($price_max) + { + $this->container['price_max'] = $price_max; + + 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/ResponseWrapperSuiTokenSecurity.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurity.php new file mode 100644 index 0000000..40b966f --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurity.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => 'map[string,\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityResult]' + ]; + + /** + * 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 map[string,\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityResult] + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param map[string,\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityResult] $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/ResponseWrapperSuiTokenSecurityBlacklist.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityBlacklist.php new file mode 100644 index 0000000..8fbd95c --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityBlacklist.php @@ -0,0 +1,331 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'cap_owner' => 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 = [ + 'cap_owner' => 'cap_owner', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cap_owner' => 'setCapOwner', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cap_owner' => 'getCapOwner', + '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['cap_owner'] = isset($data['cap_owner']) ? $data['cap_owner'] : 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 cap_owner + * + * @return string + */ + public function getCapOwner() + { + return $this->container['cap_owner']; + } + + /** + * Sets cap_owner + * + * @param string $cap_owner The owner cap of the function. This field can have three possible values: A. A specific address indicates the address that can currently operate this function. B.'Shared' means any address can operate this function. C.'Immutable' means this function can no longer be invoked. + * + * @return $this + */ + public function setCapOwner($cap_owner) + { + $this->container['cap_owner'] = $cap_owner; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSuiTokenSecurityContractUpgradeable.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityContractUpgradeable.php new file mode 100644 index 0000000..9afb155 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityContractUpgradeable.php @@ -0,0 +1,331 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'cap_owner' => 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 = [ + 'cap_owner' => 'cap_owner', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cap_owner' => 'setCapOwner', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cap_owner' => 'getCapOwner', + '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['cap_owner'] = isset($data['cap_owner']) ? $data['cap_owner'] : 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 cap_owner + * + * @return string + */ + public function getCapOwner() + { + return $this->container['cap_owner']; + } + + /** + * Sets cap_owner + * + * @param string $cap_owner The owner cap of the function. This field can have three possible values: A. A specific address indicates the address that can currently operate this function. B.'Shared' means any address can operate this function. C.'Immutable' means this function can no longer be invoked. + * + * @return $this + */ + public function setCapOwner($cap_owner) + { + $this->container['cap_owner'] = $cap_owner; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSuiTokenSecurityMetadataModifiable.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityMetadataModifiable.php new file mode 100644 index 0000000..a8ef1c2 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityMetadataModifiable.php @@ -0,0 +1,331 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'cap_owner' => 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 = [ + 'cap_owner' => 'cap_owner', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cap_owner' => 'setCapOwner', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cap_owner' => 'getCapOwner', + '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['cap_owner'] = isset($data['cap_owner']) ? $data['cap_owner'] : 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 cap_owner + * + * @return string + */ + public function getCapOwner() + { + return $this->container['cap_owner']; + } + + /** + * Sets cap_owner + * + * @param string $cap_owner The owner cap of the function. This field can have three possible values: A. A specific address indicates the address that can currently operate this function. B.'Shared' means any address can operate this function. C.'Immutable' means this function can no longer be invoked. + * + * @return $this + */ + public function setCapOwner($cap_owner) + { + $this->container['cap_owner'] = $cap_owner; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSuiTokenSecurityMintable.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityMintable.php new file mode 100644 index 0000000..bc48aab --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityMintable.php @@ -0,0 +1,331 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'cap_owner' => 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 = [ + 'cap_owner' => 'cap_owner', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cap_owner' => 'setCapOwner', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cap_owner' => 'getCapOwner', + '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['cap_owner'] = isset($data['cap_owner']) ? $data['cap_owner'] : 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 cap_owner + * + * @return string + */ + public function getCapOwner() + { + return $this->container['cap_owner']; + } + + /** + * Sets cap_owner + * + * @param string $cap_owner The owner cap of the function. This field can have three possible values: A. A specific address indicates the address that can currently operate this function. B.'Shared' means any address can operate this function. C.'Immutable' means this function can no longer be invoked. + * + * @return $this + */ + public function setCapOwner($cap_owner) + { + $this->container['cap_owner'] = $cap_owner; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Status indicator, where \"1\" means the funtcion is available. + * + * @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/ResponseWrapperSuiTokenSecurityResult.php b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityResult.php new file mode 100644 index 0000000..37ccd04 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperSuiTokenSecurityResult.php @@ -0,0 +1,571 @@ + 'string', + 'creator' => 'string', + 'contract_upgradeable' => '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityContractUpgradeable', + 'total_supply' => 'string', + 'decimals' => 'int', + 'name' => 'string', + 'trusted_token' => 'string', + 'metadata_modifiable' => '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMetadataModifiable', + 'blacklist' => '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityBlacklist', + 'mintable' => '\Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMintable' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'symbol' => null, + 'creator' => null, + 'contract_upgradeable' => null, + 'total_supply' => null, + 'decimals' => 'int32', + 'name' => null, + 'trusted_token' => null, + 'metadata_modifiable' => null, + 'blacklist' => null, + 'mintable' => 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 = [ + 'symbol' => 'symbol', + 'creator' => 'creator', + 'contract_upgradeable' => 'contract_upgradeable', + 'total_supply' => 'total_supply', + 'decimals' => 'decimals', + 'name' => 'name', + 'trusted_token' => 'trusted_token', + 'metadata_modifiable' => 'metadata_modifiable', + 'blacklist' => 'blacklist', + 'mintable' => 'mintable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'symbol' => 'setSymbol', + 'creator' => 'setCreator', + 'contract_upgradeable' => 'setContractUpgradeable', + 'total_supply' => 'setTotalSupply', + 'decimals' => 'setDecimals', + 'name' => 'setName', + 'trusted_token' => 'setTrustedToken', + 'metadata_modifiable' => 'setMetadataModifiable', + 'blacklist' => 'setBlacklist', + 'mintable' => 'setMintable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'symbol' => 'getSymbol', + 'creator' => 'getCreator', + 'contract_upgradeable' => 'getContractUpgradeable', + 'total_supply' => 'getTotalSupply', + 'decimals' => 'getDecimals', + 'name' => 'getName', + 'trusted_token' => 'getTrustedToken', + 'metadata_modifiable' => 'getMetadataModifiable', + 'blacklist' => 'getBlacklist', + 'mintable' => 'getMintable' + ]; + + /** + * 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['symbol'] = isset($data['symbol']) ? $data['symbol'] : null; + $this->container['creator'] = isset($data['creator']) ? $data['creator'] : null; + $this->container['contract_upgradeable'] = isset($data['contract_upgradeable']) ? $data['contract_upgradeable'] : null; + $this->container['total_supply'] = isset($data['total_supply']) ? $data['total_supply'] : null; + $this->container['decimals'] = isset($data['decimals']) ? $data['decimals'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['trusted_token'] = isset($data['trusted_token']) ? $data['trusted_token'] : null; + $this->container['metadata_modifiable'] = isset($data['metadata_modifiable']) ? $data['metadata_modifiable'] : null; + $this->container['blacklist'] = isset($data['blacklist']) ? $data['blacklist'] : null; + $this->container['mintable'] = isset($data['mintable']) ? $data['mintable'] : 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 symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol Symbol of the token. + * + * @return $this + */ + public function setSymbol($symbol) + { + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets creator + * + * @return string + */ + public function getCreator() + { + return $this->container['creator']; + } + + /** + * Sets creator + * + * @param string $creator Creator of the token. + * + * @return $this + */ + public function setCreator($creator) + { + $this->container['creator'] = $creator; + + return $this; + } + + /** + * Gets contract_upgradeable + * + * @return \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityContractUpgradeable + */ + public function getContractUpgradeable() + { + return $this->container['contract_upgradeable']; + } + + /** + * Sets contract_upgradeable + * + * @param \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityContractUpgradeable $contract_upgradeable contract_upgradeable + * + * @return $this + */ + public function setContractUpgradeable($contract_upgradeable) + { + $this->container['contract_upgradeable'] = $contract_upgradeable; + + return $this; + } + + /** + * Gets total_supply + * + * @return string + */ + public function getTotalSupply() + { + return $this->container['total_supply']; + } + + /** + * Sets total_supply + * + * @param string $total_supply Total supply of the token. + * + * @return $this + */ + public function setTotalSupply($total_supply) + { + $this->container['total_supply'] = $total_supply; + + return $this; + } + + /** + * Gets decimals + * + * @return int + */ + public function getDecimals() + { + return $this->container['decimals']; + } + + /** + * Sets decimals + * + * @param int $decimals Decimals of the token. + * + * @return $this + */ + public function setDecimals($decimals) + { + $this->container['decimals'] = $decimals; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the token. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets trusted_token + * + * @return string + */ + public function getTrustedToken() + { + return $this->container['trusted_token']; + } + + /** + * Sets trusted_token + * + * @param string $trusted_token If the token is a famous and trustworthy one. \"1\" means yes.(Notice: This field is intended to identify well-known and reputable tokens. Trusted tokens with special functions (such as the mintable function in USDC) are generally not considered risk items. Please note that a value other than “1” does not indicate that the token is untrustworthy. We recommend properly evaluating and handling tokens with values other than “1” to avoid unnecessary disputes. ) + * + * @return $this + */ + public function setTrustedToken($trusted_token) + { + $this->container['trusted_token'] = $trusted_token; + + return $this; + } + + /** + * Gets metadata_modifiable + * + * @return \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMetadataModifiable + */ + public function getMetadataModifiable() + { + return $this->container['metadata_modifiable']; + } + + /** + * Sets metadata_modifiable + * + * @param \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMetadataModifiable $metadata_modifiable metadata_modifiable + * + * @return $this + */ + public function setMetadataModifiable($metadata_modifiable) + { + $this->container['metadata_modifiable'] = $metadata_modifiable; + + return $this; + } + + /** + * Gets blacklist + * + * @return \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityBlacklist + */ + public function getBlacklist() + { + return $this->container['blacklist']; + } + + /** + * Sets blacklist + * + * @param \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityBlacklist $blacklist blacklist + * + * @return $this + */ + public function setBlacklist($blacklist) + { + $this->container['blacklist'] = $blacklist; + + return $this; + } + + /** + * Gets mintable + * + * @return \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMintable + */ + public function getMintable() + { + return $this->container['mintable']; + } + + /** + * Sets mintable + * + * @param \Swagger\Client\Model\ResponseWrapperSuiTokenSecurityMintable $mintable mintable + * + * @return $this + */ + public function setMintable($mintable) + { + $this->container['mintable'] = $mintable; + + 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/ResponseWrapperTokenLockerResponse.php b/src/lib/client/Model/ResponseWrapperTokenLockerResponse.php new file mode 100644 index 0000000..94607e0 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperTokenLockerResponse.php @@ -0,0 +1,360 @@ + 'int', + 'message' => 'string', + 'result' => '\Swagger\Client\Model\TokenLockerResponse' + ]; + + /** + * 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\TokenLockerResponse + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\TokenLockerResponse $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/SolanaAllowanceUpgrade.php b/src/lib/client/Model/SolanaAllowanceUpgrade.php new file mode 100644 index 0000000..2e2bb85 --- /dev/null +++ b/src/lib/client/Model/SolanaAllowanceUpgrade.php @@ -0,0 +1,420 @@ + 'string', + 'symbol' => 'string', + 'decimals' => 'int', + 'name' => 'string', + 'new_allowances' => '\Swagger\Client\Model\NewAllowance[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'mint' => null, + 'symbol' => null, + 'decimals' => 'int32', + 'name' => null, + 'new_allowances' => 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 = [ + 'mint' => 'mint', + 'symbol' => 'symbol', + 'decimals' => 'decimals', + 'name' => 'name', + 'new_allowances' => 'new_allowances' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mint' => 'setMint', + 'symbol' => 'setSymbol', + 'decimals' => 'setDecimals', + 'name' => 'setName', + 'new_allowances' => 'setNewAllowances' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mint' => 'getMint', + 'symbol' => 'getSymbol', + 'decimals' => 'getDecimals', + 'name' => 'getName', + 'new_allowances' => 'getNewAllowances' + ]; + + /** + * 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['mint'] = isset($data['mint']) ? $data['mint'] : null; + $this->container['symbol'] = isset($data['symbol']) ? $data['symbol'] : null; + $this->container['decimals'] = isset($data['decimals']) ? $data['decimals'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['new_allowances'] = isset($data['new_allowances']) ? $data['new_allowances'] : 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 mint + * + * @return string + */ + public function getMint() + { + return $this->container['mint']; + } + + /** + * Sets mint + * + * @param string $mint mint + * + * @return $this + */ + public function setMint($mint) + { + $this->container['mint'] = $mint; + + return $this; + } + + /** + * Gets symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol symbol + * + * @return $this + */ + public function setSymbol($symbol) + { + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets decimals + * + * @return int + */ + public function getDecimals() + { + return $this->container['decimals']; + } + + /** + * Sets decimals + * + * @param int $decimals decimals + * + * @return $this + */ + public function setDecimals($decimals) + { + $this->container['decimals'] = $decimals; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets new_allowances + * + * @return \Swagger\Client\Model\NewAllowance[] + */ + public function getNewAllowances() + { + return $this->container['new_allowances']; + } + + /** + * Sets new_allowances + * + * @param \Swagger\Client\Model\NewAllowance[] $new_allowances new_allowances + * + * @return $this + */ + public function setNewAllowances($new_allowances) + { + $this->container['new_allowances'] = $new_allowances; + + 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/SolanaOwnershipChange.php b/src/lib/client/Model/SolanaOwnershipChange.php new file mode 100644 index 0000000..001beb6 --- /dev/null +++ b/src/lib/client/Model/SolanaOwnershipChange.php @@ -0,0 +1,510 @@ + 'string', + 'symbol' => 'string', + 'post_owner' => 'string', + 'decimals' => 'int', + 'name' => 'string', + 'pre_owner' => 'string', + 'owner_changed' => 'string', + 'risky_post_owner' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'mint' => null, + 'symbol' => null, + 'post_owner' => null, + 'decimals' => 'int32', + 'name' => null, + 'pre_owner' => null, + 'owner_changed' => null, + 'risky_post_owner' => '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 = [ + 'mint' => 'mint', + 'symbol' => 'symbol', + 'post_owner' => 'post_owner', + 'decimals' => 'decimals', + 'name' => 'name', + 'pre_owner' => 'pre_owner', + 'owner_changed' => 'owner_changed', + 'risky_post_owner' => 'risky_post_owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mint' => 'setMint', + 'symbol' => 'setSymbol', + 'post_owner' => 'setPostOwner', + 'decimals' => 'setDecimals', + 'name' => 'setName', + 'pre_owner' => 'setPreOwner', + 'owner_changed' => 'setOwnerChanged', + 'risky_post_owner' => 'setRiskyPostOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mint' => 'getMint', + 'symbol' => 'getSymbol', + 'post_owner' => 'getPostOwner', + 'decimals' => 'getDecimals', + 'name' => 'getName', + 'pre_owner' => 'getPreOwner', + 'owner_changed' => 'getOwnerChanged', + 'risky_post_owner' => 'getRiskyPostOwner' + ]; + + /** + * 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['mint'] = isset($data['mint']) ? $data['mint'] : null; + $this->container['symbol'] = isset($data['symbol']) ? $data['symbol'] : null; + $this->container['post_owner'] = isset($data['post_owner']) ? $data['post_owner'] : null; + $this->container['decimals'] = isset($data['decimals']) ? $data['decimals'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['pre_owner'] = isset($data['pre_owner']) ? $data['pre_owner'] : null; + $this->container['owner_changed'] = isset($data['owner_changed']) ? $data['owner_changed'] : null; + $this->container['risky_post_owner'] = isset($data['risky_post_owner']) ? $data['risky_post_owner'] : 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 mint + * + * @return string + */ + public function getMint() + { + return $this->container['mint']; + } + + /** + * Sets mint + * + * @param string $mint mint + * + * @return $this + */ + public function setMint($mint) + { + $this->container['mint'] = $mint; + + return $this; + } + + /** + * Gets symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol symbol + * + * @return $this + */ + public function setSymbol($symbol) + { + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets post_owner + * + * @return string + */ + public function getPostOwner() + { + return $this->container['post_owner']; + } + + /** + * Sets post_owner + * + * @param string $post_owner post_owner + * + * @return $this + */ + public function setPostOwner($post_owner) + { + $this->container['post_owner'] = $post_owner; + + return $this; + } + + /** + * Gets decimals + * + * @return int + */ + public function getDecimals() + { + return $this->container['decimals']; + } + + /** + * Sets decimals + * + * @param int $decimals decimals + * + * @return $this + */ + public function setDecimals($decimals) + { + $this->container['decimals'] = $decimals; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets pre_owner + * + * @return string + */ + public function getPreOwner() + { + return $this->container['pre_owner']; + } + + /** + * Sets pre_owner + * + * @param string $pre_owner pre_owner + * + * @return $this + */ + public function setPreOwner($pre_owner) + { + $this->container['pre_owner'] = $pre_owner; + + return $this; + } + + /** + * Gets owner_changed + * + * @return string + */ + public function getOwnerChanged() + { + return $this->container['owner_changed']; + } + + /** + * Sets owner_changed + * + * @param string $owner_changed owner_changed + * + * @return $this + */ + public function setOwnerChanged($owner_changed) + { + $this->container['owner_changed'] = $owner_changed; + + return $this; + } + + /** + * Gets risky_post_owner + * + * @return int + */ + public function getRiskyPostOwner() + { + return $this->container['risky_post_owner']; + } + + /** + * Sets risky_post_owner + * + * @param int $risky_post_owner risky_post_owner + * + * @return $this + */ + public function setRiskyPostOwner($risky_post_owner) + { + $this->container['risky_post_owner'] = $risky_post_owner; + + 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/SolanaPrerunTxRequest.php b/src/lib/client/Model/SolanaPrerunTxRequest.php new file mode 100644 index 0000000..71b991c --- /dev/null +++ b/src/lib/client/Model/SolanaPrerunTxRequest.php @@ -0,0 +1,300 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'encoded_transaction' => 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 = [ + 'encoded_transaction' => 'encoded_transaction' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'encoded_transaction' => 'setEncodedTransaction' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'encoded_transaction' => 'getEncodedTransaction' + ]; + + /** + * 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['encoded_transaction'] = isset($data['encoded_transaction']) ? $data['encoded_transaction'] : 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 encoded_transaction + * + * @return string + */ + public function getEncodedTransaction() + { + return $this->container['encoded_transaction']; + } + + /** + * Sets encoded_transaction + * + * @param string $encoded_transaction encoded_transaction + * + * @return $this + */ + public function setEncodedTransaction($encoded_transaction) + { + $this->container['encoded_transaction'] = $encoded_transaction; + + 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/SolanaPrerunTxResponse.php b/src/lib/client/Model/SolanaPrerunTxResponse.php new file mode 100644 index 0000000..57a2db9 --- /dev/null +++ b/src/lib/client/Model/SolanaPrerunTxResponse.php @@ -0,0 +1,630 @@ + 'string', + 'asset_changes' => '\Swagger\Client\Model\SolanaTxAssetChanges', + 'risk_type' => 'int[]', + 'allowance_upgrades' => '\Swagger\Client\Model\SolanaAllowanceUpgrade[]', + 'ownership_changes' => '\Swagger\Client\Model\SolanaOwnershipChange[]', + 'sender' => 'string', + 'transaction_fee' => 'string', + 'risky_txn' => 'string', + 'error' => 'string', + 'logs' => 'string[]', + 'risk_detail' => 'string[]', + 'slot_height' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'input' => null, + 'asset_changes' => null, + 'risk_type' => 'int32', + 'allowance_upgrades' => null, + 'ownership_changes' => null, + 'sender' => null, + 'transaction_fee' => null, + 'risky_txn' => null, + 'error' => null, + 'logs' => null, + 'risk_detail' => null, + 'slot_height' => '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 = [ + 'input' => 'input', + 'asset_changes' => 'asset_changes', + 'risk_type' => 'risk_type', + 'allowance_upgrades' => 'allowance_upgrades', + 'ownership_changes' => 'ownership_changes', + 'sender' => 'sender', + 'transaction_fee' => 'transaction_fee', + 'risky_txn' => 'risky_txn', + 'error' => 'error', + 'logs' => 'logs', + 'risk_detail' => 'risk_detail', + 'slot_height' => 'slot_height' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'input' => 'setInput', + 'asset_changes' => 'setAssetChanges', + 'risk_type' => 'setRiskType', + 'allowance_upgrades' => 'setAllowanceUpgrades', + 'ownership_changes' => 'setOwnershipChanges', + 'sender' => 'setSender', + 'transaction_fee' => 'setTransactionFee', + 'risky_txn' => 'setRiskyTxn', + 'error' => 'setError', + 'logs' => 'setLogs', + 'risk_detail' => 'setRiskDetail', + 'slot_height' => 'setSlotHeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'input' => 'getInput', + 'asset_changes' => 'getAssetChanges', + 'risk_type' => 'getRiskType', + 'allowance_upgrades' => 'getAllowanceUpgrades', + 'ownership_changes' => 'getOwnershipChanges', + 'sender' => 'getSender', + 'transaction_fee' => 'getTransactionFee', + 'risky_txn' => 'getRiskyTxn', + 'error' => 'getError', + 'logs' => 'getLogs', + 'risk_detail' => 'getRiskDetail', + 'slot_height' => 'getSlotHeight' + ]; + + /** + * 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['input'] = isset($data['input']) ? $data['input'] : null; + $this->container['asset_changes'] = isset($data['asset_changes']) ? $data['asset_changes'] : null; + $this->container['risk_type'] = isset($data['risk_type']) ? $data['risk_type'] : null; + $this->container['allowance_upgrades'] = isset($data['allowance_upgrades']) ? $data['allowance_upgrades'] : null; + $this->container['ownership_changes'] = isset($data['ownership_changes']) ? $data['ownership_changes'] : null; + $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null; + $this->container['transaction_fee'] = isset($data['transaction_fee']) ? $data['transaction_fee'] : null; + $this->container['risky_txn'] = isset($data['risky_txn']) ? $data['risky_txn'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + $this->container['logs'] = isset($data['logs']) ? $data['logs'] : null; + $this->container['risk_detail'] = isset($data['risk_detail']) ? $data['risk_detail'] : null; + $this->container['slot_height'] = isset($data['slot_height']) ? $data['slot_height'] : 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 input + * + * @return string + */ + public function getInput() + { + return $this->container['input']; + } + + /** + * Sets input + * + * @param string $input input + * + * @return $this + */ + public function setInput($input) + { + $this->container['input'] = $input; + + return $this; + } + + /** + * Gets asset_changes + * + * @return \Swagger\Client\Model\SolanaTxAssetChanges + */ + public function getAssetChanges() + { + return $this->container['asset_changes']; + } + + /** + * Sets asset_changes + * + * @param \Swagger\Client\Model\SolanaTxAssetChanges $asset_changes asset_changes + * + * @return $this + */ + public function setAssetChanges($asset_changes) + { + $this->container['asset_changes'] = $asset_changes; + + return $this; + } + + /** + * Gets risk_type + * + * @return int[] + */ + public function getRiskType() + { + return $this->container['risk_type']; + } + + /** + * Sets risk_type + * + * @param int[] $risk_type risk_type + * + * @return $this + */ + public function setRiskType($risk_type) + { + $this->container['risk_type'] = $risk_type; + + return $this; + } + + /** + * Gets allowance_upgrades + * + * @return \Swagger\Client\Model\SolanaAllowanceUpgrade[] + */ + public function getAllowanceUpgrades() + { + return $this->container['allowance_upgrades']; + } + + /** + * Sets allowance_upgrades + * + * @param \Swagger\Client\Model\SolanaAllowanceUpgrade[] $allowance_upgrades allowance_upgrades + * + * @return $this + */ + public function setAllowanceUpgrades($allowance_upgrades) + { + $this->container['allowance_upgrades'] = $allowance_upgrades; + + return $this; + } + + /** + * Gets ownership_changes + * + * @return \Swagger\Client\Model\SolanaOwnershipChange[] + */ + public function getOwnershipChanges() + { + return $this->container['ownership_changes']; + } + + /** + * Sets ownership_changes + * + * @param \Swagger\Client\Model\SolanaOwnershipChange[] $ownership_changes ownership_changes + * + * @return $this + */ + public function setOwnershipChanges($ownership_changes) + { + $this->container['ownership_changes'] = $ownership_changes; + + return $this; + } + + /** + * Gets sender + * + * @return string + */ + public function getSender() + { + return $this->container['sender']; + } + + /** + * Sets sender + * + * @param string $sender sender + * + * @return $this + */ + public function setSender($sender) + { + $this->container['sender'] = $sender; + + return $this; + } + + /** + * Gets transaction_fee + * + * @return string + */ + public function getTransactionFee() + { + return $this->container['transaction_fee']; + } + + /** + * Sets transaction_fee + * + * @param string $transaction_fee transaction_fee + * + * @return $this + */ + public function setTransactionFee($transaction_fee) + { + $this->container['transaction_fee'] = $transaction_fee; + + return $this; + } + + /** + * Gets risky_txn + * + * @return string + */ + public function getRiskyTxn() + { + return $this->container['risky_txn']; + } + + /** + * Sets risky_txn + * + * @param string $risky_txn risky_txn + * + * @return $this + */ + public function setRiskyTxn($risky_txn) + { + $this->container['risky_txn'] = $risky_txn; + + return $this; + } + + /** + * Gets error + * + * @return string + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string $error error + * + * @return $this + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets logs + * + * @return string[] + */ + public function getLogs() + { + return $this->container['logs']; + } + + /** + * Sets logs + * + * @param string[] $logs logs + * + * @return $this + */ + public function setLogs($logs) + { + $this->container['logs'] = $logs; + + return $this; + } + + /** + * Gets risk_detail + * + * @return string[] + */ + public function getRiskDetail() + { + return $this->container['risk_detail']; + } + + /** + * Sets risk_detail + * + * @param string[] $risk_detail risk_detail + * + * @return $this + */ + public function setRiskDetail($risk_detail) + { + $this->container['risk_detail'] = $risk_detail; + + return $this; + } + + /** + * Gets slot_height + * + * @return int + */ + public function getSlotHeight() + { + return $this->container['slot_height']; + } + + /** + * Sets slot_height + * + * @param int $slot_height slot_height + * + * @return $this + */ + public function setSlotHeight($slot_height) + { + $this->container['slot_height'] = $slot_height; + + 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/SolanaTxAssetChange.php b/src/lib/client/Model/SolanaTxAssetChange.php new file mode 100644 index 0000000..446fbe4 --- /dev/null +++ b/src/lib/client/Model/SolanaTxAssetChange.php @@ -0,0 +1,420 @@ + 'string', + 'symbol' => 'string', + 'change_detail' => '\Swagger\Client\Model\SolanaTxChangeDetail[]', + 'decimals' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'mint' => null, + 'symbol' => null, + 'change_detail' => null, + 'decimals' => 'int32', + 'name' => 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 = [ + 'mint' => 'mint', + 'symbol' => 'symbol', + 'change_detail' => 'change_detail', + 'decimals' => 'decimals', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mint' => 'setMint', + 'symbol' => 'setSymbol', + 'change_detail' => 'setChangeDetail', + 'decimals' => 'setDecimals', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mint' => 'getMint', + 'symbol' => 'getSymbol', + 'change_detail' => 'getChangeDetail', + 'decimals' => 'getDecimals', + 'name' => 'getName' + ]; + + /** + * 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['mint'] = isset($data['mint']) ? $data['mint'] : null; + $this->container['symbol'] = isset($data['symbol']) ? $data['symbol'] : null; + $this->container['change_detail'] = isset($data['change_detail']) ? $data['change_detail'] : null; + $this->container['decimals'] = isset($data['decimals']) ? $data['decimals'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : 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 mint + * + * @return string + */ + public function getMint() + { + return $this->container['mint']; + } + + /** + * Sets mint + * + * @param string $mint mint + * + * @return $this + */ + public function setMint($mint) + { + $this->container['mint'] = $mint; + + return $this; + } + + /** + * Gets symbol + * + * @return string + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string $symbol symbol + * + * @return $this + */ + public function setSymbol($symbol) + { + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets change_detail + * + * @return \Swagger\Client\Model\SolanaTxChangeDetail[] + */ + public function getChangeDetail() + { + return $this->container['change_detail']; + } + + /** + * Sets change_detail + * + * @param \Swagger\Client\Model\SolanaTxChangeDetail[] $change_detail change_detail + * + * @return $this + */ + public function setChangeDetail($change_detail) + { + $this->container['change_detail'] = $change_detail; + + return $this; + } + + /** + * Gets decimals + * + * @return int + */ + public function getDecimals() + { + return $this->container['decimals']; + } + + /** + * Sets decimals + * + * @param int $decimals decimals + * + * @return $this + */ + public function setDecimals($decimals) + { + $this->container['decimals'] = $decimals; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + 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/SolanaTxAssetChanges.php b/src/lib/client/Model/SolanaTxAssetChanges.php new file mode 100644 index 0000000..410be51 --- /dev/null +++ b/src/lib/client/Model/SolanaTxAssetChanges.php @@ -0,0 +1,360 @@ + '\Swagger\Client\Model\SolanaTxAssetChange[]', + 'token_changes' => '\Swagger\Client\Model\SolanaTxAssetChange[]', + 'sol_changes' => '\Swagger\Client\Model\SolanaTxSolChange[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'nft_changes' => null, + 'token_changes' => null, + 'sol_changes' => 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 = [ + 'nft_changes' => 'nft_changes', + 'token_changes' => 'token_changes', + 'sol_changes' => 'sol_changes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'nft_changes' => 'setNftChanges', + 'token_changes' => 'setTokenChanges', + 'sol_changes' => 'setSolChanges' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'nft_changes' => 'getNftChanges', + 'token_changes' => 'getTokenChanges', + 'sol_changes' => 'getSolChanges' + ]; + + /** + * 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['nft_changes'] = isset($data['nft_changes']) ? $data['nft_changes'] : null; + $this->container['token_changes'] = isset($data['token_changes']) ? $data['token_changes'] : null; + $this->container['sol_changes'] = isset($data['sol_changes']) ? $data['sol_changes'] : 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 nft_changes + * + * @return \Swagger\Client\Model\SolanaTxAssetChange[] + */ + public function getNftChanges() + { + return $this->container['nft_changes']; + } + + /** + * Sets nft_changes + * + * @param \Swagger\Client\Model\SolanaTxAssetChange[] $nft_changes nft_changes + * + * @return $this + */ + public function setNftChanges($nft_changes) + { + $this->container['nft_changes'] = $nft_changes; + + return $this; + } + + /** + * Gets token_changes + * + * @return \Swagger\Client\Model\SolanaTxAssetChange[] + */ + public function getTokenChanges() + { + return $this->container['token_changes']; + } + + /** + * Sets token_changes + * + * @param \Swagger\Client\Model\SolanaTxAssetChange[] $token_changes token_changes + * + * @return $this + */ + public function setTokenChanges($token_changes) + { + $this->container['token_changes'] = $token_changes; + + return $this; + } + + /** + * Gets sol_changes + * + * @return \Swagger\Client\Model\SolanaTxSolChange[] + */ + public function getSolChanges() + { + return $this->container['sol_changes']; + } + + /** + * Sets sol_changes + * + * @param \Swagger\Client\Model\SolanaTxSolChange[] $sol_changes sol_changes + * + * @return $this + */ + public function setSolChanges($sol_changes) + { + $this->container['sol_changes'] = $sol_changes; + + 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/SolanaTxChangeDetail.php b/src/lib/client/Model/SolanaTxChangeDetail.php new file mode 100644 index 0000000..71f5aa3 --- /dev/null +++ b/src/lib/client/Model/SolanaTxChangeDetail.php @@ -0,0 +1,480 @@ + 'string', + 'post_amount' => 'string', + 'address' => 'string', + 'amount_changes' => 'string', + 'risky_address' => 'int', + 'from_address' => 'int', + 'pre_amount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner' => null, + 'post_amount' => null, + 'address' => null, + 'amount_changes' => null, + 'risky_address' => 'int32', + 'from_address' => 'int32', + 'pre_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 = [ + 'owner' => 'owner', + 'post_amount' => 'post_amount', + 'address' => 'address', + 'amount_changes' => 'amount_changes', + 'risky_address' => 'risky_address', + 'from_address' => 'from_address', + 'pre_amount' => 'pre_amount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner' => 'setOwner', + 'post_amount' => 'setPostAmount', + 'address' => 'setAddress', + 'amount_changes' => 'setAmountChanges', + 'risky_address' => 'setRiskyAddress', + 'from_address' => 'setFromAddress', + 'pre_amount' => 'setPreAmount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner' => 'getOwner', + 'post_amount' => 'getPostAmount', + 'address' => 'getAddress', + 'amount_changes' => 'getAmountChanges', + 'risky_address' => 'getRiskyAddress', + 'from_address' => 'getFromAddress', + 'pre_amount' => 'getPreAmount' + ]; + + /** + * 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['owner'] = isset($data['owner']) ? $data['owner'] : null; + $this->container['post_amount'] = isset($data['post_amount']) ? $data['post_amount'] : null; + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['amount_changes'] = isset($data['amount_changes']) ? $data['amount_changes'] : null; + $this->container['risky_address'] = isset($data['risky_address']) ? $data['risky_address'] : null; + $this->container['from_address'] = isset($data['from_address']) ? $data['from_address'] : null; + $this->container['pre_amount'] = isset($data['pre_amount']) ? $data['pre_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 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 post_amount + * + * @return string + */ + public function getPostAmount() + { + return $this->container['post_amount']; + } + + /** + * Sets post_amount + * + * @param string $post_amount post_amount + * + * @return $this + */ + public function setPostAmount($post_amount) + { + $this->container['post_amount'] = $post_amount; + + return $this; + } + + /** + * 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 amount_changes + * + * @return string + */ + public function getAmountChanges() + { + return $this->container['amount_changes']; + } + + /** + * Sets amount_changes + * + * @param string $amount_changes amount_changes + * + * @return $this + */ + public function setAmountChanges($amount_changes) + { + $this->container['amount_changes'] = $amount_changes; + + return $this; + } + + /** + * Gets risky_address + * + * @return int + */ + public function getRiskyAddress() + { + return $this->container['risky_address']; + } + + /** + * Sets risky_address + * + * @param int $risky_address risky_address + * + * @return $this + */ + public function setRiskyAddress($risky_address) + { + $this->container['risky_address'] = $risky_address; + + return $this; + } + + /** + * Gets from_address + * + * @return int + */ + public function getFromAddress() + { + return $this->container['from_address']; + } + + /** + * Sets from_address + * + * @param int $from_address from_address + * + * @return $this + */ + public function setFromAddress($from_address) + { + $this->container['from_address'] = $from_address; + + return $this; + } + + /** + * Gets pre_amount + * + * @return string + */ + public function getPreAmount() + { + return $this->container['pre_amount']; + } + + /** + * Sets pre_amount + * + * @param string $pre_amount pre_amount + * + * @return $this + */ + public function setPreAmount($pre_amount) + { + $this->container['pre_amount'] = $pre_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/SolanaTxSolChange.php b/src/lib/client/Model/SolanaTxSolChange.php new file mode 100644 index 0000000..bceb0e0 --- /dev/null +++ b/src/lib/client/Model/SolanaTxSolChange.php @@ -0,0 +1,450 @@ + 'string', + 'post_lamports' => 'string', + 'lamport_changes' => 'string', + 'risky_address' => 'int', + 'from_address' => 'int', + 'pre_lamports' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, + 'post_lamports' => null, + 'lamport_changes' => null, + 'risky_address' => 'int32', + 'from_address' => 'int32', + 'pre_lamports' => 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', + 'post_lamports' => 'post_lamports', + 'lamport_changes' => 'lamport_changes', + 'risky_address' => 'risky_address', + 'from_address' => 'from_address', + 'pre_lamports' => 'pre_lamports' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', + 'post_lamports' => 'setPostLamports', + 'lamport_changes' => 'setLamportChanges', + 'risky_address' => 'setRiskyAddress', + 'from_address' => 'setFromAddress', + 'pre_lamports' => 'setPreLamports' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', + 'post_lamports' => 'getPostLamports', + 'lamport_changes' => 'getLamportChanges', + 'risky_address' => 'getRiskyAddress', + 'from_address' => 'getFromAddress', + 'pre_lamports' => 'getPreLamports' + ]; + + /** + * 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['post_lamports'] = isset($data['post_lamports']) ? $data['post_lamports'] : null; + $this->container['lamport_changes'] = isset($data['lamport_changes']) ? $data['lamport_changes'] : null; + $this->container['risky_address'] = isset($data['risky_address']) ? $data['risky_address'] : null; + $this->container['from_address'] = isset($data['from_address']) ? $data['from_address'] : null; + $this->container['pre_lamports'] = isset($data['pre_lamports']) ? $data['pre_lamports'] : 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 post_lamports + * + * @return string + */ + public function getPostLamports() + { + return $this->container['post_lamports']; + } + + /** + * Sets post_lamports + * + * @param string $post_lamports post_lamports + * + * @return $this + */ + public function setPostLamports($post_lamports) + { + $this->container['post_lamports'] = $post_lamports; + + return $this; + } + + /** + * Gets lamport_changes + * + * @return string + */ + public function getLamportChanges() + { + return $this->container['lamport_changes']; + } + + /** + * Sets lamport_changes + * + * @param string $lamport_changes lamport_changes + * + * @return $this + */ + public function setLamportChanges($lamport_changes) + { + $this->container['lamport_changes'] = $lamport_changes; + + return $this; + } + + /** + * Gets risky_address + * + * @return int + */ + public function getRiskyAddress() + { + return $this->container['risky_address']; + } + + /** + * Sets risky_address + * + * @param int $risky_address risky_address + * + * @return $this + */ + public function setRiskyAddress($risky_address) + { + $this->container['risky_address'] = $risky_address; + + return $this; + } + + /** + * Gets from_address + * + * @return int + */ + public function getFromAddress() + { + return $this->container['from_address']; + } + + /** + * Sets from_address + * + * @param int $from_address from_address + * + * @return $this + */ + public function setFromAddress($from_address) + { + $this->container['from_address'] = $from_address; + + return $this; + } + + /** + * Gets pre_lamports + * + * @return string + */ + public function getPreLamports() + { + return $this->container['pre_lamports']; + } + + /** + * Sets pre_lamports + * + * @param string $pre_lamports pre_lamports + * + * @return $this + */ + public function setPreLamports($pre_lamports) + { + $this->container['pre_lamports'] = $pre_lamports; + + 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/TaNftLockerLockInfoobject.php b/src/lib/client/Model/TaNftLockerLockInfoobject.php new file mode 100644 index 0000000..8e43998 --- /dev/null +++ b/src/lib/client/Model/TaNftLockerLockInfoobject.php @@ -0,0 +1,481 @@ + 'int', + 'lock_id' => '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' => 'int32', + 'lock_id' => null, + 'nft_id' => null, + 'nft_position_manager' => null, + 'owner' => null, + 'pool' => null, + 'start_time' => '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 = [ + 'end_time' => 'endTime', + 'lock_id' => 'lockId', + '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', + 'lock_id' => 'setLockId', + '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', + 'lock_id' => 'getLockId', + '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['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'] = 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 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 用户地址 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/TaTokenLockerLockInfoobject.php b/src/lib/client/Model/TaTokenLockerLockInfoobject.php new file mode 100644 index 0000000..876adc9 --- /dev/null +++ b/src/lib/client/Model/TaTokenLockerLockInfoobject.php @@ -0,0 +1,511 @@ + 'string', + 'end_time' => 'int', + 'is_lp_token' => 'int', + 'lock_id' => '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' => 'int32', + 'is_lp_token' => 'int32', + 'lock_id' => null, + 'owner' => null, + 'start_time' => 'int32', + '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', + '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', + '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', + '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['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 累计总锁仓数量 + * + * @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 解锁时间戳 + * + * @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 是否为lp token -1:未知、0:否、1:是 + * + * @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 owner + * + * @return string + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner 用户地址 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 开始时间戳 + * + * @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 已解锁数量 + * + * @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/TokenLockerResponse.php b/src/lib/client/Model/TokenLockerResponse.php new file mode 100644 index 0000000..4394bf3 --- /dev/null +++ b/src/lib/client/Model/TokenLockerResponse.php @@ -0,0 +1,330 @@ + '\Swagger\Client\Model\TaTokenLockerLockInfoobject[]', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'list' => null, + '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', + 'total_count' => 'totalCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList', + '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['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\TaTokenLockerLockInfoobject[] + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \Swagger\Client\Model\TaTokenLockerLockInfoobject[] $list list + * + * @return $this + */ + public function setList($list) + { + $this->container['list'] = $list; + + 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)); + } +}