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

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

/**
 * EpsApiMyApi2WebModelsShipmentShipmentModel Class Doc Comment
 *
 * @category Class
 * @description ShipmentModel
 * @package  PPLCZCPL
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class EpsApiMyApi2WebModelsShipmentShipmentModel 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.ShipmentModel';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'shipment_number' => 'string',
        'product_type' => 'string',
        'note' => 'string',
        'depot' => 'string',
        'integrator_id' => 'int',
        'last_update_date' => '\DateTime',
        'shipment_set' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelShipmentSet',
        'sender' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelSender',
        'recipient' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelSender',
        'specific_delivery' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelSpecificDelivery',
        'external_numbers' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentExternalNumberModel[]',
        'services' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentServiceModel[]',
        'track_and_trace' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelTrackAndTrace',
        'shipment_weight_info' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelShipmentWeightInfo',
        'payment_info' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelPaymentInfo',
        'delivery_feature' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelDeliveryFeature',
        'back_shipment_feature' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelBackShipmentFeature',
        'dormant_shipment_feature' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelDormantShipmentFeature',
        'access_point_feature' => '\PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentShipmentModelAccessPointFeature'
    ];

    /**
      * 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 = [
        'shipment_number' => null,
        'product_type' => null,
        'note' => null,
        'depot' => null,
        'integrator_id' => 'int32',
        'last_update_date' => 'date-time',
        'shipment_set' => null,
        'sender' => null,
        'recipient' => null,
        'specific_delivery' => null,
        'external_numbers' => null,
        'services' => null,
        'track_and_trace' => null,
        'shipment_weight_info' => null,
        'payment_info' => null,
        'delivery_feature' => null,
        'back_shipment_feature' => null,
        'dormant_shipment_feature' => null,
        'access_point_feature' => 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 = [
        'shipment_number' => 'shipmentNumber',
        'product_type' => 'productType',
        'note' => 'note',
        'depot' => 'depot',
        'integrator_id' => 'integratorId',
        'last_update_date' => 'lastUpdateDate',
        'shipment_set' => 'shipmentSet',
        'sender' => 'sender',
        'recipient' => 'recipient',
        'specific_delivery' => 'specificDelivery',
        'external_numbers' => 'externalNumbers',
        'services' => 'services',
        'track_and_trace' => 'trackAndTrace',
        'shipment_weight_info' => 'shipmentWeightInfo',
        'payment_info' => 'paymentInfo',
        'delivery_feature' => 'deliveryFeature',
        'back_shipment_feature' => 'backShipmentFeature',
        'dormant_shipment_feature' => 'dormantShipmentFeature',
        'access_point_feature' => 'accessPointFeature'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'shipment_number' => 'setShipmentNumber',
        'product_type' => 'setProductType',
        'note' => 'setNote',
        'depot' => 'setDepot',
        'integrator_id' => 'setIntegratorId',
        'last_update_date' => 'setLastUpdateDate',
        'shipment_set' => 'setShipmentSet',
        'sender' => 'setSender',
        'recipient' => 'setRecipient',
        'specific_delivery' => 'setSpecificDelivery',
        'external_numbers' => 'setExternalNumbers',
        'services' => 'setServices',
        'track_and_trace' => 'setTrackAndTrace',
        'shipment_weight_info' => 'setShipmentWeightInfo',
        'payment_info' => 'setPaymentInfo',
        'delivery_feature' => 'setDeliveryFeature',
        'back_shipment_feature' => 'setBackShipmentFeature',
        'dormant_shipment_feature' => 'setDormantShipmentFeature',
        'access_point_feature' => 'setAccessPointFeature'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'shipment_number' => 'getShipmentNumber',
        'product_type' => 'getProductType',
        'note' => 'getNote',
        'depot' => 'getDepot',
        'integrator_id' => 'getIntegratorId',
        'last_update_date' => 'getLastUpdateDate',
        'shipment_set' => 'getShipmentSet',
        'sender' => 'getSender',
        'recipient' => 'getRecipient',
        'specific_delivery' => 'getSpecificDelivery',
        'external_numbers' => 'getExternalNumbers',
        'services' => 'getServices',
        'track_and_trace' => 'getTrackAndTrace',
        'shipment_weight_info' => 'getShipmentWeightInfo',
        'payment_info' => 'getPaymentInfo',
        'delivery_feature' => 'getDeliveryFeature',
        'back_shipment_feature' => 'getBackShipmentFeature',
        'dormant_shipment_feature' => 'getDormantShipmentFeature',
        'access_point_feature' => 'getAccessPointFeature'
    ];

    /**
     * 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['shipment_number'] = $data['shipment_number'] ?? null;
        $this->container['product_type'] = $data['product_type'] ?? null;
        $this->container['note'] = $data['note'] ?? null;
        $this->container['depot'] = $data['depot'] ?? null;
        $this->container['integrator_id'] = $data['integrator_id'] ?? null;
        $this->container['last_update_date'] = $data['last_update_date'] ?? null;
        $this->container['shipment_set'] = $data['shipment_set'] ?? null;
        $this->container['sender'] = $data['sender'] ?? null;
        $this->container['recipient'] = $data['recipient'] ?? null;
        $this->container['specific_delivery'] = $data['specific_delivery'] ?? null;
        $this->container['external_numbers'] = $data['external_numbers'] ?? null;
        $this->container['services'] = $data['services'] ?? null;
        $this->container['track_and_trace'] = $data['track_and_trace'] ?? null;
        $this->container['shipment_weight_info'] = $data['shipment_weight_info'] ?? null;
        $this->container['payment_info'] = $data['payment_info'] ?? null;
        $this->container['delivery_feature'] = $data['delivery_feature'] ?? null;
        $this->container['back_shipment_feature'] = $data['back_shipment_feature'] ?? null;
        $this->container['dormant_shipment_feature'] = $data['dormant_shipment_feature'] ?? null;
        $this->container['access_point_feature'] = $data['access_point_feature'] ?? 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 shipment_number
     *
     * @return string|null
     */
    public function getShipmentNumber()
    {
        return $this->container['shipment_number'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets last_update_date
     *
     * @param \DateTime|null $last_update_date Last update date
     *
     * @return self
     */
    public function setLastUpdateDate($last_update_date)
    {
        $this->container['last_update_date'] = $last_update_date;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets external_numbers
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentExternalNumberModel[]|null $external_numbers ExternalNumbers
     *
     * @return self
     */
    public function setExternalNumbers($external_numbers)
    {
        $this->container['external_numbers'] = $external_numbers;

        return $this;
    }

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

    /**
     * Sets services
     *
     * @param \PPLCZCPL\Model\EpsApiMyApi2WebModelsShipmentServiceModel[]|null $services Services
     *
     * @return self
     */
    public function setServices($services)
    {
        $this->container['services'] = $services;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


