diff --git a/src/lib/client/Model/ResponseWrapperPhishingSite.php b/src/lib/client/Model/ResponseWrapperPhishingSite.php index 869d9fc..405285f 100644 --- a/src/lib/client/Model/ResponseWrapperPhishingSite.php +++ b/src/lib/client/Model/ResponseWrapperPhishingSite.php @@ -226,7 +226,7 @@ public function getCode() /** * Sets code * - * @param int $code Code 1: Success + * @param int $code Code 1:Success * * @return $this */ diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResult.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResult.php index afdfed1..2cf0dad 100644 --- a/src/lib/client/Model/ResponseWrapperPhishingSiteResult.php +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResult.php @@ -57,7 +57,7 @@ class ResponseWrapperPhishingSiteResult implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'website_contract_security' => 'string[]', + 'website_contract_security' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultWebsiteContractSecurity[]', 'phishing_site' => 'int' ]; @@ -211,7 +211,7 @@ public function valid() /** * Gets website_contract_security * - * @return string[] + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultWebsiteContractSecurity[] */ public function getWebsiteContractSecurity() { @@ -221,7 +221,7 @@ public function getWebsiteContractSecurity() /** * Sets website_contract_security * - * @param string[] $website_contract_security website_contract_security + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultWebsiteContractSecurity[] $website_contract_security website_contract_security * * @return $this */ diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRisk.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRisk.php new file mode 100644 index 0000000..856354d --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRisk.php @@ -0,0 +1,511 @@ + 'int', + 'privileged_minting' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting', + 'oversupply_minting' => 'int', + 'nft_proxy' => 'int', + 'restricted_approval' => 'int', + 'transfer_without_approval' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval', + 'privileged_burn' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn', + 'self_destruct' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskSelfDestruct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'nft_open_source' => 'int32', + 'privileged_minting' => null, + 'oversupply_minting' => 'int32', + 'nft_proxy' => 'int32', + 'restricted_approval' => 'int32', + 'transfer_without_approval' => null, + 'privileged_burn' => null, + 'self_destruct' => 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_open_source' => 'nft_open_source', + 'privileged_minting' => 'privileged_minting', + 'oversupply_minting' => 'oversupply_minting', + 'nft_proxy' => 'nft_proxy', + 'restricted_approval' => 'restricted_approval', + 'transfer_without_approval' => 'transfer_without_approval', + 'privileged_burn' => 'privileged_burn', + 'self_destruct' => 'self_destruct' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'nft_open_source' => 'setNftOpenSource', + 'privileged_minting' => 'setPrivilegedMinting', + 'oversupply_minting' => 'setOversupplyMinting', + 'nft_proxy' => 'setNftProxy', + 'restricted_approval' => 'setRestrictedApproval', + 'transfer_without_approval' => 'setTransferWithoutApproval', + 'privileged_burn' => 'setPrivilegedBurn', + 'self_destruct' => 'setSelfDestruct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'nft_open_source' => 'getNftOpenSource', + 'privileged_minting' => 'getPrivilegedMinting', + 'oversupply_minting' => 'getOversupplyMinting', + 'nft_proxy' => 'getNftProxy', + 'restricted_approval' => 'getRestrictedApproval', + 'transfer_without_approval' => 'getTransferWithoutApproval', + 'privileged_burn' => 'getPrivilegedBurn', + 'self_destruct' => 'getSelfDestruct' + ]; + + /** + * 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_open_source'] = isset($data['nft_open_source']) ? $data['nft_open_source'] : null; + $this->container['privileged_minting'] = isset($data['privileged_minting']) ? $data['privileged_minting'] : null; + $this->container['oversupply_minting'] = isset($data['oversupply_minting']) ? $data['oversupply_minting'] : null; + $this->container['nft_proxy'] = isset($data['nft_proxy']) ? $data['nft_proxy'] : null; + $this->container['restricted_approval'] = isset($data['restricted_approval']) ? $data['restricted_approval'] : null; + $this->container['transfer_without_approval'] = isset($data['transfer_without_approval']) ? $data['transfer_without_approval'] : null; + $this->container['privileged_burn'] = isset($data['privileged_burn']) ? $data['privileged_burn'] : null; + $this->container['self_destruct'] = isset($data['self_destruct']) ? $data['self_destruct'] : 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_open_source + * + * @return int + */ + public function getNftOpenSource() + { + return $this->container['nft_open_source']; + } + + /** + * Sets nft_open_source + * + * @param int $nft_open_source It describes whether this contract is open source. \"1\" means true; \"0\" means false.(Notice:Un-open-sourced contracts may hide various unknown mechanisms and are extremely risky. When the contract is not open source, we will not be able to detect other risk items.) + * + * @return $this + */ + public function setNftOpenSource($nft_open_source) + { + $this->container['nft_open_source'] = $nft_open_source; + + return $this; + } + + /** + * Gets privileged_minting + * + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting + */ + public function getPrivilegedMinting() + { + return $this->container['privileged_minting']; + } + + /** + * Sets privileged_minting + * + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting $privileged_minting privileged_minting + * + * @return $this + */ + public function setPrivilegedMinting($privileged_minting) + { + $this->container['privileged_minting'] = $privileged_minting; + + return $this; + } + + /** + * Gets oversupply_minting + * + * @return int + */ + public function getOversupplyMinting() + { + return $this->container['oversupply_minting']; + } + + /** + * Sets oversupply_minting + * + * @param int $oversupply_minting It describes whether this NFT owner can bypass the maximum amount of minting specified in the contract, and continue to mint NFTs beyond this limit. \"1\" means true; \"0\" means false; \"Null\" means unknown.(Notice:Oversupply minting refers to the existence of a special mint method in the NFT contract - the owner can bypass the maximum amount of minting specified in the contract, and continue to mint NFTs beyond this limit.) + * + * @return $this + */ + public function setOversupplyMinting($oversupply_minting) + { + $this->container['oversupply_minting'] = $oversupply_minting; + + return $this; + } + + /** + * Gets nft_proxy + * + * @return int + */ + public function getNftProxy() + { + return $this->container['nft_proxy']; + } + + /** + * Sets nft_proxy + * + * @param int $nft_proxy It describes whether this NFT contract has a proxy contract. \"1\" means true; \"0\" means false; \"Null\" means unknown.(Notice:(1) When \"is_open_source\":\"0\", it will return \"null\". (2) Most Proxy contracts are accompanied by modifiable implementation contracts, and implementation contracts may contain significant potential risk.) + * + * @return $this + */ + public function setNftProxy($nft_proxy) + { + $this->container['nft_proxy'] = $nft_proxy; + + return $this; + } + + /** + * Gets restricted_approval + * + * @return int + */ + public function getRestrictedApproval() + { + return $this->container['restricted_approval']; + } + + /** + * Sets restricted_approval + * + * @param int $restricted_approval It describes whether the NFT contract can restrict the approval, resulting in NFT can not be traded on the NFT DEX. \"1\" means true; \"0\" means false; \"Null\" means unknown.(Notice:If this risk exists, it means that users will not be able to trade the NFT on the exchange and only privileged users in the whitelist will be able to trade normally.) + * + * @return $this + */ + public function setRestrictedApproval($restricted_approval) + { + $this->container['restricted_approval'] = $restricted_approval; + + return $this; + } + + /** + * Gets transfer_without_approval + * + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval + */ + public function getTransferWithoutApproval() + { + return $this->container['transfer_without_approval']; + } + + /** + * Sets transfer_without_approval + * + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval $transfer_without_approval transfer_without_approval + * + * @return $this + */ + public function setTransferWithoutApproval($transfer_without_approval) + { + $this->container['transfer_without_approval'] = $transfer_without_approval; + + return $this; + } + + /** + * Gets privileged_burn + * + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn + */ + public function getPrivilegedBurn() + { + return $this->container['privileged_burn']; + } + + /** + * Sets privileged_burn + * + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn $privileged_burn privileged_burn + * + * @return $this + */ + public function setPrivilegedBurn($privileged_burn) + { + $this->container['privileged_burn'] = $privileged_burn; + + return $this; + } + + /** + * Gets self_destruct + * + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskSelfDestruct + */ + public function getSelfDestruct() + { + return $this->container['self_destruct']; + } + + /** + * Sets self_destruct + * + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRiskSelfDestruct $self_destruct self_destruct + * + * @return $this + */ + public function setSelfDestruct($self_destruct) + { + $this->container['self_destruct'] = $self_destruct; + + 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/ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn.php new file mode 100644 index 0000000..0b5fbe0 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskPrivilegedBurn.php @@ -0,0 +1,361 @@ + 'string', + 'value' => 'int', + 'owner_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner_address' => null, + 'value' => 'int32', + 'owner_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'owner_address' => 'owner_address', + 'value' => 'value', + 'owner_type' => 'owner_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner_address' => 'setOwnerAddress', + 'value' => 'setValue', + 'owner_type' => 'setOwnerType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner_address' => 'getOwnerAddress', + 'value' => 'getValue', + 'owner_type' => 'getOwnerType' + ]; + + /** + * 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_address'] = isset($data['owner_address']) ? $data['owner_address'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['owner_type'] = isset($data['owner_type']) ? $data['owner_type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets owner_address + * + * @return string + */ + public function getOwnerAddress() + { + return $this->container['owner_address']; + } + + /** + * Sets owner_address + * + * @param string $owner_address Owner_address describes the owner address. null: the owner address cannot be fetched. + * + * @return $this + */ + public function setOwnerAddress($owner_address) + { + $this->container['owner_address'] = $owner_address; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The \"value\" describes the status of the risk. null: the contract is not open source or there is a proxy, it is not possible to detect whether the risk exists. -1: the risk is detected but the ownership give up. If the detection of a code vulnerability, it can also be considered risk-free. 0: the risk is not detected. 1: the risk is detected, and the owner address is a common address (EOA), then it can be said that there is a clear risk. 2: The risk is detected, but the owner address is a contract address, the risk is not significant. 3: The risk is detected, but the owner address is not detectable / or an array. + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets owner_type + * + * @return string + */ + public function getOwnerType() + { + return $this->container['owner_type']; + } + + /** + * Sets owner_type + * + * @param string $owner_type \"blackhole\" : the owner is a blackhole address. \"contract\" : the owner is a contract. \"eoa\" : the owner is a common address (eoa). \"multi-address\":the owner is an array/list. null: the address is not detected. + * + * @return $this + */ + public function setOwnerType($owner_type) + { + $this->container['owner_type'] = $owner_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting.php new file mode 100644 index 0000000..1b5d866 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskPrivilegedMinting.php @@ -0,0 +1,361 @@ + 'string', + 'value' => 'int', + 'owner_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner_address' => null, + 'value' => 'int32', + 'owner_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'owner_address' => 'owner_address', + 'value' => 'value', + 'owner_type' => 'owner_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner_address' => 'setOwnerAddress', + 'value' => 'setValue', + 'owner_type' => 'setOwnerType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner_address' => 'getOwnerAddress', + 'value' => 'getValue', + 'owner_type' => 'getOwnerType' + ]; + + /** + * 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_address'] = isset($data['owner_address']) ? $data['owner_address'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['owner_type'] = isset($data['owner_type']) ? $data['owner_type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets owner_address + * + * @return string + */ + public function getOwnerAddress() + { + return $this->container['owner_address']; + } + + /** + * Sets owner_address + * + * @param string $owner_address Owner_address describes the owner address. null: the owner address cannot be fetched. + * + * @return $this + */ + public function setOwnerAddress($owner_address) + { + $this->container['owner_address'] = $owner_address; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The \"value\" describes the status of the risk. null: the contract is not open source or there is a proxy, it is not possible to detect whether the risk exists. -1: the risk is detected but the ownership give up. If the detection of a code vulnerability, it can also be considered risk-free. 0: the risk is not detected. 1: the risk is detected, and the owner address is a common address (EOA), then it can be said that there is a clear risk. 2: The risk is detected, but the owner address is a contract address, the risk is not significant. 3: The risk is detected, but the owner address is not detectable / or an array. + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets owner_type + * + * @return string + */ + public function getOwnerType() + { + return $this->container['owner_type']; + } + + /** + * Sets owner_type + * + * @param string $owner_type \"blackhole\" : the owner is a blackhole address. \"contract\" : the owner is a contract. \"eoa\" : the owner is a common address (eoa). \"multi-address\":the owner is an array/list. null: the address is not detected. + * + * @return $this + */ + public function setOwnerType($owner_type) + { + $this->container['owner_type'] = $owner_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskSelfDestruct.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskSelfDestruct.php new file mode 100644 index 0000000..93a67bf --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskSelfDestruct.php @@ -0,0 +1,361 @@ + 'string', + 'value' => 'int', + 'owner_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner_address' => null, + 'value' => 'int32', + 'owner_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'owner_address' => 'owner_address', + 'value' => 'value', + 'owner_type' => 'owner_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner_address' => 'setOwnerAddress', + 'value' => 'setValue', + 'owner_type' => 'setOwnerType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner_address' => 'getOwnerAddress', + 'value' => 'getValue', + 'owner_type' => 'getOwnerType' + ]; + + /** + * 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_address'] = isset($data['owner_address']) ? $data['owner_address'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['owner_type'] = isset($data['owner_type']) ? $data['owner_type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets owner_address + * + * @return string + */ + public function getOwnerAddress() + { + return $this->container['owner_address']; + } + + /** + * Sets owner_address + * + * @param string $owner_address Owner_address describes the owner address. null: the owner address cannot be fetched. + * + * @return $this + */ + public function setOwnerAddress($owner_address) + { + $this->container['owner_address'] = $owner_address; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The \"value\" describes the status of the risk. null: the contract is not open source or there is a proxy, it is not possible to detect whether the risk exists. -1: the risk is detected but the ownership give up. If the detection of a code vulnerability, it can also be considered risk-free. 0: the risk is not detected. 1: the risk is detected, and the owner address is a common address (EOA), then it can be said that there is a clear risk. 2: The risk is detected, but the owner address is a contract address, the risk is not significant. 3: The risk is detected, but the owner address is not detectable / or an array. + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets owner_type + * + * @return string + */ + public function getOwnerType() + { + return $this->container['owner_type']; + } + + /** + * Sets owner_type + * + * @param string $owner_type \"blackhole\" : the owner is a blackhole address. \"contract\" : the owner is a contract. \"eoa\" : the owner is a common address (eoa). \"multi-address\":the owner is an array/list. null: the address is not detected. + * + * @return $this + */ + public function setOwnerType($owner_type) + { + $this->container['owner_type'] = $owner_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval.php new file mode 100644 index 0000000..11d9ddf --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultNftRiskTransferWithoutApproval.php @@ -0,0 +1,361 @@ + 'string', + 'value' => 'int', + 'owner_type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'owner_address' => null, + 'value' => 'int32', + 'owner_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'owner_address' => 'owner_address', + 'value' => 'value', + 'owner_type' => 'owner_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'owner_address' => 'setOwnerAddress', + 'value' => 'setValue', + 'owner_type' => 'setOwnerType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'owner_address' => 'getOwnerAddress', + 'value' => 'getValue', + 'owner_type' => 'getOwnerType' + ]; + + /** + * 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_address'] = isset($data['owner_address']) ? $data['owner_address'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['owner_type'] = isset($data['owner_type']) ? $data['owner_type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets owner_address + * + * @return string + */ + public function getOwnerAddress() + { + return $this->container['owner_address']; + } + + /** + * Sets owner_address + * + * @param string $owner_address Owner_address describes the owner address. null: the owner address cannot be fetched. + * + * @return $this + */ + public function setOwnerAddress($owner_address) + { + $this->container['owner_address'] = $owner_address; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The \"value\" describes the status of the risk. null: the contract is not open source or there is a proxy, it is not possible to detect whether the risk exists. -1: the risk is detected but the ownership give up. If the detection of a code vulnerability, it can also be considered risk-free. 0: the risk is not detected. 1: the risk is detected, and the owner address is a common address (EOA), then it can be said that there is a clear risk. 2: The risk is detected, but the owner address is a contract address, the risk is not significant. 3: The risk is detected, but the owner address is not detectable / or an array. + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets owner_type + * + * @return string + */ + public function getOwnerType() + { + return $this->container['owner_type']; + } + + /** + * Sets owner_type + * + * @param string $owner_type \"blackhole\" : the owner is a blackhole address. \"contract\" : the owner is a contract. \"eoa\" : the owner is a common address (eoa). \"multi-address\":the owner is an array/list. null: the address is not detected. + * + * @return $this + */ + public function setOwnerType($owner_type) + { + $this->container['owner_type'] = $owner_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/lib/client/Model/ResponseWrapperPhishingSiteResultWebsiteContractSecurity.php b/src/lib/client/Model/ResponseWrapperPhishingSiteResultWebsiteContractSecurity.php new file mode 100644 index 0000000..aa34974 --- /dev/null +++ b/src/lib/client/Model/ResponseWrapperPhishingSiteResultWebsiteContractSecurity.php @@ -0,0 +1,450 @@ + 'string', + 'is_contract' => 'int', + 'address_risk' => 'string[]', + 'contract' => 'string', + 'is_open_source' => 'int', + 'nft_risk' => '\Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRisk' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'standard' => null, + 'is_contract' => 'int32', + 'address_risk' => null, + 'contract' => null, + 'is_open_source' => 'int32', + 'nft_risk' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'standard' => 'standard', + 'is_contract' => 'is_contract', + 'address_risk' => 'address_risk', + 'contract' => 'contract', + 'is_open_source' => 'is_open_source', + 'nft_risk' => 'nft_risk' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'standard' => 'setStandard', + 'is_contract' => 'setIsContract', + 'address_risk' => 'setAddressRisk', + 'contract' => 'setContract', + 'is_open_source' => 'setIsOpenSource', + 'nft_risk' => 'setNftRisk' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'standard' => 'getStandard', + 'is_contract' => 'getIsContract', + 'address_risk' => 'getAddressRisk', + 'contract' => 'getContract', + 'is_open_source' => 'getIsOpenSource', + 'nft_risk' => 'getNftRisk' + ]; + + /** + * 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['standard'] = isset($data['standard']) ? $data['standard'] : null; + $this->container['is_contract'] = isset($data['is_contract']) ? $data['is_contract'] : null; + $this->container['address_risk'] = isset($data['address_risk']) ? $data['address_risk'] : null; + $this->container['contract'] = isset($data['contract']) ? $data['contract'] : null; + $this->container['is_open_source'] = isset($data['is_open_source']) ? $data['is_open_source'] : null; + $this->container['nft_risk'] = isset($data['nft_risk']) ? $data['nft_risk'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets standard + * + * @return string + */ + public function getStandard() + { + return $this->container['standard']; + } + + /** + * Sets standard + * + * @param string $standard contract type(erc20, erc721, erc1155) + * + * @return $this + */ + public function setStandard($standard) + { + $this->container['standard'] = $standard; + + return $this; + } + + /** + * Gets is_contract + * + * @return int + */ + public function getIsContract() + { + return $this->container['is_contract']; + } + + /** + * Sets is_contract + * + * @param int $is_contract It describes whether the holder is a contract \"1\" means true; \"0\" means false. + * + * @return $this + */ + public function setIsContract($is_contract) + { + $this->container['is_contract'] = $is_contract; + + return $this; + } + + /** + * Gets address_risk + * + * @return string[] + */ + public function getAddressRisk() + { + return $this->container['address_risk']; + } + + /** + * Sets address_risk + * + * @param string[] $address_risk address risk + * + * @return $this + */ + public function setAddressRisk($address_risk) + { + $this->container['address_risk'] = $address_risk; + + return $this; + } + + /** + * Gets contract + * + * @return string + */ + public function getContract() + { + return $this->container['contract']; + } + + /** + * Sets contract + * + * @param string $contract contract address + * + * @return $this + */ + public function setContract($contract) + { + $this->container['contract'] = $contract; + + return $this; + } + + /** + * Gets is_open_source + * + * @return int + */ + public function getIsOpenSource() + { + return $this->container['is_open_source']; + } + + /** + * Sets is_open_source + * + * @param int $is_open_source It describes whether this contract is open source. \"1\" means true; \"0\" means false.(Notice:Un-open-sourced contracts may hide various unknown mechanisms and are extremely risky. When the contract is not open source, we will not be able to detect other risk items.) + * + * @return $this + */ + public function setIsOpenSource($is_open_source) + { + $this->container['is_open_source'] = $is_open_source; + + return $this; + } + + /** + * Gets nft_risk + * + * @return \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRisk + */ + public function getNftRisk() + { + return $this->container['nft_risk']; + } + + /** + * Sets nft_risk + * + * @param \Swagger\Client\Model\ResponseWrapperPhishingSiteResultNftRisk $nft_risk nft_risk + * + * @return $this + */ + public function setNftRisk($nft_risk) + { + $this->container['nft_risk'] = $nft_risk; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +}