<?php 
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fwrite
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fclose
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fopen
// phpcs:ignoreFile WordPress.Security.EscapeOutput.ExceptionNotEscaped            

/**
 * EpsApiMyApi2WebModelsAccessPointAccessPointModel
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  PPLCZCPL
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * CPL
 *
 * **Changelog**    * 2024-08-22 - SPRJ-13791 - validace PRTE / PRBC externích čísel - nelze použít najednou    - /shipment/batch    * 2024-07-01 - SPRJ-13838 - přidání    - /customer/address    * 2023-11-23 - SPRJ-12703 - CPL - /shipment - timestamp    - /shipment - Rozšíření výstupu o LastUpdateDate.    * 2023-07-13 - SPRJ-11888 - přidání    - /codelist/status - číselník statusů    * 2023-07-13 - SPRJ-11953 - přidání    - /order/cancel - storno objednávky
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.1
 */

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

namespace PPLCZCPL\Model;

use \ArrayAccess;
use \PPLCZCPL\ObjectSerializer;

/**
 * EpsApiMyApi2WebModelsAccessPointAccessPointModel Class Doc Comment
 *
 * @category Class
 * @description AccessPointModel
 * @package  PPLCZCPL
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class EpsApiMyApi2WebModelsAccessPointAccessPointModel implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'Eps.Api.MyApi2.Web.Models.AccessPoint.AccessPointModel';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'access_point_code' => 'string',
        'access_point_type' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointConstMyApi2AccessPointType',
        'name' => 'string',
        'name2' => 'string',
        'street' => 'string',
        'city' => 'string',
        'country' => 'string',
        'zip_code' => 'string',
        'phone' => 'string',
        'email' => 'string',
        'tribal_service_point' => 'bool',
        'active_card_payment' => 'bool',
        'active_cash_payment' => 'bool',
        'pickup_enabled' => 'bool',
        'dimension_forced' => 'bool',
        'work_hours' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointWorkHourModel[]',
        'access_point_note' => 'string',
        'gps' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointModelGps',
        'capacity_settings' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointCapacitySettingModel[]'
    ];

    /**
      * 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 = [
        'access_point_code' => null,
        'access_point_type' => null,
        'name' => null,
        'name2' => null,
        'street' => null,
        'city' => null,
        'country' => null,
        'zip_code' => null,
        'phone' => null,
        'email' => null,
        'tribal_service_point' => null,
        'active_card_payment' => null,
        'active_cash_payment' => null,
        'pickup_enabled' => null,
        'dimension_forced' => null,
        'work_hours' => null,
        'access_point_note' => null,
        'gps' => null,
        'capacity_settings' => null
    ];

    /**
     * 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 = [
        'access_point_code' => 'accessPointCode',
        'access_point_type' => 'accessPointType',
        'name' => 'name',
        'name2' => 'name2',
        'street' => 'street',
        'city' => 'city',
        'country' => 'country',
        'zip_code' => 'zipCode',
        'phone' => 'phone',
        'email' => 'email',
        'tribal_service_point' => 'tribalServicePoint',
        'active_card_payment' => 'activeCardPayment',
        'active_cash_payment' => 'activeCashPayment',
        'pickup_enabled' => 'pickupEnabled',
        'dimension_forced' => 'dimensionForced',
        'work_hours' => 'workHours',
        'access_point_note' => 'accessPointNote',
        'gps' => 'gps',
        'capacity_settings' => 'capacitySettings'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'access_point_code' => 'setAccessPointCode',
        'access_point_type' => 'setAccessPointType',
        'name' => 'setName',
        'name2' => 'setName2',
        'street' => 'setStreet',
        'city' => 'setCity',
        'country' => 'setCountry',
        'zip_code' => 'setZipCode',
        'phone' => 'setPhone',
        'email' => 'setEmail',
        'tribal_service_point' => 'setTribalServicePoint',
        'active_card_payment' => 'setActiveCardPayment',
        'active_cash_payment' => 'setActiveCashPayment',
        'pickup_enabled' => 'setPickupEnabled',
        'dimension_forced' => 'setDimensionForced',
        'work_hours' => 'setWorkHours',
        'access_point_note' => 'setAccessPointNote',
        'gps' => 'setGps',
        'capacity_settings' => 'setCapacitySettings'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'access_point_code' => 'getAccessPointCode',
        'access_point_type' => 'getAccessPointType',
        'name' => 'getName',
        'name2' => 'getName2',
        'street' => 'getStreet',
        'city' => 'getCity',
        'country' => 'getCountry',
        'zip_code' => 'getZipCode',
        'phone' => 'getPhone',
        'email' => 'getEmail',
        'tribal_service_point' => 'getTribalServicePoint',
        'active_card_payment' => 'getActiveCardPayment',
        'active_cash_payment' => 'getActiveCashPayment',
        'pickup_enabled' => 'getPickupEnabled',
        'dimension_forced' => 'getDimensionForced',
        'work_hours' => 'getWorkHours',
        'access_point_note' => 'getAccessPointNote',
        'gps' => 'getGps',
        'capacity_settings' => 'getCapacitySettings'
    ];

    /**
     * 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['access_point_code'] = $data['access_point_code'] ?? null;
        $this->container['access_point_type'] = $data['access_point_type'] ?? null;
        $this->container['name'] = $data['name'] ?? null;
        $this->container['name2'] = $data['name2'] ?? null;
        $this->container['street'] = $data['street'] ?? null;
        $this->container['city'] = $data['city'] ?? null;
        $this->container['country'] = $data['country'] ?? null;
        $this->container['zip_code'] = $data['zip_code'] ?? null;
        $this->container['phone'] = $data['phone'] ?? null;
        $this->container['email'] = $data['email'] ?? null;
        $this->container['tribal_service_point'] = $data['tribal_service_point'] ?? null;
        $this->container['active_card_payment'] = $data['active_card_payment'] ?? null;
        $this->container['active_cash_payment'] = $data['active_cash_payment'] ?? null;
        $this->container['pickup_enabled'] = $data['pickup_enabled'] ?? null;
        $this->container['dimension_forced'] = $data['dimension_forced'] ?? null;
        $this->container['work_hours'] = $data['work_hours'] ?? null;
        $this->container['access_point_note'] = $data['access_point_note'] ?? null;
        $this->container['gps'] = $data['gps'] ?? null;
        $this->container['capacity_settings'] = $data['capacity_settings'] ?? 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 access_point_code
     *
     * @return string|null
     */
    public function getAccessPointCode()
    {
        return $this->container['access_point_code'];
    }

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

        return $this;
    }

    /**
     * Gets access_point_type
     *
     * @return \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointConstMyApi2AccessPointType|null
     */
    public function getAccessPointType()
    {
        return $this->container['access_point_type'];
    }

    /**
     * Sets access_point_type
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointConstMyApi2AccessPointType|null $access_point_type access_point_type
     *
     * @return self
     */
    public function setAccessPointType($access_point_type)
    {
        $this->container['access_point_type'] = $access_point_type;

        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 name2
     *
     * @return string|null
     */
    public function getName2()
    {
        return $this->container['name2'];
    }

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

        return $this;
    }

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

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

        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 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 zip_code
     *
     * @return string|null
     */
    public function getZipCode()
    {
        return $this->container['zip_code'];
    }

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

        return $this;
    }

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

    /**
     * Sets phone
     *
     * @param string|null $phone Phone
     *
     * @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 Email
     *
     * @return self
     */
    public function setEmail($email)
    {
        $this->container['email'] = $email;

        return $this;
    }

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

    /**
     * Sets tribal_service_point
     *
     * @param bool|null $tribal_service_point Tribal service point
     *
     * @return self
     */
    public function setTribalServicePoint($tribal_service_point)
    {
        $this->container['tribal_service_point'] = $tribal_service_point;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets active_cash_payment
     *
     * @param bool|null $active_cash_payment Active cash payment
     *
     * @return self
     */
    public function setActiveCashPayment($active_cash_payment)
    {
        $this->container['active_cash_payment'] = $active_cash_payment;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets work_hours
     *
     * @return \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointWorkHourModel[]|null
     */
    public function getWorkHours()
    {
        return $this->container['work_hours'];
    }

    /**
     * Sets work_hours
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointWorkHourModel[]|null $work_hours WorkHours
     *
     * @return self
     */
    public function setWorkHours($work_hours)
    {
        $this->container['work_hours'] = $work_hours;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets gps
     *
     * @return \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointModelGps|null
     */
    public function getGps()
    {
        return $this->container['gps'];
    }

    /**
     * Sets gps
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointModelGps|null $gps gps
     *
     * @return self
     */
    public function setGps($gps)
    {
        $this->container['gps'] = $gps;

        return $this;
    }

    /**
     * Gets capacity_settings
     *
     * @return \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointCapacitySettingModel[]|null
     */
    public function getCapacitySettings()
    {
        return $this->container['capacity_settings'];
    }

    /**
     * Sets capacity_settings
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsAccessPointAccessPointCapacitySettingModel[]|null $capacity_settings CapacitySettings
     *
     * @return self
     */
    public function setCapacitySettings($capacity_settings)
    {
        $this->container['capacity_settings'] = $capacity_settings;

        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 ObjectSerializerPpl::sanitizeForSerialization($this);
    }

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

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


