<?php
/**
 * TemandoShippingDataDeliveryQuoteCollectionPointInterface
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  Magento2
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Magento Community
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.3
 * 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 Magento2\Model;

use \ArrayAccess;
use \Magento2\ObjectSerializer;

/**
 * TemandoShippingDataDeliveryQuoteCollectionPointInterface Class Doc Comment
 *
 * @category Class
 * @description Temando Quote Collection Point Interface – Checkout/Quoting
 * @package  Magento2
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class TemandoShippingDataDeliveryQuoteCollectionPointInterface implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'temando-shipping-data-delivery-quote-collection-point-interface';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'entity_id' => 'int',
        'collection_point_id' => 'string',
        'recipient_address_id' => 'int',
        'name' => 'string',
        'country' => 'string',
        'region' => 'string',
        'postcode' => 'string',
        'city' => 'string',
        'street' => 'string[]',
        'distance' => 'int',
        'opening_hours' => 'string[]',
        'shipping_experiences' => 'string[]',
        'selected' => '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 = [
        'entity_id' => null,
        'collection_point_id' => null,
        'recipient_address_id' => null,
        'name' => null,
        'country' => null,
        'region' => null,
        'postcode' => null,
        'city' => null,
        'street' => null,
        'distance' => null,
        'opening_hours' => null,
        'shipping_experiences' => null,
        'selected' => 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 = [
        'entity_id' => 'entity_id',
        'collection_point_id' => 'collection_point_id',
        'recipient_address_id' => 'recipient_address_id',
        'name' => 'name',
        'country' => 'country',
        'region' => 'region',
        'postcode' => 'postcode',
        'city' => 'city',
        'street' => 'street',
        'distance' => 'distance',
        'opening_hours' => 'opening_hours',
        'shipping_experiences' => 'shipping_experiences',
        'selected' => 'selected'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'entity_id' => 'setEntityId',
        'collection_point_id' => 'setCollectionPointId',
        'recipient_address_id' => 'setRecipientAddressId',
        'name' => 'setName',
        'country' => 'setCountry',
        'region' => 'setRegion',
        'postcode' => 'setPostcode',
        'city' => 'setCity',
        'street' => 'setStreet',
        'distance' => 'setDistance',
        'opening_hours' => 'setOpeningHours',
        'shipping_experiences' => 'setShippingExperiences',
        'selected' => 'setSelected'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'entity_id' => 'getEntityId',
        'collection_point_id' => 'getCollectionPointId',
        'recipient_address_id' => 'getRecipientAddressId',
        'name' => 'getName',
        'country' => 'getCountry',
        'region' => 'getRegion',
        'postcode' => 'getPostcode',
        'city' => 'getCity',
        'street' => 'getStreet',
        'distance' => 'getDistance',
        'opening_hours' => 'getOpeningHours',
        'shipping_experiences' => 'getShippingExperiences',
        'selected' => 'getSelected'
    ];

    /**
     * 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['entity_id'] = $data['entity_id'] ?? null;
        $this->container['collection_point_id'] = $data['collection_point_id'] ?? null;
        $this->container['recipient_address_id'] = $data['recipient_address_id'] ?? null;
        $this->container['name'] = $data['name'] ?? null;
        $this->container['country'] = $data['country'] ?? null;
        $this->container['region'] = $data['region'] ?? null;
        $this->container['postcode'] = $data['postcode'] ?? null;
        $this->container['city'] = $data['city'] ?? null;
        $this->container['street'] = $data['street'] ?? null;
        $this->container['distance'] = $data['distance'] ?? null;
        $this->container['opening_hours'] = $data['opening_hours'] ?? null;
        $this->container['shipping_experiences'] = $data['shipping_experiences'] ?? null;
        $this->container['selected'] = $data['selected'] ?? null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if ($this->container['entity_id'] === null) {
            $invalidProperties[] = "'entity_id' can't be null";
        }
        if ($this->container['collection_point_id'] === null) {
            $invalidProperties[] = "'collection_point_id' can't be null";
        }
        if ($this->container['recipient_address_id'] === null) {
            $invalidProperties[] = "'recipient_address_id' can't be null";
        }
        if ($this->container['name'] === null) {
            $invalidProperties[] = "'name' can't be null";
        }
        if ($this->container['country'] === null) {
            $invalidProperties[] = "'country' can't be null";
        }
        if ($this->container['region'] === null) {
            $invalidProperties[] = "'region' can't be null";
        }
        if ($this->container['postcode'] === null) {
            $invalidProperties[] = "'postcode' can't be null";
        }
        if ($this->container['city'] === null) {
            $invalidProperties[] = "'city' can't be null";
        }
        if ($this->container['street'] === null) {
            $invalidProperties[] = "'street' can't be null";
        }
        if ($this->container['distance'] === null) {
            $invalidProperties[] = "'distance' can't be null";
        }
        if ($this->container['opening_hours'] === null) {
            $invalidProperties[] = "'opening_hours' can't be null";
        }
        if ($this->container['shipping_experiences'] === null) {
            $invalidProperties[] = "'shipping_experiences' can't be null";
        }
        if ($this->container['selected'] === null) {
            $invalidProperties[] = "'selected' can't be null";
        }
        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 entity_id
     *
     * @return int
     */
    public function getEntityId()
    {
        return $this->container['entity_id'];
    }

    /**
     * Sets entity_id
     *
     * @param int $entity_id entity_id
     *
     * @return self
     */
    public function setEntityId($entity_id)
    {
        $this->container['entity_id'] = $entity_id;

        return $this;
    }

    /**
     * Gets collection_point_id
     *
     * @return string
     */
    public function getCollectionPointId()
    {
        return $this->container['collection_point_id'];
    }

    /**
     * Sets collection_point_id
     *
     * @param string $collection_point_id collection_point_id
     *
     * @return self
     */
    public function setCollectionPointId($collection_point_id)
    {
        $this->container['collection_point_id'] = $collection_point_id;

        return $this;
    }

    /**
     * Gets recipient_address_id
     *
     * @return int
     */
    public function getRecipientAddressId()
    {
        return $this->container['recipient_address_id'];
    }

    /**
     * Sets recipient_address_id
     *
     * @param int $recipient_address_id recipient_address_id
     *
     * @return self
     */
    public function setRecipientAddressId($recipient_address_id)
    {
        $this->container['recipient_address_id'] = $recipient_address_id;

        return $this;
    }

    /**
     * Gets name
     *
     * @return string
     */
    public function getName()
    {
        return $this->container['name'];
    }

    /**
     * Sets name
     *
     * @param string $name name
     *
     * @return self
     */
    public function setName($name)
    {
        $this->container['name'] = $name;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets region
     *
     * @return string
     */
    public function getRegion()
    {
        return $this->container['region'];
    }

    /**
     * Sets region
     *
     * @param string $region region
     *
     * @return self
     */
    public function setRegion($region)
    {
        $this->container['region'] = $region;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets city
     *
     * @return string
     */
    public function getCity()
    {
        return $this->container['city'];
    }

    /**
     * Sets city
     *
     * @param string $city city
     *
     * @return self
     */
    public function setCity($city)
    {
        $this->container['city'] = $city;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets distance
     *
     * @return int
     */
    public function getDistance()
    {
        return $this->container['distance'];
    }

    /**
     * Sets distance
     *
     * @param int $distance distance
     *
     * @return self
     */
    public function setDistance($distance)
    {
        $this->container['distance'] = $distance;

        return $this;
    }

    /**
     * Gets opening_hours
     *
     * @return string[]
     */
    public function getOpeningHours()
    {
        return $this->container['opening_hours'];
    }

    /**
     * Sets opening_hours
     *
     * @param string[] $opening_hours opening_hours
     *
     * @return self
     */
    public function setOpeningHours($opening_hours)
    {
        $this->container['opening_hours'] = $opening_hours;

        return $this;
    }

    /**
     * Gets shipping_experiences
     *
     * @return string[]
     */
    public function getShippingExperiences()
    {
        return $this->container['shipping_experiences'];
    }

    /**
     * Sets shipping_experiences
     *
     * @param string[] $shipping_experiences shipping_experiences
     *
     * @return self
     */
    public function setShippingExperiences($shipping_experiences)
    {
        $this->container['shipping_experiences'] = $shipping_experiences;

        return $this;
    }

    /**
     * Gets selected
     *
     * @return bool
     */
    public function getSelected()
    {
        return $this->container['selected'];
    }

    /**
     * Sets selected
     *
     * @param bool $selected selected
     *
     * @return self
     */
    public function setSelected($selected)
    {
        $this->container['selected'] = $selected;

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


