<?php
/**
 * TenantInEdit
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  SmartVolution
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * SV Register Web-services
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.15
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace SmartVolution\Model;

use \ArrayAccess;
use \SmartVolution\ObjectSerializer;

/**
 * TenantInEdit Class Doc Comment
 *
 * @category Class
 * @description 
 * @package  SmartVolution
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class TenantInEdit implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'TenantInEdit';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'id' => 'int',
        'name' => 'string',
        'code' => 'string',
        'contactName' => 'string',
        'phone1' => 'string',
        'phone2' => 'string',
        'email' => 'string',
        'taxNumber' => 'string',
        'address1' => 'string',
        'licenseCount' => 'int',
        'description' => 'string',
        'address2' => 'string',
        'city' => 'string',
        'region' => 'string',
        'postcode' => 'string',
        'country' => 'string',
        'parentId' => 'int',
        'deleted' => 'bool',
        'merchant' => 'bool',
        'locked' => 'bool',
        'billingCycleStartDate' => 'int',
        'messageBundleId' => 'int',
        'billingTypeId' => 'int',
        'endUserPrice' => 'double',
        'proLicenses' => 'int',
        'contractStart' => '\DateTime',
        'contractEnd' => '\DateTime',
        'internationalisationId' => 'int',
        'messageBundleTypeId' => 'int',
        'solutionProviderId' => 'int',
        'timeZone' => 'int'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'id' => 'int64',
        'name' => null,
        'code' => null,
        'contactName' => null,
        'phone1' => null,
        'phone2' => null,
        'email' => null,
        'taxNumber' => null,
        'address1' => null,
        'licenseCount' => 'int64',
        'description' => null,
        'address2' => null,
        'city' => null,
        'region' => null,
        'postcode' => null,
        'country' => null,
        'parentId' => 'int64',
        'deleted' => null,
        'merchant' => null,
        'locked' => null,
        'billingCycleStartDate' => 'int64',
        'messageBundleId' => 'int64',
        'billingTypeId' => 'int64',
        'endUserPrice' => 'double',
        'proLicenses' => 'int64',
        'contractStart' => 'date-time',
        'contractEnd' => 'date-time',
        'internationalisationId' => 'int64',
        'messageBundleTypeId' => 'int64',
        'solutionProviderId' => 'int64',
        'timeZone' => 'int64'
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'id' => 'id',
        'name' => 'name',
        'code' => 'code',
        'contactName' => 'contactName',
        'phone1' => 'phone1',
        'phone2' => 'phone2',
        'email' => 'email',
        'taxNumber' => 'taxNumber',
        'address1' => 'address1',
        'licenseCount' => 'licenseCount',
        'description' => 'description',
        'address2' => 'address2',
        'city' => 'city',
        'region' => 'region',
        'postcode' => 'postcode',
        'country' => 'country',
        'parentId' => 'parentId',
        'deleted' => 'deleted',
        'merchant' => 'merchant',
        'locked' => 'locked',
        'billingCycleStartDate' => 'billingCycleStartDate',
        'messageBundleId' => 'messageBundleId',
        'billingTypeId' => 'billingTypeId',
        'endUserPrice' => 'endUserPrice',
        'proLicenses' => 'proLicenses',
        'contractStart' => 'contractStart',
        'contractEnd' => 'contractEnd',
        'internationalisationId' => 'internationalisationId',
        'messageBundleTypeId' => 'messageBundleTypeId',
        'solutionProviderId' => 'solutionProviderId',
        'timeZone' => 'timeZone'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'name' => 'setName',
        'code' => 'setCode',
        'contactName' => 'setContactName',
        'phone1' => 'setPhone1',
        'phone2' => 'setPhone2',
        'email' => 'setEmail',
        'taxNumber' => 'setTaxNumber',
        'address1' => 'setAddress1',
        'licenseCount' => 'setLicenseCount',
        'description' => 'setDescription',
        'address2' => 'setAddress2',
        'city' => 'setCity',
        'region' => 'setRegion',
        'postcode' => 'setPostcode',
        'country' => 'setCountry',
        'parentId' => 'setParentId',
        'deleted' => 'setDeleted',
        'merchant' => 'setMerchant',
        'locked' => 'setLocked',
        'billingCycleStartDate' => 'setBillingCycleStartDate',
        'messageBundleId' => 'setMessageBundleId',
        'billingTypeId' => 'setBillingTypeId',
        'endUserPrice' => 'setEndUserPrice',
        'proLicenses' => 'setProLicenses',
        'contractStart' => 'setContractStart',
        'contractEnd' => 'setContractEnd',
        'internationalisationId' => 'setInternationalisationId',
        'messageBundleTypeId' => 'setMessageBundleTypeId',
        'solutionProviderId' => 'setSolutionProviderId',
        'timeZone' => 'setTimeZone'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'name' => 'getName',
        'code' => 'getCode',
        'contactName' => 'getContactName',
        'phone1' => 'getPhone1',
        'phone2' => 'getPhone2',
        'email' => 'getEmail',
        'taxNumber' => 'getTaxNumber',
        'address1' => 'getAddress1',
        'licenseCount' => 'getLicenseCount',
        'description' => 'getDescription',
        'address2' => 'getAddress2',
        'city' => 'getCity',
        'region' => 'getRegion',
        'postcode' => 'getPostcode',
        'country' => 'getCountry',
        'parentId' => 'getParentId',
        'deleted' => 'getDeleted',
        'merchant' => 'getMerchant',
        'locked' => 'getLocked',
        'billingCycleStartDate' => 'getBillingCycleStartDate',
        'messageBundleId' => 'getMessageBundleId',
        'billingTypeId' => 'getBillingTypeId',
        'endUserPrice' => 'getEndUserPrice',
        'proLicenses' => 'getProLicenses',
        'contractStart' => 'getContractStart',
        'contractEnd' => 'getContractEnd',
        'internationalisationId' => 'getInternationalisationId',
        'messageBundleTypeId' => 'getMessageBundleTypeId',
        'solutionProviderId' => 'getSolutionProviderId',
        'timeZone' => 'getTimeZone'
    ];

    /**
     * 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::$openAPIModelName;
    }


    /**
     * 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'] = $data['id'] ?? null;
        $this->container['name'] = $data['name'] ?? null;
        $this->container['code'] = $data['code'] ?? null;
        $this->container['contactName'] = $data['contactName'] ?? null;
        $this->container['phone1'] = $data['phone1'] ?? null;
        $this->container['phone2'] = $data['phone2'] ?? null;
        $this->container['email'] = $data['email'] ?? null;
        $this->container['taxNumber'] = $data['taxNumber'] ?? null;
        $this->container['address1'] = $data['address1'] ?? null;
        $this->container['licenseCount'] = $data['licenseCount'] ?? null;
        $this->container['description'] = $data['description'] ?? null;
        $this->container['address2'] = $data['address2'] ?? null;
        $this->container['city'] = $data['city'] ?? null;
        $this->container['region'] = $data['region'] ?? null;
        $this->container['postcode'] = $data['postcode'] ?? null;
        $this->container['country'] = $data['country'] ?? null;
        $this->container['parentId'] = $data['parentId'] ?? null;
        $this->container['deleted'] = $data['deleted'] ?? null;
        $this->container['merchant'] = $data['merchant'] ?? null;
        $this->container['locked'] = $data['locked'] ?? null;
        $this->container['billingCycleStartDate'] = $data['billingCycleStartDate'] ?? null;
        $this->container['messageBundleId'] = $data['messageBundleId'] ?? null;
        $this->container['billingTypeId'] = $data['billingTypeId'] ?? null;
        $this->container['endUserPrice'] = $data['endUserPrice'] ?? null;
        $this->container['proLicenses'] = $data['proLicenses'] ?? null;
        $this->container['contractStart'] = $data['contractStart'] ?? null;
        $this->container['contractEnd'] = $data['contractEnd'] ?? null;
        $this->container['internationalisationId'] = $data['internationalisationId'] ?? null;
        $this->container['messageBundleTypeId'] = $data['messageBundleTypeId'] ?? null;
        $this->container['solutionProviderId'] = $data['solutionProviderId'] ?? null;
        $this->container['timeZone'] = $data['timeZone'] ?? null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets id
     *
     * @return int|null
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int|null $id id
     *
     * @return self
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets name
     *
     * @return string|null
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string|null $name name
     *
     * @return self
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

    /**
     * Gets code
     *
     * @return string|null
     */
    public function getCode()
    {
        return $this->container['code'];
    }

    /**
     * Sets code
     *
     * @param string|null $code code
     *
     * @return self
     */
    public function setCode($code)
    {
        $this->container['code'] = $code;

        return $this;
    }

    /**
     * Gets contactName
     *
     * @return string|null
     */
    public function getContactName()
    {
        return $this->container['contactName'];
    }

    /**
     * Sets contactName
     *
     * @param string|null $contactName contactName
     *
     * @return self
     */
    public function setContactName($contactName)
    {
        $this->container['contactName'] = $contactName;

        return $this;
    }

    /**
     * Gets phone1
     *
     * @return string|null
     */
    public function getPhone1()
    {
        return $this->container['phone1'];
    }

    /**
     * Sets phone1
     *
     * @param string|null $phone1 phone1
     *
     * @return self
     */
    public function setPhone1($phone1)
    {
        $this->container['phone1'] = $phone1;

        return $this;
    }

    /**
     * Gets phone2
     *
     * @return string|null
     */
    public function getPhone2()
    {
        return $this->container['phone2'];
    }

    /**
     * Sets phone2
     *
     * @param string|null $phone2 phone2
     *
     * @return self
     */
    public function setPhone2($phone2)
    {
        $this->container['phone2'] = $phone2;

        return $this;
    }

    /**
     * Gets email
     *
     * @return string|null
     */
    public function getEmail()
    {
        return $this->container['email'];
    }

    /**
     * Sets email
     *
     * @param string|null $email email
     *
     * @return self
     */
    public function setEmail($email)
    {
        $this->container['email'] = $email;

        return $this;
    }

    /**
     * Gets taxNumber
     *
     * @return string|null
     */
    public function getTaxNumber()
    {
        return $this->container['taxNumber'];
    }

    /**
     * Sets taxNumber
     *
     * @param string|null $taxNumber taxNumber
     *
     * @return self
     */
    public function setTaxNumber($taxNumber)
    {
        $this->container['taxNumber'] = $taxNumber;

        return $this;
    }

    /**
     * Gets address1
     *
     * @return string|null
     */
    public function getAddress1()
    {
        return $this->container['address1'];
    }

    /**
     * Sets address1
     *
     * @param string|null $address1 address1
     *
     * @return self
     */
    public function setAddress1($address1)
    {
        $this->container['address1'] = $address1;

        return $this;
    }

    /**
     * Gets licenseCount
     *
     * @return int|null
     */
    public function getLicenseCount()
    {
        return $this->container['licenseCount'];
    }

    /**
     * Sets licenseCount
     *
     * @param int|null $licenseCount licenseCount
     *
     * @return self
     */
    public function setLicenseCount($licenseCount)
    {
        $this->container['licenseCount'] = $licenseCount;

        return $this;
    }

    /**
     * Gets description
     *
     * @return string|null
     */
    public function getDescription()
    {
        return $this->container['description'];
    }

    /**
     * Sets description
     *
     * @param string|null $description description
     *
     * @return self
     */
    public function setDescription($description)
    {
        $this->container['description'] = $description;

        return $this;
    }

    /**
     * Gets address2
     *
     * @return string|null
     */
    public function getAddress2()
    {
        return $this->container['address2'];
    }

    /**
     * Sets address2
     *
     * @param string|null $address2 address2
     *
     * @return self
     */
    public function setAddress2($address2)
    {
        $this->container['address2'] = $address2;

        return $this;
    }

    /**
     * Gets city
     *
     * @return string|null
     */
    public function getCity()
    {
        return $this->container['city'];
    }

    /**
     * Sets city
     *
     * @param string|null $city city
     *
     * @return self
     */
    public function setCity($city)
    {
        $this->container['city'] = $city;

        return $this;
    }

    /**
     * Gets region
     *
     * @return string|null
     */
    public function getRegion()
    {
        return $this->container['region'];
    }

    /**
     * Sets region
     *
     * @param string|null $region region
     *
     * @return self
     */
    public function setRegion($region)
    {
        $this->container['region'] = $region;

        return $this;
    }

    /**
     * Gets postcode
     *
     * @return string|null
     */
    public function getPostcode()
    {
        return $this->container['postcode'];
    }

    /**
     * Sets postcode
     *
     * @param string|null $postcode postcode
     *
     * @return self
     */
    public function setPostcode($postcode)
    {
        $this->container['postcode'] = $postcode;

        return $this;
    }

    /**
     * Gets country
     *
     * @return string|null
     */
    public function getCountry()
    {
        return $this->container['country'];
    }

    /**
     * Sets country
     *
     * @param string|null $country country
     *
     * @return self
     */
    public function setCountry($country)
    {
        $this->container['country'] = $country;

        return $this;
    }

    /**
     * Gets parentId
     *
     * @return int|null
     */
    public function getParentId()
    {
        return $this->container['parentId'];
    }

    /**
     * Sets parentId
     *
     * @param int|null $parentId parentId
     *
     * @return self
     */
    public function setParentId($parentId)
    {
        $this->container['parentId'] = $parentId;

        return $this;
    }

    /**
     * Gets deleted
     *
     * @return bool|null
     */
    public function getDeleted()
    {
        return $this->container['deleted'];
    }

    /**
     * Sets deleted
     *
     * @param bool|null $deleted deleted
     *
     * @return self
     */
    public function setDeleted($deleted)
    {
        $this->container['deleted'] = $deleted;

        return $this;
    }

    /**
     * Gets merchant
     *
     * @return bool|null
     */
    public function getMerchant()
    {
        return $this->container['merchant'];
    }

    /**
     * Sets merchant
     *
     * @param bool|null $merchant merchant
     *
     * @return self
     */
    public function setMerchant($merchant)
    {
        $this->container['merchant'] = $merchant;

        return $this;
    }

    /**
     * Gets locked
     *
     * @return bool|null
     */
    public function getLocked()
    {
        return $this->container['locked'];
    }

    /**
     * Sets locked
     *
     * @param bool|null $locked locked
     *
     * @return self
     */
    public function setLocked($locked)
    {
        $this->container['locked'] = $locked;

        return $this;
    }

    /**
     * Gets billingCycleStartDate
     *
     * @return int|null
     */
    public function getBillingCycleStartDate()
    {
        return $this->container['billingCycleStartDate'];
    }

    /**
     * Sets billingCycleStartDate
     *
     * @param int|null $billingCycleStartDate billingCycleStartDate
     *
     * @return self
     */
    public function setBillingCycleStartDate($billingCycleStartDate)
    {
        $this->container['billingCycleStartDate'] = $billingCycleStartDate;

        return $this;
    }

    /**
     * Gets messageBundleId
     *
     * @return int|null
     */
    public function getMessageBundleId()
    {
        return $this->container['messageBundleId'];
    }

    /**
     * Sets messageBundleId
     *
     * @param int|null $messageBundleId messageBundleId
     *
     * @return self
     */
    public function setMessageBundleId($messageBundleId)
    {
        $this->container['messageBundleId'] = $messageBundleId;

        return $this;
    }

    /**
     * Gets billingTypeId
     *
     * @return int|null
     */
    public function getBillingTypeId()
    {
        return $this->container['billingTypeId'];
    }

    /**
     * Sets billingTypeId
     *
     * @param int|null $billingTypeId billingTypeId
     *
     * @return self
     */
    public function setBillingTypeId($billingTypeId)
    {
        $this->container['billingTypeId'] = $billingTypeId;

        return $this;
    }

    /**
     * Gets endUserPrice
     *
     * @return double|null
     */
    public function getEndUserPrice()
    {
        return $this->container['endUserPrice'];
    }

    /**
     * Sets endUserPrice
     *
     * @param double|null $endUserPrice endUserPrice
     *
     * @return self
     */
    public function setEndUserPrice($endUserPrice)
    {
        $this->container['endUserPrice'] = $endUserPrice;

        return $this;
    }

    /**
     * Gets proLicenses
     *
     * @return int|null
     */
    public function getProLicenses()
    {
        return $this->container['proLicenses'];
    }

    /**
     * Sets proLicenses
     *
     * @param int|null $proLicenses proLicenses
     *
     * @return self
     */
    public function setProLicenses($proLicenses)
    {
        $this->container['proLicenses'] = $proLicenses;

        return $this;
    }

    /**
     * Gets contractStart
     *
     * @return \DateTime|null
     */
    public function getContractStart()
    {
        return $this->container['contractStart'];
    }

    /**
     * Sets contractStart
     *
     * @param \DateTime|null $contractStart contractStart
     *
     * @return self
     */
    public function setContractStart($contractStart)
    {
        $this->container['contractStart'] = $contractStart;

        return $this;
    }

    /**
     * Gets contractEnd
     *
     * @return \DateTime|null
     */
    public function getContractEnd()
    {
        return $this->container['contractEnd'];
    }

    /**
     * Sets contractEnd
     *
     * @param \DateTime|null $contractEnd contractEnd
     *
     * @return self
     */
    public function setContractEnd($contractEnd)
    {
        $this->container['contractEnd'] = $contractEnd;

        return $this;
    }

    /**
     * Gets internationalisationId
     *
     * @return int|null
     */
    public function getInternationalisationId()
    {
        return $this->container['internationalisationId'];
    }

    /**
     * Sets internationalisationId
     *
     * @param int|null $internationalisationId internationalisationId
     *
     * @return self
     */
    public function setInternationalisationId($internationalisationId)
    {
        $this->container['internationalisationId'] = $internationalisationId;

        return $this;
    }

    /**
     * Gets messageBundleTypeId
     *
     * @return int|null
     */
    public function getMessageBundleTypeId()
    {
        return $this->container['messageBundleTypeId'];
    }

    /**
     * Sets messageBundleTypeId
     *
     * @param int|null $messageBundleTypeId messageBundleTypeId
     *
     * @return self
     */
    public function setMessageBundleTypeId($messageBundleTypeId)
    {
        $this->container['messageBundleTypeId'] = $messageBundleTypeId;

        return $this;
    }

    /**
     * Gets solutionProviderId
     *
     * @return int|null
     */
    public function getSolutionProviderId()
    {
        return $this->container['solutionProviderId'];
    }

    /**
     * Sets solutionProviderId
     *
     * @param int|null $solutionProviderId solutionProviderId
     *
     * @return self
     */
    public function setSolutionProviderId($solutionProviderId)
    {
        $this->container['solutionProviderId'] = $solutionProviderId;

        return $this;
    }

    /**
     * Gets timeZone
     *
     * @return int|null
     */
    public function getTimeZone()
    {
        return $this->container['timeZone'];
    }

    /**
     * Sets timeZone
     *
     * @param int|null $timeZone timeZone
     *
     * @return self
     */
    public function setTimeZone($timeZone)
    {
        $this->container['timeZone'] = $timeZone;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


