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

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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'city' => 'string',
        'place' => 'string',
        'street' => 'string',
        'house_number' => 'string',
        'reference_number' => 'string',
        'reference_number_char' => 'string',
        'evidence_number' => 'bool',
        'zip_code' => 'string',
        'adm_code' => 'string',
        'valid' => 'bool',
        'full_street' => 'string'
    ];

    /**
      * 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 = [
        'city' => null,
        'place' => null,
        'street' => null,
        'house_number' => null,
        'reference_number' => null,
        'reference_number_char' => null,
        'evidence_number' => null,
        'zip_code' => null,
        'adm_code' => null,
        'valid' => null,
        'full_street' => 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 = [
        'city' => 'city',
        'place' => 'place',
        'street' => 'street',
        'house_number' => 'houseNumber',
        'reference_number' => 'referenceNumber',
        'reference_number_char' => 'referenceNumberChar',
        'evidence_number' => 'evidenceNumber',
        'zip_code' => 'zipCode',
        'adm_code' => 'admCode',
        'valid' => 'valid',
        'full_street' => 'fullStreet'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'city' => 'setCity',
        'place' => 'setPlace',
        'street' => 'setStreet',
        'house_number' => 'setHouseNumber',
        'reference_number' => 'setReferenceNumber',
        'reference_number_char' => 'setReferenceNumberChar',
        'evidence_number' => 'setEvidenceNumber',
        'zip_code' => 'setZipCode',
        'adm_code' => 'setAdmCode',
        'valid' => 'setValid',
        'full_street' => 'setFullStreet'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'city' => 'getCity',
        'place' => 'getPlace',
        'street' => 'getStreet',
        'house_number' => 'getHouseNumber',
        'reference_number' => 'getReferenceNumber',
        'reference_number_char' => 'getReferenceNumberChar',
        'evidence_number' => 'getEvidenceNumber',
        'zip_code' => 'getZipCode',
        'adm_code' => 'getAdmCode',
        'valid' => 'getValid',
        'full_street' => 'getFullStreet'
    ];

    /**
     * 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['city'] = $data['city'] ?? null;
        $this->container['place'] = $data['place'] ?? null;
        $this->container['street'] = $data['street'] ?? null;
        $this->container['house_number'] = $data['house_number'] ?? null;
        $this->container['reference_number'] = $data['reference_number'] ?? null;
        $this->container['reference_number_char'] = $data['reference_number_char'] ?? null;
        $this->container['evidence_number'] = $data['evidence_number'] ?? null;
        $this->container['zip_code'] = $data['zip_code'] ?? null;
        $this->container['adm_code'] = $data['adm_code'] ?? null;
        $this->container['valid'] = $data['valid'] ?? null;
        $this->container['full_street'] = $data['full_street'] ?? 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 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 place
     *
     * @return string|null
     */
    public function getPlace()
    {
        return $this->container['place'];
    }

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

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets reference_number_char
     *
     * @param string|null $reference_number_char Reference number char
     *
     * @return self
     */
    public function setReferenceNumberChar($reference_number_char)
    {
        $this->container['reference_number_char'] = $reference_number_char;

        return $this;
    }

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

    /**
     * Sets evidence_number
     *
     * @param bool|null $evidence_number Mark if house number is subtype of evidence number
     *
     * @return self
     */
    public function setEvidenceNumber($evidence_number)
    {
        $this->container['evidence_number'] = $evidence_number;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets full_street
     *
     * @param string|null $full_street Street address with details
     *
     * @return self
     */
    public function setFullStreet($full_street)
    {
        $this->container['full_street'] = $full_street;

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


