<?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            

/**
 * EpsApiMyApi2WebModelsShipmentShipmentDeliveryFeatureModel
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'load_date' => '\DateTime',
        'deliv_date' => '\DateTime',
        'deliv_person' => 'string',
        'not_deliv_date' => '\DateTime',
        'out_dep_date' => '\DateTime',
        'hub_date' => '\DateTime',
        'delivery_to_access_point' => 'bool'
    ];

    /**
      * 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 = [
        'load_date' => 'date-time',
        'deliv_date' => 'date-time',
        'deliv_person' => null,
        'not_deliv_date' => 'date-time',
        'out_dep_date' => 'date-time',
        'hub_date' => 'date-time',
        'delivery_to_access_point' => 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 = [
        'load_date' => 'loadDate',
        'deliv_date' => 'delivDate',
        'deliv_person' => 'delivPerson',
        'not_deliv_date' => 'notDelivDate',
        'out_dep_date' => 'outDepDate',
        'hub_date' => 'hubDate',
        'delivery_to_access_point' => 'deliveryToAccessPoint'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'load_date' => 'setLoadDate',
        'deliv_date' => 'setDelivDate',
        'deliv_person' => 'setDelivPerson',
        'not_deliv_date' => 'setNotDelivDate',
        'out_dep_date' => 'setOutDepDate',
        'hub_date' => 'setHubDate',
        'delivery_to_access_point' => 'setDeliveryToAccessPoint'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'load_date' => 'getLoadDate',
        'deliv_date' => 'getDelivDate',
        'deliv_person' => 'getDelivPerson',
        'not_deliv_date' => 'getNotDelivDate',
        'out_dep_date' => 'getOutDepDate',
        'hub_date' => 'getHubDate',
        'delivery_to_access_point' => 'getDeliveryToAccessPoint'
    ];

    /**
     * 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['load_date'] = $data['load_date'] ?? null;
        $this->container['deliv_date'] = $data['deliv_date'] ?? null;
        $this->container['deliv_person'] = $data['deliv_person'] ?? null;
        $this->container['not_deliv_date'] = $data['not_deliv_date'] ?? null;
        $this->container['out_dep_date'] = $data['out_dep_date'] ?? null;
        $this->container['hub_date'] = $data['hub_date'] ?? null;
        $this->container['delivery_to_access_point'] = $data['delivery_to_access_point'] ?? 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 load_date
     *
     * @return \DateTime|null
     */
    public function getLoadDate()
    {
        return $this->container['load_date'];
    }

    /**
     * Sets load_date
     *
     * @param \DateTime|null $load_date Date of loading shipment for delivery.
     *
     * @return self
     */
    public function setLoadDate($load_date)
    {
        $this->container['load_date'] = $load_date;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets not_deliv_date
     *
     * @param \DateTime|null $not_deliv_date Not delivery date
     *
     * @return self
     */
    public function setNotDelivDate($not_deliv_date)
    {
        $this->container['not_deliv_date'] = $not_deliv_date;

        return $this;
    }

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

    /**
     * Sets out_dep_date
     *
     * @param \DateTime|null $out_dep_date Out dep date
     *
     * @return self
     */
    public function setOutDepDate($out_dep_date)
    {
        $this->container['out_dep_date'] = $out_dep_date;

        return $this;
    }

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

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

        return $this;
    }

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

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

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


