<?php
/**
 * StoreWithPriceListsVii
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'id' => 'int',
        'name' => 'string',
        'storeNumber' => 'string',
        'notes' => 'string',
        'phone' => 'string',
        'email' => 'string',
        'address1' => 'string',
        'address2' => 'string',
        'city' => 'string',
        'region' => 'string',
        'country' => 'string',
        'postcode' => 'string',
        'modified' => 'int',
        'useClerkList' => 'bool',
        'reasonUsageId' => 'int',
        'timeZone' => 'int',
        'timeZoneOffset' => 'string',
        'priceLists' => '\SmartVolution\Model\StorePriceListOut[]',
        'storeDefaultPriceList' => 'int',
        'protectPriceLists' => '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,
        'storeNumber' => null,
        'notes' => null,
        'phone' => null,
        'email' => null,
        'address1' => null,
        'address2' => null,
        'city' => null,
        'region' => null,
        'country' => null,
        'postcode' => null,
        'modified' => 'int64',
        'useClerkList' => null,
        'reasonUsageId' => 'int64',
        'timeZone' => 'int64',
        'timeZoneOffset' => null,
        'priceLists' => null,
        'storeDefaultPriceList' => 'int64',
        'protectPriceLists' => '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',
        'storeNumber' => 'storeNumber',
        'notes' => 'notes',
        'phone' => 'phone',
        'email' => 'email',
        'address1' => 'address1',
        'address2' => 'address2',
        'city' => 'city',
        'region' => 'region',
        'country' => 'country',
        'postcode' => 'postcode',
        'modified' => 'modified',
        'useClerkList' => 'useClerkList',
        'reasonUsageId' => 'reasonUsageId',
        'timeZone' => 'timeZone',
        'timeZoneOffset' => 'timeZoneOffset',
        'priceLists' => 'priceLists',
        'storeDefaultPriceList' => 'storeDefaultPriceList',
        'protectPriceLists' => 'protectPriceLists'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'name' => 'setName',
        'storeNumber' => 'setStoreNumber',
        'notes' => 'setNotes',
        'phone' => 'setPhone',
        'email' => 'setEmail',
        'address1' => 'setAddress1',
        'address2' => 'setAddress2',
        'city' => 'setCity',
        'region' => 'setRegion',
        'country' => 'setCountry',
        'postcode' => 'setPostcode',
        'modified' => 'setModified',
        'useClerkList' => 'setUseClerkList',
        'reasonUsageId' => 'setReasonUsageId',
        'timeZone' => 'setTimeZone',
        'timeZoneOffset' => 'setTimeZoneOffset',
        'priceLists' => 'setPriceLists',
        'storeDefaultPriceList' => 'setStoreDefaultPriceList',
        'protectPriceLists' => 'setProtectPriceLists'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'name' => 'getName',
        'storeNumber' => 'getStoreNumber',
        'notes' => 'getNotes',
        'phone' => 'getPhone',
        'email' => 'getEmail',
        'address1' => 'getAddress1',
        'address2' => 'getAddress2',
        'city' => 'getCity',
        'region' => 'getRegion',
        'country' => 'getCountry',
        'postcode' => 'getPostcode',
        'modified' => 'getModified',
        'useClerkList' => 'getUseClerkList',
        'reasonUsageId' => 'getReasonUsageId',
        'timeZone' => 'getTimeZone',
        'timeZoneOffset' => 'getTimeZoneOffset',
        'priceLists' => 'getPriceLists',
        'storeDefaultPriceList' => 'getStoreDefaultPriceList',
        'protectPriceLists' => 'getProtectPriceLists'
    ];

    /**
     * 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['storeNumber'] = $data['storeNumber'] ?? null;
        $this->container['notes'] = $data['notes'] ?? null;
        $this->container['phone'] = $data['phone'] ?? null;
        $this->container['email'] = $data['email'] ?? null;
        $this->container['address1'] = $data['address1'] ?? null;
        $this->container['address2'] = $data['address2'] ?? null;
        $this->container['city'] = $data['city'] ?? null;
        $this->container['region'] = $data['region'] ?? null;
        $this->container['country'] = $data['country'] ?? null;
        $this->container['postcode'] = $data['postcode'] ?? null;
        $this->container['modified'] = $data['modified'] ?? null;
        $this->container['useClerkList'] = $data['useClerkList'] ?? null;
        $this->container['reasonUsageId'] = $data['reasonUsageId'] ?? null;
        $this->container['timeZone'] = $data['timeZone'] ?? null;
        $this->container['timeZoneOffset'] = $data['timeZoneOffset'] ?? null;
        $this->container['priceLists'] = $data['priceLists'] ?? null;
        $this->container['storeDefaultPriceList'] = $data['storeDefaultPriceList'] ?? null;
        $this->container['protectPriceLists'] = $data['protectPriceLists'] ?? 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 Store unique 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 Store name
     *
     * @return self
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets phone
     *
     * @param string|null $phone Store Phone number
     *
     * @return self
     */
    public function setPhone($phone)
    {
        $this->container['phone'] = $phone;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets address2
     *
     * @param string|null $address2 Store address line 2
     *
     * @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 Store 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 Store region / county
     *
     * @return self
     */
    public function setRegion($region)
    {
        $this->container['region'] = $region;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets modified
     *
     * @param int|null $modified The time in seconds since midnight January 1st 1970 UTC that this Product was modified
     *
     * @return self
     */
    public function setModified($modified)
    {
        $this->container['modified'] = $modified;

        return $this;
    }

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

    /**
     * Sets useClerkList
     *
     * @param bool|null $useClerkList Store use Clerk to book appointment
     *
     * @return self
     */
    public function setUseClerkList($useClerkList)
    {
        $this->container['useClerkList'] = $useClerkList;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets timeZoneOffset
     *
     * @param string|null $timeZoneOffset Store time zone offset
     *
     * @return self
     */
    public function setTimeZoneOffset($timeZoneOffset)
    {
        $this->container['timeZoneOffset'] = $timeZoneOffset;

        return $this;
    }

    /**
     * Gets priceLists
     *
     * @return \SmartVolution\Model\StorePriceListOut[]|null
     */
    public function getPriceLists()
    {
        return $this->container['priceLists'];
    }

    /**
     * Sets priceLists
     *
     * @param \SmartVolution\Model\StorePriceListOut[]|null $priceLists List of price list to assign to store
     *
     * @return self
     */
    public function setPriceLists($priceLists)
    {
        $this->container['priceLists'] = $priceLists;

        return $this;
    }

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

    /**
     * Sets storeDefaultPriceList
     *
     * @param int|null $storeDefaultPriceList Store default price list reason id
     *
     * @return self
     */
    public function setStoreDefaultPriceList($storeDefaultPriceList)
    {
        $this->container['storeDefaultPriceList'] = $storeDefaultPriceList;

        return $this;
    }

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

    /**
     * Sets protectPriceLists
     *
     * @param int[]|null $protectPriceLists List of price list Ids to assign to store and used by suspend transaction
     *
     * @return self
     */
    public function setProtectPriceLists($protectPriceLists)
    {
        $this->container['protectPriceLists'] = $protectPriceLists;

        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));
    }
}


