From 0345f4a633ad4a541c6b4519b2785f286fb5c8f4 Mon Sep 17 00:00:00 2001 From: Christian Pleintinger Date: Mon, 14 Jun 2021 15:45:48 +0200 Subject: [PATCH] DEV-4160 Signed-off-by: Christian Pleintinger --- src/Model/AccountManager.php | 614 +++++++++++++ src/Model/AdoptExpiration.php | 404 +++++++++ src/Model/AuEligibilityIdTypeConstants.php | 30 +- src/Model/AuEligibilityTypeConstants.php | 32 + src/Model/AuRegistrantIdTypeConstants.php | 16 + src/Model/BasicCertificate.php | 434 +++++++++ src/Model/BasicCustomer.php | 180 +++- src/Model/BasicCustomerSpoolVerification.php | 524 +++++++++++ src/Model/BasicDocument.php | 40 +- src/Model/BillingEventExtensions.php | 404 +++++++++ src/Model/BillingStatus.php | 2 + src/Model/BulkContactDeleteRequest.php | 434 +++++++++ src/Model/BulkSslContactDeleteRequest.php | 434 +++++++++ src/Model/CertAuthentication.php | 40 +- src/Model/Certificate.php | 132 ++- src/Model/CertificateInstallCheckData.php | 824 ++++++++++++++++++ src/Model/CertificateInstallCheckNotice.php | 464 ++++++++++ src/Model/CertificateInstallCheckRequest.php | 404 +++++++++ src/Model/CertificateInstallCheckResult.php | 434 +++++++++ src/Model/Comment.php | 554 ++++++++++++ src/Model/Contact.php | 608 ++++--------- src/Model/ContactBirthExtensions.php | 2 +- src/Model/ContactExtensions.php | 60 +- src/Model/ContactIdentificationExtensions.php | 4 +- src/Model/ContactIeExtensions.php | 46 +- src/Model/ContactSwissExtensions.php | 26 +- src/Model/ContactTrademarkExtensions.php | 4 +- src/Model/ContactType.php | 70 ++ src/Model/ContextHost.php | 180 ++++ src/Model/ContextHostZone.php | 464 ++++++++++ src/Model/Customer.php | 280 +++++- src/Model/CustomerContract.php | 30 + src/Model/CustomerPriceLists.php | 379 ++++++++ src/Model/CustomerTag.php | 467 ++++++++++ src/Model/CustomerType.php | 62 ++ src/Model/DomainEnvelopeSearchRequest.php | 250 +----- src/Model/DomainSafeUser.php | 30 + src/Model/DomainStudioDomainSource.php | 2 + src/Model/DomainStudioSourceMarket.php | 584 +++++++++++++ src/Model/DomainStudioSourcePremium.php | 70 +- src/Model/DomainStudioSources.php | 30 + src/Model/ExchangedPrice.php | 26 +- src/Model/ExtendedValidationExtension.php | 60 ++ src/Model/GenericLabelEntity.php | 62 +- src/Model/HkIndustryTypeConstants.php | 144 +-- src/Model/HostSubZone.php | 434 +++++++++ src/Model/Id4MeAgent.php | 6 +- src/Model/Id4MeIdentityAddons.php | 379 ++++++++ src/Model/Id4MeLayoutConfiguration.php | 734 ++++++++++++++++ src/Model/Id4meIdentity.php | 6 +- ...ponseDataCertificateInstallCheckResult.php | 554 ++++++++++++ ...esponseDataListJsonResponseDataContact.php | 554 ++++++++++++ ...onseDataListJsonResponseDataSslContact.php | 554 ++++++++++++ .../JsonResponseDataSiteSealInformation.php | 554 ++++++++++++ src/Model/JsonResponseDataTaskUserLimit.php | 554 ++++++++++++ src/Model/JsonResponseDataUserSalesReport.php | 554 ++++++++++++ src/Model/Locale.php | 379 ++++++++ src/Model/PeriodicBilling.php | 100 ++- src/Model/PolicyMode.php | 66 ++ src/Model/PollMessage.php | 30 + src/Model/PriceServiceEntity.php | 2 +- src/Model/SEPAMandate.php | 66 +- src/Model/SanType.php | 64 ++ src/Model/SepaStatus.php | 70 ++ src/Model/ServiceEntity.php | 2 +- src/Model/SignatureHashAlgorithmConstants.php | 14 + src/Model/SiteSealInformation.php | 524 +++++++++++ src/Model/SpamPolicy.php | 30 + src/Model/SslContact.php | 60 ++ src/Model/SslContactExtensions.php | 404 +++++++++ src/Model/SslContactGeneralExtensions.php | 524 +++++++++++ src/Model/SslContactReference.php | 434 +++++++++ src/Model/SubjectAlternativeName.php | 160 +++- src/Model/Subscription.php | 130 ++- src/Model/TaskCount.php | 434 +++++++++ src/Model/TaskGroup.php | 88 ++ src/Model/TaskLimit.php | 704 +++++++++++++++ src/Model/TaskUserLimit.php | 467 ++++++++++ src/Model/TlsData.php | 434 +++++++++ src/Model/User.php | 60 ++ src/Model/UserProfile.php | 30 + src/Model/UserSalesReport.php | 674 ++++++++++++++ src/Model/WhoisStatus.php | 40 +- src/Model/X509CertificateData.php | 734 ++++++++++++++++ src/Model/X509CertificateIssuer.php | 554 ++++++++++++ src/Model/X509CertificatePublicKeyData.php | 524 +++++++++++ src/Model/X509CertificateSubject.php | 554 ++++++++++++ src/Model/X509CertificateValidity.php | 434 +++++++++ src/Model/ZoneBasePatchRequest.php | 30 + 89 files changed, 23093 insertions(+), 950 deletions(-) create mode 100644 src/Model/AccountManager.php create mode 100644 src/Model/AdoptExpiration.php create mode 100644 src/Model/BasicCertificate.php create mode 100644 src/Model/BasicCustomerSpoolVerification.php create mode 100644 src/Model/BillingEventExtensions.php create mode 100644 src/Model/BulkContactDeleteRequest.php create mode 100644 src/Model/BulkSslContactDeleteRequest.php create mode 100644 src/Model/CertificateInstallCheckData.php create mode 100644 src/Model/CertificateInstallCheckNotice.php create mode 100644 src/Model/CertificateInstallCheckRequest.php create mode 100644 src/Model/CertificateInstallCheckResult.php create mode 100644 src/Model/Comment.php create mode 100644 src/Model/ContactType.php create mode 100644 src/Model/ContextHostZone.php create mode 100644 src/Model/CustomerPriceLists.php create mode 100644 src/Model/CustomerTag.php create mode 100644 src/Model/CustomerType.php create mode 100644 src/Model/DomainStudioSourceMarket.php create mode 100644 src/Model/HostSubZone.php create mode 100644 src/Model/Id4MeIdentityAddons.php create mode 100644 src/Model/Id4MeLayoutConfiguration.php create mode 100644 src/Model/JsonResponseDataCertificateInstallCheckResult.php create mode 100644 src/Model/JsonResponseDataListJsonResponseDataContact.php create mode 100644 src/Model/JsonResponseDataListJsonResponseDataSslContact.php create mode 100644 src/Model/JsonResponseDataSiteSealInformation.php create mode 100644 src/Model/JsonResponseDataTaskUserLimit.php create mode 100644 src/Model/JsonResponseDataUserSalesReport.php create mode 100644 src/Model/Locale.php create mode 100644 src/Model/PolicyMode.php create mode 100644 src/Model/SanType.php create mode 100644 src/Model/SepaStatus.php create mode 100644 src/Model/SiteSealInformation.php create mode 100644 src/Model/SslContactExtensions.php create mode 100644 src/Model/SslContactGeneralExtensions.php create mode 100644 src/Model/SslContactReference.php create mode 100644 src/Model/TaskCount.php create mode 100644 src/Model/TaskGroup.php create mode 100644 src/Model/TaskLimit.php create mode 100644 src/Model/TaskUserLimit.php create mode 100644 src/Model/TlsData.php create mode 100644 src/Model/UserSalesReport.php create mode 100644 src/Model/X509CertificateData.php create mode 100644 src/Model/X509CertificateIssuer.php create mode 100644 src/Model/X509CertificatePublicKeyData.php create mode 100644 src/Model/X509CertificateSubject.php create mode 100644 src/Model/X509CertificateValidity.php diff --git a/src/Model/AccountManager.php b/src/Model/AccountManager.php new file mode 100644 index 00000000..1aecb519 --- /dev/null +++ b/src/Model/AccountManager.php @@ -0,0 +1,614 @@ + '\DateTime', + 'updated' => '\DateTime', + 'owner' => '\Domainrobot\Model\BasicUser', + 'updater' => '\Domainrobot\Model\BasicUser', + 'id' => 'int', + 'name' => 'string', + 'phone' => '\Domainrobot\Model\Phone', + 'email' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'owner' => null, + 'updater' => null, + 'id' => 'int32', + 'name' => null, + 'phone' => null, + 'email' => 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'owner' => 'owner', + 'updater' => 'updater', + 'id' => 'id', + 'name' => 'name', + 'phone' => 'phone', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'owner' => 'setOwner', + 'updater' => 'setUpdater', + 'id' => 'setId', + 'name' => 'setName', + 'phone' => 'setPhone', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'owner' => 'getOwner', + 'updater' => 'getUpdater', + 'id' => 'getId', + 'name' => 'getName', + 'phone' => 'getPhone', + 'email' => 'getEmail' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['owner'] = isset($data['owner']) ? $this->createData($data['owner'], 'owner') : null; + $this->container['updater'] = isset($data['updater']) ? $this->createData($data['updater'], 'updater') : null; + $this->container['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; + $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; + $this->container['phone'] = isset($data['phone']) ? $this->createData($data['phone'], 'phone') : null; + $this->container['email'] = isset($data['email']) ? $this->createData($data['email'], 'email') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets owner + * + * @return \Domainrobot\Model\BasicUser + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param \Domainrobot\Model\BasicUser $owner The owner of the object. + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets updater + * + * @return \Domainrobot\Model\BasicUser + */ + public function getUpdater() + { + return $this->container['updater']; + } + + /** + * Sets updater + * + * @param \Domainrobot\Model\BasicUser $updater The updater of the object. + * + * @return $this + */ + public function setUpdater($updater) + { + $this->container['updater'] = $updater; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + 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 phone + * + * @return \Domainrobot\Model\Phone + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param \Domainrobot\Model\Phone $phone phone + * + * @return $this + */ + public function setPhone($phone) + { + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/AdoptExpiration.php b/src/Model/AdoptExpiration.php new file mode 100644 index 00000000..0a4875c7 --- /dev/null +++ b/src/Model/AdoptExpiration.php @@ -0,0 +1,404 @@ + 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'tlds' => 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 = [ + 'tlds' => 'tlds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tlds' => 'setTlds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tlds' => 'getTlds' + ]; + + /** + * 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['tlds'] = isset($data['tlds']) ? $this->createData($data['tlds'], 'tlds') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tlds + * + * @return string[] + */ + public function getTlds() + { + return $this->container['tlds']; + } + + /** + * Sets tlds + * + * @param string[] $tlds tlds + * + * @return $this + */ + public function setTlds($tlds) + { + $this->container['tlds'] = $tlds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/AuEligibilityIdTypeConstants.php b/src/Model/AuEligibilityIdTypeConstants.php index 88d31e48..926afbe1 100644 --- a/src/Model/AuEligibilityIdTypeConstants.php +++ b/src/Model/AuEligibilityIdTypeConstants.php @@ -45,15 +45,14 @@ class AuEligibilityIdTypeConstants */ const ACN = 'ACN'; const ABN = 'ABN'; - const VIC_BN = 'VIC_BN'; - const NSW_BN = 'NSW_BN'; + const VIC = 'VIC'; + const NSW = 'NSW'; const SA = 'SA'; - const BN = 'BN'; - const NT_BN = 'NT_BN'; - const WA_BN = 'WA_BN'; - const TAS_BN = 'TAS_BN'; - const ACT_BN = 'ACT_BN'; - const QLD_BN = 'QLD_BN'; + const NT = 'NT'; + const WA = 'WA'; + const TAS = 'TAS'; + const ACT = 'ACT'; + const QLD = 'QLD'; const TM = 'TM'; const OTHER = 'OTHER'; @@ -66,15 +65,14 @@ public static function getAllowableEnumValues() return [ self::ACN, self::ABN, - self::VIC_BN, - self::NSW_BN, + self::VIC, + self::NSW, self::SA, - self::BN, - self::NT_BN, - self::WA_BN, - self::TAS_BN, - self::ACT_BN, - self::QLD_BN, + self::NT, + self::WA, + self::TAS, + self::ACT, + self::QLD, self::TM, self::OTHER, ]; diff --git a/src/Model/AuEligibilityTypeConstants.php b/src/Model/AuEligibilityTypeConstants.php index 89c317c7..7034b650 100644 --- a/src/Model/AuEligibilityTypeConstants.php +++ b/src/Model/AuEligibilityTypeConstants.php @@ -61,6 +61,22 @@ class AuEligibilityTypeConstants const POLITICAL_PARTY = 'POLITICAL_PARTY'; const RELIGIOUS_CHURCH_GROUPS = 'RELIGIOUS_CHURCH_GROUPS'; const OTHER = 'OTHER'; + const REGISTRABLE_BODY = 'REGISTRABLE_BODY'; + const INDIGENOUS_CORPORATION = 'INDIGENOUS_CORPORATION'; + const REGISTERED_ORGANISATION = 'REGISTERED_ORGANISATION'; + const COOPERATIVE = 'COOPERATIVE'; + const TRUST = 'TRUST'; + const EDUCATIONAL_INSTITUTION = 'EDUCATIONAL_INSTITUTION'; + const COMMONWEALTH_ENTITY = 'COMMONWEALTH_ENTITY'; + const STATUTORY_BODY = 'STATUTORY_BODY'; + const TRADING_COOPERATIVE = 'TRADING_COOPERATIVE'; + const COMPANY_LIMITED_BY_GUARANTEE = 'COMPANY_LIMITED_BY_GUARANTEE'; + const NON_DISTRIBUTING_COOPERATIVE = 'NON_DISTRIBUTING_COOPERATIVE'; + const NON_TRADING_COOPERATIVE = 'NON_TRADING_COOPERATIVE'; + const CHARITABLE_TRUST = 'CHARITABLE_TRUST'; + const PUBLIC_PRIVATE_ANCILLARY_FUND = 'PUBLIC_PRIVATE_ANCILLARY_FUND'; + const PEAK_STATE_TERRITORY_BODY = 'PEAK_STATE_TERRITORY_BODY'; + const NOT_FOR_PROFIT_COMMUNITY_GROUP = 'NOT_FOR_PROFIT_COMMUNITY_GROUP'; /** * Gets allowable values of the enum @@ -87,6 +103,22 @@ public static function getAllowableEnumValues() self::POLITICAL_PARTY, self::RELIGIOUS_CHURCH_GROUPS, self::OTHER, + self::REGISTRABLE_BODY, + self::INDIGENOUS_CORPORATION, + self::REGISTERED_ORGANISATION, + self::COOPERATIVE, + self::TRUST, + self::EDUCATIONAL_INSTITUTION, + self::COMMONWEALTH_ENTITY, + self::STATUTORY_BODY, + self::TRADING_COOPERATIVE, + self::COMPANY_LIMITED_BY_GUARANTEE, + self::NON_DISTRIBUTING_COOPERATIVE, + self::NON_TRADING_COOPERATIVE, + self::CHARITABLE_TRUST, + self::PUBLIC_PRIVATE_ANCILLARY_FUND, + self::PEAK_STATE_TERRITORY_BODY, + self::NOT_FOR_PROFIT_COMMUNITY_GROUP, ]; } } diff --git a/src/Model/AuRegistrantIdTypeConstants.php b/src/Model/AuRegistrantIdTypeConstants.php index 52041c77..55114e1b 100644 --- a/src/Model/AuRegistrantIdTypeConstants.php +++ b/src/Model/AuRegistrantIdTypeConstants.php @@ -46,6 +46,14 @@ class AuRegistrantIdTypeConstants const ACN = 'ACN'; const ABN = 'ABN'; const OTHER = 'OTHER'; + const TAS = 'TAS'; + const VIC = 'VIC'; + const NSW = 'NSW'; + const ACT = 'ACT'; + const QLD = 'QLD'; + const NT = 'NT'; + const WA = 'WA'; + const SA = 'SA'; /** * Gets allowable values of the enum @@ -57,6 +65,14 @@ public static function getAllowableEnumValues() self::ACN, self::ABN, self::OTHER, + self::TAS, + self::VIC, + self::NSW, + self::ACT, + self::QLD, + self::NT, + self::WA, + self::SA, ]; } } diff --git a/src/Model/BasicCertificate.php b/src/Model/BasicCertificate.php new file mode 100644 index 00000000..a85e3e8e --- /dev/null +++ b/src/Model/BasicCertificate.php @@ -0,0 +1,434 @@ + 'int', + 'product' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'product' => 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 = [ + 'id' => 'id', + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'product' => 'getProduct' + ]; + + /** + * 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['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; + $this->container['product'] = isset($data['product']) ? $this->createData($data['product'], 'product') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The id of stored certificate + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets product + * + * @return string + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param string $product The certificate product + * + * @return $this + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/BasicCustomer.php b/src/Model/BasicCustomer.php index 46f6d2f0..630d97b5 100644 --- a/src/Model/BasicCustomer.php +++ b/src/Model/BasicCustomer.php @@ -61,6 +61,7 @@ class BasicCustomer implements ModelInterface, ArrayAccess 'client' => 'string', 'group' => 'int', 'name' => 'string', + 'type' => '\Domainrobot\Model\CustomerType', 'organization' => 'string', 'vatNumber' => 'string', 'gender' => '\Domainrobot\Model\GenderConstants', @@ -75,16 +76,18 @@ class BasicCustomer implements ModelInterface, ArrayAccess 'billingEmails' => 'string[]', 'payment' => '\Domainrobot\Model\PaymentConstants', 'paymentMode' => 'string', - 'paymentCurrency' => '\Domainrobot\Model\Currency', + 'paymentCurrency' => 'string', 'discountValid' => '\DateTime', 'invoiceLanguage' => 'string', 'taxable' => 'bool', 'card' => '\Domainrobot\Model\Card', 'contracts' => '\Domainrobot\Model\CustomerContract[]', - 'billingUsers' => '\Domainrobot\Model\BasicUser[]', - 'account' => '\Domainrobot\Model\Account', - 'clearAccount' => '\Domainrobot\Model\ClearAccountPeriod', 'autodelete' => 'bool', + 'pending' => 'bool', + 'verifications' => '\Domainrobot\Model\BasicCustomerSpoolVerification[]', + 'account' => '\Domainrobot\Model\Account', + 'billingUsers' => '\Domainrobot\Model\BasicUser[]', + 'comments' => '\Domainrobot\Model\Comment[]', 'fname' => 'string', 'lname' => 'string', 'pcode' => 'string', @@ -101,6 +104,7 @@ class BasicCustomer implements ModelInterface, ArrayAccess 'client' => null, 'group' => 'int64', 'name' => null, + 'type' => null, 'organization' => null, 'vatNumber' => null, 'gender' => null, @@ -121,10 +125,12 @@ class BasicCustomer implements ModelInterface, ArrayAccess 'taxable' => null, 'card' => null, 'contracts' => null, - 'billingUsers' => null, - 'account' => null, - 'clearAccount' => null, 'autodelete' => null, + 'pending' => null, + 'verifications' => null, + 'account' => null, + 'billingUsers' => null, + 'comments' => null, 'fname' => null, 'lname' => null, 'pcode' => null, @@ -162,6 +168,7 @@ public static function swaggerFormats() 'client' => 'client', 'group' => 'group', 'name' => 'name', + 'type' => 'type', 'organization' => 'organization', 'vatNumber' => 'vatNumber', 'gender' => 'gender', @@ -182,10 +189,12 @@ public static function swaggerFormats() 'taxable' => 'taxable', 'card' => 'card', 'contracts' => 'contracts', - 'billingUsers' => 'billingUsers', - 'account' => 'account', - 'clearAccount' => 'clearAccount', 'autodelete' => 'autodelete', + 'pending' => 'pending', + 'verifications' => 'verifications', + 'account' => 'account', + 'billingUsers' => 'billingUsers', + 'comments' => 'comments', 'fname' => 'fname', 'lname' => 'lname', 'pcode' => 'pcode', @@ -202,6 +211,7 @@ public static function swaggerFormats() 'client' => 'setClient', 'group' => 'setGroup', 'name' => 'setName', + 'type' => 'setType', 'organization' => 'setOrganization', 'vatNumber' => 'setVatNumber', 'gender' => 'setGender', @@ -222,10 +232,12 @@ public static function swaggerFormats() 'taxable' => 'setTaxable', 'card' => 'setCard', 'contracts' => 'setContracts', - 'billingUsers' => 'setBillingUsers', - 'account' => 'setAccount', - 'clearAccount' => 'setClearAccount', 'autodelete' => 'setAutodelete', + 'pending' => 'setPending', + 'verifications' => 'setVerifications', + 'account' => 'setAccount', + 'billingUsers' => 'setBillingUsers', + 'comments' => 'setComments', 'fname' => 'setFname', 'lname' => 'setLname', 'pcode' => 'setPcode', @@ -242,6 +254,7 @@ public static function swaggerFormats() 'client' => 'getClient', 'group' => 'getGroup', 'name' => 'getName', + 'type' => 'getType', 'organization' => 'getOrganization', 'vatNumber' => 'getVatNumber', 'gender' => 'getGender', @@ -262,10 +275,12 @@ public static function swaggerFormats() 'taxable' => 'getTaxable', 'card' => 'getCard', 'contracts' => 'getContracts', - 'billingUsers' => 'getBillingUsers', - 'account' => 'getAccount', - 'clearAccount' => 'getClearAccount', 'autodelete' => 'getAutodelete', + 'pending' => 'getPending', + 'verifications' => 'getVerifications', + 'account' => 'getAccount', + 'billingUsers' => 'getBillingUsers', + 'comments' => 'getComments', 'fname' => 'getFname', 'lname' => 'getLname', 'pcode' => 'getPcode', @@ -336,6 +351,7 @@ public function __construct(array $data = null) $this->container['client'] = isset($data['client']) ? $this->createData($data['client'], 'client') : null; $this->container['group'] = isset($data['group']) ? $this->createData($data['group'], 'group') : null; $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; + $this->container['type'] = isset($data['type']) ? $this->createData($data['type'], 'type') : null; $this->container['organization'] = isset($data['organization']) ? $this->createData($data['organization'], 'organization') : null; $this->container['vatNumber'] = isset($data['vatNumber']) ? $this->createData($data['vatNumber'], 'vatNumber') : null; $this->container['gender'] = isset($data['gender']) ? $this->createData($data['gender'], 'gender') : null; @@ -356,10 +372,12 @@ public function __construct(array $data = null) $this->container['taxable'] = isset($data['taxable']) ? $this->createData($data['taxable'], 'taxable') : null; $this->container['card'] = isset($data['card']) ? $this->createData($data['card'], 'card') : null; $this->container['contracts'] = isset($data['contracts']) ? $this->createData($data['contracts'], 'contracts') : null; - $this->container['billingUsers'] = isset($data['billingUsers']) ? $this->createData($data['billingUsers'], 'billingUsers') : null; - $this->container['account'] = isset($data['account']) ? $this->createData($data['account'], 'account') : null; - $this->container['clearAccount'] = isset($data['clearAccount']) ? $this->createData($data['clearAccount'], 'clearAccount') : null; $this->container['autodelete'] = isset($data['autodelete']) ? $this->createData($data['autodelete'], 'autodelete') : null; + $this->container['pending'] = isset($data['pending']) ? $this->createData($data['pending'], 'pending') : null; + $this->container['verifications'] = isset($data['verifications']) ? $this->createData($data['verifications'], 'verifications') : null; + $this->container['account'] = isset($data['account']) ? $this->createData($data['account'], 'account') : null; + $this->container['billingUsers'] = isset($data['billingUsers']) ? $this->createData($data['billingUsers'], 'billingUsers') : null; + $this->container['comments'] = isset($data['comments']) ? $this->createData($data['comments'], 'comments') : null; $this->container['fname'] = isset($data['fname']) ? $this->createData($data['fname'], 'fname') : null; $this->container['lname'] = isset($data['lname']) ? $this->createData($data['lname'], 'lname') : null; $this->container['pcode'] = isset($data['pcode']) ? $this->createData($data['pcode'], 'pcode') : null; @@ -613,6 +631,30 @@ public function setName($name) return $this; } + /** + * Gets type + * + * @return \Domainrobot\Model\CustomerType + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Domainrobot\Model\CustomerType $type The type of the customer. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** * Gets organization * @@ -959,7 +1001,7 @@ public function setPaymentMode($paymentMode) /** * Gets paymentCurrency * - * @return \Domainrobot\Model\Currency + * @return string */ public function getPaymentCurrency() { @@ -969,7 +1011,7 @@ public function getPaymentCurrency() /** * Sets paymentCurrency * - * @param \Domainrobot\Model\Currency $paymentCurrency The payment currency of the customer. + * @param string $paymentCurrency The payment currency of the customer. * * @return $this */ @@ -1101,25 +1143,73 @@ public function setContracts($contracts) } /** - * Gets billingUsers + * Gets autodelete * - * @return \Domainrobot\Model\BasicUser[] + * @return bool */ - public function getBillingUsers() + public function getAutodelete() { - return $this->container['billingUsers']; + return $this->container['autodelete']; } /** - * Sets billingUsers + * Sets autodelete * - * @param \Domainrobot\Model\BasicUser[] $billingUsers The billing users. + * @param bool $autodelete Flag indication if the customer is autodelete * * @return $this */ - public function setBillingUsers($billingUsers) + public function setAutodelete($autodelete) { - $this->container['billingUsers'] = $billingUsers; + $this->container['autodelete'] = $autodelete; + + return $this; + } + + /** + * Gets pending + * + * @return bool + */ + public function getPending() + { + return $this->container['pending']; + } + + /** + * Sets pending + * + * @param bool $pending Flag indication if the customer data are pending + * + * @return $this + */ + public function setPending($pending) + { + $this->container['pending'] = $pending; + + return $this; + } + + /** + * Gets verifications + * + * @return \Domainrobot\Model\BasicCustomerSpoolVerification[] + */ + public function getVerifications() + { + return $this->container['verifications']; + } + + /** + * Sets verifications + * + * @param \Domainrobot\Model\BasicCustomerSpoolVerification[] $verifications Shows the pending email verifications + * + * @return $this + */ + public function setVerifications($verifications) + { + $this->container['verifications'] = $verifications; return $this; } @@ -1149,49 +1239,49 @@ public function setAccount($account) } /** - * Gets clearAccount + * Gets billingUsers * - * @return \Domainrobot\Model\ClearAccountPeriod + * @return \Domainrobot\Model\BasicUser[] */ - public function getClearAccount() + public function getBillingUsers() { - return $this->container['clearAccount']; + return $this->container['billingUsers']; } /** - * Sets clearAccount + * Sets billingUsers * - * @param \Domainrobot\Model\ClearAccountPeriod $clearAccount The period after the post payment account will be cleared to zero + * @param \Domainrobot\Model\BasicUser[] $billingUsers The billing users. * * @return $this */ - public function setClearAccount($clearAccount) + public function setBillingUsers($billingUsers) { - $this->container['clearAccount'] = $clearAccount; + $this->container['billingUsers'] = $billingUsers; return $this; } /** - * Gets autodelete + * Gets comments * - * @return bool + * @return \Domainrobot\Model\Comment[] */ - public function getAutodelete() + public function getComments() { - return $this->container['autodelete']; + return $this->container['comments']; } /** - * Sets autodelete + * Sets comments * - * @param bool $autodelete Flag indication if the customer is autodelete + * @param \Domainrobot\Model\Comment[] $comments The comments of the customer * * @return $this */ - public function setAutodelete($autodelete) + public function setComments($comments) { - $this->container['autodelete'] = $autodelete; + $this->container['comments'] = $comments; return $this; } diff --git a/src/Model/BasicCustomerSpoolVerification.php b/src/Model/BasicCustomerSpoolVerification.php new file mode 100644 index 00000000..22500798 --- /dev/null +++ b/src/Model/BasicCustomerSpoolVerification.php @@ -0,0 +1,524 @@ + '\DateTime', + 'updated' => '\DateTime', + 'email' => 'string', + 'status' => '\Domainrobot\Model\GenericStatusConstants', + 'customer' => '\Domainrobot\Model\GenericCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'email' => null, + 'status' => null, + 'customer' => 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'email' => 'email', + 'status' => 'status', + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'email' => 'setEmail', + 'status' => 'setStatus', + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'email' => 'getEmail', + 'status' => 'getStatus', + 'customer' => 'getCustomer' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['email'] = isset($data['email']) ? $this->createData($data['email'], 'email') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['customer'] = isset($data['customer']) ? $this->createData($data['customer'], 'customer') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email The email address to verify + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\GenericStatusConstants + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\GenericStatusConstants $status The status of the verification + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets customer + * + * @return \Domainrobot\Model\GenericCustomer + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Domainrobot\Model\GenericCustomer $customer The related customer + * + * @return $this + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/BasicDocument.php b/src/Model/BasicDocument.php index 8f6825b4..7fc78695 100644 --- a/src/Model/BasicDocument.php +++ b/src/Model/BasicDocument.php @@ -70,7 +70,8 @@ class BasicDocument implements ModelInterface, ArrayAccess 'uuid' => 'string', 'alias' => 'string', 'owner' => '\Domainrobot\Model\BasicUser', - 'updater' => '\Domainrobot\Model\BasicUser' + 'updater' => '\Domainrobot\Model\BasicUser', + 'expire' => '\DateTime' ]; /** @@ -92,7 +93,8 @@ class BasicDocument implements ModelInterface, ArrayAccess 'uuid' => null, 'alias' => null, 'owner' => null, - 'updater' => null + 'updater' => null, + 'expire' => 'date-time' ]; /** @@ -135,7 +137,8 @@ public static function swaggerFormats() 'uuid' => 'uuid', 'alias' => 'alias', 'owner' => 'owner', - 'updater' => 'updater' + 'updater' => 'updater', + 'expire' => 'expire' ]; /** @@ -157,7 +160,8 @@ public static function swaggerFormats() 'uuid' => 'setUuid', 'alias' => 'setAlias', 'owner' => 'setOwner', - 'updater' => 'setUpdater' + 'updater' => 'setUpdater', + 'expire' => 'setExpire' ]; /** @@ -179,7 +183,8 @@ public static function swaggerFormats() 'uuid' => 'getUuid', 'alias' => 'getAlias', 'owner' => 'getOwner', - 'updater' => 'getUpdater' + 'updater' => 'getUpdater', + 'expire' => 'getExpire' ]; /** @@ -256,6 +261,7 @@ public function __construct(array $data = null) $this->container['alias'] = isset($data['alias']) ? $this->createData($data['alias'], 'alias') : null; $this->container['owner'] = isset($data['owner']) ? $this->createData($data['owner'], 'owner') : null; $this->container['updater'] = isset($data['updater']) ? $this->createData($data['updater'], 'updater') : null; + $this->container['expire'] = isset($data['expire']) ? $this->createData($data['expire'], 'expire') : null; } /** @@ -675,6 +681,30 @@ public function setUpdater($updater) return $this; } + + /** + * Gets expire + * + * @return \DateTime + */ + public function getExpire() + { + return $this->container['expire']; + } + + /** + * Sets expire + * + * @param \DateTime $expire The expire date. + * + * @return $this + */ + public function setExpire($expire) + { + $this->container['expire'] = $expire; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/BillingEventExtensions.php b/src/Model/BillingEventExtensions.php new file mode 100644 index 00000000..8c16c612 --- /dev/null +++ b/src/Model/BillingEventExtensions.php @@ -0,0 +1,404 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'externalReference' => 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 = [ + 'externalReference' => 'externalReference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'externalReference' => 'setExternalReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'externalReference' => 'getExternalReference' + ]; + + /** + * 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['externalReference'] = isset($data['externalReference']) ? $this->createData($data['externalReference'], 'externalReference') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets externalReference + * + * @return string + */ + public function getExternalReference() + { + return $this->container['externalReference']; + } + + /** + * Sets externalReference + * + * @param string $externalReference externalReference + * + * @return $this + */ + public function setExternalReference($externalReference) + { + $this->container['externalReference'] = $externalReference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/BillingStatus.php b/src/Model/BillingStatus.php index fbdde67e..1eff9408 100644 --- a/src/Model/BillingStatus.php +++ b/src/Model/BillingStatus.php @@ -55,6 +55,7 @@ class BillingStatus const RESTORE = 'RESTORE'; const AUTODELETE = 'AUTODELETE'; const REMOVED = 'REMOVED'; + const DROP = 'DROP'; /** * Gets allowable values of the enum @@ -75,6 +76,7 @@ public static function getAllowableEnumValues() self::RESTORE, self::AUTODELETE, self::REMOVED, + self::DROP, ]; } } diff --git a/src/Model/BulkContactDeleteRequest.php b/src/Model/BulkContactDeleteRequest.php new file mode 100644 index 00000000..84c8224f --- /dev/null +++ b/src/Model/BulkContactDeleteRequest.php @@ -0,0 +1,434 @@ + '\Domainrobot\Model\Contact[]', + 'query' => '\Domainrobot\Model\Query' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'objects' => null, + 'query' => 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 = [ + 'objects' => 'objects', + 'query' => 'query' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'objects' => 'setObjects', + 'query' => 'setQuery' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'objects' => 'getObjects', + 'query' => 'getQuery' + ]; + + /** + * 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['objects'] = isset($data['objects']) ? $this->createData($data['objects'], 'objects') : null; + $this->container['query'] = isset($data['query']) ? $this->createData($data['query'], 'query') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets objects + * + * @return \Domainrobot\Model\Contact[] + */ + public function getObjects() + { + return $this->container['objects']; + } + + /** + * Sets objects + * + * @param \Domainrobot\Model\Contact[] $objects The objects to process + * + * @return $this + */ + public function setObjects($objects) + { + $this->container['objects'] = $objects; + + return $this; + } + + /** + * Gets query + * + * @return \Domainrobot\Model\Query + */ + public function getQuery() + { + return $this->container['query']; + } + + /** + * Sets query + * + * @param \Domainrobot\Model\Query $query The query to fetch the object instead of defined list + * + * @return $this + */ + public function setQuery($query) + { + $this->container['query'] = $query; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/BulkSslContactDeleteRequest.php b/src/Model/BulkSslContactDeleteRequest.php new file mode 100644 index 00000000..d22fd66f --- /dev/null +++ b/src/Model/BulkSslContactDeleteRequest.php @@ -0,0 +1,434 @@ + '\Domainrobot\Model\SslContact[]', + 'query' => '\Domainrobot\Model\Query' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'objects' => null, + 'query' => 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 = [ + 'objects' => 'objects', + 'query' => 'query' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'objects' => 'setObjects', + 'query' => 'setQuery' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'objects' => 'getObjects', + 'query' => 'getQuery' + ]; + + /** + * 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['objects'] = isset($data['objects']) ? $this->createData($data['objects'], 'objects') : null; + $this->container['query'] = isset($data['query']) ? $this->createData($data['query'], 'query') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets objects + * + * @return \Domainrobot\Model\SslContact[] + */ + public function getObjects() + { + return $this->container['objects']; + } + + /** + * Sets objects + * + * @param \Domainrobot\Model\SslContact[] $objects The objects to process + * + * @return $this + */ + public function setObjects($objects) + { + $this->container['objects'] = $objects; + + return $this; + } + + /** + * Gets query + * + * @return \Domainrobot\Model\Query + */ + public function getQuery() + { + return $this->container['query']; + } + + /** + * Sets query + * + * @param \Domainrobot\Model\Query $query The query to fetch the object instead of defined list + * + * @return $this + */ + public function setQuery($query) + { + $this->container['query'] = $query; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CertAuthentication.php b/src/Model/CertAuthentication.php index cca7c353..5ed5d83f 100644 --- a/src/Model/CertAuthentication.php +++ b/src/Model/CertAuthentication.php @@ -63,7 +63,8 @@ class CertAuthentication implements ModelInterface, ArrayAccess 'fileName' => 'string', 'fileContent' => 'string', 'approverEmails' => 'string[]', - 'provisioning' => 'bool' + 'provisioning' => 'bool', + 'domains' => '\Domainrobot\Model\CertAuthentication[]' ]; /** @@ -78,7 +79,8 @@ class CertAuthentication implements ModelInterface, ArrayAccess 'fileName' => null, 'fileContent' => null, 'approverEmails' => null, - 'provisioning' => null + 'provisioning' => null, + 'domains' => null ]; /** @@ -114,7 +116,8 @@ public static function swaggerFormats() 'fileName' => 'fileName', 'fileContent' => 'fileContent', 'approverEmails' => 'approverEmails', - 'provisioning' => 'provisioning' + 'provisioning' => 'provisioning', + 'domains' => 'domains' ]; /** @@ -129,7 +132,8 @@ public static function swaggerFormats() 'fileName' => 'setFileName', 'fileContent' => 'setFileContent', 'approverEmails' => 'setApproverEmails', - 'provisioning' => 'setProvisioning' + 'provisioning' => 'setProvisioning', + 'domains' => 'setDomains' ]; /** @@ -144,7 +148,8 @@ public static function swaggerFormats() 'fileName' => 'getFileName', 'fileContent' => 'getFileContent', 'approverEmails' => 'getApproverEmails', - 'provisioning' => 'getProvisioning' + 'provisioning' => 'getProvisioning', + 'domains' => 'getDomains' ]; /** @@ -214,6 +219,7 @@ public function __construct(array $data = null) $this->container['fileContent'] = isset($data['fileContent']) ? $this->createData($data['fileContent'], 'fileContent') : null; $this->container['approverEmails'] = isset($data['approverEmails']) ? $this->createData($data['approverEmails'], 'approverEmails') : null; $this->container['provisioning'] = isset($data['provisioning']) ? $this->createData($data['provisioning'], 'provisioning') : null; + $this->container['domains'] = isset($data['domains']) ? $this->createData($data['domains'], 'domains') : null; } /** @@ -462,6 +468,30 @@ public function setProvisioning($provisioning) return $this; } + + /** + * Gets domains + * + * @return \Domainrobot\Model\CertAuthentication[] + */ + public function getDomains() + { + return $this->container['domains']; + } + + /** + * Sets domains + * + * @param \Domainrobot\Model\CertAuthentication[] $domains The authentication data for every domain. + * + * @return $this + */ + public function setDomains($domains) + { + $this->container['domains'] = $domains; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Certificate.php b/src/Model/Certificate.php index 9deada81..f9f5512b 100644 --- a/src/Model/Certificate.php +++ b/src/Model/Certificate.php @@ -61,7 +61,6 @@ class Certificate implements ModelInterface, ArrayAccess 'updated' => '\DateTime', 'owner' => '\Domainrobot\Model\BasicUser', 'updater' => '\Domainrobot\Model\BasicUser', - 'extension' => '\Domainrobot\Model\ExtendedValidationExtension', 'id' => 'int', 'partnerOrderId' => 'string', 'orderId' => 'string', @@ -81,6 +80,8 @@ class Certificate implements ModelInterface, ArrayAccess 'certificateType' => '\Domainrobot\Model\CertificateType', 'signatureHashAlgorithm' => '\Domainrobot\Model\SignatureHashAlgorithmConstants', 'expire' => '\DateTime', + 'payable' => '\DateTime', + 'extension' => '\Domainrobot\Model\ExtendedValidationExtension', 'subjectAlternativeNames' => '\Domainrobot\Model\SubjectAlternativeName[]', 'histories' => '\Domainrobot\Model\CertificateHistory[]', 'certificationAuthority' => '\Domainrobot\Model\CaCertificate[]', @@ -94,7 +95,8 @@ class Certificate implements ModelInterface, ArrayAccess 'certificateTransparencyPrivacy' => '\Domainrobot\Model\CertificateTransparencyPrivacyConstants', 'domain' => 'string', 'hasCsr' => 'bool', - 'idn' => 'string' + 'idn' => 'string', + 'multiyear' => 'bool' ]; /** @@ -107,7 +109,6 @@ class Certificate implements ModelInterface, ArrayAccess 'updated' => 'date-time', 'owner' => null, 'updater' => null, - 'extension' => null, 'id' => 'int32', 'partnerOrderId' => null, 'orderId' => null, @@ -127,6 +128,8 @@ class Certificate implements ModelInterface, ArrayAccess 'certificateType' => null, 'signatureHashAlgorithm' => null, 'expire' => 'date-time', + 'payable' => 'date-time', + 'extension' => null, 'subjectAlternativeNames' => null, 'histories' => null, 'certificationAuthority' => null, @@ -140,7 +143,8 @@ class Certificate implements ModelInterface, ArrayAccess 'certificateTransparencyPrivacy' => null, 'domain' => null, 'hasCsr' => null, - 'idn' => null + 'idn' => null, + 'multiyear' => null ]; /** @@ -174,7 +178,6 @@ public static function swaggerFormats() 'updated' => 'updated', 'owner' => 'owner', 'updater' => 'updater', - 'extension' => 'extension', 'id' => 'id', 'partnerOrderId' => 'partnerOrderId', 'orderId' => 'orderId', @@ -194,6 +197,8 @@ public static function swaggerFormats() 'certificateType' => 'certificateType', 'signatureHashAlgorithm' => 'signatureHashAlgorithm', 'expire' => 'expire', + 'payable' => 'payable', + 'extension' => 'extension', 'subjectAlternativeNames' => 'subjectAlternativeNames', 'histories' => 'histories', 'certificationAuthority' => 'certificationAuthority', @@ -207,7 +212,8 @@ public static function swaggerFormats() 'certificateTransparencyPrivacy' => 'certificateTransparencyPrivacy', 'domain' => 'domain', 'hasCsr' => 'hasCsr', - 'idn' => 'idn' + 'idn' => 'idn', + 'multiyear' => 'multiyear' ]; /** @@ -220,7 +226,6 @@ public static function swaggerFormats() 'updated' => 'setUpdated', 'owner' => 'setOwner', 'updater' => 'setUpdater', - 'extension' => 'setExtension', 'id' => 'setId', 'partnerOrderId' => 'setPartnerOrderId', 'orderId' => 'setOrderId', @@ -240,6 +245,8 @@ public static function swaggerFormats() 'certificateType' => 'setCertificateType', 'signatureHashAlgorithm' => 'setSignatureHashAlgorithm', 'expire' => 'setExpire', + 'payable' => 'setPayable', + 'extension' => 'setExtension', 'subjectAlternativeNames' => 'setSubjectAlternativeNames', 'histories' => 'setHistories', 'certificationAuthority' => 'setCertificationAuthority', @@ -253,7 +260,8 @@ public static function swaggerFormats() 'certificateTransparencyPrivacy' => 'setCertificateTransparencyPrivacy', 'domain' => 'setDomain', 'hasCsr' => 'setHasCsr', - 'idn' => 'setIdn' + 'idn' => 'setIdn', + 'multiyear' => 'setMultiyear' ]; /** @@ -266,7 +274,6 @@ public static function swaggerFormats() 'updated' => 'getUpdated', 'owner' => 'getOwner', 'updater' => 'getUpdater', - 'extension' => 'getExtension', 'id' => 'getId', 'partnerOrderId' => 'getPartnerOrderId', 'orderId' => 'getOrderId', @@ -286,6 +293,8 @@ public static function swaggerFormats() 'certificateType' => 'getCertificateType', 'signatureHashAlgorithm' => 'getSignatureHashAlgorithm', 'expire' => 'getExpire', + 'payable' => 'getPayable', + 'extension' => 'getExtension', 'subjectAlternativeNames' => 'getSubjectAlternativeNames', 'histories' => 'getHistories', 'certificationAuthority' => 'getCertificationAuthority', @@ -299,7 +308,8 @@ public static function swaggerFormats() 'certificateTransparencyPrivacy' => 'getCertificateTransparencyPrivacy', 'domain' => 'getDomain', 'hasCsr' => 'getHasCsr', - 'idn' => 'getIdn' + 'idn' => 'getIdn', + 'multiyear' => 'getMultiyear' ]; /** @@ -366,7 +376,6 @@ public function __construct(array $data = null) $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; $this->container['owner'] = isset($data['owner']) ? $this->createData($data['owner'], 'owner') : null; $this->container['updater'] = isset($data['updater']) ? $this->createData($data['updater'], 'updater') : null; - $this->container['extension'] = isset($data['extension']) ? $this->createData($data['extension'], 'extension') : null; $this->container['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; $this->container['partnerOrderId'] = isset($data['partnerOrderId']) ? $this->createData($data['partnerOrderId'], 'partnerOrderId') : null; $this->container['orderId'] = isset($data['orderId']) ? $this->createData($data['orderId'], 'orderId') : null; @@ -386,6 +395,8 @@ public function __construct(array $data = null) $this->container['certificateType'] = isset($data['certificateType']) ? $this->createData($data['certificateType'], 'certificateType') : null; $this->container['signatureHashAlgorithm'] = isset($data['signatureHashAlgorithm']) ? $this->createData($data['signatureHashAlgorithm'], 'signatureHashAlgorithm') : null; $this->container['expire'] = isset($data['expire']) ? $this->createData($data['expire'], 'expire') : null; + $this->container['payable'] = isset($data['payable']) ? $this->createData($data['payable'], 'payable') : null; + $this->container['extension'] = isset($data['extension']) ? $this->createData($data['extension'], 'extension') : null; $this->container['subjectAlternativeNames'] = isset($data['subjectAlternativeNames']) ? $this->createData($data['subjectAlternativeNames'], 'subjectAlternativeNames') : null; $this->container['histories'] = isset($data['histories']) ? $this->createData($data['histories'], 'histories') : null; $this->container['certificationAuthority'] = isset($data['certificationAuthority']) ? $this->createData($data['certificationAuthority'], 'certificationAuthority') : null; @@ -400,6 +411,7 @@ public function __construct(array $data = null) $this->container['domain'] = isset($data['domain']) ? $this->createData($data['domain'], 'domain') : null; $this->container['hasCsr'] = isset($data['hasCsr']) ? $this->createData($data['hasCsr'], 'hasCsr') : null; $this->container['idn'] = isset($data['idn']) ? $this->createData($data['idn'], 'idn') : null; + $this->container['multiyear'] = isset($data['multiyear']) ? $this->createData($data['multiyear'], 'multiyear') : null; } /** @@ -590,30 +602,6 @@ public function setUpdater($updater) return $this; } - /** - * Gets extension - * - * @return \Domainrobot\Model\ExtendedValidationExtension - */ - public function getExtension() - { - return $this->container['extension']; - } - - /** - * Sets extension - * - * @param \Domainrobot\Model\ExtendedValidationExtension $extension The certificate extensions for comodo. - * - * @return $this - */ - public function setExtension($extension) - { - $this->container['extension'] = $extension; - - return $this; - } - /** * Gets id * @@ -1059,7 +1047,7 @@ public function getExpire() /** * Sets expire * - * @param \DateTime $expire The date on which the certificate expires + * @param \DateTime $expire The notAfter date of the certificate * * @return $this */ @@ -1070,6 +1058,54 @@ public function setExpire($expire) return $this; } + /** + * Gets payable + * + * @return \DateTime + */ + public function getPayable() + { + return $this->container['payable']; + } + + /** + * Sets payable + * + * @param \DateTime $payable The payable date for the certificate. Indicates when a runtime renewal must take place. + * + * @return $this + */ + public function setPayable($payable) + { + $this->container['payable'] = $payable; + + return $this; + } + + /** + * Gets extension + * + * @return \Domainrobot\Model\ExtendedValidationExtension + */ + public function getExtension() + { + return $this->container['extension']; + } + + /** + * Sets extension + * + * @param \Domainrobot\Model\ExtendedValidationExtension $extension The certificate extensions for comodo. + * + * @return $this + */ + public function setExtension($extension) + { + $this->container['extension'] = $extension; + + return $this; + } + /** * Gets subjectAlternativeNames * @@ -1410,6 +1446,30 @@ public function setIdn($idn) return $this; } + + /** + * Gets multiyear + * + * @return bool + */ + public function getMultiyear() + { + return $this->container['multiyear']; + } + + /** + * Sets multiyear + * + * @param bool $multiyear Defines whether the certificate is a multiyear or not + * + * @return $this + */ + public function setMultiyear($multiyear) + { + $this->container['multiyear'] = $multiyear; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CertificateInstallCheckData.php b/src/Model/CertificateInstallCheckData.php new file mode 100644 index 00000000..1a3f8afc --- /dev/null +++ b/src/Model/CertificateInstallCheckData.php @@ -0,0 +1,824 @@ + 'string', + 'secured' => 'bool', + 'redirect' => 'bool', + 'redirectMatch' => 'bool', + 'caa' => 'bool', + 'multipleCaa' => 'bool', + 'selfSigned' => 'bool', + 'chainOk' => 'bool', + 'inventory' => 'bool', + 'certificate' => '\Domainrobot\Model\Certificate', + 'tls' => '\Domainrobot\Model\TlsData[]', + 'certificateData' => '\Domainrobot\Model\X509CertificateData', + 'redirectCertificateData' => '\Domainrobot\Model\X509CertificateData', + 'chain' => '\Domainrobot\Model\X509CertificateData[]', + 'notices' => '\Domainrobot\Model\CertificateInstallCheckNotice[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'ip' => null, + 'secured' => null, + 'redirect' => null, + 'redirectMatch' => null, + 'caa' => null, + 'multipleCaa' => null, + 'selfSigned' => null, + 'chainOk' => null, + 'inventory' => null, + 'certificate' => null, + 'tls' => null, + 'certificateData' => null, + 'redirectCertificateData' => null, + 'chain' => null, + 'notices' => 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 = [ + 'ip' => 'ip', + 'secured' => 'secured', + 'redirect' => 'redirect', + 'redirectMatch' => 'redirectMatch', + 'caa' => 'caa', + 'multipleCaa' => 'multipleCaa', + 'selfSigned' => 'selfSigned', + 'chainOk' => 'chainOk', + 'inventory' => 'inventory', + 'certificate' => 'certificate', + 'tls' => 'tls', + 'certificateData' => 'certificateData', + 'redirectCertificateData' => 'redirectCertificateData', + 'chain' => 'chain', + 'notices' => 'notices' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'ip' => 'setIp', + 'secured' => 'setSecured', + 'redirect' => 'setRedirect', + 'redirectMatch' => 'setRedirectMatch', + 'caa' => 'setCaa', + 'multipleCaa' => 'setMultipleCaa', + 'selfSigned' => 'setSelfSigned', + 'chainOk' => 'setChainOk', + 'inventory' => 'setInventory', + 'certificate' => 'setCertificate', + 'tls' => 'setTls', + 'certificateData' => 'setCertificateData', + 'redirectCertificateData' => 'setRedirectCertificateData', + 'chain' => 'setChain', + 'notices' => 'setNotices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'ip' => 'getIp', + 'secured' => 'getSecured', + 'redirect' => 'getRedirect', + 'redirectMatch' => 'getRedirectMatch', + 'caa' => 'getCaa', + 'multipleCaa' => 'getMultipleCaa', + 'selfSigned' => 'getSelfSigned', + 'chainOk' => 'getChainOk', + 'inventory' => 'getInventory', + 'certificate' => 'getCertificate', + 'tls' => 'getTls', + 'certificateData' => 'getCertificateData', + 'redirectCertificateData' => 'getRedirectCertificateData', + 'chain' => 'getChain', + 'notices' => 'getNotices' + ]; + + /** + * 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['ip'] = isset($data['ip']) ? $this->createData($data['ip'], 'ip') : null; + $this->container['secured'] = isset($data['secured']) ? $this->createData($data['secured'], 'secured') : null; + $this->container['redirect'] = isset($data['redirect']) ? $this->createData($data['redirect'], 'redirect') : null; + $this->container['redirectMatch'] = isset($data['redirectMatch']) ? $this->createData($data['redirectMatch'], 'redirectMatch') : null; + $this->container['caa'] = isset($data['caa']) ? $this->createData($data['caa'], 'caa') : null; + $this->container['multipleCaa'] = isset($data['multipleCaa']) ? $this->createData($data['multipleCaa'], 'multipleCaa') : null; + $this->container['selfSigned'] = isset($data['selfSigned']) ? $this->createData($data['selfSigned'], 'selfSigned') : null; + $this->container['chainOk'] = isset($data['chainOk']) ? $this->createData($data['chainOk'], 'chainOk') : null; + $this->container['inventory'] = isset($data['inventory']) ? $this->createData($data['inventory'], 'inventory') : null; + $this->container['certificate'] = isset($data['certificate']) ? $this->createData($data['certificate'], 'certificate') : null; + $this->container['tls'] = isset($data['tls']) ? $this->createData($data['tls'], 'tls') : null; + $this->container['certificateData'] = isset($data['certificateData']) ? $this->createData($data['certificateData'], 'certificateData') : null; + $this->container['redirectCertificateData'] = isset($data['redirectCertificateData']) ? $this->createData($data['redirectCertificateData'], 'redirectCertificateData') : null; + $this->container['chain'] = isset($data['chain']) ? $this->createData($data['chain'], 'chain') : null; + $this->container['notices'] = isset($data['notices']) ? $this->createData($data['notices'], 'notices') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ip + * + * @return string + */ + public function getIp() + { + return $this->container['ip']; + } + + /** + * Sets ip + * + * @param string $ip The ip that was checked + * + * @return $this + */ + public function setIp($ip) + { + $this->container['ip'] = $ip; + + return $this; + } + + /** + * Gets secured + * + * @return bool + */ + public function getSecured() + { + return $this->container['secured']; + } + + /** + * Sets secured + * + * @param bool $secured Defines wether the hostname name is secured by a certificate or not + * + * @return $this + */ + public function setSecured($secured) + { + $this->container['secured'] = $secured; + + return $this; + } + + /** + * Gets redirect + * + * @return bool + */ + public function getRedirect() + { + return $this->container['redirect']; + } + + /** + * Sets redirect + * + * @param bool $redirect Defines wether the server behind the hostname has a automated redirect to https + * + * @return $this + */ + public function setRedirect($redirect) + { + $this->container['redirect'] = $redirect; + + return $this; + } + + /** + * Gets redirectMatch + * + * @return bool + */ + public function getRedirectMatch() + { + return $this->container['redirectMatch']; + } + + /** + * Sets redirectMatch + * + * @param bool $redirectMatch Defines wether the certificate at the end of a redirect matches the certificate under https + * + * @return $this + */ + public function setRedirectMatch($redirectMatch) + { + $this->container['redirectMatch'] = $redirectMatch; + + return $this; + } + + /** + * Gets caa + * + * @return bool + */ + public function getCaa() + { + return $this->container['caa']; + } + + /** + * Sets caa + * + * @param bool $caa Describes whether the zone associated with the hostname contains a CAA record. + * + * @return $this + */ + public function setCaa($caa) + { + $this->container['caa'] = $caa; + + return $this; + } + + /** + * Gets multipleCaa + * + * @return bool + */ + public function getMultipleCaa() + { + return $this->container['multipleCaa']; + } + + /** + * Sets multipleCaa + * + * @param bool $multipleCaa Describes whether the zone associated with the hostname contains multiple CAA records. + * + * @return $this + */ + public function setMultipleCaa($multipleCaa) + { + $this->container['multipleCaa'] = $multipleCaa; + + return $this; + } + + /** + * Gets selfSigned + * + * @return bool + */ + public function getSelfSigned() + { + return $this->container['selfSigned']; + } + + /** + * Sets selfSigned + * + * @param bool $selfSigned Describes whether the hostname is secured by a self signed certificate. + * + * @return $this + */ + public function setSelfSigned($selfSigned) + { + $this->container['selfSigned'] = $selfSigned; + + return $this; + } + + /** + * Gets chainOk + * + * @return bool + */ + public function getChainOk() + { + return $this->container['chainOk']; + } + + /** + * Sets chainOk + * + * @param bool $chainOk Defines wether the certificate chain is installed in a correct way + * + * @return $this + */ + public function setChainOk($chainOk) + { + $this->container['chainOk'] = $chainOk; + + return $this; + } + + /** + * Gets inventory + * + * @return bool + */ + public function getInventory() + { + return $this->container['inventory']; + } + + /** + * Sets inventory + * + * @param bool $inventory Defines wether a certificate with the same serial number was found within the owned inventory + * + * @return $this + */ + public function setInventory($inventory) + { + $this->container['inventory'] = $inventory; + + return $this; + } + + /** + * Gets certificate + * + * @return \Domainrobot\Model\Certificate + */ + public function getCertificate() + { + return $this->container['certificate']; + } + + /** + * Sets certificate + * + * @param \Domainrobot\Model\Certificate $certificate The corresponding certificate from the portfolio + * + * @return $this + */ + public function setCertificate($certificate) + { + $this->container['certificate'] = $certificate; + + return $this; + } + + /** + * Gets tls + * + * @return \Domainrobot\Model\TlsData[] + */ + public function getTls() + { + return $this->container['tls']; + } + + /** + * Sets tls + * + * @param \Domainrobot\Model\TlsData[] $tls The supported tls version by server behind the hostname + * + * @return $this + */ + public function setTls($tls) + { + $this->container['tls'] = $tls; + + return $this; + } + + /** + * Gets certificateData + * + * @return \Domainrobot\Model\X509CertificateData + */ + public function getCertificateData() + { + return $this->container['certificateData']; + } + + /** + * Sets certificateData + * + * @param \Domainrobot\Model\X509CertificateData $certificateData Then data of the certificate installed on the server + * + * @return $this + */ + public function setCertificateData($certificateData) + { + $this->container['certificateData'] = $certificateData; + + return $this; + } + + /** + * Gets redirectCertificateData + * + * @return \Domainrobot\Model\X509CertificateData + */ + public function getRedirectCertificateData() + { + return $this->container['redirectCertificateData']; + } + + /** + * Sets redirectCertificateData + * + * @param \Domainrobot\Model\X509CertificateData $redirectCertificateData Then data of the redirect certificate installed on the server + * + * @return $this + */ + public function setRedirectCertificateData($redirectCertificateData) + { + $this->container['redirectCertificateData'] = $redirectCertificateData; + + return $this; + } + + /** + * Gets chain + * + * @return \Domainrobot\Model\X509CertificateData[] + */ + public function getChain() + { + return $this->container['chain']; + } + + /** + * Sets chain + * + * @param \Domainrobot\Model\X509CertificateData[] $chain Then certificate chain + * + * @return $this + */ + public function setChain($chain) + { + $this->container['chain'] = $chain; + + return $this; + } + + /** + * Gets notices + * + * @return \Domainrobot\Model\CertificateInstallCheckNotice[] + */ + public function getNotices() + { + return $this->container['notices']; + } + + /** + * Sets notices + * + * @param \Domainrobot\Model\CertificateInstallCheckNotice[] $notices Notices for the check + * + * @return $this + */ + public function setNotices($notices) + { + $this->container['notices'] = $notices; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CertificateInstallCheckNotice.php b/src/Model/CertificateInstallCheckNotice.php new file mode 100644 index 00000000..73f44aab --- /dev/null +++ b/src/Model/CertificateInstallCheckNotice.php @@ -0,0 +1,464 @@ + 'string', + 'label' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type' => null, + 'label' => 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 = [ + 'type' => 'type', + 'label' => 'label', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'label' => 'setLabel', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'label' => 'getLabel', + '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['type'] = isset($data['type']) ? $this->createData($data['type'], 'type') : null; + $this->container['label'] = isset($data['label']) ? $this->createData($data['label'], 'label') : null; + $this->container['value'] = isset($data['value']) ? $this->createData($data['value'], 'value') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of the notice + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets label + * + * @return string + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string $label The label of the notice + * + * @return $this + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value The value of the notice + * + * @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 + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CertificateInstallCheckRequest.php b/src/Model/CertificateInstallCheckRequest.php new file mode 100644 index 00000000..462ff6f0 --- /dev/null +++ b/src/Model/CertificateInstallCheckRequest.php @@ -0,0 +1,404 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'hostname' => 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 = [ + 'hostname' => 'hostname' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'hostname' => 'setHostname' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'hostname' => 'getHostname' + ]; + + /** + * 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['hostname'] = isset($data['hostname']) ? $this->createData($data['hostname'], 'hostname') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets hostname + * + * @return string + */ + public function getHostname() + { + return $this->container['hostname']; + } + + /** + * Sets hostname + * + * @param string $hostname The hostname to check + * + * @return $this + */ + public function setHostname($hostname) + { + $this->container['hostname'] = $hostname; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CertificateInstallCheckResult.php b/src/Model/CertificateInstallCheckResult.php new file mode 100644 index 00000000..e4b41d54 --- /dev/null +++ b/src/Model/CertificateInstallCheckResult.php @@ -0,0 +1,434 @@ + 'string', + 'data' => '\Domainrobot\Model\CertificateInstallCheckData[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'hostname' => null, + 'data' => 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 = [ + 'hostname' => 'hostname', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'hostname' => 'setHostname', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'hostname' => 'getHostname', + 'data' => 'getData' + ]; + + /** + * 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['hostname'] = isset($data['hostname']) ? $this->createData($data['hostname'], 'hostname') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets hostname + * + * @return string + */ + public function getHostname() + { + return $this->container['hostname']; + } + + /** + * Sets hostname + * + * @param string $hostname The hostname to check + * + * @return $this + */ + public function setHostname($hostname) + { + $this->container['hostname'] = $hostname; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\CertificateInstallCheckData[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\CertificateInstallCheckData[] $data The data for the check + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Comment.php b/src/Model/Comment.php new file mode 100644 index 00000000..0b3e6837 --- /dev/null +++ b/src/Model/Comment.php @@ -0,0 +1,554 @@ + '\DateTime', + 'updated' => '\DateTime', + 'id' => 'int', + 'customer' => '\Domainrobot\Model\GenericCustomer', + 'text' => 'string', + 'user' => '\Domainrobot\Model\BasicUser' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'id' => 'int32', + 'customer' => null, + 'text' => null, + 'user' => 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'id' => 'id', + 'customer' => 'customer', + 'text' => 'text', + 'user' => 'user' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'id' => 'setId', + 'customer' => 'setCustomer', + 'text' => 'setText', + 'user' => 'setUser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'id' => 'getId', + 'customer' => 'getCustomer', + 'text' => 'getText', + 'user' => 'getUser' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; + $this->container['customer'] = isset($data['customer']) ? $this->createData($data['customer'], 'customer') : null; + $this->container['text'] = isset($data['text']) ? $this->createData($data['text'], 'text') : null; + $this->container['user'] = isset($data['user']) ? $this->createData($data['user'], 'user') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The id. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets customer + * + * @return \Domainrobot\Model\GenericCustomer + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Domainrobot\Model\GenericCustomer $customer customer + * + * @return $this + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets user + * + * @return \Domainrobot\Model\BasicUser + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \Domainrobot\Model\BasicUser $user user + * + * @return $this + */ + public function setUser($user) + { + $this->container['user'] = $user; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 66011884..e24033da 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -49,7 +49,7 @@ class Contact implements ModelInterface, ArrayAccess * * @var string */ - protected static $swaggerModelName = 'Contact'; + protected static $swaggerModelName = 'contact'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,32 +59,25 @@ class Contact implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'created' => '\DateTime', 'updated' => '\DateTime', - 'id' => 'int', 'owner' => '\Domainrobot\Model\BasicUser', 'updater' => '\Domainrobot\Model\BasicUser', - 'alias' => 'string', - 'type' => '\Domainrobot\Model\ContactTypeConstants', - 'organization' => 'string', + 'id' => 'int', + 'customer' => '\Domainrobot\Model\GenericCustomer', + 'type' => '\Domainrobot\Model\ContactType', + 'firstName' => 'string', + 'lastName' => 'string', 'title' => 'string', + 'label' => 'string', + 'locale' => '\Domainrobot\Model\Locale', + 'gender' => '\Domainrobot\Model\GenderConstants', + 'postalCode' => 'string', 'city' => 'string', 'country' => 'string', 'state' => 'string', + 'phones' => '\Domainrobot\Model\Phone[]', + 'faxes' => '\Domainrobot\Model\Phone[]', 'email' => 'string', - 'protection' => '\Domainrobot\Model\ContactProtectionConstants', - 'sip' => 'string', - 'remarks' => 'string[]', - 'domainsafe' => 'bool', - 'confirmOwnerConsent' => 'bool', - 'comment' => 'string', - 'verification' => '\Domainrobot\Model\GenericStatusConstants', - 'fname' => 'string', - 'lname' => 'string', - 'address' => 'string[]', - 'pcode' => 'string', - 'phone' => 'string', - 'fax' => 'string', - 'nicRef' => '\Domainrobot\Model\ContactReference[]', - 'extensions' => '\Domainrobot\Model\ContactExtensions' + 'address' => 'string[]' ]; /** @@ -95,32 +88,25 @@ class Contact implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'created' => 'date-time', 'updated' => 'date-time', - 'id' => 'int32', 'owner' => null, 'updater' => null, - 'alias' => null, + 'id' => 'int32', + 'customer' => null, 'type' => null, - 'organization' => null, + 'firstName' => null, + 'lastName' => null, 'title' => null, + 'label' => null, + 'locale' => null, + 'gender' => null, + 'postalCode' => null, 'city' => null, 'country' => null, 'state' => null, + 'phones' => null, + 'faxes' => null, 'email' => null, - 'protection' => null, - 'sip' => null, - 'remarks' => null, - 'domainsafe' => null, - 'confirmOwnerConsent' => null, - 'comment' => null, - 'verification' => null, - 'fname' => null, - 'lname' => null, - 'address' => null, - 'pcode' => null, - 'phone' => null, - 'fax' => null, - 'nicRef' => null, - 'extensions' => null + 'address' => null ]; /** @@ -152,32 +138,25 @@ public static function swaggerFormats() protected static $attributeMap = [ 'created' => 'created', 'updated' => 'updated', - 'id' => 'id', 'owner' => 'owner', 'updater' => 'updater', - 'alias' => 'alias', + 'id' => 'id', + 'customer' => 'customer', 'type' => 'type', - 'organization' => 'organization', + 'firstName' => 'firstName', + 'lastName' => 'lastName', 'title' => 'title', + 'label' => 'label', + 'locale' => 'locale', + 'gender' => 'gender', + 'postalCode' => 'postalCode', 'city' => 'city', 'country' => 'country', 'state' => 'state', + 'phones' => 'phones', + 'faxes' => 'faxes', 'email' => 'email', - 'protection' => 'protection', - 'sip' => 'sip', - 'remarks' => 'remarks', - 'domainsafe' => 'domainsafe', - 'confirmOwnerConsent' => 'confirmOwnerConsent', - 'comment' => 'comment', - 'verification' => 'verification', - 'fname' => 'fname', - 'lname' => 'lname', - 'address' => 'address', - 'pcode' => 'pcode', - 'phone' => 'phone', - 'fax' => 'fax', - 'nicRef' => 'nicRef', - 'extensions' => 'extensions' + 'address' => 'address' ]; /** @@ -188,32 +167,25 @@ public static function swaggerFormats() protected static $setters = [ 'created' => 'setCreated', 'updated' => 'setUpdated', - 'id' => 'setId', 'owner' => 'setOwner', 'updater' => 'setUpdater', - 'alias' => 'setAlias', + 'id' => 'setId', + 'customer' => 'setCustomer', 'type' => 'setType', - 'organization' => 'setOrganization', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', 'title' => 'setTitle', + 'label' => 'setLabel', + 'locale' => 'setLocale', + 'gender' => 'setGender', + 'postalCode' => 'setPostalCode', 'city' => 'setCity', 'country' => 'setCountry', 'state' => 'setState', + 'phones' => 'setPhones', + 'faxes' => 'setFaxes', 'email' => 'setEmail', - 'protection' => 'setProtection', - 'sip' => 'setSip', - 'remarks' => 'setRemarks', - 'domainsafe' => 'setDomainsafe', - 'confirmOwnerConsent' => 'setConfirmOwnerConsent', - 'comment' => 'setComment', - 'verification' => 'setVerification', - 'fname' => 'setFname', - 'lname' => 'setLname', - 'address' => 'setAddress', - 'pcode' => 'setPcode', - 'phone' => 'setPhone', - 'fax' => 'setFax', - 'nicRef' => 'setNicRef', - 'extensions' => 'setExtensions' + 'address' => 'setAddress' ]; /** @@ -224,32 +196,25 @@ public static function swaggerFormats() protected static $getters = [ 'created' => 'getCreated', 'updated' => 'getUpdated', - 'id' => 'getId', 'owner' => 'getOwner', 'updater' => 'getUpdater', - 'alias' => 'getAlias', + 'id' => 'getId', + 'customer' => 'getCustomer', 'type' => 'getType', - 'organization' => 'getOrganization', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', 'title' => 'getTitle', + 'label' => 'getLabel', + 'locale' => 'getLocale', + 'gender' => 'getGender', + 'postalCode' => 'getPostalCode', 'city' => 'getCity', 'country' => 'getCountry', 'state' => 'getState', + 'phones' => 'getPhones', + 'faxes' => 'getFaxes', 'email' => 'getEmail', - 'protection' => 'getProtection', - 'sip' => 'getSip', - 'remarks' => 'getRemarks', - 'domainsafe' => 'getDomainsafe', - 'confirmOwnerConsent' => 'getConfirmOwnerConsent', - 'comment' => 'getComment', - 'verification' => 'getVerification', - 'fname' => 'getFname', - 'lname' => 'getLname', - 'address' => 'getAddress', - 'pcode' => 'getPcode', - 'phone' => 'getPhone', - 'fax' => 'getFax', - 'nicRef' => 'getNicRef', - 'extensions' => 'getExtensions' + 'address' => 'getAddress' ]; /** @@ -314,32 +279,25 @@ public function __construct(array $data = null) { $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; - $this->container['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; $this->container['owner'] = isset($data['owner']) ? $this->createData($data['owner'], 'owner') : null; $this->container['updater'] = isset($data['updater']) ? $this->createData($data['updater'], 'updater') : null; - $this->container['alias'] = isset($data['alias']) ? $this->createData($data['alias'], 'alias') : null; + $this->container['id'] = isset($data['id']) ? $this->createData($data['id'], 'id') : null; + $this->container['customer'] = isset($data['customer']) ? $this->createData($data['customer'], 'customer') : null; $this->container['type'] = isset($data['type']) ? $this->createData($data['type'], 'type') : null; - $this->container['organization'] = isset($data['organization']) ? $this->createData($data['organization'], 'organization') : null; + $this->container['firstName'] = isset($data['firstName']) ? $this->createData($data['firstName'], 'firstName') : null; + $this->container['lastName'] = isset($data['lastName']) ? $this->createData($data['lastName'], 'lastName') : null; $this->container['title'] = isset($data['title']) ? $this->createData($data['title'], 'title') : null; + $this->container['label'] = isset($data['label']) ? $this->createData($data['label'], 'label') : null; + $this->container['locale'] = isset($data['locale']) ? $this->createData($data['locale'], 'locale') : null; + $this->container['gender'] = isset($data['gender']) ? $this->createData($data['gender'], 'gender') : null; + $this->container['postalCode'] = isset($data['postalCode']) ? $this->createData($data['postalCode'], 'postalCode') : null; $this->container['city'] = isset($data['city']) ? $this->createData($data['city'], 'city') : null; $this->container['country'] = isset($data['country']) ? $this->createData($data['country'], 'country') : null; $this->container['state'] = isset($data['state']) ? $this->createData($data['state'], 'state') : null; + $this->container['phones'] = isset($data['phones']) ? $this->createData($data['phones'], 'phones') : null; + $this->container['faxes'] = isset($data['faxes']) ? $this->createData($data['faxes'], 'faxes') : null; $this->container['email'] = isset($data['email']) ? $this->createData($data['email'], 'email') : null; - $this->container['protection'] = isset($data['protection']) ? $this->createData($data['protection'], 'protection') : null; - $this->container['sip'] = isset($data['sip']) ? $this->createData($data['sip'], 'sip') : null; - $this->container['remarks'] = isset($data['remarks']) ? $this->createData($data['remarks'], 'remarks') : null; - $this->container['domainsafe'] = isset($data['domainsafe']) ? $this->createData($data['domainsafe'], 'domainsafe') : null; - $this->container['confirmOwnerConsent'] = isset($data['confirmOwnerConsent']) ? $this->createData($data['confirmOwnerConsent'], 'confirmOwnerConsent') : null; - $this->container['comment'] = isset($data['comment']) ? $this->createData($data['comment'], 'comment') : null; - $this->container['verification'] = isset($data['verification']) ? $this->createData($data['verification'], 'verification') : null; - $this->container['fname'] = isset($data['fname']) ? $this->createData($data['fname'], 'fname') : null; - $this->container['lname'] = isset($data['lname']) ? $this->createData($data['lname'], 'lname') : null; $this->container['address'] = isset($data['address']) ? $this->createData($data['address'], 'address') : null; - $this->container['pcode'] = isset($data['pcode']) ? $this->createData($data['pcode'], 'pcode') : null; - $this->container['phone'] = isset($data['phone']) ? $this->createData($data['phone'], 'phone') : null; - $this->container['fax'] = isset($data['fax']) ? $this->createData($data['fax'], 'fax') : null; - $this->container['nicRef'] = isset($data['nicRef']) ? $this->createData($data['nicRef'], 'nicRef') : null; - $this->container['extensions'] = isset($data['extensions']) ? $this->createData($data['extensions'], 'extensions') : null; } /** @@ -406,24 +364,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['customer'] === null) { + $invalidProperties[] = "'customer' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ($this->container['country'] === null) { - $invalidProperties[] = "'country' can't be null"; - } - if ($this->container['lname'] === null) { - $invalidProperties[] = "'lname' can't be null"; - } - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ($this->container['pcode'] === null) { - $invalidProperties[] = "'pcode' can't be null"; - } return $invalidProperties; } @@ -487,30 +433,6 @@ public function setUpdated($updated) return $this; } - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id The unique identifier of the contact - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** * Gets owner * @@ -548,7 +470,7 @@ public function getUpdater() /** * Sets updater * - * @param \Domainrobot\Model\BasicUser $updater The updating user of the object. + * @param \Domainrobot\Model\BasicUser $updater The updater of the object. * * @return $this */ @@ -560,409 +482,385 @@ public function setUpdater($updater) } /** - * Gets alias + * Gets id * - * @return string + * @return int */ - public function getAlias() + public function getId() { - return $this->container['alias']; + return $this->container['id']; } /** - * Sets alias + * Sets id * - * @param string $alias The unique alias of the contact + * @param int $id The id. * * @return $this */ - public function setAlias($alias) + public function setId($id) { - $this->container['alias'] = $alias; + $this->container['id'] = $id; return $this; } /** - * Gets type + * Gets customer * - * @return \Domainrobot\Model\ContactTypeConstants + * @return \Domainrobot\Model\GenericCustomer */ - public function getType() + public function getCustomer() { - return $this->container['type']; + return $this->container['customer']; } /** - * Sets type + * Sets customer * - * @param \Domainrobot\Model\ContactTypeConstants $type The type of the contact + * @param \Domainrobot\Model\GenericCustomer $customer customer * * @return $this */ - public function setType($type) + public function setCustomer($customer) { - $this->container['type'] = $type; + $this->container['customer'] = $customer; return $this; } /** - * Gets organization + * Gets type * - * @return string + * @return \Domainrobot\Model\ContactType */ - public function getOrganization() + public function getType() { - return $this->container['organization']; + return $this->container['type']; } /** - * Sets organization + * Sets type * - * @param string $organization The name of the organization + * @param \Domainrobot\Model\ContactType $type type * * @return $this */ - public function setOrganization($organization) + public function setType($type) { - $this->container['organization'] = $organization; + $this->container['type'] = $type; return $this; } /** - * Gets title + * Gets firstName * * @return string */ - public function getTitle() + public function getFirstName() { - return $this->container['title']; + return $this->container['firstName']; } /** - * Sets title + * Sets firstName * - * @param string $title The title of the contact + * @param string $firstName firstName * * @return $this */ - public function setTitle($title) + public function setFirstName($firstName) { - $this->container['title'] = $title; + $this->container['firstName'] = $firstName; return $this; } /** - * Gets city + * Gets lastName * * @return string */ - public function getCity() + public function getLastName() { - return $this->container['city']; + return $this->container['lastName']; } /** - * Sets city + * Sets lastName * - * @param string $city The city of the contact + * @param string $lastName lastName * * @return $this */ - public function setCity($city) + public function setLastName($lastName) { - $this->container['city'] = $city; + $this->container['lastName'] = $lastName; return $this; } /** - * Gets country + * Gets title * * @return string */ - public function getCountry() + public function getTitle() { - return $this->container['country']; + return $this->container['title']; } /** - * Sets country + * Sets title * - * @param string $country The country of the contact + * @param string $title title * * @return $this */ - public function setCountry($country) + public function setTitle($title) { - $this->container['country'] = $country; + $this->container['title'] = $title; return $this; } /** - * Gets state + * Gets label * * @return string */ - public function getState() + public function getLabel() { - return $this->container['state']; + return $this->container['label']; } /** - * Sets state + * Sets label * - * @param string $state The local country state of the contact + * @param string $label label * * @return $this */ - public function setState($state) + public function setLabel($label) { - $this->container['state'] = $state; + $this->container['label'] = $label; return $this; } /** - * Gets email + * Gets locale * - * @return string + * @return \Domainrobot\Model\Locale */ - public function getEmail() + public function getLocale() { - return $this->container['email']; + return $this->container['locale']; } /** - * Sets email + * Sets locale * - * @param string $email The email of the contact + * @param \Domainrobot\Model\Locale $locale locale * * @return $this */ - public function setEmail($email) + public function setLocale($locale) { - $this->container['email'] = $email; + $this->container['locale'] = $locale; return $this; } /** - * Gets protection + * Gets gender * - * @return \Domainrobot\Model\ContactProtectionConstants + * @return \Domainrobot\Model\GenderConstants */ - public function getProtection() + public function getGender() { - return $this->container['protection']; + return $this->container['gender']; } /** - * Sets protection + * Sets gender * - * @param \Domainrobot\Model\ContactProtectionConstants $protection The protection of the contact + * @param \Domainrobot\Model\GenderConstants $gender gender * * @return $this */ - public function setProtection($protection) + public function setGender($gender) { - $this->container['protection'] = $protection; + $this->container['gender'] = $gender; return $this; } /** - * Gets sip + * Gets postalCode * * @return string */ - public function getSip() - { - return $this->container['sip']; - } - - /** - * Sets sip - * - * @param string $sip The sip of the contact - * - * @return $this - */ - public function setSip($sip) - { - $this->container['sip'] = $sip; - - return $this; - } - - /** - * Gets remarks - * - * @return string[] - */ - public function getRemarks() + public function getPostalCode() { - return $this->container['remarks']; + return $this->container['postalCode']; } /** - * Sets remarks + * Sets postalCode * - * @param string[] $remarks The remarks of the contact + * @param string $postalCode postalCode * * @return $this */ - public function setRemarks($remarks) + public function setPostalCode($postalCode) { - $this->container['remarks'] = $remarks; + $this->container['postalCode'] = $postalCode; return $this; } /** - * Gets domainsafe + * Gets city * - * @return bool + * @return string */ - public function getDomainsafe() + public function getCity() { - return $this->container['domainsafe']; + return $this->container['city']; } /** - * Sets domainsafe + * Sets city * - * @param bool $domainsafe The nic references of the contact + * @param string $city city * * @return $this */ - public function setDomainsafe($domainsafe) + public function setCity($city) { - $this->container['domainsafe'] = $domainsafe; + $this->container['city'] = $city; return $this; } /** - * Gets confirmOwnerConsent + * Gets country * - * @return bool + * @return string */ - public function getConfirmOwnerConsent() + public function getCountry() { - return $this->container['confirmOwnerConsent']; + return $this->container['country']; } /** - * Sets confirmOwnerConsent + * Sets country * - * @param bool $confirmOwnerConsent ??? + * @param string $country country * * @return $this */ - public function setConfirmOwnerConsent($confirmOwnerConsent) + public function setCountry($country) { - $this->container['confirmOwnerConsent'] = $confirmOwnerConsent; + $this->container['country'] = $country; return $this; } /** - * Gets comment + * Gets state * * @return string */ - public function getComment() + public function getState() { - return $this->container['comment']; + return $this->container['state']; } /** - * Sets comment + * Sets state * - * @param string $comment The comment for the contact + * @param string $state state * * @return $this */ - public function setComment($comment) + public function setState($state) { - $this->container['comment'] = $comment; + $this->container['state'] = $state; return $this; } /** - * Gets verification + * Gets phones * - * @return \Domainrobot\Model\GenericStatusConstants + * @return \Domainrobot\Model\Phone[] */ - public function getVerification() + public function getPhones() { - return $this->container['verification']; + return $this->container['phones']; } /** - * Sets verification + * Sets phones * - * @param \Domainrobot\Model\GenericStatusConstants $verification The verification status of the contact + * @param \Domainrobot\Model\Phone[] $phones phones * * @return $this */ - public function setVerification($verification) + public function setPhones($phones) { - $this->container['verification'] = $verification; + $this->container['phones'] = $phones; return $this; } /** - * Gets fname + * Gets faxes * - * @return string + * @return \Domainrobot\Model\Phone[] */ - public function getFname() + public function getFaxes() { - return $this->container['fname']; + return $this->container['faxes']; } /** - * Sets fname + * Sets faxes * - * @param string $fname The first name of the contact + * @param \Domainrobot\Model\Phone[] $faxes faxes * * @return $this */ - public function setFname($fname) + public function setFaxes($faxes) { - $this->container['fname'] = $fname; + $this->container['faxes'] = $faxes; return $this; } /** - * Gets lname + * Gets email * * @return string */ - public function getLname() + public function getEmail() { - return $this->container['lname']; + return $this->container['email']; } /** - * Sets lname + * Sets email * - * @param string $lname The last name of the contact + * @param string $email email * * @return $this */ - public function setLname($lname) + public function setEmail($email) { - $this->container['lname'] = $lname; + $this->container['email'] = $email; return $this; } @@ -980,7 +878,7 @@ public function getAddress() /** * Sets address * - * @param string[] $address The address of the contact. + * @param string[] $address address * * @return $this */ @@ -990,126 +888,6 @@ public function setAddress($address) return $this; } - - /** - * Gets pcode - * - * @return string - */ - public function getPcode() - { - return $this->container['pcode']; - } - - /** - * Sets pcode - * - * @param string $pcode The pcode of the contact - * - * @return $this - */ - public function setPcode($pcode) - { - $this->container['pcode'] = $pcode; - - return $this; - } - - /** - * Gets phone - * - * @return string - */ - public function getPhone() - { - return $this->container['phone']; - } - - /** - * Sets phone - * - * @param string $phone The phone number of the contact - * - * @return $this - */ - public function setPhone($phone) - { - $this->container['phone'] = $phone; - - return $this; - } - - /** - * Gets fax - * - * @return string - */ - public function getFax() - { - return $this->container['fax']; - } - - /** - * Sets fax - * - * @param string $fax The fax number of the contact - * - * @return $this - */ - public function setFax($fax) - { - $this->container['fax'] = $fax; - - return $this; - } - - /** - * Gets nicRef - * - * @return \Domainrobot\Model\ContactReference[] - */ - public function getNicRef() - { - return $this->container['nicRef']; - } - - /** - * Sets nicRef - * - * @param \Domainrobot\Model\ContactReference[] $nicRef The nic references of the contact - * - * @return $this - */ - public function setNicRef($nicRef) - { - $this->container['nicRef'] = $nicRef; - - return $this; - } - - /** - * Gets extensions - * - * @return \Domainrobot\Model\ContactExtensions - */ - public function getExtensions() - { - return $this->container['extensions']; - } - - /** - * Sets extensions - * - * @param \Domainrobot\Model\ContactExtensions $extensions The contact extensions. - * - * @return $this - */ - public function setExtensions($extensions) - { - $this->container['extensions'] = $extensions; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContactBirthExtensions.php b/src/Model/ContactBirthExtensions.php index 9aeeb89a..eb716ae9 100644 --- a/src/Model/ContactBirthExtensions.php +++ b/src/Model/ContactBirthExtensions.php @@ -70,7 +70,7 @@ class ContactBirthExtensions implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'country' => null, - 'day' => 'date-time', + 'day' => 'date', 'postalCode' => null, 'place' => null ]; diff --git a/src/Model/ContactExtensions.php b/src/Model/ContactExtensions.php index 8ace7bd6..9c616101 100644 --- a/src/Model/ContactExtensions.php +++ b/src/Model/ContactExtensions.php @@ -74,10 +74,10 @@ class ContactExtensions implements ModelInterface, ArrayAccess 'barcelona' => '\Domainrobot\Model\ContactBarcelonaExtensions', 'general' => '\Domainrobot\Model\ContactGeneralExtensions', 'nz' => '\Domainrobot\Model\ContactNzExtensions', - 'scot' => '\Domainrobot\Model\ContactScotExtensions', 'sport' => '\Domainrobot\Model\ContactSportExtensions', 'luxe' => '\Domainrobot\Model\ContactLuxeExtensions', 'madrid' => '\Domainrobot\Model\ContactMadridExtensions', + 'scot' => '\Domainrobot\Model\ContactScotExtensions', 'ie' => '\Domainrobot\Model\ContactIeExtensions' ]; @@ -104,10 +104,10 @@ class ContactExtensions implements ModelInterface, ArrayAccess 'barcelona' => null, 'general' => null, 'nz' => null, - 'scot' => null, 'sport' => null, 'luxe' => null, 'madrid' => null, + 'scot' => null, 'ie' => null ]; @@ -155,10 +155,10 @@ public static function swaggerFormats() 'barcelona' => 'barcelona', 'general' => 'general', 'nz' => 'nz', - 'scot' => 'scot', 'sport' => 'sport', 'luxe' => 'luxe', 'madrid' => 'madrid', + 'scot' => 'scot', 'ie' => 'ie' ]; @@ -185,10 +185,10 @@ public static function swaggerFormats() 'barcelona' => 'setBarcelona', 'general' => 'setGeneral', 'nz' => 'setNz', - 'scot' => 'setScot', 'sport' => 'setSport', 'luxe' => 'setLuxe', 'madrid' => 'setMadrid', + 'scot' => 'setScot', 'ie' => 'setIe' ]; @@ -215,10 +215,10 @@ public static function swaggerFormats() 'barcelona' => 'getBarcelona', 'general' => 'getGeneral', 'nz' => 'getNz', - 'scot' => 'getScot', 'sport' => 'getSport', 'luxe' => 'getLuxe', 'madrid' => 'getMadrid', + 'scot' => 'getScot', 'ie' => 'getIe' ]; @@ -299,10 +299,10 @@ public function __construct(array $data = null) $this->container['barcelona'] = isset($data['barcelona']) ? $this->createData($data['barcelona'], 'barcelona') : null; $this->container['general'] = isset($data['general']) ? $this->createData($data['general'], 'general') : null; $this->container['nz'] = isset($data['nz']) ? $this->createData($data['nz'], 'nz') : null; - $this->container['scot'] = isset($data['scot']) ? $this->createData($data['scot'], 'scot') : null; $this->container['sport'] = isset($data['sport']) ? $this->createData($data['sport'], 'sport') : null; $this->container['luxe'] = isset($data['luxe']) ? $this->createData($data['luxe'], 'luxe') : null; $this->container['madrid'] = isset($data['madrid']) ? $this->createData($data['madrid'], 'madrid') : null; + $this->container['scot'] = isset($data['scot']) ? $this->createData($data['scot'], 'scot') : null; $this->container['ie'] = isset($data['ie']) ? $this->createData($data['ie'], 'ie') : null; } @@ -793,30 +793,6 @@ public function setNz($nz) return $this; } - /** - * Gets scot - * - * @return \Domainrobot\Model\ContactScotExtensions - */ - public function getScot() - { - return $this->container['scot']; - } - - /** - * Sets scot - * - * @param \Domainrobot\Model\ContactScotExtensions $scot The .scot contact extensions. - * - * @return $this - */ - public function setScot($scot) - { - $this->container['scot'] = $scot; - - return $this; - } - /** * Gets sport * @@ -889,6 +865,30 @@ public function setMadrid($madrid) return $this; } + /** + * Gets scot + * + * @return \Domainrobot\Model\ContactScotExtensions + */ + public function getScot() + { + return $this->container['scot']; + } + + /** + * Sets scot + * + * @param \Domainrobot\Model\ContactScotExtensions $scot The .scot contact extensions. + * + * @return $this + */ + public function setScot($scot) + { + $this->container['scot'] = $scot; + + return $this; + } + /** * Gets ie * diff --git a/src/Model/ContactIdentificationExtensions.php b/src/Model/ContactIdentificationExtensions.php index 9727aac6..9e35c6b8 100644 --- a/src/Model/ContactIdentificationExtensions.php +++ b/src/Model/ContactIdentificationExtensions.php @@ -71,8 +71,8 @@ class ContactIdentificationExtensions implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'number' => null, 'authority' => null, - 'dateOfIssue' => 'date-time', - 'validTill' => 'date-time' + 'dateOfIssue' => 'date', + 'validTill' => 'date' ]; /** diff --git a/src/Model/ContactIeExtensions.php b/src/Model/ContactIeExtensions.php index 41900711..61ec0be1 100644 --- a/src/Model/ContactIeExtensions.php +++ b/src/Model/ContactIeExtensions.php @@ -58,7 +58,8 @@ class ContactIeExtensions implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'contactType' => '\Domainrobot\Model\IeContactTypeConstants', - 'croNumber' => 'int' + 'croNumber' => 'string', + 'supportingNumber' => 'string' ]; /** @@ -68,7 +69,8 @@ class ContactIeExtensions implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'contactType' => null, - 'croNumber' => 'int32' + 'croNumber' => null, + 'supportingNumber' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'contactType' => 'contactType', - 'croNumber' => 'croNumber' + 'croNumber' => 'croNumber', + 'supportingNumber' => 'supportingNumber' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'contactType' => 'setContactType', - 'croNumber' => 'setCroNumber' + 'croNumber' => 'setCroNumber', + 'supportingNumber' => 'setSupportingNumber' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'contactType' => 'getContactType', - 'croNumber' => 'getCroNumber' + 'croNumber' => 'getCroNumber', + 'supportingNumber' => 'getSupportingNumber' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['contactType'] = isset($data['contactType']) ? $this->createData($data['contactType'], 'contactType') : null; $this->container['croNumber'] = isset($data['croNumber']) ? $this->createData($data['croNumber'], 'croNumber') : null; + $this->container['supportingNumber'] = isset($data['supportingNumber']) ? $this->createData($data['supportingNumber'], 'supportingNumber') : null; } /** @@ -278,7 +284,7 @@ public function getContactType() /** * Sets contactType * - * @param \Domainrobot\Model\IeContactTypeConstants $contactType The contact’s Connection to Ireland (CTI) category that is used to indicate how the Registrant meets specific presence requirements. + * @param \Domainrobot\Model\IeContactTypeConstants $contactType The contact’s Connection to Ireland (CTI) category that is used to indicate how the Registrant meets specific presence requirements. CTI category values include Charity, Company, and Other. CTI category information is mandatory if you intend to use the contact as a Registrant for a domain name. This property is only supported if you have specified that you are using the Fury 2.0 extension during your EPP login. * * @return $this */ @@ -292,7 +298,7 @@ public function setContactType($contactType) /** * Gets croNumber * - * @return int + * @return string */ public function getCroNumber() { @@ -302,7 +308,7 @@ public function getCroNumber() /** * Sets croNumber * - * @param int $croNumber The Companies Registration Office (CRO) identifier that can be used to ensure the company is in a valid state to be registering domains. + * @param string $croNumber The Companies Registration Office (CRO) identifier that can be used to ensure the company is in a valid state to be registering domains. * * @return $this */ @@ -312,6 +318,30 @@ public function setCroNumber($croNumber) return $this; } + + /** + * Gets supportingNumber + * + * @return string + */ + public function getSupportingNumber() + { + return $this->container['supportingNumber']; + } + + /** + * Sets supportingNumber + * + * @param string $supportingNumber The identifier for a charity or a supporting number (RBN or VAT, for example) for other contact types. + * + * @return $this + */ + public function setSupportingNumber($supportingNumber) + { + $this->container['supportingNumber'] = $supportingNumber; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/ContactSwissExtensions.php b/src/Model/ContactSwissExtensions.php index 8b4da52e..39fce231 100644 --- a/src/Model/ContactSwissExtensions.php +++ b/src/Model/ContactSwissExtensions.php @@ -58,7 +58,7 @@ class ContactSwissExtensions implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'enterpriseId' => 'string', - 'intededUse' => 'string' + 'intendedUse' => 'string' ]; /** @@ -68,7 +68,7 @@ class ContactSwissExtensions implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'enterpriseId' => null, - 'intededUse' => null + 'intendedUse' => null ]; /** @@ -99,7 +99,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'enterpriseId' => 'enterpriseId', - 'intededUse' => 'intededUse' + 'intendedUse' => 'intendedUse' ]; /** @@ -109,7 +109,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'enterpriseId' => 'setEnterpriseId', - 'intededUse' => 'setIntededUse' + 'intendedUse' => 'setIntendedUse' ]; /** @@ -119,7 +119,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'enterpriseId' => 'getEnterpriseId', - 'intededUse' => 'getIntededUse' + 'intendedUse' => 'getIntendedUse' ]; /** @@ -183,7 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['enterpriseId'] = isset($data['enterpriseId']) ? $this->createData($data['enterpriseId'], 'enterpriseId') : null; - $this->container['intededUse'] = isset($data['intededUse']) ? $this->createData($data['intededUse'], 'intededUse') : null; + $this->container['intendedUse'] = isset($data['intendedUse']) ? $this->createData($data['intendedUse'], 'intendedUse') : null; } /** @@ -290,25 +290,25 @@ public function setEnterpriseId($enterpriseId) } /** - * Gets intededUse + * Gets intendedUse * * @return string */ - public function getIntededUse() + public function getIntendedUse() { - return $this->container['intededUse']; + return $this->container['intendedUse']; } /** - * Sets intededUse + * Sets intendedUse * - * @param string $intededUse The statement of intended use for the domain name. + * @param string $intendedUse The statement of intended use for the domain name. * * @return $this */ - public function setIntededUse($intededUse) + public function setIntendedUse($intendedUse) { - $this->container['intededUse'] = $intededUse; + $this->container['intendedUse'] = $intendedUse; return $this; } diff --git a/src/Model/ContactTrademarkExtensions.php b/src/Model/ContactTrademarkExtensions.php index 431ae720..0a0678ce 100644 --- a/src/Model/ContactTrademarkExtensions.php +++ b/src/Model/ContactTrademarkExtensions.php @@ -74,8 +74,8 @@ class ContactTrademarkExtensions implements ModelInterface, ArrayAccess 'name' => null, 'number' => null, 'country' => null, - 'regdate' => 'date-time', - 'appdate' => 'date-time', + 'regdate' => 'date', + 'appdate' => 'date', 'office' => null ]; diff --git a/src/Model/ContactType.php b/src/Model/ContactType.php new file mode 100644 index 00000000..b7d95ee5 --- /dev/null +++ b/src/Model/ContactType.php @@ -0,0 +1,70 @@ + '\DateTime', 'updated' => '\DateTime', 'master' => 'bool', + 'csr' => 'string', + 'serverCert' => 'string', + 'caCert' => 'string', 'status' => '\Domainrobot\Model\JobStatusConstants', + 'subStatus' => 'string', + 'zone' => '\Domainrobot\Model\ContextHostZone', + 'certificate' => '\Domainrobot\Model\BasicCertificate', 'name' => 'string' ]; @@ -73,7 +79,13 @@ class ContextHost implements ModelInterface, ArrayAccess 'created' => 'date-time', 'updated' => 'date-time', 'master' => null, + 'csr' => null, + 'serverCert' => null, + 'caCert' => null, 'status' => null, + 'subStatus' => null, + 'zone' => null, + 'certificate' => null, 'name' => null ]; @@ -107,7 +119,13 @@ public static function swaggerFormats() 'created' => 'created', 'updated' => 'updated', 'master' => 'master', + 'csr' => 'csr', + 'serverCert' => 'serverCert', + 'caCert' => 'caCert', 'status' => 'status', + 'subStatus' => 'subStatus', + 'zone' => 'zone', + 'certificate' => 'certificate', 'name' => 'name' ]; @@ -120,7 +138,13 @@ public static function swaggerFormats() 'created' => 'setCreated', 'updated' => 'setUpdated', 'master' => 'setMaster', + 'csr' => 'setCsr', + 'serverCert' => 'setServerCert', + 'caCert' => 'setCaCert', 'status' => 'setStatus', + 'subStatus' => 'setSubStatus', + 'zone' => 'setZone', + 'certificate' => 'setCertificate', 'name' => 'setName' ]; @@ -133,7 +157,13 @@ public static function swaggerFormats() 'created' => 'getCreated', 'updated' => 'getUpdated', 'master' => 'getMaster', + 'csr' => 'getCsr', + 'serverCert' => 'getServerCert', + 'caCert' => 'getCaCert', 'status' => 'getStatus', + 'subStatus' => 'getSubStatus', + 'zone' => 'getZone', + 'certificate' => 'getCertificate', 'name' => 'getName' ]; @@ -200,7 +230,13 @@ public function __construct(array $data = null) $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; $this->container['master'] = isset($data['master']) ? $this->createData($data['master'], 'master') : null; + $this->container['csr'] = isset($data['csr']) ? $this->createData($data['csr'], 'csr') : null; + $this->container['serverCert'] = isset($data['serverCert']) ? $this->createData($data['serverCert'], 'serverCert') : null; + $this->container['caCert'] = isset($data['caCert']) ? $this->createData($data['caCert'], 'caCert') : null; $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['subStatus'] = isset($data['subStatus']) ? $this->createData($data['subStatus'], 'subStatus') : null; + $this->container['zone'] = isset($data['zone']) ? $this->createData($data['zone'], 'zone') : null; + $this->container['certificate'] = isset($data['certificate']) ? $this->createData($data['certificate'], 'certificate') : null; $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; } @@ -355,6 +391,78 @@ public function setMaster($master) return $this; } + /** + * Gets csr + * + * @return string + */ + public function getCsr() + { + return $this->container['csr']; + } + + /** + * Sets csr + * + * @param string $csr The csr of the certificate + * + * @return $this + */ + public function setCsr($csr) + { + $this->container['csr'] = $csr; + + return $this; + } + + /** + * Gets serverCert + * + * @return string + */ + public function getServerCert() + { + return $this->container['serverCert']; + } + + /** + * Sets serverCert + * + * @param string $serverCert The server certificate. + * + * @return $this + */ + public function setServerCert($serverCert) + { + $this->container['serverCert'] = $serverCert; + + return $this; + } + + /** + * Gets caCert + * + * @return string + */ + public function getCaCert() + { + return $this->container['caCert']; + } + + /** + * Sets caCert + * + * @param string $caCert The intermediates of the certificate + * + * @return $this + */ + public function setCaCert($caCert) + { + $this->container['caCert'] = $caCert; + + return $this; + } + /** * Gets status * @@ -379,6 +487,78 @@ public function setStatus($status) return $this; } + /** + * Gets subStatus + * + * @return string + */ + public function getSubStatus() + { + return $this->container['subStatus']; + } + + /** + * Sets subStatus + * + * @param string $subStatus The job substatus + * + * @return $this + */ + public function setSubStatus($subStatus) + { + $this->container['subStatus'] = $subStatus; + + return $this; + } + + /** + * Gets zone + * + * @return \Domainrobot\Model\ContextHostZone + */ + public function getZone() + { + return $this->container['zone']; + } + + /** + * Sets zone + * + * @param \Domainrobot\Model\ContextHostZone $zone The zones of the host + * + * @return $this + */ + public function setZone($zone) + { + $this->container['zone'] = $zone; + + return $this; + } + + /** + * Gets certificate + * + * @return \Domainrobot\Model\BasicCertificate + */ + public function getCertificate() + { + return $this->container['certificate']; + } + + /** + * Sets certificate + * + * @param \Domainrobot\Model\BasicCertificate $certificate The zones of the host + * + * @return $this + */ + public function setCertificate($certificate) + { + $this->container['certificate'] = $certificate; + + return $this; + } + /** * Gets name * diff --git a/src/Model/ContextHostZone.php b/src/Model/ContextHostZone.php new file mode 100644 index 00000000..2e02c007 --- /dev/null +++ b/src/Model/ContextHostZone.php @@ -0,0 +1,464 @@ + 'string', + 'sub' => 'string', + 'zones' => '\Domainrobot\Model\HostSubZone[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'origin' => null, + 'sub' => null, + 'zones' => 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 = [ + 'origin' => 'origin', + 'sub' => 'sub', + 'zones' => 'zones' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'origin' => 'setOrigin', + 'sub' => 'setSub', + 'zones' => 'setZones' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'origin' => 'getOrigin', + 'sub' => 'getSub', + 'zones' => 'getZones' + ]; + + /** + * 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['origin'] = isset($data['origin']) ? $this->createData($data['origin'], 'origin') : null; + $this->container['sub'] = isset($data['sub']) ? $this->createData($data['sub'], 'sub') : null; + $this->container['zones'] = isset($data['zones']) ? $this->createData($data['zones'], 'zones') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets origin + * + * @return string + */ + public function getOrigin() + { + return $this->container['origin']; + } + + /** + * Sets origin + * + * @param string $origin The zone origin + * + * @return $this + */ + public function setOrigin($origin) + { + $this->container['origin'] = $origin; + + return $this; + } + + /** + * Gets sub + * + * @return string + */ + public function getSub() + { + return $this->container['sub']; + } + + /** + * Sets sub + * + * @param string $sub The name of the sub zone + * + * @return $this + */ + public function setSub($sub) + { + $this->container['sub'] = $sub; + + return $this; + } + + /** + * Gets zones + * + * @return \Domainrobot\Model\HostSubZone[] + */ + public function getZones() + { + return $this->container['zones']; + } + + /** + * Sets zones + * + * @param \Domainrobot\Model\HostSubZone[] $zones The found zone entries + * + * @return $this + */ + public function setZones($zones) + { + $this->container['zones'] = $zones; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Customer.php b/src/Model/Customer.php index 6e205438..cd759fb8 100644 --- a/src/Model/Customer.php +++ b/src/Model/Customer.php @@ -61,6 +61,7 @@ class Customer implements ModelInterface, ArrayAccess 'client' => 'string', 'group' => 'int', 'name' => 'string', + 'type' => '\Domainrobot\Model\CustomerType', 'organization' => 'string', 'vatNumber' => 'string', 'gender' => '\Domainrobot\Model\GenderConstants', @@ -82,13 +83,21 @@ class Customer implements ModelInterface, ArrayAccess 'card' => '\Domainrobot\Model\Card', 'contracts' => '\Domainrobot\Model\CustomerContract[]', 'billingUsers' => '\Domainrobot\Model\BasicUser[]', + 'comments' => '\Domainrobot\Model\Comment[]', + 'contacts' => '\Domainrobot\Model\Contact[]', 'account' => '\Domainrobot\Model\Account', 'clearAccount' => '\Domainrobot\Model\ClearAccountPeriod', 'autodelete' => 'bool', + 'pending' => 'bool', + 'verifications' => '\Domainrobot\Model\BasicCustomerSpoolVerification[]', + 'tags' => '\Domainrobot\Model\CustomerTag[]', + 'pin' => 'string', 'fname' => 'string', 'lname' => 'string', 'pcode' => 'string', - 'sepa' => '\Domainrobot\Model\SEPAMandate' + 'technical' => '\Domainrobot\Model\GenericCustomer', + 'sepa' => '\Domainrobot\Model\SEPAMandate', + 'pricelists' => '\Domainrobot\Model\CustomerPriceLists' ]; /** @@ -101,6 +110,7 @@ class Customer implements ModelInterface, ArrayAccess 'client' => null, 'group' => 'int64', 'name' => null, + 'type' => null, 'organization' => null, 'vatNumber' => null, 'gender' => null, @@ -122,13 +132,21 @@ class Customer implements ModelInterface, ArrayAccess 'card' => null, 'contracts' => null, 'billingUsers' => null, + 'comments' => null, + 'contacts' => null, 'account' => null, 'clearAccount' => null, 'autodelete' => null, + 'pending' => null, + 'verifications' => null, + 'tags' => null, + 'pin' => null, 'fname' => null, 'lname' => null, 'pcode' => null, - 'sepa' => null + 'technical' => null, + 'sepa' => null, + 'pricelists' => null ]; /** @@ -162,6 +180,7 @@ public static function swaggerFormats() 'client' => 'client', 'group' => 'group', 'name' => 'name', + 'type' => 'type', 'organization' => 'organization', 'vatNumber' => 'vatNumber', 'gender' => 'gender', @@ -183,13 +202,21 @@ public static function swaggerFormats() 'card' => 'card', 'contracts' => 'contracts', 'billingUsers' => 'billingUsers', + 'comments' => 'comments', + 'contacts' => 'contacts', 'account' => 'account', 'clearAccount' => 'clearAccount', 'autodelete' => 'autodelete', + 'pending' => 'pending', + 'verifications' => 'verifications', + 'tags' => 'tags', + 'pin' => 'pin', 'fname' => 'fname', 'lname' => 'lname', 'pcode' => 'pcode', - 'sepa' => 'sepa' + 'technical' => 'technical', + 'sepa' => 'sepa', + 'pricelists' => 'pricelists' ]; /** @@ -202,6 +229,7 @@ public static function swaggerFormats() 'client' => 'setClient', 'group' => 'setGroup', 'name' => 'setName', + 'type' => 'setType', 'organization' => 'setOrganization', 'vatNumber' => 'setVatNumber', 'gender' => 'setGender', @@ -223,13 +251,21 @@ public static function swaggerFormats() 'card' => 'setCard', 'contracts' => 'setContracts', 'billingUsers' => 'setBillingUsers', + 'comments' => 'setComments', + 'contacts' => 'setContacts', 'account' => 'setAccount', 'clearAccount' => 'setClearAccount', 'autodelete' => 'setAutodelete', + 'pending' => 'setPending', + 'verifications' => 'setVerifications', + 'tags' => 'setTags', + 'pin' => 'setPin', 'fname' => 'setFname', 'lname' => 'setLname', 'pcode' => 'setPcode', - 'sepa' => 'setSepa' + 'technical' => 'setTechnical', + 'sepa' => 'setSepa', + 'pricelists' => 'setPricelists' ]; /** @@ -242,6 +278,7 @@ public static function swaggerFormats() 'client' => 'getClient', 'group' => 'getGroup', 'name' => 'getName', + 'type' => 'getType', 'organization' => 'getOrganization', 'vatNumber' => 'getVatNumber', 'gender' => 'getGender', @@ -263,13 +300,21 @@ public static function swaggerFormats() 'card' => 'getCard', 'contracts' => 'getContracts', 'billingUsers' => 'getBillingUsers', + 'comments' => 'getComments', + 'contacts' => 'getContacts', 'account' => 'getAccount', 'clearAccount' => 'getClearAccount', 'autodelete' => 'getAutodelete', + 'pending' => 'getPending', + 'verifications' => 'getVerifications', + 'tags' => 'getTags', + 'pin' => 'getPin', 'fname' => 'getFname', 'lname' => 'getLname', 'pcode' => 'getPcode', - 'sepa' => 'getSepa' + 'technical' => 'getTechnical', + 'sepa' => 'getSepa', + 'pricelists' => 'getPricelists' ]; /** @@ -336,6 +381,7 @@ public function __construct(array $data = null) $this->container['client'] = isset($data['client']) ? $this->createData($data['client'], 'client') : null; $this->container['group'] = isset($data['group']) ? $this->createData($data['group'], 'group') : null; $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; + $this->container['type'] = isset($data['type']) ? $this->createData($data['type'], 'type') : null; $this->container['organization'] = isset($data['organization']) ? $this->createData($data['organization'], 'organization') : null; $this->container['vatNumber'] = isset($data['vatNumber']) ? $this->createData($data['vatNumber'], 'vatNumber') : null; $this->container['gender'] = isset($data['gender']) ? $this->createData($data['gender'], 'gender') : null; @@ -357,13 +403,21 @@ public function __construct(array $data = null) $this->container['card'] = isset($data['card']) ? $this->createData($data['card'], 'card') : null; $this->container['contracts'] = isset($data['contracts']) ? $this->createData($data['contracts'], 'contracts') : null; $this->container['billingUsers'] = isset($data['billingUsers']) ? $this->createData($data['billingUsers'], 'billingUsers') : null; + $this->container['comments'] = isset($data['comments']) ? $this->createData($data['comments'], 'comments') : null; + $this->container['contacts'] = isset($data['contacts']) ? $this->createData($data['contacts'], 'contacts') : null; $this->container['account'] = isset($data['account']) ? $this->createData($data['account'], 'account') : null; $this->container['clearAccount'] = isset($data['clearAccount']) ? $this->createData($data['clearAccount'], 'clearAccount') : null; $this->container['autodelete'] = isset($data['autodelete']) ? $this->createData($data['autodelete'], 'autodelete') : null; + $this->container['pending'] = isset($data['pending']) ? $this->createData($data['pending'], 'pending') : null; + $this->container['verifications'] = isset($data['verifications']) ? $this->createData($data['verifications'], 'verifications') : null; + $this->container['tags'] = isset($data['tags']) ? $this->createData($data['tags'], 'tags') : null; + $this->container['pin'] = isset($data['pin']) ? $this->createData($data['pin'], 'pin') : null; $this->container['fname'] = isset($data['fname']) ? $this->createData($data['fname'], 'fname') : null; $this->container['lname'] = isset($data['lname']) ? $this->createData($data['lname'], 'lname') : null; $this->container['pcode'] = isset($data['pcode']) ? $this->createData($data['pcode'], 'pcode') : null; + $this->container['technical'] = isset($data['technical']) ? $this->createData($data['technical'], 'technical') : null; $this->container['sepa'] = isset($data['sepa']) ? $this->createData($data['sepa'], 'sepa') : null; + $this->container['pricelists'] = isset($data['pricelists']) ? $this->createData($data['pricelists'], 'pricelists') : null; } /** @@ -613,6 +667,30 @@ public function setName($name) return $this; } + /** + * Gets type + * + * @return \Domainrobot\Model\CustomerType + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Domainrobot\Model\CustomerType $type The type of the customer. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** * Gets organization * @@ -1124,6 +1202,54 @@ public function setBillingUsers($billingUsers) return $this; } + /** + * Gets comments + * + * @return \Domainrobot\Model\Comment[] + */ + public function getComments() + { + return $this->container['comments']; + } + + /** + * Sets comments + * + * @param \Domainrobot\Model\Comment[] $comments The comments of the customer + * + * @return $this + */ + public function setComments($comments) + { + $this->container['comments'] = $comments; + + return $this; + } + + /** + * Gets contacts + * + * @return \Domainrobot\Model\Contact[] + */ + public function getContacts() + { + return $this->container['contacts']; + } + + /** + * Sets contacts + * + * @param \Domainrobot\Model\Contact[] $contacts The contacts of the customer + * + * @return $this + */ + public function setContacts($contacts) + { + $this->container['contacts'] = $contacts; + + return $this; + } + /** * Gets account * @@ -1196,6 +1322,102 @@ public function setAutodelete($autodelete) return $this; } + /** + * Gets pending + * + * @return bool + */ + public function getPending() + { + return $this->container['pending']; + } + + /** + * Sets pending + * + * @param bool $pending Flag indication if the customer data are pending + * + * @return $this + */ + public function setPending($pending) + { + $this->container['pending'] = $pending; + + return $this; + } + + /** + * Gets verifications + * + * @return \Domainrobot\Model\BasicCustomerSpoolVerification[] + */ + public function getVerifications() + { + return $this->container['verifications']; + } + + /** + * Sets verifications + * + * @param \Domainrobot\Model\BasicCustomerSpoolVerification[] $verifications Shows the pending email verifications + * + * @return $this + */ + public function setVerifications($verifications) + { + $this->container['verifications'] = $verifications; + + return $this; + } + + /** + * Gets tags + * + * @return \Domainrobot\Model\CustomerTag[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \Domainrobot\Model\CustomerTag[] $tags The customers tags. + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets pin + * + * @return string + */ + public function getPin() + { + return $this->container['pin']; + } + + /** + * Sets pin + * + * @param string $pin The pin number. + * + * @return $this + */ + public function setPin($pin) + { + $this->container['pin'] = $pin; + + return $this; + } + /** * Gets fname * @@ -1282,6 +1504,30 @@ public function setPcode($pcode) return $this; } + /** + * Gets technical + * + * @return \Domainrobot\Model\GenericCustomer + */ + public function getTechnical() + { + return $this->container['technical']; + } + + /** + * Sets technical + * + * @param \Domainrobot\Model\GenericCustomer $technical technical Customer. + * + * @return $this + */ + public function setTechnical($technical) + { + $this->container['technical'] = $technical; + + return $this; + } + /** * Gets sepa * @@ -1305,6 +1551,30 @@ public function setSepa($sepa) return $this; } + + /** + * Gets pricelists + * + * @return \Domainrobot\Model\CustomerPriceLists + */ + public function getPricelists() + { + return $this->container['pricelists']; + } + + /** + * Sets pricelists + * + * @param \Domainrobot\Model\CustomerPriceLists $pricelists the customer PriceLists + * + * @return $this + */ + public function setPricelists($pricelists) + { + $this->container['pricelists'] = $pricelists; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/CustomerContract.php b/src/Model/CustomerContract.php index c4be6224..4ee624f7 100644 --- a/src/Model/CustomerContract.php +++ b/src/Model/CustomerContract.php @@ -60,6 +60,7 @@ class CustomerContract implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'updated' => '\DateTime', 'contract' => '\Domainrobot\Model\GenericLabelEntity', + 'accountManager' => '\Domainrobot\Model\AccountManager', 'notice' => 'string', 'ticketNumber' => 'string' ]; @@ -73,6 +74,7 @@ class CustomerContract implements ModelInterface, ArrayAccess 'created' => 'date-time', 'updated' => 'date-time', 'contract' => null, + 'accountManager' => null, 'notice' => null, 'ticketNumber' => null ]; @@ -107,6 +109,7 @@ public static function swaggerFormats() 'created' => 'created', 'updated' => 'updated', 'contract' => 'contract', + 'accountManager' => 'accountManager', 'notice' => 'notice', 'ticketNumber' => 'ticketNumber' ]; @@ -120,6 +123,7 @@ public static function swaggerFormats() 'created' => 'setCreated', 'updated' => 'setUpdated', 'contract' => 'setContract', + 'accountManager' => 'setAccountManager', 'notice' => 'setNotice', 'ticketNumber' => 'setTicketNumber' ]; @@ -133,6 +137,7 @@ public static function swaggerFormats() 'created' => 'getCreated', 'updated' => 'getUpdated', 'contract' => 'getContract', + 'accountManager' => 'getAccountManager', 'notice' => 'getNotice', 'ticketNumber' => 'getTicketNumber' ]; @@ -200,6 +205,7 @@ public function __construct(array $data = null) $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; $this->container['contract'] = isset($data['contract']) ? $this->createData($data['contract'], 'contract') : null; + $this->container['accountManager'] = isset($data['accountManager']) ? $this->createData($data['accountManager'], 'accountManager') : null; $this->container['notice'] = isset($data['notice']) ? $this->createData($data['notice'], 'notice') : null; $this->container['ticketNumber'] = isset($data['ticketNumber']) ? $this->createData($data['ticketNumber'], 'ticketNumber') : null; } @@ -358,6 +364,30 @@ public function setContract($contract) return $this; } + /** + * Gets accountManager + * + * @return \Domainrobot\Model\AccountManager + */ + public function getAccountManager() + { + return $this->container['accountManager']; + } + + /** + * Sets accountManager + * + * @param \Domainrobot\Model\AccountManager $accountManager The name of the manager. + * + * @return $this + */ + public function setAccountManager($accountManager) + { + $this->container['accountManager'] = $accountManager; + + return $this; + } + /** * Gets notice * diff --git a/src/Model/CustomerPriceLists.php b/src/Model/CustomerPriceLists.php new file mode 100644 index 00000000..d3954636 --- /dev/null +++ b/src/Model/CustomerPriceLists.php @@ -0,0 +1,379 @@ + 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CustomerTag.php b/src/Model/CustomerTag.php new file mode 100644 index 00000000..e7e87cc5 --- /dev/null +++ b/src/Model/CustomerTag.php @@ -0,0 +1,467 @@ + '\DateTime', + 'updated' => '\DateTime', + 'tag' => '\Domainrobot\Model\GenericLabelEntity' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'tag' => 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'tag' => 'getTag' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['tag'] = isset($data['tag']) ? $this->createData($data['tag'], 'tag') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['tag'] === null) { + $invalidProperties[] = "'tag' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets tag + * + * @return \Domainrobot\Model\GenericLabelEntity + */ + public function getTag() + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param \Domainrobot\Model\GenericLabelEntity $tag The tag. + * + * @return $this + */ + public function setTag($tag) + { + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/CustomerType.php b/src/Model/CustomerType.php new file mode 100644 index 00000000..c7222edc --- /dev/null +++ b/src/Model/CustomerType.php @@ -0,0 +1,62 @@ + 'string', - 'currency' => 'string', - 'debug' => 'bool', - 'checkPortfolio' => 'bool', - 'forceDnsCheck' => 'bool', - 'allowDuplicates' => 'bool', - 'sources' => '\Domainrobot\Model\DomainStudioSources', - 'clientIp' => 'string', - 'onlyAvailable' => 'bool' + 'searchToken' => 'string' ]; /** @@ -74,15 +66,7 @@ class DomainEnvelopeSearchRequest implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'searchToken' => null, - 'currency' => null, - 'debug' => null, - 'checkPortfolio' => null, - 'forceDnsCheck' => null, - 'allowDuplicates' => null, - 'sources' => null, - 'clientIp' => null, - 'onlyAvailable' => null + 'searchToken' => null ]; /** @@ -112,15 +96,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'searchToken' => 'searchToken', - 'currency' => 'currency', - 'debug' => 'debug', - 'checkPortfolio' => 'checkPortfolio', - 'forceDnsCheck' => 'forceDnsCheck', - 'allowDuplicates' => 'allowDuplicates', - 'sources' => 'sources', - 'clientIp' => 'clientIp', - 'onlyAvailable' => 'onlyAvailable' + 'searchToken' => 'searchToken' ]; /** @@ -129,15 +105,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'searchToken' => 'setSearchToken', - 'currency' => 'setCurrency', - 'debug' => 'setDebug', - 'checkPortfolio' => 'setCheckPortfolio', - 'forceDnsCheck' => 'setForceDnsCheck', - 'allowDuplicates' => 'setAllowDuplicates', - 'sources' => 'setSources', - 'clientIp' => 'setClientIp', - 'onlyAvailable' => 'setOnlyAvailable' + 'searchToken' => 'setSearchToken' ]; /** @@ -146,15 +114,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'searchToken' => 'getSearchToken', - 'currency' => 'getCurrency', - 'debug' => 'getDebug', - 'checkPortfolio' => 'getCheckPortfolio', - 'forceDnsCheck' => 'getForceDnsCheck', - 'allowDuplicates' => 'getAllowDuplicates', - 'sources' => 'getSources', - 'clientIp' => 'getClientIp', - 'onlyAvailable' => 'getOnlyAvailable' + 'searchToken' => 'getSearchToken' ]; /** @@ -218,14 +178,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['searchToken'] = isset($data['searchToken']) ? $this->createData($data['searchToken'], 'searchToken') : null; - $this->container['currency'] = isset($data['currency']) ? $this->createData($data['currency'], 'currency') : null; - $this->container['debug'] = isset($data['debug']) ? $this->createData($data['debug'], 'debug') : null; - $this->container['checkPortfolio'] = isset($data['checkPortfolio']) ? $this->createData($data['checkPortfolio'], 'checkPortfolio') : null; - $this->container['forceDnsCheck'] = isset($data['forceDnsCheck']) ? $this->createData($data['forceDnsCheck'], 'forceDnsCheck') : null; - $this->container['allowDuplicates'] = isset($data['allowDuplicates']) ? $this->createData($data['allowDuplicates'], 'allowDuplicates') : null; - $this->container['sources'] = isset($data['sources']) ? $this->createData($data['sources'], 'sources') : null; - $this->container['clientIp'] = isset($data['clientIp']) ? $this->createData($data['clientIp'], 'clientIp') : null; - $this->container['onlyAvailable'] = isset($data['onlyAvailable']) ? $this->createData($data['onlyAvailable'], 'onlyAvailable') : null; } /** @@ -330,198 +282,6 @@ public function setSearchToken($searchToken) return $this; } - - /** - * Gets currency - * - * @return string - */ - public function getCurrency() - { - return $this->container['currency']; - } - - /** - * Sets currency - * - * @param string $currency The currency for every price lookup - * - * @return $this - */ - public function setCurrency($currency) - { - $this->container['currency'] = $currency; - - return $this; - } - - /** - * Gets debug - * - * @return bool - */ - public function getDebug() - { - return $this->container['debug']; - } - - /** - * Sets debug - * - * @param bool $debug Activates debugging - * - * @return $this - */ - public function setDebug($debug) - { - $this->container['debug'] = $debug; - - return $this; - } - - /** - * Gets checkPortfolio - * - * @return bool - */ - public function getCheckPortfolio() - { - return $this->container['checkPortfolio']; - } - - /** - * Sets checkPortfolio - * - * @param bool $checkPortfolio Activates the check for each domain whether the user already owns it. - * - * @return $this - */ - public function setCheckPortfolio($checkPortfolio) - { - $this->container['checkPortfolio'] = $checkPortfolio; - - return $this; - } - - /** - * Gets forceDnsCheck - * - * @return bool - */ - public function getForceDnsCheck() - { - return $this->container['forceDnsCheck']; - } - - /** - * Sets forceDnsCheck - * - * @param bool $forceDnsCheck All whois checks will be done via dns check. - * - * @return $this - */ - public function setForceDnsCheck($forceDnsCheck) - { - $this->container['forceDnsCheck'] = $forceDnsCheck; - - return $this; - } - - /** - * Gets allowDuplicates - * - * @return bool - */ - public function getAllowDuplicates() - { - return $this->container['allowDuplicates']; - } - - /** - * Sets allowDuplicates - * - * @param bool $allowDuplicates Allow duplicate domain names from different sources. - * - * @return $this - */ - public function setAllowDuplicates($allowDuplicates) - { - $this->container['allowDuplicates'] = $allowDuplicates; - - return $this; - } - - /** - * Gets sources - * - * @return \Domainrobot\Model\DomainStudioSources - */ - public function getSources() - { - return $this->container['sources']; - } - - /** - * Sets sources - * - * @param \Domainrobot\Model\DomainStudioSources $sources Wrapper for the configuration for each source - * - * @return $this - */ - public function setSources($sources) - { - $this->container['sources'] = $sources; - - return $this; - } - - /** - * Gets clientIp - * - * @return string - */ - public function getClientIp() - { - return $this->container['clientIp']; - } - - /** - * Sets clientIp - * - * @param string $clientIp The ip of the client - * - * @return $this - */ - public function setClientIp($clientIp) - { - $this->container['clientIp'] = $clientIp; - - return $this; - } - - /** - * Gets onlyAvailable - * - * @return bool - */ - public function getOnlyAvailable() - { - return $this->container['onlyAvailable']; - } - - /** - * Sets onlyAvailable - * - * @param bool $onlyAvailable Defines whether to return only free domain names when service WHOIS is used for a source. - * - * @return $this - */ - public function setOnlyAvailable($onlyAvailable) - { - $this->container['onlyAvailable'] = $onlyAvailable; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DomainSafeUser.php b/src/Model/DomainSafeUser.php index baecda0c..33cfe635 100644 --- a/src/Model/DomainSafeUser.php +++ b/src/Model/DomainSafeUser.php @@ -58,6 +58,7 @@ class DomainSafeUser implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'context' => 'int', + 'mobile' => '\Domainrobot\Model\Phone', 'user' => 'string', 'pin' => 'string' ]; @@ -69,6 +70,7 @@ class DomainSafeUser implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'context' => 'int32', + 'mobile' => null, 'user' => null, 'pin' => null ]; @@ -101,6 +103,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'context' => 'context', + 'mobile' => 'mobile', 'user' => 'user', 'pin' => 'pin' ]; @@ -112,6 +115,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'context' => 'setContext', + 'mobile' => 'setMobile', 'user' => 'setUser', 'pin' => 'setPin' ]; @@ -123,6 +127,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'context' => 'getContext', + 'mobile' => 'getMobile', 'user' => 'getUser', 'pin' => 'getPin' ]; @@ -188,6 +193,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['context'] = isset($data['context']) ? $this->createData($data['context'], 'context') : null; + $this->container['mobile'] = isset($data['mobile']) ? $this->createData($data['mobile'], 'mobile') : null; $this->container['user'] = isset($data['user']) ? $this->createData($data['user'], 'user') : null; $this->container['pin'] = isset($data['pin']) ? $this->createData($data['pin'], 'pin') : null; } @@ -301,6 +307,30 @@ public function setContext($context) return $this; } + /** + * Gets mobile + * + * @return \Domainrobot\Model\Phone + */ + public function getMobile() + { + return $this->container['mobile']; + } + + /** + * Sets mobile + * + * @param \Domainrobot\Model\Phone $mobile The mobile of the user. + * + * @return $this + */ + public function setMobile($mobile) + { + $this->container['mobile'] = $mobile; + + return $this; + } + /** * Gets user * diff --git a/src/Model/DomainStudioDomainSource.php b/src/Model/DomainStudioDomainSource.php index 74af2e20..a083deeb 100644 --- a/src/Model/DomainStudioDomainSource.php +++ b/src/Model/DomainStudioDomainSource.php @@ -54,6 +54,7 @@ class DomainStudioDomainSource const SPIN_WORD = 'SPIN_WORD'; const PERSONAL_NAMES = 'PERSONAL_NAMES'; const UPCOMING = 'UPCOMING'; + const MARKET = 'MARKET'; /** * Gets allowable values of the enum @@ -73,6 +74,7 @@ public static function getAllowableEnumValues() self::SPIN_WORD, self::PERSONAL_NAMES, self::UPCOMING, + self::MARKET, ]; } } diff --git a/src/Model/DomainStudioSourceMarket.php b/src/Model/DomainStudioSourceMarket.php new file mode 100644 index 00000000..09e1f520 --- /dev/null +++ b/src/Model/DomainStudioSourceMarket.php @@ -0,0 +1,584 @@ + '\Domainrobot\Model\DomainEnvelopeSearchService[]', + 'onlyAvailable' => 'bool', + 'promoTlds' => 'string[]', + 'topTlds' => 'string[]', + 'max' => 'int', + 'priceMin' => 'int', + 'priceMax' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'services' => null, + 'onlyAvailable' => null, + 'promoTlds' => null, + 'topTlds' => null, + 'max' => 'int32', + 'priceMin' => 'int32', + 'priceMax' => '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 = [ + 'services' => 'services', + 'onlyAvailable' => 'onlyAvailable', + 'promoTlds' => 'promoTlds', + 'topTlds' => 'topTlds', + 'max' => 'max', + 'priceMin' => 'priceMin', + 'priceMax' => 'priceMax' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices', + 'onlyAvailable' => 'setOnlyAvailable', + 'promoTlds' => 'setPromoTlds', + 'topTlds' => 'setTopTlds', + 'max' => 'setMax', + 'priceMin' => 'setPriceMin', + 'priceMax' => 'setPriceMax' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices', + 'onlyAvailable' => 'getOnlyAvailable', + 'promoTlds' => 'getPromoTlds', + 'topTlds' => 'getTopTlds', + 'max' => 'getMax', + 'priceMin' => 'getPriceMin', + 'priceMax' => '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['services'] = isset($data['services']) ? $this->createData($data['services'], 'services') : null; + $this->container['onlyAvailable'] = isset($data['onlyAvailable']) ? $this->createData($data['onlyAvailable'], 'onlyAvailable') : null; + $this->container['promoTlds'] = isset($data['promoTlds']) ? $this->createData($data['promoTlds'], 'promoTlds') : null; + $this->container['topTlds'] = isset($data['topTlds']) ? $this->createData($data['topTlds'], 'topTlds') : null; + $this->container['max'] = isset($data['max']) ? $this->createData($data['max'], 'max') : null; + $this->container['priceMin'] = isset($data['priceMin']) ? $this->createData($data['priceMin'], 'priceMin') : null; + $this->container['priceMax'] = isset($data['priceMax']) ? $this->createData($data['priceMax'], 'priceMax') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return \Domainrobot\Model\DomainEnvelopeSearchService[] + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param \Domainrobot\Model\DomainEnvelopeSearchService[] $services The services to fetch extra data from for this source + * + * @return $this + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets onlyAvailable + * + * @return bool + */ + public function getOnlyAvailable() + { + return $this->container['onlyAvailable']; + } + + /** + * Sets onlyAvailable + * + * @param bool $onlyAvailable Defines whether to return only free domain names when service WHOIS is used for a source. + * + * @return $this + */ + public function setOnlyAvailable($onlyAvailable) + { + $this->container['onlyAvailable'] = $onlyAvailable; + + return $this; + } + + /** + * Gets promoTlds + * + * @return string[] + */ + public function getPromoTlds() + { + return $this->container['promoTlds']; + } + + /** + * Sets promoTlds + * + * @param string[] $promoTlds Promo tlds + * + * @return $this + */ + public function setPromoTlds($promoTlds) + { + $this->container['promoTlds'] = $promoTlds; + + return $this; + } + + /** + * Gets topTlds + * + * @return string[] + */ + public function getTopTlds() + { + return $this->container['topTlds']; + } + + /** + * Sets topTlds + * + * @param string[] $topTlds Top tlds + * + * @return $this + */ + public function setTopTlds($topTlds) + { + $this->container['topTlds'] = $topTlds; + + return $this; + } + + /** + * Gets max + * + * @return int + */ + public function getMax() + { + return $this->container['max']; + } + + /** + * Sets max + * + * @param int $max The maximum amount of fetched premium and market domains. + * + * @return $this + */ + public function setMax($max) + { + $this->container['max'] = $max; + + return $this; + } + + /** + * Gets priceMin + * + * @return int + */ + public function getPriceMin() + { + return $this->container['priceMin']; + } + + /** + * Sets priceMin + * + * @param int $priceMin The minumum price. + * + * @return $this + */ + public function setPriceMin($priceMin) + { + $this->container['priceMin'] = $priceMin; + + return $this; + } + + /** + * Gets priceMax + * + * @return int + */ + public function getPriceMax() + { + return $this->container['priceMax']; + } + + /** + * Sets priceMax + * + * @param int $priceMax The maximum price. + * + * @return $this + */ + public function setPriceMax($priceMax) + { + $this->container['priceMax'] = $priceMax; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/DomainStudioSourcePremium.php b/src/Model/DomainStudioSourcePremium.php index e2b7ab7d..ff430478 100644 --- a/src/Model/DomainStudioSourcePremium.php +++ b/src/Model/DomainStudioSourcePremium.php @@ -61,7 +61,9 @@ class DomainStudioSourcePremium implements ModelInterface, ArrayAccess 'onlyAvailable' => 'bool', 'promoTlds' => 'string[]', 'topTlds' => 'string[]', - 'max' => 'int' + 'max' => 'int', + 'priceMin' => 'int', + 'priceMax' => 'int' ]; /** @@ -74,7 +76,9 @@ class DomainStudioSourcePremium implements ModelInterface, ArrayAccess 'onlyAvailable' => null, 'promoTlds' => null, 'topTlds' => null, - 'max' => 'int32' + 'max' => 'int32', + 'priceMin' => 'int32', + 'priceMax' => 'int32' ]; /** @@ -108,7 +112,9 @@ public static function swaggerFormats() 'onlyAvailable' => 'onlyAvailable', 'promoTlds' => 'promoTlds', 'topTlds' => 'topTlds', - 'max' => 'max' + 'max' => 'max', + 'priceMin' => 'priceMin', + 'priceMax' => 'priceMax' ]; /** @@ -121,7 +127,9 @@ public static function swaggerFormats() 'onlyAvailable' => 'setOnlyAvailable', 'promoTlds' => 'setPromoTlds', 'topTlds' => 'setTopTlds', - 'max' => 'setMax' + 'max' => 'setMax', + 'priceMin' => 'setPriceMin', + 'priceMax' => 'setPriceMax' ]; /** @@ -134,7 +142,9 @@ public static function swaggerFormats() 'onlyAvailable' => 'getOnlyAvailable', 'promoTlds' => 'getPromoTlds', 'topTlds' => 'getTopTlds', - 'max' => 'getMax' + 'max' => 'getMax', + 'priceMin' => 'getPriceMin', + 'priceMax' => 'getPriceMax' ]; /** @@ -202,6 +212,8 @@ public function __construct(array $data = null) $this->container['promoTlds'] = isset($data['promoTlds']) ? $this->createData($data['promoTlds'], 'promoTlds') : null; $this->container['topTlds'] = isset($data['topTlds']) ? $this->createData($data['topTlds'], 'topTlds') : null; $this->container['max'] = isset($data['max']) ? $this->createData($data['max'], 'max') : null; + $this->container['priceMin'] = isset($data['priceMin']) ? $this->createData($data['priceMin'], 'priceMin') : null; + $this->container['priceMax'] = isset($data['priceMax']) ? $this->createData($data['priceMax'], 'priceMax') : null; } /** @@ -402,6 +414,54 @@ public function setMax($max) return $this; } + + /** + * Gets priceMin + * + * @return int + */ + public function getPriceMin() + { + return $this->container['priceMin']; + } + + /** + * Sets priceMin + * + * @param int $priceMin The minumum price. + * + * @return $this + */ + public function setPriceMin($priceMin) + { + $this->container['priceMin'] = $priceMin; + + return $this; + } + + /** + * Gets priceMax + * + * @return int + */ + public function getPriceMax() + { + return $this->container['priceMax']; + } + + /** + * Sets priceMax + * + * @param int $priceMax The maximum price. + * + * @return $this + */ + public function setPriceMax($priceMax) + { + $this->container['priceMax'] = $priceMax; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DomainStudioSources.php b/src/Model/DomainStudioSources.php index 5a7b4d6e..43677c33 100644 --- a/src/Model/DomainStudioSources.php +++ b/src/Model/DomainStudioSources.php @@ -60,6 +60,7 @@ class DomainStudioSources implements ModelInterface, ArrayAccess 'initial' => '\Domainrobot\Model\DomainStudioSourceInitial', 'suggestion' => '\Domainrobot\Model\DomainStudioSourceSuggestion', 'premium' => '\Domainrobot\Model\DomainStudioSourcePremium', + 'market' => '\Domainrobot\Model\DomainStudioSourceMarket', 'geo' => '\Domainrobot\Model\DomainStudioSourceGeo', 'similar' => '\Domainrobot\Model\DomainStudioSourceSimilar', 'recommended' => '\Domainrobot\Model\DomainStudioSourceRecommended', @@ -80,6 +81,7 @@ class DomainStudioSources implements ModelInterface, ArrayAccess 'initial' => null, 'suggestion' => null, 'premium' => null, + 'market' => null, 'geo' => null, 'similar' => null, 'recommended' => null, @@ -121,6 +123,7 @@ public static function swaggerFormats() 'initial' => 'initial', 'suggestion' => 'suggestion', 'premium' => 'premium', + 'market' => 'market', 'geo' => 'geo', 'similar' => 'similar', 'recommended' => 'recommended', @@ -141,6 +144,7 @@ public static function swaggerFormats() 'initial' => 'setInitial', 'suggestion' => 'setSuggestion', 'premium' => 'setPremium', + 'market' => 'setMarket', 'geo' => 'setGeo', 'similar' => 'setSimilar', 'recommended' => 'setRecommended', @@ -161,6 +165,7 @@ public static function swaggerFormats() 'initial' => 'getInitial', 'suggestion' => 'getSuggestion', 'premium' => 'getPremium', + 'market' => 'getMarket', 'geo' => 'getGeo', 'similar' => 'getSimilar', 'recommended' => 'getRecommended', @@ -235,6 +240,7 @@ public function __construct(array $data = null) $this->container['initial'] = isset($data['initial']) ? $this->createData($data['initial'], 'initial') : null; $this->container['suggestion'] = isset($data['suggestion']) ? $this->createData($data['suggestion'], 'suggestion') : null; $this->container['premium'] = isset($data['premium']) ? $this->createData($data['premium'], 'premium') : null; + $this->container['market'] = isset($data['market']) ? $this->createData($data['market'], 'market') : null; $this->container['geo'] = isset($data['geo']) ? $this->createData($data['geo'], 'geo') : null; $this->container['similar'] = isset($data['similar']) ? $this->createData($data['similar'], 'similar') : null; $this->container['recommended'] = isset($data['recommended']) ? $this->createData($data['recommended'], 'recommended') : null; @@ -397,6 +403,30 @@ public function setPremium($premium) return $this; } + /** + * Gets market + * + * @return \Domainrobot\Model\DomainStudioSourceMarket + */ + public function getMarket() + { + return $this->container['market']; + } + + /** + * Sets market + * + * @param \Domainrobot\Model\DomainStudioSourceMarket $market The configuration for the market source + * + * @return $this + */ + public function setMarket($market) + { + $this->container['market'] = $market; + + return $this; + } + /** * Gets geo * diff --git a/src/Model/ExchangedPrice.php b/src/Model/ExchangedPrice.php index 994b18ee..ef01e920 100644 --- a/src/Model/ExchangedPrice.php +++ b/src/Model/ExchangedPrice.php @@ -491,7 +491,7 @@ public function getAmount() /** * Sets amount * - * @param double $amount Lorem Ipum + * @param double $amount Amount * * @return $this */ @@ -515,7 +515,7 @@ public function getType() /** * Sets type * - * @param \Domainrobot\Model\PriceTypeConstants $type Lorem Ipum + * @param \Domainrobot\Model\PriceTypeConstants $type The price type * * @return $this */ @@ -539,7 +539,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency Lorem Ipsum + * @param string $currency Used currency * * @return $this */ @@ -563,7 +563,7 @@ public function getPriority() /** * Sets priority * - * @param \Domainrobot\Model\PriorityConstants $priority Lorem Ipum + * @param \Domainrobot\Model\PriorityConstants $priority Priority * * @return $this */ @@ -587,7 +587,7 @@ public function getCustomer() /** * Sets customer * - * @param \Domainrobot\Model\Customer $customer Lorem Ipum + * @param \Domainrobot\Model\Customer $customer Customer * * @return $this */ @@ -611,7 +611,7 @@ public function getPeriod() /** * Sets period * - * @param \Domainrobot\Model\TimePeriod $period Lorem Ipum + * @param \Domainrobot\Model\TimePeriod $period The activity period of a product * * @return $this */ @@ -635,7 +635,7 @@ public function getDiscountable() /** * Sets discountable * - * @param bool $discountable Lorem Ipum + * @param bool $discountable Indicates if price discountable is possible * * @return $this */ @@ -659,7 +659,7 @@ public function getLogId() /** * Sets logId * - * @param int $logId Lorem Ipum + * @param int $logId Id of the created log * * @return $this */ @@ -683,7 +683,7 @@ public function getRefund() /** * Sets refund * - * @param int $refund Lorem Ipum + * @param int $refund Refund * * @return $this */ @@ -707,7 +707,7 @@ public function getPriceConditions() /** * Sets priceConditions * - * @param \Domainrobot\Model\PriceServiceEntity[] $priceConditions Lorem Ipum + * @param \Domainrobot\Model\PriceServiceEntity[] $priceConditions Price condition * * @return $this */ @@ -731,7 +731,7 @@ public function getComment() /** * Sets comment * - * @param string $comment Lorem Ipum + * @param string $comment Comments * * @return $this */ @@ -755,7 +755,7 @@ public function getNormalPrice() /** * Sets normalPrice * - * @param \Domainrobot\Model\ExchangedPrice $normalPrice Lorem Ipum + * @param \Domainrobot\Model\ExchangedPrice $normalPrice Normal price * * @return $this */ @@ -779,7 +779,7 @@ public function getValid() /** * Sets valid * - * @param \DateTime $valid Lorem Ipum + * @param \DateTime $valid Date until the price is valid * * @return $this */ diff --git a/src/Model/ExtendedValidationExtension.php b/src/Model/ExtendedValidationExtension.php index 5eda99a0..bbfbf55e 100644 --- a/src/Model/ExtendedValidationExtension.php +++ b/src/Model/ExtendedValidationExtension.php @@ -58,6 +58,8 @@ class ExtendedValidationExtension implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'joiCountryName' => 'string', + 'joiLocality' => 'string', + 'joiStateOrProvince' => 'string', 'companyNumber' => 'string', 'businessCategory' => '\Domainrobot\Model\BusinessCategory' ]; @@ -69,6 +71,8 @@ class ExtendedValidationExtension implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'joiCountryName' => null, + 'joiLocality' => null, + 'joiStateOrProvince' => null, 'companyNumber' => null, 'businessCategory' => null ]; @@ -101,6 +105,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'joiCountryName' => 'joiCountryName', + 'joiLocality' => 'joiLocality', + 'joiStateOrProvince' => 'joiStateOrProvince', 'companyNumber' => 'companyNumber', 'businessCategory' => 'businessCategory' ]; @@ -112,6 +118,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'joiCountryName' => 'setJoiCountryName', + 'joiLocality' => 'setJoiLocality', + 'joiStateOrProvince' => 'setJoiStateOrProvince', 'companyNumber' => 'setCompanyNumber', 'businessCategory' => 'setBusinessCategory' ]; @@ -123,6 +131,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'joiCountryName' => 'getJoiCountryName', + 'joiLocality' => 'getJoiLocality', + 'joiStateOrProvince' => 'getJoiStateOrProvince', 'companyNumber' => 'getCompanyNumber', 'businessCategory' => 'getBusinessCategory' ]; @@ -188,6 +198,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['joiCountryName'] = isset($data['joiCountryName']) ? $this->createData($data['joiCountryName'], 'joiCountryName') : null; + $this->container['joiLocality'] = isset($data['joiLocality']) ? $this->createData($data['joiLocality'], 'joiLocality') : null; + $this->container['joiStateOrProvince'] = isset($data['joiStateOrProvince']) ? $this->createData($data['joiStateOrProvince'], 'joiStateOrProvince') : null; $this->container['companyNumber'] = isset($data['companyNumber']) ? $this->createData($data['companyNumber'], 'companyNumber') : null; $this->container['businessCategory'] = isset($data['businessCategory']) ? $this->createData($data['businessCategory'], 'businessCategory') : null; } @@ -295,6 +307,54 @@ public function setJoiCountryName($joiCountryName) return $this; } + /** + * Gets joiLocality + * + * @return string + */ + public function getJoiLocality() + { + return $this->container['joiLocality']; + } + + /** + * Sets joiLocality + * + * @param string $joiLocality Locality or city of judicial formation + * + * @return $this + */ + public function setJoiLocality($joiLocality) + { + $this->container['joiLocality'] = $joiLocality; + + return $this; + } + + /** + * Gets joiStateOrProvince + * + * @return string + */ + public function getJoiStateOrProvince() + { + return $this->container['joiStateOrProvince']; + } + + /** + * Sets joiStateOrProvince + * + * @param string $joiStateOrProvince State or province of judicial formation + * + * @return $this + */ + public function setJoiStateOrProvince($joiStateOrProvince) + { + $this->container['joiStateOrProvince'] = $joiStateOrProvince; + + return $this; + } + /** * Gets companyNumber * diff --git a/src/Model/GenericLabelEntity.php b/src/Model/GenericLabelEntity.php index c5f25a47..4cd1a76d 100644 --- a/src/Model/GenericLabelEntity.php +++ b/src/Model/GenericLabelEntity.php @@ -61,6 +61,8 @@ class GenericLabelEntity implements ModelInterface, ArrayAccess 'updated' => '\DateTime', 'label' => 'string', 'name' => 'string', + 'category' => 'string', + 'configuration' => 'map[string,object]', 'packageLabel' => 'string' ]; @@ -74,6 +76,8 @@ class GenericLabelEntity implements ModelInterface, ArrayAccess 'updated' => 'date-time', 'label' => null, 'name' => null, + 'category' => null, + 'configuration' => null, 'packageLabel' => null ]; @@ -108,6 +112,8 @@ public static function swaggerFormats() 'updated' => 'updated', 'label' => 'label', 'name' => 'name', + 'category' => 'category', + 'configuration' => 'configuration', 'packageLabel' => 'packageLabel' ]; @@ -121,6 +127,8 @@ public static function swaggerFormats() 'updated' => 'setUpdated', 'label' => 'setLabel', 'name' => 'setName', + 'category' => 'setCategory', + 'configuration' => 'setConfiguration', 'packageLabel' => 'setPackageLabel' ]; @@ -134,6 +142,8 @@ public static function swaggerFormats() 'updated' => 'getUpdated', 'label' => 'getLabel', 'name' => 'getName', + 'category' => 'getCategory', + 'configuration' => 'getConfiguration', 'packageLabel' => 'getPackageLabel' ]; @@ -201,6 +211,8 @@ public function __construct(array $data = null) $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; $this->container['label'] = isset($data['label']) ? $this->createData($data['label'], 'label') : null; $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; + $this->container['category'] = isset($data['category']) ? $this->createData($data['category'], 'category') : null; + $this->container['configuration'] = isset($data['configuration']) ? $this->createData($data['configuration'], 'configuration') : null; $this->container['packageLabel'] = isset($data['packageLabel']) ? $this->createData($data['packageLabel'], 'packageLabel') : null; } @@ -347,7 +359,7 @@ public function getLabel() /** * Sets label * - * @param string $label Lorem Ipum + * @param string $label The unique identifier * * @return $this */ @@ -382,6 +394,54 @@ public function setName($name) return $this; } + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category category + * + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets configuration + * + * @return map[string,object] + */ + public function getConfiguration() + { + return $this->container['configuration']; + } + + /** + * Sets configuration + * + * @param map[string,object] $configuration Lorem Ipum + * + * @return $this + */ + public function setConfiguration($configuration) + { + $this->container['configuration'] = $configuration; + + return $this; + } + /** * Gets packageLabel * diff --git a/src/Model/HkIndustryTypeConstants.php b/src/Model/HkIndustryTypeConstants.php index 403f6c9e..21039616 100644 --- a/src/Model/HkIndustryTypeConstants.php +++ b/src/Model/HkIndustryTypeConstants.php @@ -44,42 +44,42 @@ class HkIndustryTypeConstants * Possible values of this enum */ const _0 = '_0'; - const _4160 = '_4160'; - const _4224 = '_4224'; - const _4288 = '_4288'; - const _4352 = '_4352'; - const _4416 = '_4416'; - const _8256 = '_8256'; - const _8320 = '_8320'; - const _8384 = '_8384'; - const _8448 = '_8448'; - const _8512 = '_8512'; - const _12352 = '_12352'; - const _12416 = '_12416'; - const _16448 = '_16448'; - const _16512 = '_16512'; - const _16576 = '_16576'; - const _16640 = '_16640'; - const _16704 = '_16704'; - const _16768 = '_16768'; - const _16832 = '_16832'; - const _20544 = '_20544'; - const _20608 = '_20608'; - const _20672 = '_20672'; - const _20736 = '_20736'; - const _20800 = '_20800'; - const _20864 = '_20864'; - const _20928 = '_20928'; - const _24640 = '_24640'; - const _24704 = '_24704'; - const _24768 = '_24768'; - const _28736 = '_28736'; - const _28800 = '_28800'; - const _28864 = '_28864'; - const _28928 = '_28928'; - const _28992 = '_28992'; - const _29056 = '_29056'; - const _29120 = '_29120'; + const _010100 = '_010100'; + const _010200 = '_010200'; + const _010300 = '_010300'; + const _010400 = '_010400'; + const _010500 = '_010500'; + const _020100 = '_020100'; + const _020200 = '_020200'; + const _020300 = '_020300'; + const _020400 = '_020400'; + const _020500 = '_020500'; + const _030100 = '_030100'; + const _030200 = '_030200'; + const _040100 = '_040100'; + const _040200 = '_040200'; + const _040300 = '_040300'; + const _040400 = '_040400'; + const _040500 = '_040500'; + const _040600 = '_040600'; + const _040700 = '_040700'; + const _050100 = '_050100'; + const _050200 = '_050200'; + const _050300 = '_050300'; + const _050400 = '_050400'; + const _050500 = '_050500'; + const _050600 = '_050600'; + const _050700 = '_050700'; + const _060100 = '_060100'; + const _060200 = '_060200'; + const _060300 = '_060300'; + const _070100 = '_070100'; + const _070200 = '_070200'; + const _070300 = '_070300'; + const _070400 = '_070400'; + const _070500 = '_070500'; + const _070600 = '_070600'; + const _070700 = '_070700'; const _070800 = '_070800'; const _070900 = '_070900'; const _080100 = '_080100'; @@ -144,42 +144,42 @@ public static function getAllowableEnumValues() { return [ self::_0, - self::_4160, - self::_4224, - self::_4288, - self::_4352, - self::_4416, - self::_8256, - self::_8320, - self::_8384, - self::_8448, - self::_8512, - self::_12352, - self::_12416, - self::_16448, - self::_16512, - self::_16576, - self::_16640, - self::_16704, - self::_16768, - self::_16832, - self::_20544, - self::_20608, - self::_20672, - self::_20736, - self::_20800, - self::_20864, - self::_20928, - self::_24640, - self::_24704, - self::_24768, - self::_28736, - self::_28800, - self::_28864, - self::_28928, - self::_28992, - self::_29056, - self::_29120, + self::_010100, + self::_010200, + self::_010300, + self::_010400, + self::_010500, + self::_020100, + self::_020200, + self::_020300, + self::_020400, + self::_020500, + self::_030100, + self::_030200, + self::_040100, + self::_040200, + self::_040300, + self::_040400, + self::_040500, + self::_040600, + self::_040700, + self::_050100, + self::_050200, + self::_050300, + self::_050400, + self::_050500, + self::_050600, + self::_050700, + self::_060100, + self::_060200, + self::_060300, + self::_070100, + self::_070200, + self::_070300, + self::_070400, + self::_070500, + self::_070600, + self::_070700, self::_070800, self::_070900, self::_080100, diff --git a/src/Model/HostSubZone.php b/src/Model/HostSubZone.php new file mode 100644 index 00000000..fcf51bf5 --- /dev/null +++ b/src/Model/HostSubZone.php @@ -0,0 +1,434 @@ + 'string', + 'virtualNameServer' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'origin' => null, + 'virtualNameServer' => 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 = [ + 'origin' => 'origin', + 'virtualNameServer' => 'virtualNameServer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'origin' => 'setOrigin', + 'virtualNameServer' => 'setVirtualNameServer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'origin' => 'getOrigin', + 'virtualNameServer' => 'getVirtualNameServer' + ]; + + /** + * 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['origin'] = isset($data['origin']) ? $this->createData($data['origin'], 'origin') : null; + $this->container['virtualNameServer'] = isset($data['virtualNameServer']) ? $this->createData($data['virtualNameServer'], 'virtualNameServer') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets origin + * + * @return string + */ + public function getOrigin() + { + return $this->container['origin']; + } + + /** + * Sets origin + * + * @param string $origin Zone name + * + * @return $this + */ + public function setOrigin($origin) + { + $this->container['origin'] = $origin; + + return $this; + } + + /** + * Gets virtualNameServer + * + * @return string + */ + public function getVirtualNameServer() + { + return $this->container['virtualNameServer']; + } + + /** + * Sets virtualNameServer + * + * @param string $virtualNameServer The first nameserver managed by the system + * + * @return $this + */ + public function setVirtualNameServer($virtualNameServer) + { + $this->container['virtualNameServer'] = $virtualNameServer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Id4MeAgent.php b/src/Model/Id4MeAgent.php index 9ae5c6dc..dd20bcb1 100644 --- a/src/Model/Id4MeAgent.php +++ b/src/Model/Id4MeAgent.php @@ -63,7 +63,7 @@ class Id4MeAgent implements ModelInterface, ArrayAccess 'updater' => '\Domainrobot\Model\BasicUser', 'externalReference' => 'string', 'certificate' => '\Domainrobot\Model\VhostCertificate', - 'layoutAddon' => '\Domainrobot\Model\Configuration', + 'layoutAddon' => '\Domainrobot\Model\Id4MeLayoutConfiguration', 'name' => 'string', 'status' => '\Domainrobot\Model\Id4MeAgentStatus', 'records' => 'string[]' @@ -463,7 +463,7 @@ public function setCertificate($certificate) /** * Gets layoutAddon * - * @return \Domainrobot\Model\Configuration + * @return \Domainrobot\Model\Id4MeLayoutConfiguration */ public function getLayoutAddon() { @@ -473,7 +473,7 @@ public function getLayoutAddon() /** * Sets layoutAddon * - * @param \Domainrobot\Model\Configuration $layoutAddon Layout properties + * @param \Domainrobot\Model\Id4MeLayoutConfiguration $layoutAddon Layout properties * * @return $this */ diff --git a/src/Model/Id4MeIdentityAddons.php b/src/Model/Id4MeIdentityAddons.php new file mode 100644 index 00000000..7ffb38ac --- /dev/null +++ b/src/Model/Id4MeIdentityAddons.php @@ -0,0 +1,379 @@ + 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Id4MeLayoutConfiguration.php b/src/Model/Id4MeLayoutConfiguration.php new file mode 100644 index 00000000..7aecaa3e --- /dev/null +++ b/src/Model/Id4MeLayoutConfiguration.php @@ -0,0 +1,734 @@ + 'string', + 'loginLogoHeight' => 'string', + 'loginLogoWidth' => 'string', + 'menuLogoHeight' => 'string', + 'menuLogoWidth' => 'string', + 'primaryColor' => 'string', + 'primaryText' => 'string', + 'secondaryColor' => 'string', + 'loginLogoSrc' => 'string', + 'menuLogoSrc' => 'string', + 'about' => 'string', + 'privacy' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'title' => null, + 'loginLogoHeight' => null, + 'loginLogoWidth' => null, + 'menuLogoHeight' => null, + 'menuLogoWidth' => null, + 'primaryColor' => null, + 'primaryText' => null, + 'secondaryColor' => null, + 'loginLogoSrc' => null, + 'menuLogoSrc' => null, + 'about' => null, + 'privacy' => 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 = [ + 'title' => 'title', + 'loginLogoHeight' => 'loginLogoHeight', + 'loginLogoWidth' => 'loginLogoWidth', + 'menuLogoHeight' => 'menuLogoHeight', + 'menuLogoWidth' => 'menuLogoWidth', + 'primaryColor' => 'primaryColor', + 'primaryText' => 'primaryText', + 'secondaryColor' => 'secondaryColor', + 'loginLogoSrc' => 'loginLogoSrc', + 'menuLogoSrc' => 'menuLogoSrc', + 'about' => 'about', + 'privacy' => 'privacy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'loginLogoHeight' => 'setLoginLogoHeight', + 'loginLogoWidth' => 'setLoginLogoWidth', + 'menuLogoHeight' => 'setMenuLogoHeight', + 'menuLogoWidth' => 'setMenuLogoWidth', + 'primaryColor' => 'setPrimaryColor', + 'primaryText' => 'setPrimaryText', + 'secondaryColor' => 'setSecondaryColor', + 'loginLogoSrc' => 'setLoginLogoSrc', + 'menuLogoSrc' => 'setMenuLogoSrc', + 'about' => 'setAbout', + 'privacy' => 'setPrivacy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'loginLogoHeight' => 'getLoginLogoHeight', + 'loginLogoWidth' => 'getLoginLogoWidth', + 'menuLogoHeight' => 'getMenuLogoHeight', + 'menuLogoWidth' => 'getMenuLogoWidth', + 'primaryColor' => 'getPrimaryColor', + 'primaryText' => 'getPrimaryText', + 'secondaryColor' => 'getSecondaryColor', + 'loginLogoSrc' => 'getLoginLogoSrc', + 'menuLogoSrc' => 'getMenuLogoSrc', + 'about' => 'getAbout', + 'privacy' => 'getPrivacy' + ]; + + /** + * 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['title'] = isset($data['title']) ? $this->createData($data['title'], 'title') : null; + $this->container['loginLogoHeight'] = isset($data['loginLogoHeight']) ? $this->createData($data['loginLogoHeight'], 'loginLogoHeight') : null; + $this->container['loginLogoWidth'] = isset($data['loginLogoWidth']) ? $this->createData($data['loginLogoWidth'], 'loginLogoWidth') : null; + $this->container['menuLogoHeight'] = isset($data['menuLogoHeight']) ? $this->createData($data['menuLogoHeight'], 'menuLogoHeight') : null; + $this->container['menuLogoWidth'] = isset($data['menuLogoWidth']) ? $this->createData($data['menuLogoWidth'], 'menuLogoWidth') : null; + $this->container['primaryColor'] = isset($data['primaryColor']) ? $this->createData($data['primaryColor'], 'primaryColor') : null; + $this->container['primaryText'] = isset($data['primaryText']) ? $this->createData($data['primaryText'], 'primaryText') : null; + $this->container['secondaryColor'] = isset($data['secondaryColor']) ? $this->createData($data['secondaryColor'], 'secondaryColor') : null; + $this->container['loginLogoSrc'] = isset($data['loginLogoSrc']) ? $this->createData($data['loginLogoSrc'], 'loginLogoSrc') : null; + $this->container['menuLogoSrc'] = isset($data['menuLogoSrc']) ? $this->createData($data['menuLogoSrc'], 'menuLogoSrc') : null; + $this->container['about'] = isset($data['about']) ? $this->createData($data['about'], 'about') : null; + $this->container['privacy'] = isset($data['privacy']) ? $this->createData($data['privacy'], 'privacy') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title title + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets loginLogoHeight + * + * @return string + */ + public function getLoginLogoHeight() + { + return $this->container['loginLogoHeight']; + } + + /** + * Sets loginLogoHeight + * + * @param string $loginLogoHeight loginLogoHeight + * + * @return $this + */ + public function setLoginLogoHeight($loginLogoHeight) + { + $this->container['loginLogoHeight'] = $loginLogoHeight; + + return $this; + } + + /** + * Gets loginLogoWidth + * + * @return string + */ + public function getLoginLogoWidth() + { + return $this->container['loginLogoWidth']; + } + + /** + * Sets loginLogoWidth + * + * @param string $loginLogoWidth loginLogoWidth + * + * @return $this + */ + public function setLoginLogoWidth($loginLogoWidth) + { + $this->container['loginLogoWidth'] = $loginLogoWidth; + + return $this; + } + + /** + * Gets menuLogoHeight + * + * @return string + */ + public function getMenuLogoHeight() + { + return $this->container['menuLogoHeight']; + } + + /** + * Sets menuLogoHeight + * + * @param string $menuLogoHeight menuLogoHeight + * + * @return $this + */ + public function setMenuLogoHeight($menuLogoHeight) + { + $this->container['menuLogoHeight'] = $menuLogoHeight; + + return $this; + } + + /** + * Gets menuLogoWidth + * + * @return string + */ + public function getMenuLogoWidth() + { + return $this->container['menuLogoWidth']; + } + + /** + * Sets menuLogoWidth + * + * @param string $menuLogoWidth menuLogoWidth + * + * @return $this + */ + public function setMenuLogoWidth($menuLogoWidth) + { + $this->container['menuLogoWidth'] = $menuLogoWidth; + + return $this; + } + + /** + * Gets primaryColor + * + * @return string + */ + public function getPrimaryColor() + { + return $this->container['primaryColor']; + } + + /** + * Sets primaryColor + * + * @param string $primaryColor primaryColor + * + * @return $this + */ + public function setPrimaryColor($primaryColor) + { + $this->container['primaryColor'] = $primaryColor; + + return $this; + } + + /** + * Gets primaryText + * + * @return string + */ + public function getPrimaryText() + { + return $this->container['primaryText']; + } + + /** + * Sets primaryText + * + * @param string $primaryText primaryText + * + * @return $this + */ + public function setPrimaryText($primaryText) + { + $this->container['primaryText'] = $primaryText; + + return $this; + } + + /** + * Gets secondaryColor + * + * @return string + */ + public function getSecondaryColor() + { + return $this->container['secondaryColor']; + } + + /** + * Sets secondaryColor + * + * @param string $secondaryColor secondaryColor + * + * @return $this + */ + public function setSecondaryColor($secondaryColor) + { + $this->container['secondaryColor'] = $secondaryColor; + + return $this; + } + + /** + * Gets loginLogoSrc + * + * @return string + */ + public function getLoginLogoSrc() + { + return $this->container['loginLogoSrc']; + } + + /** + * Sets loginLogoSrc + * + * @param string $loginLogoSrc loginLogoSrc + * + * @return $this + */ + public function setLoginLogoSrc($loginLogoSrc) + { + $this->container['loginLogoSrc'] = $loginLogoSrc; + + return $this; + } + + /** + * Gets menuLogoSrc + * + * @return string + */ + public function getMenuLogoSrc() + { + return $this->container['menuLogoSrc']; + } + + /** + * Sets menuLogoSrc + * + * @param string $menuLogoSrc menuLogoSrc + * + * @return $this + */ + public function setMenuLogoSrc($menuLogoSrc) + { + $this->container['menuLogoSrc'] = $menuLogoSrc; + + return $this; + } + + /** + * Gets about + * + * @return string + */ + public function getAbout() + { + return $this->container['about']; + } + + /** + * Sets about + * + * @param string $about about + * + * @return $this + */ + public function setAbout($about) + { + $this->container['about'] = $about; + + return $this; + } + + /** + * Gets privacy + * + * @return string + */ + public function getPrivacy() + { + return $this->container['privacy']; + } + + /** + * Sets privacy + * + * @param string $privacy privacy + * + * @return $this + */ + public function setPrivacy($privacy) + { + $this->container['privacy'] = $privacy; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Id4meIdentity.php b/src/Model/Id4meIdentity.php index aa37fbda..740f3cd7 100644 --- a/src/Model/Id4meIdentity.php +++ b/src/Model/Id4meIdentity.php @@ -63,7 +63,7 @@ class Id4meIdentity implements ModelInterface, ArrayAccess 'updater' => '\Domainrobot\Model\BasicUser', 'agent' => '\Domainrobot\Model\Id4MeAgent', 'verifyExpire' => '\DateTime', - 'addons' => '\Domainrobot\Model\Configuration', + 'addons' => '\Domainrobot\Model\Id4MeIdentityAddons', 'magicLink' => 'string', 'claims' => '\Domainrobot\Model\Claims', 'showClaims' => 'bool', @@ -502,7 +502,7 @@ public function setVerifyExpire($verifyExpire) /** * Gets addons * - * @return \Domainrobot\Model\Configuration + * @return \Domainrobot\Model\Id4MeIdentityAddons */ public function getAddons() { @@ -512,7 +512,7 @@ public function getAddons() /** * Sets addons * - * @param \Domainrobot\Model\Configuration $addons Additional information + * @param \Domainrobot\Model\Id4MeIdentityAddons $addons Additional information * * @return $this */ diff --git a/src/Model/JsonResponseDataCertificateInstallCheckResult.php b/src/Model/JsonResponseDataCertificateInstallCheckResult.php new file mode 100644 index 00000000..38360ccf --- /dev/null +++ b/src/Model/JsonResponseDataCertificateInstallCheckResult.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\CertificateInstallCheckResult[]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\CertificateInstallCheckResult[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\CertificateInstallCheckResult[] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/JsonResponseDataListJsonResponseDataContact.php b/src/Model/JsonResponseDataListJsonResponseDataContact.php new file mode 100644 index 00000000..610ccea4 --- /dev/null +++ b/src/Model/JsonResponseDataListJsonResponseDataContact.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\JsonResponseDataContact[][]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\JsonResponseDataContact[][] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\JsonResponseDataContact[][] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/JsonResponseDataListJsonResponseDataSslContact.php b/src/Model/JsonResponseDataListJsonResponseDataSslContact.php new file mode 100644 index 00000000..12838889 --- /dev/null +++ b/src/Model/JsonResponseDataListJsonResponseDataSslContact.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\JsonResponseDataSslContact[][]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\JsonResponseDataSslContact[][] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\JsonResponseDataSslContact[][] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/JsonResponseDataSiteSealInformation.php b/src/Model/JsonResponseDataSiteSealInformation.php new file mode 100644 index 00000000..aa5f7cde --- /dev/null +++ b/src/Model/JsonResponseDataSiteSealInformation.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\SiteSealInformation[]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\SiteSealInformation[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\SiteSealInformation[] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/JsonResponseDataTaskUserLimit.php b/src/Model/JsonResponseDataTaskUserLimit.php new file mode 100644 index 00000000..f454004c --- /dev/null +++ b/src/Model/JsonResponseDataTaskUserLimit.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\TaskUserLimit[]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\TaskUserLimit[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\TaskUserLimit[] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/JsonResponseDataUserSalesReport.php b/src/Model/JsonResponseDataUserSalesReport.php new file mode 100644 index 00000000..c96971cc --- /dev/null +++ b/src/Model/JsonResponseDataUserSalesReport.php @@ -0,0 +1,554 @@ + 'string', + 'messages' => '\Domainrobot\Model\Message[]', + 'status' => '\Domainrobot\Model\ResponseStatus', + 'object' => '\Domainrobot\Model\ResponseObject', + 'data' => '\Domainrobot\Model\UserSalesReport[]', + 'ctid' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'stid' => null, + 'messages' => null, + 'status' => null, + 'object' => null, + 'data' => null, + 'ctid' => 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 = [ + 'stid' => 'stid', + 'messages' => 'messages', + 'status' => 'status', + 'object' => 'object', + 'data' => 'data', + 'ctid' => 'ctid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'stid' => 'setStid', + 'messages' => 'setMessages', + 'status' => 'setStatus', + 'object' => 'setObject', + 'data' => 'setData', + 'ctid' => 'setCtid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'stid' => 'getStid', + 'messages' => 'getMessages', + 'status' => 'getStatus', + 'object' => 'getObject', + 'data' => 'getData', + 'ctid' => 'getCtid' + ]; + + /** + * 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['stid'] = isset($data['stid']) ? $this->createData($data['stid'], 'stid') : null; + $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; + $this->container['data'] = isset($data['data']) ? $this->createData($data['data'], 'data') : null; + $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets stid + * + * @return string + */ + public function getStid() + { + return $this->container['stid']; + } + + /** + * Sets stid + * + * @param string $stid The server transaction id for the response. + * + * @return $this + */ + public function setStid($stid) + { + $this->container['stid'] = $stid; + + return $this; + } + + /** + * Gets messages + * + * @return \Domainrobot\Model\Message[] + */ + public function getMessages() + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \Domainrobot\Model\Message[] $messages The messages belonging to the response. + * + * @return $this + */ + public function setMessages($messages) + { + $this->container['messages'] = $messages; + + return $this; + } + + /** + * Gets status + * + * @return \Domainrobot\Model\ResponseStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\ResponseStatus $status The status of the response. + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets object + * + * @return \Domainrobot\Model\ResponseObject + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param \Domainrobot\Model\ResponseObject $object The object of the response. + * + * @return $this + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + + /** + * Gets data + * + * @return \Domainrobot\Model\UserSalesReport[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Domainrobot\Model\UserSalesReport[] $data The data for the response. The type of the objects are depending on the request and are also specified in the responseObject value of the response. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets ctid + * + * @return string + */ + public function getCtid() + { + return $this->container['ctid']; + } + + /** + * Sets ctid + * + * @param string $ctid The client transaction id for the response. + * + * @return $this + */ + public function setCtid($ctid) + { + $this->container['ctid'] = $ctid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/Locale.php b/src/Model/Locale.php new file mode 100644 index 00000000..b7c97170 --- /dev/null +++ b/src/Model/Locale.php @@ -0,0 +1,379 @@ + 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/PeriodicBilling.php b/src/Model/PeriodicBilling.php index 809a5256..f2e1b342 100644 --- a/src/Model/PeriodicBilling.php +++ b/src/Model/PeriodicBilling.php @@ -68,7 +68,10 @@ class PeriodicBilling implements ModelInterface, ArrayAccess 'articleTypeLabel' => 'string', 'articleLabel' => 'string', 'item' => '\Domainrobot\Model\PeriodicBilling[]', - 'businessCase' => 'string' + 'expire' => '\DateTime', + 'cancelation' => '\DateTime', + 'businessCase' => 'string', + 'extensions' => '\Domainrobot\Model\BillingEventExtensions' ]; /** @@ -88,7 +91,10 @@ class PeriodicBilling implements ModelInterface, ArrayAccess 'articleTypeLabel' => null, 'articleLabel' => null, 'item' => null, - 'businessCase' => null + 'expire' => 'date-time', + 'cancelation' => 'date-time', + 'businessCase' => null, + 'extensions' => null ]; /** @@ -129,7 +135,10 @@ public static function swaggerFormats() 'articleTypeLabel' => 'articleTypeLabel', 'articleLabel' => 'articleLabel', 'item' => 'item', - 'businessCase' => 'businessCase' + 'expire' => 'expire', + 'cancelation' => 'cancelation', + 'businessCase' => 'businessCase', + 'extensions' => 'extensions' ]; /** @@ -149,7 +158,10 @@ public static function swaggerFormats() 'articleTypeLabel' => 'setArticleTypeLabel', 'articleLabel' => 'setArticleLabel', 'item' => 'setItem', - 'businessCase' => 'setBusinessCase' + 'expire' => 'setExpire', + 'cancelation' => 'setCancelation', + 'businessCase' => 'setBusinessCase', + 'extensions' => 'setExtensions' ]; /** @@ -169,7 +181,10 @@ public static function swaggerFormats() 'articleTypeLabel' => 'getArticleTypeLabel', 'articleLabel' => 'getArticleLabel', 'item' => 'getItem', - 'businessCase' => 'getBusinessCase' + 'expire' => 'getExpire', + 'cancelation' => 'getCancelation', + 'businessCase' => 'getBusinessCase', + 'extensions' => 'getExtensions' ]; /** @@ -243,7 +258,10 @@ public function __construct(array $data = null) $this->container['articleTypeLabel'] = isset($data['articleTypeLabel']) ? $this->createData($data['articleTypeLabel'], 'articleTypeLabel') : null; $this->container['articleLabel'] = isset($data['articleLabel']) ? $this->createData($data['articleLabel'], 'articleLabel') : null; $this->container['item'] = isset($data['item']) ? $this->createData($data['item'], 'item') : null; + $this->container['expire'] = isset($data['expire']) ? $this->createData($data['expire'], 'expire') : null; + $this->container['cancelation'] = isset($data['cancelation']) ? $this->createData($data['cancelation'], 'cancelation') : null; $this->container['businessCase'] = isset($data['businessCase']) ? $this->createData($data['businessCase'], 'businessCase') : null; + $this->container['extensions'] = isset($data['extensions']) ? $this->createData($data['extensions'], 'extensions') : null; } /** @@ -589,6 +607,54 @@ public function setItem($item) return $this; } + /** + * Gets expire + * + * @return \DateTime + */ + public function getExpire() + { + return $this->container['expire']; + } + + /** + * Sets expire + * + * @param \DateTime $expire The expire date. + * + * @return $this + */ + public function setExpire($expire) + { + $this->container['expire'] = $expire; + + return $this; + } + + /** + * Gets cancelation + * + * @return \DateTime + */ + public function getCancelation() + { + return $this->container['cancelation']; + } + + /** + * Sets cancelation + * + * @param \DateTime $cancelation The cancelation date. + * + * @return $this + */ + public function setCancelation($cancelation) + { + $this->container['cancelation'] = $cancelation; + + return $this; + } + /** * Gets businessCase * @@ -612,6 +678,30 @@ public function setBusinessCase($businessCase) return $this; } + + /** + * Gets extensions + * + * @return \Domainrobot\Model\BillingEventExtensions + */ + public function getExtensions() + { + return $this->container['extensions']; + } + + /** + * Sets extensions + * + * @param \Domainrobot\Model\BillingEventExtensions $extensions The additional data + * + * @return $this + */ + public function setExtensions($extensions) + { + $this->container['extensions'] = $extensions; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/PolicyMode.php b/src/Model/PolicyMode.php new file mode 100644 index 00000000..b5b737a9 --- /dev/null +++ b/src/Model/PolicyMode.php @@ -0,0 +1,66 @@ + 'string', 'messages' => '\Domainrobot\Model\Message[]', 'flags' => 'string', + 'notice' => 'string', 'created' => '\DateTime', 'object' => '\Domainrobot\Model\ResponseObject' ]; @@ -83,6 +84,7 @@ class PollMessage implements ModelInterface, ArrayAccess 'ctid' => null, 'messages' => null, 'flags' => null, + 'notice' => null, 'created' => 'date-time', 'object' => null ]; @@ -122,6 +124,7 @@ public static function swaggerFormats() 'ctid' => 'ctid', 'messages' => 'messages', 'flags' => 'flags', + 'notice' => 'notice', 'created' => 'created', 'object' => 'object' ]; @@ -140,6 +143,7 @@ public static function swaggerFormats() 'ctid' => 'setCtid', 'messages' => 'setMessages', 'flags' => 'setFlags', + 'notice' => 'setNotice', 'created' => 'setCreated', 'object' => 'setObject' ]; @@ -158,6 +162,7 @@ public static function swaggerFormats() 'ctid' => 'getCtid', 'messages' => 'getMessages', 'flags' => 'getFlags', + 'notice' => 'getNotice', 'created' => 'getCreated', 'object' => 'getObject' ]; @@ -230,6 +235,7 @@ public function __construct(array $data = null) $this->container['ctid'] = isset($data['ctid']) ? $this->createData($data['ctid'], 'ctid') : null; $this->container['messages'] = isset($data['messages']) ? $this->createData($data['messages'], 'messages') : null; $this->container['flags'] = isset($data['flags']) ? $this->createData($data['flags'], 'flags') : null; + $this->container['notice'] = isset($data['notice']) ? $this->createData($data['notice'], 'notice') : null; $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['object'] = isset($data['object']) ? $this->createData($data['object'], 'object') : null; } @@ -505,6 +511,30 @@ public function setFlags($flags) return $this; } + /** + * Gets notice + * + * @return string + */ + public function getNotice() + { + return $this->container['notice']; + } + + /** + * Sets notice + * + * @param string $notice Optional notice. + * + * @return $this + */ + public function setNotice($notice) + { + $this->container['notice'] = $notice; + + return $this; + } + /** * Gets created * diff --git a/src/Model/PriceServiceEntity.php b/src/Model/PriceServiceEntity.php index dac3c1b5..7cfd31f6 100644 --- a/src/Model/PriceServiceEntity.php +++ b/src/Model/PriceServiceEntity.php @@ -302,7 +302,7 @@ public function getCondition() /** * Sets condition * - * @param \Domainrobot\Model\ServiceEntity $condition Lorem Ipum + * @param \Domainrobot\Model\ServiceEntity $condition service entity * * @return $this */ diff --git a/src/Model/SEPAMandate.php b/src/Model/SEPAMandate.php index d6dd5677..052a8758 100644 --- a/src/Model/SEPAMandate.php +++ b/src/Model/SEPAMandate.php @@ -59,13 +59,15 @@ class SEPAMandate implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'created' => '\DateTime', 'updated' => '\DateTime', + 'document' => '\Domainrobot\Model\Document', 'reference' => 'string', 'confirmSignature' => '\DateTime', - 'confirmIp' => '\Domainrobot\Model\InetAddress', + 'confirmIp' => 'string', 'confirmUseragent' => 'string', 'confirmChecked' => 'bool', 'expire' => '\DateTime', 'histories' => '\Domainrobot\Model\SEPAMandate[]', + 'status' => '\Domainrobot\Model\SepaStatus', 'accountHolder' => 'string', 'iban' => 'string', 'bic' => 'string' @@ -79,6 +81,7 @@ class SEPAMandate implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'created' => 'date-time', 'updated' => 'date-time', + 'document' => null, 'reference' => null, 'confirmSignature' => 'date-time', 'confirmIp' => null, @@ -86,6 +89,7 @@ class SEPAMandate implements ModelInterface, ArrayAccess 'confirmChecked' => null, 'expire' => 'date-time', 'histories' => null, + 'status' => null, 'accountHolder' => null, 'iban' => null, 'bic' => null @@ -120,6 +124,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'created' => 'created', 'updated' => 'updated', + 'document' => 'document', 'reference' => 'reference', 'confirmSignature' => 'confirmSignature', 'confirmIp' => 'confirmIp', @@ -127,6 +132,7 @@ public static function swaggerFormats() 'confirmChecked' => 'confirmChecked', 'expire' => 'expire', 'histories' => 'histories', + 'status' => 'status', 'accountHolder' => 'accountHolder', 'iban' => 'iban', 'bic' => 'bic' @@ -140,6 +146,7 @@ public static function swaggerFormats() protected static $setters = [ 'created' => 'setCreated', 'updated' => 'setUpdated', + 'document' => 'setDocument', 'reference' => 'setReference', 'confirmSignature' => 'setConfirmSignature', 'confirmIp' => 'setConfirmIp', @@ -147,6 +154,7 @@ public static function swaggerFormats() 'confirmChecked' => 'setConfirmChecked', 'expire' => 'setExpire', 'histories' => 'setHistories', + 'status' => 'setStatus', 'accountHolder' => 'setAccountHolder', 'iban' => 'setIban', 'bic' => 'setBic' @@ -160,6 +168,7 @@ public static function swaggerFormats() protected static $getters = [ 'created' => 'getCreated', 'updated' => 'getUpdated', + 'document' => 'getDocument', 'reference' => 'getReference', 'confirmSignature' => 'getConfirmSignature', 'confirmIp' => 'getConfirmIp', @@ -167,6 +176,7 @@ public static function swaggerFormats() 'confirmChecked' => 'getConfirmChecked', 'expire' => 'getExpire', 'histories' => 'getHistories', + 'status' => 'getStatus', 'accountHolder' => 'getAccountHolder', 'iban' => 'getIban', 'bic' => 'getBic' @@ -234,6 +244,7 @@ public function __construct(array $data = null) { $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['document'] = isset($data['document']) ? $this->createData($data['document'], 'document') : null; $this->container['reference'] = isset($data['reference']) ? $this->createData($data['reference'], 'reference') : null; $this->container['confirmSignature'] = isset($data['confirmSignature']) ? $this->createData($data['confirmSignature'], 'confirmSignature') : null; $this->container['confirmIp'] = isset($data['confirmIp']) ? $this->createData($data['confirmIp'], 'confirmIp') : null; @@ -241,6 +252,7 @@ public function __construct(array $data = null) $this->container['confirmChecked'] = isset($data['confirmChecked']) ? $this->createData($data['confirmChecked'], 'confirmChecked') : null; $this->container['expire'] = isset($data['expire']) ? $this->createData($data['expire'], 'expire') : null; $this->container['histories'] = isset($data['histories']) ? $this->createData($data['histories'], 'histories') : null; + $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; $this->container['accountHolder'] = isset($data['accountHolder']) ? $this->createData($data['accountHolder'], 'accountHolder') : null; $this->container['iban'] = isset($data['iban']) ? $this->createData($data['iban'], 'iban') : null; $this->container['bic'] = isset($data['bic']) ? $this->createData($data['bic'], 'bic') : null; @@ -382,6 +394,30 @@ public function setUpdated($updated) return $this; } + /** + * Gets document + * + * @return \Domainrobot\Model\Document + */ + public function getDocument() + { + return $this->container['document']; + } + + /** + * Sets document + * + * @param \Domainrobot\Model\Document $document The linked pdf + * + * @return $this + */ + public function setDocument($document) + { + $this->container['document'] = $document; + + return $this; + } + /** * Gets reference * @@ -433,7 +469,7 @@ public function setConfirmSignature($confirmSignature) /** * Gets confirmIp * - * @return \Domainrobot\Model\InetAddress + * @return string */ public function getConfirmIp() { @@ -443,7 +479,7 @@ public function getConfirmIp() /** * Sets confirmIp * - * @param \Domainrobot\Model\InetAddress $confirmIp The address of the confirm signature + * @param string $confirmIp The address of the confirm signature * * @return $this */ @@ -550,6 +586,30 @@ public function setHistories($histories) return $this; } + /** + * Gets status + * + * @return \Domainrobot\Model\SepaStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Domainrobot\Model\SepaStatus $status The status of the mandate + * + * @return $this + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + /** * Gets accountHolder * diff --git a/src/Model/SanType.php b/src/Model/SanType.php new file mode 100644 index 00000000..5ff76986 --- /dev/null +++ b/src/Model/SanType.php @@ -0,0 +1,64 @@ + 'string', + 'size' => 'string', + 'html' => 'string', + 'icon' => 'string', + 'preview' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'hash' => null, + 'size' => null, + 'html' => null, + 'icon' => null, + 'preview' => 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 = [ + 'hash' => 'hash', + 'size' => 'size', + 'html' => 'html', + 'icon' => 'icon', + 'preview' => 'preview' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'hash' => 'setHash', + 'size' => 'setSize', + 'html' => 'setHtml', + 'icon' => 'setIcon', + 'preview' => 'setPreview' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'hash' => 'getHash', + 'size' => 'getSize', + 'html' => 'getHtml', + 'icon' => 'getIcon', + 'preview' => 'getPreview' + ]; + + /** + * 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['hash'] = isset($data['hash']) ? $this->createData($data['hash'], 'hash') : null; + $this->container['size'] = isset($data['size']) ? $this->createData($data['size'], 'size') : null; + $this->container['html'] = isset($data['html']) ? $this->createData($data['html'], 'html') : null; + $this->container['icon'] = isset($data['icon']) ? $this->createData($data['icon'], 'icon') : null; + $this->container['preview'] = isset($data['preview']) ? $this->createData($data['preview'], 'preview') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets hash + * + * @return string + */ + public function getHash() + { + return $this->container['hash']; + } + + /** + * Sets hash + * + * @param string $hash The hash value for the site seal. + * + * @return $this + */ + public function setHash($hash) + { + $this->container['hash'] = $hash; + + return $this; + } + + /** + * Gets size + * + * @return string + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string $size The size of the site seal. + * + * @return $this + */ + public function setSize($size) + { + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets html + * + * @return string + */ + public function getHtml() + { + return $this->container['html']; + } + + /** + * Sets html + * + * @param string $html The plain html markup. + * + * @return $this + */ + public function setHtml($html) + { + $this->container['html'] = $html; + + return $this; + } + + /** + * Gets icon + * + * @return string + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string $icon The icon url. + * + * @return $this + */ + public function setIcon($icon) + { + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets preview + * + * @return string + */ + public function getPreview() + { + return $this->container['preview']; + } + + /** + * Sets preview + * + * @param string $preview The preview url. + * + * @return $this + */ + public function setPreview($preview) + { + $this->container['preview'] = $preview; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/SpamPolicy.php b/src/Model/SpamPolicy.php index b3c92888..3cb7c7d8 100644 --- a/src/Model/SpamPolicy.php +++ b/src/Model/SpamPolicy.php @@ -57,6 +57,7 @@ class SpamPolicy implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'mode' => '\Domainrobot\Model\PolicyMode', 'modifySubject' => 'bool', 'tagHeader' => 'double', 'spam' => 'double', @@ -70,6 +71,7 @@ class SpamPolicy implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'mode' => null, 'modifySubject' => null, 'tagHeader' => 'double', 'spam' => 'double', @@ -104,6 +106,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'mode' => 'mode', 'modifySubject' => 'modifySubject', 'tagHeader' => 'tagHeader', 'spam' => 'spam', @@ -117,6 +120,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'mode' => 'setMode', 'modifySubject' => 'setModifySubject', 'tagHeader' => 'setTagHeader', 'spam' => 'setSpam', @@ -130,6 +134,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'mode' => 'getMode', 'modifySubject' => 'getModifySubject', 'tagHeader' => 'getTagHeader', 'spam' => 'getSpam', @@ -197,6 +202,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['mode'] = isset($data['mode']) ? $this->createData($data['mode'], 'mode') : null; $this->container['modifySubject'] = isset($data['modifySubject']) ? $this->createData($data['modifySubject'], 'modifySubject') : null; $this->container['tagHeader'] = isset($data['tagHeader']) ? $this->createData($data['tagHeader'], 'tagHeader') : null; $this->container['spam'] = isset($data['spam']) ? $this->createData($data['spam'], 'spam') : null; @@ -311,6 +317,30 @@ public function valid() } + /** + * Gets mode + * + * @return \Domainrobot\Model\PolicyMode + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param \Domainrobot\Model\PolicyMode $mode mode + * + * @return $this + */ + public function setMode($mode) + { + $this->container['mode'] = $mode; + + return $this; + } + /** * Gets modifySubject * diff --git a/src/Model/SslContact.php b/src/Model/SslContact.php index 6ffe902f..64267e2f 100644 --- a/src/Model/SslContact.php +++ b/src/Model/SslContact.php @@ -59,6 +59,8 @@ class SslContact implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'created' => '\DateTime', 'updated' => '\DateTime', + 'extensions' => '\Domainrobot\Model\SslContactExtensions', + 'references' => '\Domainrobot\Model\SslContactReference[]', 'fname' => 'string', 'lname' => 'string', 'phone' => 'string', @@ -84,6 +86,8 @@ class SslContact implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'created' => 'date-time', 'updated' => 'date-time', + 'extensions' => null, + 'references' => null, 'fname' => null, 'lname' => null, 'phone' => null, @@ -130,6 +134,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'created' => 'created', 'updated' => 'updated', + 'extensions' => 'extensions', + 'references' => 'references', 'fname' => 'fname', 'lname' => 'lname', 'phone' => 'phone', @@ -155,6 +161,8 @@ public static function swaggerFormats() protected static $setters = [ 'created' => 'setCreated', 'updated' => 'setUpdated', + 'extensions' => 'setExtensions', + 'references' => 'setReferences', 'fname' => 'setFname', 'lname' => 'setLname', 'phone' => 'setPhone', @@ -180,6 +188,8 @@ public static function swaggerFormats() protected static $getters = [ 'created' => 'getCreated', 'updated' => 'getUpdated', + 'extensions' => 'getExtensions', + 'references' => 'getReferences', 'fname' => 'getFname', 'lname' => 'getLname', 'phone' => 'getPhone', @@ -259,6 +269,8 @@ public function __construct(array $data = null) { $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['extensions'] = isset($data['extensions']) ? $this->createData($data['extensions'], 'extensions') : null; + $this->container['references'] = isset($data['references']) ? $this->createData($data['references'], 'references') : null; $this->container['fname'] = isset($data['fname']) ? $this->createData($data['fname'], 'fname') : null; $this->container['lname'] = isset($data['lname']) ? $this->createData($data['lname'], 'lname') : null; $this->container['phone'] = isset($data['phone']) ? $this->createData($data['phone'], 'phone') : null; @@ -418,6 +430,54 @@ public function setUpdated($updated) return $this; } + /** + * Gets extensions + * + * @return \Domainrobot\Model\SslContactExtensions + */ + public function getExtensions() + { + return $this->container['extensions']; + } + + /** + * Sets extensions + * + * @param \Domainrobot\Model\SslContactExtensions $extensions The contact extensions + * + * @return $this + */ + public function setExtensions($extensions) + { + $this->container['extensions'] = $extensions; + + return $this; + } + + /** + * Gets references + * + * @return \Domainrobot\Model\SslContactReference[] + */ + public function getReferences() + { + return $this->container['references']; + } + + /** + * Sets references + * + * @param \Domainrobot\Model\SslContactReference[] $references The contact references + * + * @return $this + */ + public function setReferences($references) + { + $this->container['references'] = $references; + + return $this; + } + /** * Gets fname * diff --git a/src/Model/SslContactExtensions.php b/src/Model/SslContactExtensions.php new file mode 100644 index 00000000..8293ea9a --- /dev/null +++ b/src/Model/SslContactExtensions.php @@ -0,0 +1,404 @@ + '\Domainrobot\Model\SslContactGeneralExtensions' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'general' => 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 = [ + 'general' => 'general' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'general' => 'setGeneral' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'general' => 'getGeneral' + ]; + + /** + * 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['general'] = isset($data['general']) ? $this->createData($data['general'], 'general') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets general + * + * @return \Domainrobot\Model\SslContactGeneralExtensions + */ + public function getGeneral() + { + return $this->container['general']; + } + + /** + * Sets general + * + * @param \Domainrobot\Model\SslContactGeneralExtensions $general The general extensions + * + * @return $this + */ + public function setGeneral($general) + { + $this->container['general'] = $general; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/SslContactGeneralExtensions.php b/src/Model/SslContactGeneralExtensions.php new file mode 100644 index 00000000..23c2927e --- /dev/null +++ b/src/Model/SslContactGeneralExtensions.php @@ -0,0 +1,524 @@ + 'string', + 'joiLocality' => 'string', + 'joiStateOrProvince' => 'string', + 'companyNumber' => 'string', + 'businessCategory' => '\Domainrobot\Model\BusinessCategory' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'joiCountryName' => null, + 'joiLocality' => null, + 'joiStateOrProvince' => null, + 'companyNumber' => null, + 'businessCategory' => 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 = [ + 'joiCountryName' => 'joiCountryName', + 'joiLocality' => 'joiLocality', + 'joiStateOrProvince' => 'joiStateOrProvince', + 'companyNumber' => 'companyNumber', + 'businessCategory' => 'businessCategory' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'joiCountryName' => 'setJoiCountryName', + 'joiLocality' => 'setJoiLocality', + 'joiStateOrProvince' => 'setJoiStateOrProvince', + 'companyNumber' => 'setCompanyNumber', + 'businessCategory' => 'setBusinessCategory' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'joiCountryName' => 'getJoiCountryName', + 'joiLocality' => 'getJoiLocality', + 'joiStateOrProvince' => 'getJoiStateOrProvince', + 'companyNumber' => 'getCompanyNumber', + 'businessCategory' => 'getBusinessCategory' + ]; + + /** + * 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['joiCountryName'] = isset($data['joiCountryName']) ? $this->createData($data['joiCountryName'], 'joiCountryName') : null; + $this->container['joiLocality'] = isset($data['joiLocality']) ? $this->createData($data['joiLocality'], 'joiLocality') : null; + $this->container['joiStateOrProvince'] = isset($data['joiStateOrProvince']) ? $this->createData($data['joiStateOrProvince'], 'joiStateOrProvince') : null; + $this->container['companyNumber'] = isset($data['companyNumber']) ? $this->createData($data['companyNumber'], 'companyNumber') : null; + $this->container['businessCategory'] = isset($data['businessCategory']) ? $this->createData($data['businessCategory'], 'businessCategory') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets joiCountryName + * + * @return string + */ + public function getJoiCountryName() + { + return $this->container['joiCountryName']; + } + + /** + * Sets joiCountryName + * + * @param string $joiCountryName Country of judicial formation + * + * @return $this + */ + public function setJoiCountryName($joiCountryName) + { + $this->container['joiCountryName'] = $joiCountryName; + + return $this; + } + + /** + * Gets joiLocality + * + * @return string + */ + public function getJoiLocality() + { + return $this->container['joiLocality']; + } + + /** + * Sets joiLocality + * + * @param string $joiLocality Locality or city of judicial formation + * + * @return $this + */ + public function setJoiLocality($joiLocality) + { + $this->container['joiLocality'] = $joiLocality; + + return $this; + } + + /** + * Gets joiStateOrProvince + * + * @return string + */ + public function getJoiStateOrProvince() + { + return $this->container['joiStateOrProvince']; + } + + /** + * Sets joiStateOrProvince + * + * @param string $joiStateOrProvince State or province of judicial formation + * + * @return $this + */ + public function setJoiStateOrProvince($joiStateOrProvince) + { + $this->container['joiStateOrProvince'] = $joiStateOrProvince; + + return $this; + } + + /** + * Gets companyNumber + * + * @return string + */ + public function getCompanyNumber() + { + return $this->container['companyNumber']; + } + + /** + * Sets companyNumber + * + * @param string $companyNumber The company number + * + * @return $this + */ + public function setCompanyNumber($companyNumber) + { + $this->container['companyNumber'] = $companyNumber; + + return $this; + } + + /** + * Gets businessCategory + * + * @return \Domainrobot\Model\BusinessCategory + */ + public function getBusinessCategory() + { + return $this->container['businessCategory']; + } + + /** + * Sets businessCategory + * + * @param \Domainrobot\Model\BusinessCategory $businessCategory Additional validation data required for certain Comodo products. + * + * @return $this + */ + public function setBusinessCategory($businessCategory) + { + $this->container['businessCategory'] = $businessCategory; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/SslContactReference.php b/src/Model/SslContactReference.php new file mode 100644 index 00000000..396a4c73 --- /dev/null +++ b/src/Model/SslContactReference.php @@ -0,0 +1,434 @@ + '\DateTime', + 'updated' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time' + ]; + + /** + * 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 = [ + 'created' => 'created', + 'updated' => 'updated' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/SubjectAlternativeName.php b/src/Model/SubjectAlternativeName.php index 862b2da5..ce0e38ae 100644 --- a/src/Model/SubjectAlternativeName.php +++ b/src/Model/SubjectAlternativeName.php @@ -57,9 +57,14 @@ class SubjectAlternativeName implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'created' => '\DateTime', + 'updated' => '\DateTime', + 'type' => '\Domainrobot\Model\SanType', + 'sslCertificateId' => 'int', 'name' => 'string', 'approverEmail' => 'string', - 'orderId' => 'string' + 'orderId' => 'string', + 'free' => 'bool' ]; /** @@ -68,9 +73,14 @@ class SubjectAlternativeName implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'type' => null, + 'sslCertificateId' => 'int32', 'name' => null, 'approverEmail' => null, - 'orderId' => null + 'orderId' => null, + 'free' => null ]; /** @@ -100,9 +110,14 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'created' => 'created', + 'updated' => 'updated', + 'type' => 'type', + 'sslCertificateId' => 'sslCertificateId', 'name' => 'name', 'approverEmail' => 'approverEmail', - 'orderId' => 'orderId' + 'orderId' => 'orderId', + 'free' => 'free' ]; /** @@ -111,9 +126,14 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'type' => 'setType', + 'sslCertificateId' => 'setSslCertificateId', 'name' => 'setName', 'approverEmail' => 'setApproverEmail', - 'orderId' => 'setOrderId' + 'orderId' => 'setOrderId', + 'free' => 'setFree' ]; /** @@ -122,9 +142,14 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'type' => 'getType', + 'sslCertificateId' => 'getSslCertificateId', 'name' => 'getName', 'approverEmail' => 'getApproverEmail', - 'orderId' => 'getOrderId' + 'orderId' => 'getOrderId', + 'free' => 'getFree' ]; /** @@ -187,9 +212,14 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['type'] = isset($data['type']) ? $this->createData($data['type'], 'type') : null; + $this->container['sslCertificateId'] = isset($data['sslCertificateId']) ? $this->createData($data['sslCertificateId'], 'sslCertificateId') : null; $this->container['name'] = isset($data['name']) ? $this->createData($data['name'], 'name') : null; $this->container['approverEmail'] = isset($data['approverEmail']) ? $this->createData($data['approverEmail'], 'approverEmail') : null; $this->container['orderId'] = isset($data['orderId']) ? $this->createData($data['orderId'], 'orderId') : null; + $this->container['free'] = isset($data['free']) ? $this->createData($data['free'], 'free') : null; } /** @@ -271,6 +301,102 @@ public function valid() } + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets type + * + * @return \Domainrobot\Model\SanType + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Domainrobot\Model\SanType $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets sslCertificateId + * + * @return int + */ + public function getSslCertificateId() + { + return $this->container['sslCertificateId']; + } + + /** + * Sets sslCertificateId + * + * @param int $sslCertificateId sslCertificateId + * + * @return $this + */ + public function setSslCertificateId($sslCertificateId) + { + $this->container['sslCertificateId'] = $sslCertificateId; + + return $this; + } + /** * Gets name * @@ -342,6 +468,30 @@ public function setOrderId($orderId) return $this; } + + /** + * Gets free + * + * @return bool + */ + public function getFree() + { + return $this->container['free']; + } + + /** + * Sets free + * + * @param bool $free Defines whether the san was free or not + * + * @return $this + */ + public function setFree($free) + { + $this->container['free'] = $free; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 09141d50..b515e33d 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -68,10 +68,14 @@ class Subscription implements ModelInterface, ArrayAccess 'articleTypeLabel' => 'string', 'articleLabel' => 'string', 'item' => '\Domainrobot\Model\PeriodicBilling[]', + 'expire' => '\DateTime', + 'cancelation' => '\DateTime', 'limits' => '\Domainrobot\Model\BillingObjectLimit[]', 'acls' => '\Domainrobot\Model\UserAcl[]', 'variant' => 'string', - 'businessCase' => 'string' + 'cancelationEffective' => '\DateTime', + 'businessCase' => 'string', + 'extensions' => '\Domainrobot\Model\BillingEventExtensions' ]; /** @@ -91,10 +95,14 @@ class Subscription implements ModelInterface, ArrayAccess 'articleTypeLabel' => null, 'articleLabel' => null, 'item' => null, + 'expire' => 'date-time', + 'cancelation' => 'date-time', 'limits' => null, 'acls' => null, 'variant' => null, - 'businessCase' => null + 'cancelationEffective' => 'date-time', + 'businessCase' => null, + 'extensions' => null ]; /** @@ -135,10 +143,14 @@ public static function swaggerFormats() 'articleTypeLabel' => 'articleTypeLabel', 'articleLabel' => 'articleLabel', 'item' => 'item', + 'expire' => 'expire', + 'cancelation' => 'cancelation', 'limits' => 'limits', 'acls' => 'acls', 'variant' => 'variant', - 'businessCase' => 'businessCase' + 'cancelationEffective' => 'cancelationEffective', + 'businessCase' => 'businessCase', + 'extensions' => 'extensions' ]; /** @@ -158,10 +170,14 @@ public static function swaggerFormats() 'articleTypeLabel' => 'setArticleTypeLabel', 'articleLabel' => 'setArticleLabel', 'item' => 'setItem', + 'expire' => 'setExpire', + 'cancelation' => 'setCancelation', 'limits' => 'setLimits', 'acls' => 'setAcls', 'variant' => 'setVariant', - 'businessCase' => 'setBusinessCase' + 'cancelationEffective' => 'setCancelationEffective', + 'businessCase' => 'setBusinessCase', + 'extensions' => 'setExtensions' ]; /** @@ -181,10 +197,14 @@ public static function swaggerFormats() 'articleTypeLabel' => 'getArticleTypeLabel', 'articleLabel' => 'getArticleLabel', 'item' => 'getItem', + 'expire' => 'getExpire', + 'cancelation' => 'getCancelation', 'limits' => 'getLimits', 'acls' => 'getAcls', 'variant' => 'getVariant', - 'businessCase' => 'getBusinessCase' + 'cancelationEffective' => 'getCancelationEffective', + 'businessCase' => 'getBusinessCase', + 'extensions' => 'getExtensions' ]; /** @@ -258,10 +278,14 @@ public function __construct(array $data = null) $this->container['articleTypeLabel'] = isset($data['articleTypeLabel']) ? $this->createData($data['articleTypeLabel'], 'articleTypeLabel') : null; $this->container['articleLabel'] = isset($data['articleLabel']) ? $this->createData($data['articleLabel'], 'articleLabel') : null; $this->container['item'] = isset($data['item']) ? $this->createData($data['item'], 'item') : null; + $this->container['expire'] = isset($data['expire']) ? $this->createData($data['expire'], 'expire') : null; + $this->container['cancelation'] = isset($data['cancelation']) ? $this->createData($data['cancelation'], 'cancelation') : null; $this->container['limits'] = isset($data['limits']) ? $this->createData($data['limits'], 'limits') : null; $this->container['acls'] = isset($data['acls']) ? $this->createData($data['acls'], 'acls') : null; $this->container['variant'] = isset($data['variant']) ? $this->createData($data['variant'], 'variant') : null; + $this->container['cancelationEffective'] = isset($data['cancelationEffective']) ? $this->createData($data['cancelationEffective'], 'cancelationEffective') : null; $this->container['businessCase'] = isset($data['businessCase']) ? $this->createData($data['businessCase'], 'businessCase') : null; + $this->container['extensions'] = isset($data['extensions']) ? $this->createData($data['extensions'], 'extensions') : null; } /** @@ -607,6 +631,54 @@ public function setItem($item) return $this; } + /** + * Gets expire + * + * @return \DateTime + */ + public function getExpire() + { + return $this->container['expire']; + } + + /** + * Sets expire + * + * @param \DateTime $expire The expire date. + * + * @return $this + */ + public function setExpire($expire) + { + $this->container['expire'] = $expire; + + return $this; + } + + /** + * Gets cancelation + * + * @return \DateTime + */ + public function getCancelation() + { + return $this->container['cancelation']; + } + + /** + * Sets cancelation + * + * @param \DateTime $cancelation The cancelation date. + * + * @return $this + */ + public function setCancelation($cancelation) + { + $this->container['cancelation'] = $cancelation; + + return $this; + } + /** * Gets limits * @@ -679,6 +751,30 @@ public function setVariant($variant) return $this; } + /** + * Gets cancelationEffective + * + * @return \DateTime + */ + public function getCancelationEffective() + { + return $this->container['cancelationEffective']; + } + + /** + * Sets cancelationEffective + * + * @param \DateTime $cancelationEffective The cancelationEffective + * + * @return $this + */ + public function setCancelationEffective($cancelationEffective) + { + $this->container['cancelationEffective'] = $cancelationEffective; + + return $this; + } + /** * Gets businessCase * @@ -702,6 +798,30 @@ public function setBusinessCase($businessCase) return $this; } + + /** + * Gets extensions + * + * @return \Domainrobot\Model\BillingEventExtensions + */ + public function getExtensions() + { + return $this->container['extensions']; + } + + /** + * Sets extensions + * + * @param \Domainrobot\Model\BillingEventExtensions $extensions The additional data + * + * @return $this + */ + public function setExtensions($extensions) + { + $this->container['extensions'] = $extensions; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/TaskCount.php b/src/Model/TaskCount.php new file mode 100644 index 00000000..91b18225 --- /dev/null +++ b/src/Model/TaskCount.php @@ -0,0 +1,434 @@ + 'string', + 'counts' => 'map[string,int]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'taskGroup' => null, + 'counts' => '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 = [ + 'taskGroup' => 'taskGroup', + 'counts' => 'counts' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'taskGroup' => 'setTaskGroup', + 'counts' => 'setCounts' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'taskGroup' => 'getTaskGroup', + 'counts' => 'getCounts' + ]; + + /** + * 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['taskGroup'] = isset($data['taskGroup']) ? $this->createData($data['taskGroup'], 'taskGroup') : null; + $this->container['counts'] = isset($data['counts']) ? $this->createData($data['counts'], 'counts') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets taskGroup + * + * @return string + */ + public function getTaskGroup() + { + return $this->container['taskGroup']; + } + + /** + * Sets taskGroup + * + * @param string $taskGroup The selected task group + * + * @return $this + */ + public function setTaskGroup($taskGroup) + { + $this->container['taskGroup'] = $taskGroup; + + return $this; + } + + /** + * Gets counts + * + * @return map[string,int] + */ + public function getCounts() + { + return $this->container['counts']; + } + + /** + * Sets counts + * + * @param map[string,int] $counts Number of task calls + * + * @return $this + */ + public function setCounts($counts) + { + $this->container['counts'] = $counts; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/TaskGroup.php b/src/Model/TaskGroup.php new file mode 100644 index 00000000..dec25b96 --- /dev/null +++ b/src/Model/TaskGroup.php @@ -0,0 +1,88 @@ + '\DateTime', + 'updated' => '\DateTime', + 'taskGroup' => '\Domainrobot\Model\TaskGroup', + 'limitSelf' => 'int', + 'inclusiveSelf' => 'int', + 'timeUnitSelf' => '\Domainrobot\Model\TimeUnitConstants', + 'limitChildren' => 'int', + 'inclusiveChildren' => 'int', + 'timeUnitChildren' => '\Domainrobot\Model\TimeUnitConstants', + 'count' => 'int', + 'user' => '\Domainrobot\Model\BasicUser' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'taskGroup' => null, + 'limitSelf' => 'int32', + 'inclusiveSelf' => 'int32', + 'timeUnitSelf' => null, + 'limitChildren' => 'int32', + 'inclusiveChildren' => 'int32', + 'timeUnitChildren' => null, + 'count' => 'int32', + 'user' => 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'taskGroup' => 'taskGroup', + 'limitSelf' => 'limitSelf', + 'inclusiveSelf' => 'inclusiveSelf', + 'timeUnitSelf' => 'timeUnitSelf', + 'limitChildren' => 'limitChildren', + 'inclusiveChildren' => 'inclusiveChildren', + 'timeUnitChildren' => 'timeUnitChildren', + 'count' => 'count', + 'user' => 'user' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'taskGroup' => 'setTaskGroup', + 'limitSelf' => 'setLimitSelf', + 'inclusiveSelf' => 'setInclusiveSelf', + 'timeUnitSelf' => 'setTimeUnitSelf', + 'limitChildren' => 'setLimitChildren', + 'inclusiveChildren' => 'setInclusiveChildren', + 'timeUnitChildren' => 'setTimeUnitChildren', + 'count' => 'setCount', + 'user' => 'setUser' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'taskGroup' => 'getTaskGroup', + 'limitSelf' => 'getLimitSelf', + 'inclusiveSelf' => 'getInclusiveSelf', + 'timeUnitSelf' => 'getTimeUnitSelf', + 'limitChildren' => 'getLimitChildren', + 'inclusiveChildren' => 'getInclusiveChildren', + 'timeUnitChildren' => 'getTimeUnitChildren', + 'count' => 'getCount', + 'user' => 'getUser' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['taskGroup'] = isset($data['taskGroup']) ? $this->createData($data['taskGroup'], 'taskGroup') : null; + $this->container['limitSelf'] = isset($data['limitSelf']) ? $this->createData($data['limitSelf'], 'limitSelf') : null; + $this->container['inclusiveSelf'] = isset($data['inclusiveSelf']) ? $this->createData($data['inclusiveSelf'], 'inclusiveSelf') : null; + $this->container['timeUnitSelf'] = isset($data['timeUnitSelf']) ? $this->createData($data['timeUnitSelf'], 'timeUnitSelf') : null; + $this->container['limitChildren'] = isset($data['limitChildren']) ? $this->createData($data['limitChildren'], 'limitChildren') : null; + $this->container['inclusiveChildren'] = isset($data['inclusiveChildren']) ? $this->createData($data['inclusiveChildren'], 'inclusiveChildren') : null; + $this->container['timeUnitChildren'] = isset($data['timeUnitChildren']) ? $this->createData($data['timeUnitChildren'], 'timeUnitChildren') : null; + $this->container['count'] = isset($data['count']) ? $this->createData($data['count'], 'count') : null; + $this->container['user'] = isset($data['user']) ? $this->createData($data['user'], 'user') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets taskGroup + * + * @return \Domainrobot\Model\TaskGroup + */ + public function getTaskGroup() + { + return $this->container['taskGroup']; + } + + /** + * Sets taskGroup + * + * @param \Domainrobot\Model\TaskGroup $taskGroup The selected task group + * + * @return $this + */ + public function setTaskGroup($taskGroup) + { + $this->container['taskGroup'] = $taskGroup; + + return $this; + } + + /** + * Gets limitSelf + * + * @return int + */ + public function getLimitSelf() + { + return $this->container['limitSelf']; + } + + /** + * Sets limitSelf + * + * @param int $limitSelf The self limit count + * + * @return $this + */ + public function setLimitSelf($limitSelf) + { + $this->container['limitSelf'] = $limitSelf; + + return $this; + } + + /** + * Gets inclusiveSelf + * + * @return int + */ + public function getInclusiveSelf() + { + return $this->container['inclusiveSelf']; + } + + /** + * Sets inclusiveSelf + * + * @param int $inclusiveSelf The self included count + * + * @return $this + */ + public function setInclusiveSelf($inclusiveSelf) + { + $this->container['inclusiveSelf'] = $inclusiveSelf; + + return $this; + } + + /** + * Gets timeUnitSelf + * + * @return \Domainrobot\Model\TimeUnitConstants + */ + public function getTimeUnitSelf() + { + return $this->container['timeUnitSelf']; + } + + /** + * Sets timeUnitSelf + * + * @param \Domainrobot\Model\TimeUnitConstants $timeUnitSelf The self time unit + * + * @return $this + */ + public function setTimeUnitSelf($timeUnitSelf) + { + $this->container['timeUnitSelf'] = $timeUnitSelf; + + return $this; + } + + /** + * Gets limitChildren + * + * @return int + */ + public function getLimitChildren() + { + return $this->container['limitChildren']; + } + + /** + * Sets limitChildren + * + * @param int $limitChildren The limited count for each child + * + * @return $this + */ + public function setLimitChildren($limitChildren) + { + $this->container['limitChildren'] = $limitChildren; + + return $this; + } + + /** + * Gets inclusiveChildren + * + * @return int + */ + public function getInclusiveChildren() + { + return $this->container['inclusiveChildren']; + } + + /** + * Sets inclusiveChildren + * + * @param int $inclusiveChildren The included count for each child + * + * @return $this + */ + public function setInclusiveChildren($inclusiveChildren) + { + $this->container['inclusiveChildren'] = $inclusiveChildren; + + return $this; + } + + /** + * Gets timeUnitChildren + * + * @return \Domainrobot\Model\TimeUnitConstants + */ + public function getTimeUnitChildren() + { + return $this->container['timeUnitChildren']; + } + + /** + * Sets timeUnitChildren + * + * @param \Domainrobot\Model\TimeUnitConstants $timeUnitChildren The time unit for each child + * + * @return $this + */ + public function setTimeUnitChildren($timeUnitChildren) + { + $this->container['timeUnitChildren'] = $timeUnitChildren; + + return $this; + } + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count The current count if available + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets user + * + * @return \Domainrobot\Model\BasicUser + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \Domainrobot\Model\BasicUser $user The affected user + * + * @return $this + */ + public function setUser($user) + { + $this->container['user'] = $user; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/TaskUserLimit.php b/src/Model/TaskUserLimit.php new file mode 100644 index 00000000..211ebf56 --- /dev/null +++ b/src/Model/TaskUserLimit.php @@ -0,0 +1,467 @@ + '\Domainrobot\Model\BasicUser', + 'entries' => '\Domainrobot\Model\TaskLimit[]', + 'count' => '\Domainrobot\Model\TaskCount[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'user' => null, + 'entries' => null, + 'count' => 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 = [ + 'user' => 'user', + 'entries' => 'entries', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'user' => 'setUser', + 'entries' => 'setEntries', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'user' => 'getUser', + 'entries' => 'getEntries', + 'count' => 'getCount' + ]; + + /** + * 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['user'] = isset($data['user']) ? $this->createData($data['user'], 'user') : null; + $this->container['entries'] = isset($data['entries']) ? $this->createData($data['entries'], 'entries') : null; + $this->container['count'] = isset($data['count']) ? $this->createData($data['count'], 'count') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['user'] === null) { + $invalidProperties[] = "'user' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets user + * + * @return \Domainrobot\Model\BasicUser + */ + public function getUser() + { + return $this->container['user']; + } + + /** + * Sets user + * + * @param \Domainrobot\Model\BasicUser $user user + * + * @return $this + */ + public function setUser($user) + { + $this->container['user'] = $user; + + return $this; + } + + /** + * Gets entries + * + * @return \Domainrobot\Model\TaskLimit[] + */ + public function getEntries() + { + return $this->container['entries']; + } + + /** + * Sets entries + * + * @param \Domainrobot\Model\TaskLimit[] $entries entries + * + * @return $this + */ + public function setEntries($entries) + { + $this->container['entries'] = $entries; + + return $this; + } + + /** + * Gets count + * + * @return \Domainrobot\Model\TaskCount[] + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param \Domainrobot\Model\TaskCount[] $count count + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/TlsData.php b/src/Model/TlsData.php new file mode 100644 index 00000000..377fb907 --- /dev/null +++ b/src/Model/TlsData.php @@ -0,0 +1,434 @@ + 'string', + 'supported' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'version' => null, + 'supported' => 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 = [ + 'version' => 'version', + 'supported' => 'supported' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'version' => 'setVersion', + 'supported' => 'setSupported' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'version' => 'getVersion', + 'supported' => 'getSupported' + ]; + + /** + * 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['version'] = isset($data['version']) ? $this->createData($data['version'], 'version') : null; + $this->container['supported'] = isset($data['supported']) ? $this->createData($data['supported'], 'supported') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets version + * + * @return string + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param string $version The tls version + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + + return $this; + } + + /** + * Gets supported + * + * @return bool + */ + public function getSupported() + { + return $this->container['supported']; + } + + /** + * Sets supported + * + * @param bool $supported Whether the version is supported or not + * + * @return $this + */ + public function setSupported($supported) + { + $this->container['supported'] = $supported; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/User.php b/src/Model/User.php index 1d4fff4d..417c2efd 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -67,6 +67,7 @@ class User implements ModelInterface, ArrayAccess 'authType' => '\Domainrobot\Model\AuthType', 'details' => '\Domainrobot\Model\UserDetails', 'lock' => '\Domainrobot\Model\UserLock', + 'oldPassword' => 'string', 'acls' => '\Domainrobot\Model\UserAcls', 'profiles' => '\Domainrobot\Model\UserProfileViews', 'serviceProfiles' => '\Domainrobot\Model\ServiceProfiles', @@ -76,6 +77,7 @@ class User implements ModelInterface, ArrayAccess 'subscriptions' => '\Domainrobot\Model\Subscription[]', 'applications' => '\Domainrobot\Model\TrustedApplication[]', 'restrictions' => '\Domainrobot\Model\IpRestrictions', + 'customerLevel' => 'int', 'user' => 'string', 'language' => 'string', 'parent' => '\Domainrobot\Model\User', @@ -98,6 +100,7 @@ class User implements ModelInterface, ArrayAccess 'authType' => null, 'details' => null, 'lock' => null, + 'oldPassword' => null, 'acls' => null, 'profiles' => null, 'serviceProfiles' => null, @@ -107,6 +110,7 @@ class User implements ModelInterface, ArrayAccess 'subscriptions' => null, 'applications' => null, 'restrictions' => null, + 'customerLevel' => 'int32', 'user' => null, 'language' => null, 'parent' => null, @@ -150,6 +154,7 @@ public static function swaggerFormats() 'authType' => 'authType', 'details' => 'details', 'lock' => 'lock', + 'oldPassword' => 'oldPassword', 'acls' => 'acls', 'profiles' => 'profiles', 'serviceProfiles' => 'serviceProfiles', @@ -159,6 +164,7 @@ public static function swaggerFormats() 'subscriptions' => 'subscriptions', 'applications' => 'applications', 'restrictions' => 'restrictions', + 'customerLevel' => 'customerLevel', 'user' => 'user', 'language' => 'language', 'parent' => 'parent', @@ -181,6 +187,7 @@ public static function swaggerFormats() 'authType' => 'setAuthType', 'details' => 'setDetails', 'lock' => 'setLock', + 'oldPassword' => 'setOldPassword', 'acls' => 'setAcls', 'profiles' => 'setProfiles', 'serviceProfiles' => 'setServiceProfiles', @@ -190,6 +197,7 @@ public static function swaggerFormats() 'subscriptions' => 'setSubscriptions', 'applications' => 'setApplications', 'restrictions' => 'setRestrictions', + 'customerLevel' => 'setCustomerLevel', 'user' => 'setUser', 'language' => 'setLanguage', 'parent' => 'setParent', @@ -212,6 +220,7 @@ public static function swaggerFormats() 'authType' => 'getAuthType', 'details' => 'getDetails', 'lock' => 'getLock', + 'oldPassword' => 'getOldPassword', 'acls' => 'getAcls', 'profiles' => 'getProfiles', 'serviceProfiles' => 'getServiceProfiles', @@ -221,6 +230,7 @@ public static function swaggerFormats() 'subscriptions' => 'getSubscriptions', 'applications' => 'getApplications', 'restrictions' => 'getRestrictions', + 'customerLevel' => 'getCustomerLevel', 'user' => 'getUser', 'language' => 'getLanguage', 'parent' => 'getParent', @@ -297,6 +307,7 @@ public function __construct(array $data = null) $this->container['authType'] = isset($data['authType']) ? $this->createData($data['authType'], 'authType') : null; $this->container['details'] = isset($data['details']) ? $this->createData($data['details'], 'details') : null; $this->container['lock'] = isset($data['lock']) ? $this->createData($data['lock'], 'lock') : null; + $this->container['oldPassword'] = isset($data['oldPassword']) ? $this->createData($data['oldPassword'], 'oldPassword') : null; $this->container['acls'] = isset($data['acls']) ? $this->createData($data['acls'], 'acls') : null; $this->container['profiles'] = isset($data['profiles']) ? $this->createData($data['profiles'], 'profiles') : null; $this->container['serviceProfiles'] = isset($data['serviceProfiles']) ? $this->createData($data['serviceProfiles'], 'serviceProfiles') : null; @@ -306,6 +317,7 @@ public function __construct(array $data = null) $this->container['subscriptions'] = isset($data['subscriptions']) ? $this->createData($data['subscriptions'], 'subscriptions') : null; $this->container['applications'] = isset($data['applications']) ? $this->createData($data['applications'], 'applications') : null; $this->container['restrictions'] = isset($data['restrictions']) ? $this->createData($data['restrictions'], 'restrictions') : null; + $this->container['customerLevel'] = isset($data['customerLevel']) ? $this->createData($data['customerLevel'], 'customerLevel') : null; $this->container['user'] = isset($data['user']) ? $this->createData($data['user'], 'user') : null; $this->container['language'] = isset($data['language']) ? $this->createData($data['language'], 'language') : null; $this->container['parent'] = isset($data['parent']) ? $this->createData($data['parent'], 'parent') : null; @@ -641,6 +653,30 @@ public function setLock($lock) return $this; } + /** + * Gets oldPassword + * + * @return string + */ + public function getOldPassword() + { + return $this->container['oldPassword']; + } + + /** + * Sets oldPassword + * + * @param string $oldPassword The old password. + * + * @return $this + */ + public function setOldPassword($oldPassword) + { + $this->container['oldPassword'] = $oldPassword; + + return $this; + } + /** * Gets acls * @@ -857,6 +893,30 @@ public function setRestrictions($restrictions) return $this; } + /** + * Gets customerLevel + * + * @return int + */ + public function getCustomerLevel() + { + return $this->container['customerLevel']; + } + + /** + * Sets customerLevel + * + * @param int $customerLevel The actual customer level for the user. + * + * @return $this + */ + public function setCustomerLevel($customerLevel) + { + $this->container['customerLevel'] = $customerLevel; + + return $this; + } + /** * Gets user * diff --git a/src/Model/UserProfile.php b/src/Model/UserProfile.php index 74027509..24510e17 100644 --- a/src/Model/UserProfile.php +++ b/src/Model/UserProfile.php @@ -64,6 +64,7 @@ class UserProfile implements ModelInterface, ArrayAccess 'key' => 'string', 'value' => 'string', 'flag' => '\Domainrobot\Model\UserProfileFlag', + 'inherited' => 'bool', 'readonly' => 'bool' ]; @@ -80,6 +81,7 @@ class UserProfile implements ModelInterface, ArrayAccess 'key' => null, 'value' => null, 'flag' => null, + 'inherited' => null, 'readonly' => null ]; @@ -117,6 +119,7 @@ public static function swaggerFormats() 'key' => 'key', 'value' => 'value', 'flag' => 'flag', + 'inherited' => 'inherited', 'readonly' => 'readonly' ]; @@ -133,6 +136,7 @@ public static function swaggerFormats() 'key' => 'setKey', 'value' => 'setValue', 'flag' => 'setFlag', + 'inherited' => 'setInherited', 'readonly' => 'setReadonly' ]; @@ -149,6 +153,7 @@ public static function swaggerFormats() 'key' => 'getKey', 'value' => 'getValue', 'flag' => 'getFlag', + 'inherited' => 'getInherited', 'readonly' => 'getReadonly' ]; @@ -219,6 +224,7 @@ public function __construct(array $data = null) $this->container['key'] = isset($data['key']) ? $this->createData($data['key'], 'key') : null; $this->container['value'] = isset($data['value']) ? $this->createData($data['value'], 'value') : null; $this->container['flag'] = isset($data['flag']) ? $this->createData($data['flag'], 'flag') : null; + $this->container['inherited'] = isset($data['inherited']) ? $this->createData($data['inherited'], 'inherited') : null; $this->container['readonly'] = isset($data['readonly']) ? $this->createData($data['readonly'], 'readonly') : null; } @@ -478,6 +484,30 @@ public function setFlag($flag) return $this; } + /** + * Gets inherited + * + * @return bool + */ + public function getInherited() + { + return $this->container['inherited']; + } + + /** + * Sets inherited + * + * @param bool $inherited Is true if the value was inherited + * + * @return $this + */ + public function setInherited($inherited) + { + $this->container['inherited'] = $inherited; + + return $this; + } + /** * Gets readonly * diff --git a/src/Model/UserSalesReport.php b/src/Model/UserSalesReport.php new file mode 100644 index 00000000..b8c9fd50 --- /dev/null +++ b/src/Model/UserSalesReport.php @@ -0,0 +1,674 @@ + '\DateTime', + 'updated' => '\DateTime', + 'owner' => '\Domainrobot\Model\BasicUser', + 'updater' => '\Domainrobot\Model\BasicUser', + 'date' => '\DateTime', + 'domainSales' => 'double', + 'domainAddonSales' => 'double', + 'certificateSales' => 'double', + 'serverSales' => 'double', + 'packageSales' => 'double' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'created' => 'date-time', + 'updated' => 'date-time', + 'owner' => null, + 'updater' => null, + 'date' => 'date-time', + 'domainSales' => 'double', + 'domainAddonSales' => 'double', + 'certificateSales' => 'double', + 'serverSales' => 'double', + 'packageSales' => 'double' + ]; + + /** + * 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 = [ + 'created' => 'created', + 'updated' => 'updated', + 'owner' => 'owner', + 'updater' => 'updater', + 'date' => 'date', + 'domainSales' => 'domainSales', + 'domainAddonSales' => 'domainAddonSales', + 'certificateSales' => 'certificateSales', + 'serverSales' => 'serverSales', + 'packageSales' => 'packageSales' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created' => 'setCreated', + 'updated' => 'setUpdated', + 'owner' => 'setOwner', + 'updater' => 'setUpdater', + 'date' => 'setDate', + 'domainSales' => 'setDomainSales', + 'domainAddonSales' => 'setDomainAddonSales', + 'certificateSales' => 'setCertificateSales', + 'serverSales' => 'setServerSales', + 'packageSales' => 'setPackageSales' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created' => 'getCreated', + 'updated' => 'getUpdated', + 'owner' => 'getOwner', + 'updater' => 'getUpdater', + 'date' => 'getDate', + 'domainSales' => 'getDomainSales', + 'domainAddonSales' => 'getDomainAddonSales', + 'certificateSales' => 'getCertificateSales', + 'serverSales' => 'getServerSales', + 'packageSales' => 'getPackageSales' + ]; + + /** + * 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['created'] = isset($data['created']) ? $this->createData($data['created'], 'created') : null; + $this->container['updated'] = isset($data['updated']) ? $this->createData($data['updated'], 'updated') : null; + $this->container['owner'] = isset($data['owner']) ? $this->createData($data['owner'], 'owner') : null; + $this->container['updater'] = isset($data['updater']) ? $this->createData($data['updater'], 'updater') : null; + $this->container['date'] = isset($data['date']) ? $this->createData($data['date'], 'date') : null; + $this->container['domainSales'] = isset($data['domainSales']) ? $this->createData($data['domainSales'], 'domainSales') : null; + $this->container['domainAddonSales'] = isset($data['domainAddonSales']) ? $this->createData($data['domainAddonSales'], 'domainAddonSales') : null; + $this->container['certificateSales'] = isset($data['certificateSales']) ? $this->createData($data['certificateSales'], 'certificateSales') : null; + $this->container['serverSales'] = isset($data['serverSales']) ? $this->createData($data['serverSales'], 'serverSales') : null; + $this->container['packageSales'] = isset($data['packageSales']) ? $this->createData($data['packageSales'], 'packageSales') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The created date. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets updated + * + * @return \DateTime + */ + public function getUpdated() + { + return $this->container['updated']; + } + + /** + * Sets updated + * + * @param \DateTime $updated The updated date. + * + * @return $this + */ + public function setUpdated($updated) + { + $this->container['updated'] = $updated; + + return $this; + } + + /** + * Gets owner + * + * @return \Domainrobot\Model\BasicUser + */ + public function getOwner() + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param \Domainrobot\Model\BasicUser $owner The owner of the object. + * + * @return $this + */ + public function setOwner($owner) + { + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets updater + * + * @return \Domainrobot\Model\BasicUser + */ + public function getUpdater() + { + return $this->container['updater']; + } + + /** + * Sets updater + * + * @param \Domainrobot\Model\BasicUser $updater The updating user of the object. + * + * @return $this + */ + public function setUpdater($updater) + { + $this->container['updater'] = $updater; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime $date The report date. + * + * @return $this + */ + public function setDate($date) + { + $this->container['date'] = $date; + + return $this; + } + + /** + * Gets domainSales + * + * @return double + */ + public function getDomainSales() + { + return $this->container['domainSales']; + } + + /** + * Sets domainSales + * + * @param double $domainSales The domain sales. + * + * @return $this + */ + public function setDomainSales($domainSales) + { + $this->container['domainSales'] = $domainSales; + + return $this; + } + + /** + * Gets domainAddonSales + * + * @return double + */ + public function getDomainAddonSales() + { + return $this->container['domainAddonSales']; + } + + /** + * Sets domainAddonSales + * + * @param double $domainAddonSales The domain addon sales + * + * @return $this + */ + public function setDomainAddonSales($domainAddonSales) + { + $this->container['domainAddonSales'] = $domainAddonSales; + + return $this; + } + + /** + * Gets certificateSales + * + * @return double + */ + public function getCertificateSales() + { + return $this->container['certificateSales']; + } + + /** + * Sets certificateSales + * + * @param double $certificateSales The certificate sales. + * + * @return $this + */ + public function setCertificateSales($certificateSales) + { + $this->container['certificateSales'] = $certificateSales; + + return $this; + } + + /** + * Gets serverSales + * + * @return double + */ + public function getServerSales() + { + return $this->container['serverSales']; + } + + /** + * Sets serverSales + * + * @param double $serverSales The server sales. + * + * @return $this + */ + public function setServerSales($serverSales) + { + $this->container['serverSales'] = $serverSales; + + return $this; + } + + /** + * Gets packageSales + * + * @return double + */ + public function getPackageSales() + { + return $this->container['packageSales']; + } + + /** + * Sets packageSales + * + * @param double $packageSales The package sales + * + * @return $this + */ + public function setPackageSales($packageSales) + { + $this->container['packageSales'] = $packageSales; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/WhoisStatus.php b/src/Model/WhoisStatus.php index 239da625..20285caa 100644 --- a/src/Model/WhoisStatus.php +++ b/src/Model/WhoisStatus.php @@ -57,7 +57,8 @@ class WhoisStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'status' => '\Domainrobot\Model\DomainStudioDomainStatus' + 'status' => '\Domainrobot\Model\DomainStudioDomainStatus', + 'priceClass' => 'string' ]; /** @@ -66,7 +67,8 @@ class WhoisStatus implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'status' => null + 'status' => null, + 'priceClass' => null ]; /** @@ -96,7 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status' + 'status' => 'status', + 'priceClass' => 'priceClass' ]; /** @@ -105,7 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus' + 'status' => 'setStatus', + 'priceClass' => 'setPriceClass' ]; /** @@ -114,7 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus' + 'status' => 'getStatus', + 'priceClass' => 'getPriceClass' ]; /** @@ -178,6 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['status'] = isset($data['status']) ? $this->createData($data['status'], 'status') : null; + $this->container['priceClass'] = isset($data['priceClass']) ? $this->createData($data['priceClass'], 'priceClass') : null; } /** @@ -282,6 +288,30 @@ public function setStatus($status) return $this; } + + /** + * Gets priceClass + * + * @return string + */ + public function getPriceClass() + { + return $this->container['priceClass']; + } + + /** + * Sets priceClass + * + * @param string $priceClass The price class for premium domains + * + * @return $this + */ + public function setPriceClass($priceClass) + { + $this->container['priceClass'] = $priceClass; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/X509CertificateData.php b/src/Model/X509CertificateData.php new file mode 100644 index 00000000..07fa421c --- /dev/null +++ b/src/Model/X509CertificateData.php @@ -0,0 +1,734 @@ + 'string', + 'serialNumber' => 'string', + 'issuer' => '\Domainrobot\Model\X509CertificateIssuer', + 'subject' => '\Domainrobot\Model\X509CertificateSubject', + 'validity' => '\Domainrobot\Model\X509CertificateValidity', + 'subjectAlternativNames' => 'string[]', + 'plain' => 'string', + 'signatureAlgorithm' => 'string', + 'sha1Thumbprint' => 'string', + 'sha256Thumbprint' => 'string', + 'md5Thumbprint' => 'string', + 'publicKeyData' => '\Domainrobot\Model\X509CertificatePublicKeyData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'cn' => null, + 'serialNumber' => null, + 'issuer' => null, + 'subject' => null, + 'validity' => null, + 'subjectAlternativNames' => null, + 'plain' => null, + 'signatureAlgorithm' => null, + 'sha1Thumbprint' => null, + 'sha256Thumbprint' => null, + 'md5Thumbprint' => null, + 'publicKeyData' => 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 = [ + 'cn' => 'cn', + 'serialNumber' => 'serialNumber', + 'issuer' => 'issuer', + 'subject' => 'subject', + 'validity' => 'validity', + 'subjectAlternativNames' => 'subjectAlternativNames', + 'plain' => 'plain', + 'signatureAlgorithm' => 'signatureAlgorithm', + 'sha1Thumbprint' => 'sha1Thumbprint', + 'sha256Thumbprint' => 'sha256Thumbprint', + 'md5Thumbprint' => 'md5Thumbprint', + 'publicKeyData' => 'publicKeyData' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cn' => 'setCn', + 'serialNumber' => 'setSerialNumber', + 'issuer' => 'setIssuer', + 'subject' => 'setSubject', + 'validity' => 'setValidity', + 'subjectAlternativNames' => 'setSubjectAlternativNames', + 'plain' => 'setPlain', + 'signatureAlgorithm' => 'setSignatureAlgorithm', + 'sha1Thumbprint' => 'setSha1Thumbprint', + 'sha256Thumbprint' => 'setSha256Thumbprint', + 'md5Thumbprint' => 'setMd5Thumbprint', + 'publicKeyData' => 'setPublicKeyData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cn' => 'getCn', + 'serialNumber' => 'getSerialNumber', + 'issuer' => 'getIssuer', + 'subject' => 'getSubject', + 'validity' => 'getValidity', + 'subjectAlternativNames' => 'getSubjectAlternativNames', + 'plain' => 'getPlain', + 'signatureAlgorithm' => 'getSignatureAlgorithm', + 'sha1Thumbprint' => 'getSha1Thumbprint', + 'sha256Thumbprint' => 'getSha256Thumbprint', + 'md5Thumbprint' => 'getMd5Thumbprint', + 'publicKeyData' => 'getPublicKeyData' + ]; + + /** + * 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['cn'] = isset($data['cn']) ? $this->createData($data['cn'], 'cn') : null; + $this->container['serialNumber'] = isset($data['serialNumber']) ? $this->createData($data['serialNumber'], 'serialNumber') : null; + $this->container['issuer'] = isset($data['issuer']) ? $this->createData($data['issuer'], 'issuer') : null; + $this->container['subject'] = isset($data['subject']) ? $this->createData($data['subject'], 'subject') : null; + $this->container['validity'] = isset($data['validity']) ? $this->createData($data['validity'], 'validity') : null; + $this->container['subjectAlternativNames'] = isset($data['subjectAlternativNames']) ? $this->createData($data['subjectAlternativNames'], 'subjectAlternativNames') : null; + $this->container['plain'] = isset($data['plain']) ? $this->createData($data['plain'], 'plain') : null; + $this->container['signatureAlgorithm'] = isset($data['signatureAlgorithm']) ? $this->createData($data['signatureAlgorithm'], 'signatureAlgorithm') : null; + $this->container['sha1Thumbprint'] = isset($data['sha1Thumbprint']) ? $this->createData($data['sha1Thumbprint'], 'sha1Thumbprint') : null; + $this->container['sha256Thumbprint'] = isset($data['sha256Thumbprint']) ? $this->createData($data['sha256Thumbprint'], 'sha256Thumbprint') : null; + $this->container['md5Thumbprint'] = isset($data['md5Thumbprint']) ? $this->createData($data['md5Thumbprint'], 'md5Thumbprint') : null; + $this->container['publicKeyData'] = isset($data['publicKeyData']) ? $this->createData($data['publicKeyData'], 'publicKeyData') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets cn + * + * @return string + */ + public function getCn() + { + return $this->container['cn']; + } + + /** + * Sets cn + * + * @param string $cn The common name + * + * @return $this + */ + public function setCn($cn) + { + $this->container['cn'] = $cn; + + return $this; + } + + /** + * Gets serialNumber + * + * @return string + */ + public function getSerialNumber() + { + return $this->container['serialNumber']; + } + + /** + * Sets serialNumber + * + * @param string $serialNumber The serial number of the certificate + * + * @return $this + */ + public function setSerialNumber($serialNumber) + { + $this->container['serialNumber'] = $serialNumber; + + return $this; + } + + /** + * Gets issuer + * + * @return \Domainrobot\Model\X509CertificateIssuer + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @param \Domainrobot\Model\X509CertificateIssuer $issuer The issuer information of the certificate + * + * @return $this + */ + public function setIssuer($issuer) + { + $this->container['issuer'] = $issuer; + + return $this; + } + + /** + * Gets subject + * + * @return \Domainrobot\Model\X509CertificateSubject + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param \Domainrobot\Model\X509CertificateSubject $subject The subject information of the certificate + * + * @return $this + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets validity + * + * @return \Domainrobot\Model\X509CertificateValidity + */ + public function getValidity() + { + return $this->container['validity']; + } + + /** + * Sets validity + * + * @param \Domainrobot\Model\X509CertificateValidity $validity The validity of the certificate + * + * @return $this + */ + public function setValidity($validity) + { + $this->container['validity'] = $validity; + + return $this; + } + + /** + * Gets subjectAlternativNames + * + * @return string[] + */ + public function getSubjectAlternativNames() + { + return $this->container['subjectAlternativNames']; + } + + /** + * Sets subjectAlternativNames + * + * @param string[] $subjectAlternativNames The subject alternativ names covered by this certificate + * + * @return $this + */ + public function setSubjectAlternativNames($subjectAlternativNames) + { + $this->container['subjectAlternativNames'] = $subjectAlternativNames; + + return $this; + } + + /** + * Gets plain + * + * @return string + */ + public function getPlain() + { + return $this->container['plain']; + } + + /** + * Sets plain + * + * @param string $plain The plain certificate pem string, that was used to decode. + * + * @return $this + */ + public function setPlain($plain) + { + $this->container['plain'] = $plain; + + return $this; + } + + /** + * Gets signatureAlgorithm + * + * @return string + */ + public function getSignatureAlgorithm() + { + return $this->container['signatureAlgorithm']; + } + + /** + * Sets signatureAlgorithm + * + * @param string $signatureAlgorithm The signatureAlgorithm of the certificate. + * + * @return $this + */ + public function setSignatureAlgorithm($signatureAlgorithm) + { + $this->container['signatureAlgorithm'] = $signatureAlgorithm; + + return $this; + } + + /** + * Gets sha1Thumbprint + * + * @return string + */ + public function getSha1Thumbprint() + { + return $this->container['sha1Thumbprint']; + } + + /** + * Sets sha1Thumbprint + * + * @param string $sha1Thumbprint The SHA-1 thumbprint for the certificate. + * + * @return $this + */ + public function setSha1Thumbprint($sha1Thumbprint) + { + $this->container['sha1Thumbprint'] = $sha1Thumbprint; + + return $this; + } + + /** + * Gets sha256Thumbprint + * + * @return string + */ + public function getSha256Thumbprint() + { + return $this->container['sha256Thumbprint']; + } + + /** + * Sets sha256Thumbprint + * + * @param string $sha256Thumbprint The SHA-256 thumbprint for the certificate. + * + * @return $this + */ + public function setSha256Thumbprint($sha256Thumbprint) + { + $this->container['sha256Thumbprint'] = $sha256Thumbprint; + + return $this; + } + + /** + * Gets md5Thumbprint + * + * @return string + */ + public function getMd5Thumbprint() + { + return $this->container['md5Thumbprint']; + } + + /** + * Sets md5Thumbprint + * + * @param string $md5Thumbprint The MD5 thumbprint for the certificate. + * + * @return $this + */ + public function setMd5Thumbprint($md5Thumbprint) + { + $this->container['md5Thumbprint'] = $md5Thumbprint; + + return $this; + } + + /** + * Gets publicKeyData + * + * @return \Domainrobot\Model\X509CertificatePublicKeyData + */ + public function getPublicKeyData() + { + return $this->container['publicKeyData']; + } + + /** + * Sets publicKeyData + * + * @param \Domainrobot\Model\X509CertificatePublicKeyData $publicKeyData The public key data from the certificate. + * + * @return $this + */ + public function setPublicKeyData($publicKeyData) + { + $this->container['publicKeyData'] = $publicKeyData; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/X509CertificateIssuer.php b/src/Model/X509CertificateIssuer.php new file mode 100644 index 00000000..5d47f67a --- /dev/null +++ b/src/Model/X509CertificateIssuer.php @@ -0,0 +1,554 @@ + 'string', + 'organization' => 'string', + 'country' => 'string', + 'organizationUnit' => 'string', + 'locality' => 'string', + 'state' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'commonName' => null, + 'organization' => null, + 'country' => null, + 'organizationUnit' => null, + 'locality' => null, + 'state' => 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 = [ + 'commonName' => 'commonName', + 'organization' => 'organization', + 'country' => 'country', + 'organizationUnit' => 'organizationUnit', + 'locality' => 'locality', + 'state' => 'state' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'commonName' => 'setCommonName', + 'organization' => 'setOrganization', + 'country' => 'setCountry', + 'organizationUnit' => 'setOrganizationUnit', + 'locality' => 'setLocality', + 'state' => 'setState' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'commonName' => 'getCommonName', + 'organization' => 'getOrganization', + 'country' => 'getCountry', + 'organizationUnit' => 'getOrganizationUnit', + 'locality' => 'getLocality', + 'state' => 'getState' + ]; + + /** + * 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['commonName'] = isset($data['commonName']) ? $this->createData($data['commonName'], 'commonName') : null; + $this->container['organization'] = isset($data['organization']) ? $this->createData($data['organization'], 'organization') : null; + $this->container['country'] = isset($data['country']) ? $this->createData($data['country'], 'country') : null; + $this->container['organizationUnit'] = isset($data['organizationUnit']) ? $this->createData($data['organizationUnit'], 'organizationUnit') : null; + $this->container['locality'] = isset($data['locality']) ? $this->createData($data['locality'], 'locality') : null; + $this->container['state'] = isset($data['state']) ? $this->createData($data['state'], 'state') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets commonName + * + * @return string + */ + public function getCommonName() + { + return $this->container['commonName']; + } + + /** + * Sets commonName + * + * @param string $commonName The CN attribute of the issuer + * + * @return $this + */ + public function setCommonName($commonName) + { + $this->container['commonName'] = $commonName; + + return $this; + } + + /** + * Gets organization + * + * @return string + */ + public function getOrganization() + { + return $this->container['organization']; + } + + /** + * Sets organization + * + * @param string $organization The O attribute of the issuer + * + * @return $this + */ + public function setOrganization($organization) + { + $this->container['organization'] = $organization; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The C attribute of the issuer + * + * @return $this + */ + public function setCountry($country) + { + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets organizationUnit + * + * @return string + */ + public function getOrganizationUnit() + { + return $this->container['organizationUnit']; + } + + /** + * Sets organizationUnit + * + * @param string $organizationUnit The OU attribute of the issuer + * + * @return $this + */ + public function setOrganizationUnit($organizationUnit) + { + $this->container['organizationUnit'] = $organizationUnit; + + return $this; + } + + /** + * Gets locality + * + * @return string + */ + public function getLocality() + { + return $this->container['locality']; + } + + /** + * Sets locality + * + * @param string $locality The L attribute of the issuer + * + * @return $this + */ + public function setLocality($locality) + { + $this->container['locality'] = $locality; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state The ST attribute of the issuer + * + * @return $this + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/X509CertificatePublicKeyData.php b/src/Model/X509CertificatePublicKeyData.php new file mode 100644 index 00000000..bbbd26d6 --- /dev/null +++ b/src/Model/X509CertificatePublicKeyData.php @@ -0,0 +1,524 @@ + 'string', + 'length' => 'int', + 'sha1Thumbprint' => 'string', + 'sha256Thumbprint' => 'string', + 'bytes' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'algorithm' => null, + 'length' => 'int32', + 'sha1Thumbprint' => null, + 'sha256Thumbprint' => null, + 'bytes' => 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 = [ + 'algorithm' => 'algorithm', + 'length' => 'length', + 'sha1Thumbprint' => 'sha1Thumbprint', + 'sha256Thumbprint' => 'sha256Thumbprint', + 'bytes' => 'bytes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'algorithm' => 'setAlgorithm', + 'length' => 'setLength', + 'sha1Thumbprint' => 'setSha1Thumbprint', + 'sha256Thumbprint' => 'setSha256Thumbprint', + 'bytes' => 'setBytes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'algorithm' => 'getAlgorithm', + 'length' => 'getLength', + 'sha1Thumbprint' => 'getSha1Thumbprint', + 'sha256Thumbprint' => 'getSha256Thumbprint', + 'bytes' => 'getBytes' + ]; + + /** + * 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['algorithm'] = isset($data['algorithm']) ? $this->createData($data['algorithm'], 'algorithm') : null; + $this->container['length'] = isset($data['length']) ? $this->createData($data['length'], 'length') : null; + $this->container['sha1Thumbprint'] = isset($data['sha1Thumbprint']) ? $this->createData($data['sha1Thumbprint'], 'sha1Thumbprint') : null; + $this->container['sha256Thumbprint'] = isset($data['sha256Thumbprint']) ? $this->createData($data['sha256Thumbprint'], 'sha256Thumbprint') : null; + $this->container['bytes'] = isset($data['bytes']) ? $this->createData($data['bytes'], 'bytes') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets algorithm + * + * @return string + */ + public function getAlgorithm() + { + return $this->container['algorithm']; + } + + /** + * Sets algorithm + * + * @param string $algorithm The algorithm of the public key + * + * @return $this + */ + public function setAlgorithm($algorithm) + { + $this->container['algorithm'] = $algorithm; + + return $this; + } + + /** + * Gets length + * + * @return int + */ + public function getLength() + { + return $this->container['length']; + } + + /** + * Sets length + * + * @param int $length The key length of the public key + * + * @return $this + */ + public function setLength($length) + { + $this->container['length'] = $length; + + return $this; + } + + /** + * Gets sha1Thumbprint + * + * @return string + */ + public function getSha1Thumbprint() + { + return $this->container['sha1Thumbprint']; + } + + /** + * Sets sha1Thumbprint + * + * @param string $sha1Thumbprint The SHA-1 thumbprint of the public key + * + * @return $this + */ + public function setSha1Thumbprint($sha1Thumbprint) + { + $this->container['sha1Thumbprint'] = $sha1Thumbprint; + + return $this; + } + + /** + * Gets sha256Thumbprint + * + * @return string + */ + public function getSha256Thumbprint() + { + return $this->container['sha256Thumbprint']; + } + + /** + * Sets sha256Thumbprint + * + * @param string $sha256Thumbprint The SHA-256 thumbprint of the public key + * + * @return $this + */ + public function setSha256Thumbprint($sha256Thumbprint) + { + $this->container['sha256Thumbprint'] = $sha256Thumbprint; + + return $this; + } + + /** + * Gets bytes + * + * @return string + */ + public function getBytes() + { + return $this->container['bytes']; + } + + /** + * Sets bytes + * + * @param string $bytes The bytes representing the public key as Stringe + * + * @return $this + */ + public function setBytes($bytes) + { + $this->container['bytes'] = $bytes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/X509CertificateSubject.php b/src/Model/X509CertificateSubject.php new file mode 100644 index 00000000..15e55578 --- /dev/null +++ b/src/Model/X509CertificateSubject.php @@ -0,0 +1,554 @@ + 'string', + 'organization' => 'string', + 'country' => 'string', + 'organizationUnit' => 'string', + 'locality' => 'string', + 'state' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'commonName' => null, + 'organization' => null, + 'country' => null, + 'organizationUnit' => null, + 'locality' => null, + 'state' => 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 = [ + 'commonName' => 'commonName', + 'organization' => 'organization', + 'country' => 'country', + 'organizationUnit' => 'organizationUnit', + 'locality' => 'locality', + 'state' => 'state' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'commonName' => 'setCommonName', + 'organization' => 'setOrganization', + 'country' => 'setCountry', + 'organizationUnit' => 'setOrganizationUnit', + 'locality' => 'setLocality', + 'state' => 'setState' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'commonName' => 'getCommonName', + 'organization' => 'getOrganization', + 'country' => 'getCountry', + 'organizationUnit' => 'getOrganizationUnit', + 'locality' => 'getLocality', + 'state' => 'getState' + ]; + + /** + * 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['commonName'] = isset($data['commonName']) ? $this->createData($data['commonName'], 'commonName') : null; + $this->container['organization'] = isset($data['organization']) ? $this->createData($data['organization'], 'organization') : null; + $this->container['country'] = isset($data['country']) ? $this->createData($data['country'], 'country') : null; + $this->container['organizationUnit'] = isset($data['organizationUnit']) ? $this->createData($data['organizationUnit'], 'organizationUnit') : null; + $this->container['locality'] = isset($data['locality']) ? $this->createData($data['locality'], 'locality') : null; + $this->container['state'] = isset($data['state']) ? $this->createData($data['state'], 'state') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets commonName + * + * @return string + */ + public function getCommonName() + { + return $this->container['commonName']; + } + + /** + * Sets commonName + * + * @param string $commonName The CN attribute of the subject + * + * @return $this + */ + public function setCommonName($commonName) + { + $this->container['commonName'] = $commonName; + + return $this; + } + + /** + * Gets organization + * + * @return string + */ + public function getOrganization() + { + return $this->container['organization']; + } + + /** + * Sets organization + * + * @param string $organization The O attribute of the subject + * + * @return $this + */ + public function setOrganization($organization) + { + $this->container['organization'] = $organization; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The C attribute of the subject + * + * @return $this + */ + public function setCountry($country) + { + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets organizationUnit + * + * @return string + */ + public function getOrganizationUnit() + { + return $this->container['organizationUnit']; + } + + /** + * Sets organizationUnit + * + * @param string $organizationUnit The OU attribute of the subject + * + * @return $this + */ + public function setOrganizationUnit($organizationUnit) + { + $this->container['organizationUnit'] = $organizationUnit; + + return $this; + } + + /** + * Gets locality + * + * @return string + */ + public function getLocality() + { + return $this->container['locality']; + } + + /** + * Sets locality + * + * @param string $locality The L attribute of the subject + * + * @return $this + */ + public function setLocality($locality) + { + $this->container['locality'] = $locality; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state The ST attribute of the subject + * + * @return $this + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/X509CertificateValidity.php b/src/Model/X509CertificateValidity.php new file mode 100644 index 00000000..8fecae36 --- /dev/null +++ b/src/Model/X509CertificateValidity.php @@ -0,0 +1,434 @@ + '\DateTime', + 'notBefore' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'notAfter' => 'date-time', + 'notBefore' => 'date-time' + ]; + + /** + * 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 = [ + 'notAfter' => 'notAfter', + 'notBefore' => 'notBefore' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'notAfter' => 'setNotAfter', + 'notBefore' => 'setNotBefore' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'notAfter' => 'getNotAfter', + 'notBefore' => 'getNotBefore' + ]; + + /** + * 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['notAfter'] = isset($data['notAfter']) ? $this->createData($data['notAfter'], 'notAfter') : null; + $this->container['notBefore'] = isset($data['notBefore']) ? $this->createData($data['notBefore'], 'notBefore') : null; + } + + /** + * create data according to types; + * non object types will just be returend as is: + * object types will return an instance of themselves or and array of instances + * + * @param mixed[] $data + * @param string $property + * @return mixed + */ + public function createData($data = null, $property = '') + { + if ($data === null || $property === '') { + return ''; + } + $swaggerType = self::$swaggerTypes[$property]; + + preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); + + // handle object types + if (count($matches) > 0 && count($matches) < 3) { + try { + if (!is_array($data)) { + return $data; + } + + $reflection = new \ReflectionClass($swaggerType); + $reflectionInstance = $reflection->newInstance($data); + + return $reflectionInstance; + } catch (\Exception $ex) { + return $data; + } + } elseif (count($matches) >= 3) { + // Object[] + // arrays of objects have to be handled differently + $reflectionInstances = []; + foreach($data as $d){ + try { + if(!is_array($d)){ + $reflectionInstances[] = $d; + continue; + } + $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); + $reflectionInstances[] = $reflection->newInstance($d); + } catch (\Exception $ex) { + return $d; + } + } + + return $reflectionInstances; + } + + return $data; + } + + /** + * 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 + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets notAfter + * + * @return \DateTime + */ + public function getNotAfter() + { + return $this->container['notAfter']; + } + + /** + * Sets notAfter + * + * @param \DateTime $notAfter The notAfter date of the certificate + * + * @return $this + */ + public function setNotAfter($notAfter) + { + $this->container['notAfter'] = $notAfter; + + return $this; + } + + /** + * Gets notBefore + * + * @return \DateTime + */ + public function getNotBefore() + { + return $this->container['notBefore']; + } + + /** + * Sets notBefore + * + * @param \DateTime $notBefore The notBefore date of the certificate + * + * @return $this + */ + public function setNotBefore($notBefore) + { + $this->container['notBefore'] = $notBefore; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + 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 + */ + 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 + */ + 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)); + } + + /** + * @param boolean $removeEmptyValues [remove all empty values if true] + * @param array $retrieveKeys [list of keys to get back in any case] + * + * Examples: + * toArray() => returns only non empty values + * toArray(true) => returns all values + */ + public function toArray($retrieveAllValues = false){ + $container = $this->container; + + $cleanContainer = []; + foreach ($container as $key => &$value) { + if ( + $retrieveAllValues === false && + empty($value) === true && + $value !== false && + $value !== '' && + $value !== 0 && + $value !== '0' + ) { + unset($container[$key]); + continue; + } + + if (gettype($value) === "object") { + if(method_exists($value, 'toArray')) { + $value = $value->toArray($retrieveAllValues); + }else{ + if(get_class($value) === "DateTime"){ + $value = $value->format("Y-m-d\TH:i:s"); + }else{ + $value = (array) $value; + } + } + } + if (is_array($value)) { + foreach ($value as &$v) { + if (gettype($v) === "object") { + $v = $v->toArray($retrieveAllValues); + } + } + } + $cleanContainer[self::$attributeMap[$key]] = $value; + }; + return $cleanContainer; + } +} + + diff --git a/src/Model/ZoneBasePatchRequest.php b/src/Model/ZoneBasePatchRequest.php index fa359e35..8b52c0bf 100644 --- a/src/Model/ZoneBasePatchRequest.php +++ b/src/Model/ZoneBasePatchRequest.php @@ -74,6 +74,7 @@ class ZoneBasePatchRequest implements ModelInterface, ArrayAccess 'sourceVirtualHostname' => 'string', 'zoneGrantsAdd' => 'string[]', 'zoneGrantsRem' => 'string[]', + 'modifiers' => '\Domainrobot\Model\Modifier[]', 'nameServers' => '\Domainrobot\Model\NameServer[]', 'main' => '\Domainrobot\Model\MainIp', 'wwwInclude' => 'bool', @@ -110,6 +111,7 @@ class ZoneBasePatchRequest implements ModelInterface, ArrayAccess 'sourceVirtualHostname' => null, 'zoneGrantsAdd' => null, 'zoneGrantsRem' => null, + 'modifiers' => null, 'nameServers' => null, 'main' => null, 'wwwInclude' => null, @@ -167,6 +169,7 @@ public static function swaggerFormats() 'sourceVirtualHostname' => 'sourceVirtualHostname', 'zoneGrantsAdd' => 'zoneGrantsAdd', 'zoneGrantsRem' => 'zoneGrantsRem', + 'modifiers' => 'modifiers', 'nameServers' => 'nameServers', 'main' => 'main', 'wwwInclude' => 'wwwInclude', @@ -203,6 +206,7 @@ public static function swaggerFormats() 'sourceVirtualHostname' => 'setSourceVirtualHostname', 'zoneGrantsAdd' => 'setZoneGrantsAdd', 'zoneGrantsRem' => 'setZoneGrantsRem', + 'modifiers' => 'setModifiers', 'nameServers' => 'setNameServers', 'main' => 'setMain', 'wwwInclude' => 'setWwwInclude', @@ -239,6 +243,7 @@ public static function swaggerFormats() 'sourceVirtualHostname' => 'getSourceVirtualHostname', 'zoneGrantsAdd' => 'getZoneGrantsAdd', 'zoneGrantsRem' => 'getZoneGrantsRem', + 'modifiers' => 'getModifiers', 'nameServers' => 'getNameServers', 'main' => 'getMain', 'wwwInclude' => 'getWwwInclude', @@ -329,6 +334,7 @@ public function __construct(array $data = null) $this->container['sourceVirtualHostname'] = isset($data['sourceVirtualHostname']) ? $this->createData($data['sourceVirtualHostname'], 'sourceVirtualHostname') : null; $this->container['zoneGrantsAdd'] = isset($data['zoneGrantsAdd']) ? $this->createData($data['zoneGrantsAdd'], 'zoneGrantsAdd') : null; $this->container['zoneGrantsRem'] = isset($data['zoneGrantsRem']) ? $this->createData($data['zoneGrantsRem'], 'zoneGrantsRem') : null; + $this->container['modifiers'] = isset($data['modifiers']) ? $this->createData($data['modifiers'], 'modifiers') : null; $this->container['nameServers'] = isset($data['nameServers']) ? $this->createData($data['nameServers'], 'nameServers') : null; $this->container['main'] = isset($data['main']) ? $this->createData($data['main'], 'main') : null; $this->container['wwwInclude'] = isset($data['wwwInclude']) ? $this->createData($data['wwwInclude'], 'wwwInclude') : null; @@ -832,6 +838,30 @@ public function setZoneGrantsRem($zoneGrantsRem) return $this; } + /** + * Gets modifiers + * + * @return \Domainrobot\Model\Modifier[] + */ + public function getModifiers() + { + return $this->container['modifiers']; + } + + /** + * Sets modifiers + * + * @param \Domainrobot\Model\Modifier[] $modifiers The modifer to apply on the objects + * + * @return $this + */ + public function setModifiers($modifiers) + { + $this->container['modifiers'] = $modifiers; + + return $this; + } + /** * Gets nameServers *