<?php
/**
 * RateDetails
 *
 * PHP version 5
 *
 * @category Class
 * @package  USPS\InternationalPrices
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * International Prices
 *
 * Contact Us: [USPS API Support](https://emailus.usps.com/s/usps-APIs) | [Terms of Service](https://about.usps.com/termsofuse.htm)  The International Prices API allows users to retrieve International postage rates for packages by: * Look up International Base Postage based on a set of given package characteristics * Look up International Base Postage based on a given SKU  The USPS&#174; has implemented Stock Keeping Units (SKUs) which provide unique identification for their products. These SKUs are available for download online for mailers.   For further details on package specifications, delivery information, and more, please consult the [International Mail Manual. (IMM)](https://pe.usps.com/text/imm/welcome.htm). For a list of published rates please refer to the [USPS Price List](https://pe.usps.com/text/dmm300/Notice123.htm) To discover the rate ingredients for this API, take a look at [Publication 205](http://postalpro.usps.com/pub205).    **Authentication, Authorization and Access Control**      Client applications are given authorized access to protected information resources. Authorization is accomplished via the USPS&#174; Customer Onboarding Platform, where Customer Registration users may grant applications access to their protected business information. All client applications must go through this onboarding process. Any Customer Registration user wishing to share their protected business information with client application(s) may also grant authorized access.  The OAuth2, version 3 (/v3), API is based on this authorization grant and must be used to get tokens for all V3 APIs. * The resulting OAuth2 access token is to be placed in the **Authorization** header, using the **Bearer** authentication scheme. * All version 3 APIs validate access to protected information resources and will respond with a *401* HTTP status, *Unauthorized* reason, when the client application has not been authorized to access the given information resource.  The following APIs may include payment account or permit identification used to get contract rates.
 *
 * OpenAPI spec version: 3.3.10
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.71
 */
/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace USPS\InternationalPrices\Model;

use \ArrayAccess;
use \USPS\InternationalPrices\ObjectSerializer;

/**
 * RateDetails Class Doc Comment
 *
 * @category Class
 * @description Informative details about the price.
 * @package  USPS\InternationalPrices
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class RateDetails implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'RateDetails';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'sku' => 'string',
        'description' => 'string',
        'price_type' => 'string',
        'price' => 'double',
        'weight' => 'double',
        'dim_weight' => 'double',
        'fees' => '\USPS\InternationalPrices\Model\RateDetailsFees[]',
        'start_date' => '\DateTime',
        'end_date' => 'string',
        'mail_class' => 'string',
        'zone' => 'string',
        'processing_category' => 'string',
        'rate_indicator' => 'string',
        'destination_entry_facility_type' => 'string',
        'warnings' => '\USPS\InternationalPrices\Model\WarningsList',
        'product_name' => 'string',
        'product_definition' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'sku' => null,
        'description' => null,
        'price_type' => null,
        'price' => 'double',
        'weight' => 'double',
        'dim_weight' => 'double',
        'fees' => null,
        'start_date' => 'date',
        'end_date' => null,
        'mail_class' => null,
        'zone' => null,
        'processing_category' => null,
        'rate_indicator' => null,
        'destination_entry_facility_type' => null,
        'warnings' => null,
        'product_name' => null,
        'product_definition' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'sku' => 'SKU',
        'description' => 'description',
        'price_type' => 'priceType',
        'price' => 'price',
        'weight' => 'weight',
        'dim_weight' => 'dimWeight',
        'fees' => 'fees',
        'start_date' => 'startDate',
        'end_date' => 'endDate',
        'mail_class' => 'mailClass',
        'zone' => 'zone',
        'processing_category' => 'processingCategory',
        'rate_indicator' => 'rateIndicator',
        'destination_entry_facility_type' => 'destinationEntryFacilityType',
        'warnings' => 'warnings',
        'product_name' => 'productName',
        'product_definition' => 'productDefinition'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'sku' => 'setSku',
        'description' => 'setDescription',
        'price_type' => 'setPriceType',
        'price' => 'setPrice',
        'weight' => 'setWeight',
        'dim_weight' => 'setDimWeight',
        'fees' => 'setFees',
        'start_date' => 'setStartDate',
        'end_date' => 'setEndDate',
        'mail_class' => 'setMailClass',
        'zone' => 'setZone',
        'processing_category' => 'setProcessingCategory',
        'rate_indicator' => 'setRateIndicator',
        'destination_entry_facility_type' => 'setDestinationEntryFacilityType',
        'warnings' => 'setWarnings',
        'product_name' => 'setProductName',
        'product_definition' => 'setProductDefinition'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'sku' => 'getSku',
        'description' => 'getDescription',
        'price_type' => 'getPriceType',
        'price' => 'getPrice',
        'weight' => 'getWeight',
        'dim_weight' => 'getDimWeight',
        'fees' => 'getFees',
        'start_date' => 'getStartDate',
        'end_date' => 'getEndDate',
        'mail_class' => 'getMailClass',
        'zone' => 'getZone',
        'processing_category' => 'getProcessingCategory',
        'rate_indicator' => 'getRateIndicator',
        'destination_entry_facility_type' => 'getDestinationEntryFacilityType',
        'warnings' => 'getWarnings',
        'product_name' => 'getProductName',
        'product_definition' => 'getProductDefinition'
    ];

    /**
     * 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::$swaggerModelName;
    }

    const PRICE_TYPE_RETAIL = 'RETAIL';
    const PRICE_TYPE_COMMERCIAL = 'COMMERCIAL';
    const PRICE_TYPE_COMMERCIAL_BASE = 'COMMERCIAL_BASE';
    const PRICE_TYPE_COMMERCIAL_PLUS = 'COMMERCIAL_PLUS';
    const PRICE_TYPE_CONTRACT = 'CONTRACT';
    const PROCESSING_CATEGORY_CARDS = 'CARDS';
    const PROCESSING_CATEGORY_LETTERS = 'LETTERS';
    const PROCESSING_CATEGORY_FLATS = 'FLATS';
    const PROCESSING_CATEGORY_MACHINABLE = 'MACHINABLE';
    const PROCESSING_CATEGORY_IRREGULAR = 'IRREGULAR';
    const PROCESSING_CATEGORY_NON_MACHINABLE = 'NON_MACHINABLE';
    const PROCESSING_CATEGORY_NONSTANDARD = 'NONSTANDARD';
    const PROCESSING_CATEGORY_CATALOGS = 'CATALOGS';
    const PROCESSING_CATEGORY_OPEN_AND_DISTRIBUTE = 'OPEN_AND_DISTRIBUTE';
    const PROCESSING_CATEGORY_RETURNS = 'RETURNS';
    const PROCESSING_CATEGORY_SOFT_PACK_MACHINABLE = 'SOFT_PACK_MACHINABLE';
    const PROCESSING_CATEGORY_SOFT_PACK_NON_MACHINABLE = 'SOFT_PACK_NON_MACHINABLE';
    const DESTINATION_ENTRY_FACILITY_TYPE_NONE = 'NONE';
    const DESTINATION_ENTRY_FACILITY_TYPE_INTERNATIONAL_SERVICE_CENTER = 'INTERNATIONAL_SERVICE_CENTER';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getPriceTypeAllowableValues()
    {
        return [
            self::PRICE_TYPE_RETAIL,
            self::PRICE_TYPE_COMMERCIAL,
            self::PRICE_TYPE_COMMERCIAL_BASE,
            self::PRICE_TYPE_COMMERCIAL_PLUS,
            self::PRICE_TYPE_CONTRACT,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getProcessingCategoryAllowableValues()
    {
        return [
            self::PROCESSING_CATEGORY_CARDS,
            self::PROCESSING_CATEGORY_LETTERS,
            self::PROCESSING_CATEGORY_FLATS,
            self::PROCESSING_CATEGORY_MACHINABLE,
            self::PROCESSING_CATEGORY_IRREGULAR,
            self::PROCESSING_CATEGORY_NON_MACHINABLE,
            self::PROCESSING_CATEGORY_NONSTANDARD,
            self::PROCESSING_CATEGORY_CATALOGS,
            self::PROCESSING_CATEGORY_OPEN_AND_DISTRIBUTE,
            self::PROCESSING_CATEGORY_RETURNS,
            self::PROCESSING_CATEGORY_SOFT_PACK_MACHINABLE,
            self::PROCESSING_CATEGORY_SOFT_PACK_NON_MACHINABLE,
        ];
    }
    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getDestinationEntryFacilityTypeAllowableValues()
    {
        return [
            self::DESTINATION_ENTRY_FACILITY_TYPE_NONE,
            self::DESTINATION_ENTRY_FACILITY_TYPE_INTERNATIONAL_SERVICE_CENTER,
        ];
    }

    /**
     * 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['sku'] = isset($data['sku']) ? $data['sku'] : null;
        $this->container['description'] = isset($data['description']) ? $data['description'] : null;
        $this->container['price_type'] = isset($data['price_type']) ? $data['price_type'] : null;
        $this->container['price'] = isset($data['price']) ? $data['price'] : null;
        $this->container['weight'] = isset($data['weight']) ? $data['weight'] : null;
        $this->container['dim_weight'] = isset($data['dim_weight']) ? $data['dim_weight'] : null;
        $this->container['fees'] = isset($data['fees']) ? $data['fees'] : null;
        $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null;
        $this->container['end_date'] = isset($data['end_date']) ? $data['end_date'] : null;
        $this->container['mail_class'] = isset($data['mail_class']) ? $data['mail_class'] : null;
        $this->container['zone'] = isset($data['zone']) ? $data['zone'] : null;
        $this->container['processing_category'] = isset($data['processing_category']) ? $data['processing_category'] : null;
        $this->container['rate_indicator'] = isset($data['rate_indicator']) ? $data['rate_indicator'] : null;
        $this->container['destination_entry_facility_type'] = isset($data['destination_entry_facility_type']) ? $data['destination_entry_facility_type'] : null;
        $this->container['warnings'] = isset($data['warnings']) ? $data['warnings'] : null;
        $this->container['product_name'] = isset($data['product_name']) ? $data['product_name'] : null;
        $this->container['product_definition'] = isset($data['product_definition']) ? $data['product_definition'] : null;
    }

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

        $allowedValues = $this->getPriceTypeAllowableValues();
        if (!is_null($this->container['price_type']) && !in_array($this->container['price_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'price_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getProcessingCategoryAllowableValues();
        if (!is_null($this->container['processing_category']) && !in_array($this->container['processing_category'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'processing_category', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getDestinationEntryFacilityTypeAllowableValues();
        if (!is_null($this->container['destination_entry_facility_type']) && !in_array($this->container['destination_entry_facility_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'destination_entry_facility_type', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

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

    /**
     * Sets sku
     *
     * @param string $sku The stock keeping unit for the designated rate.
     *
     * @return $this
     */
    public function setSku($sku)
    {
        $this->container['sku'] = $sku;

        return $this;
    }

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

    /**
     * Sets description
     *
     * @param string $description The description of the price.
     *
     * @return $this
     */
    public function setDescription($description)
    {
        $this->container['description'] = $description;

        return $this;
    }

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

    /**
     * Sets price_type
     *
     * @param string $price_type The type of price applied.  * Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL' & 'CONTRACT'  * Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS' & 'CONTRACT'
     *
     * @return $this
     */
    public function setPriceType($price_type)
    {
        $allowedValues = $this->getPriceTypeAllowableValues();
        if (!is_null($price_type) && !in_array($price_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'price_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['price_type'] = $price_type;

        return $this;
    }

    /**
     * Gets price
     *
     * @return double
     */
    public function getPrice()
    {
        return $this->container['price'];
    }

    /**
     * Sets price
     *
     * @param double $price The postage price.
     *
     * @return $this
     */
    public function setPrice($price)
    {
        $this->container['price'] = $price;

        return $this;
    }

    /**
     * Gets weight
     *
     * @return double
     */
    public function getWeight()
    {
        return $this->container['weight'];
    }

    /**
     * Sets weight
     *
     * @param double $weight The calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate.
     *
     * @return $this
     */
    public function setWeight($weight)
    {
        $this->container['weight'] = $weight;

        return $this;
    }

    /**
     * Gets dim_weight
     *
     * @return double
     */
    public function getDimWeight()
    {
        return $this->container['dim_weight'];
    }

    /**
     * Sets dim_weight
     *
     * @param double $dim_weight The calculated dimensional weight for the package based on user provided dimensions. The greater of dimWeight and weight will be used to calculated the rate.
     *
     * @return $this
     */
    public function setDimWeight($dim_weight)
    {
        $this->container['dim_weight'] = $dim_weight;

        return $this;
    }

    /**
     * Gets fees
     *
     * @return \USPS\InternationalPrices\Model\RateDetailsFees[]
     */
    public function getFees()
    {
        return $this->container['fees'];
    }

    /**
     * Sets fees
     *
     * @param \USPS\InternationalPrices\Model\RateDetailsFees[] $fees The fees associated with the package.
     *
     * @return $this
     */
    public function setFees($fees)
    {
        $this->container['fees'] = $fees;

        return $this;
    }

    /**
     * Gets start_date
     *
     * @return \DateTime
     */
    public function getStartDate()
    {
        return $this->container['start_date'];
    }

    /**
     * Sets start_date
     *
     * @param \DateTime $start_date Effective start date of the rate.
     *
     * @return $this
     */
    public function setStartDate($start_date)
    {
        $this->container['start_date'] = $start_date;

        return $this;
    }

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

    /**
     * Sets end_date
     *
     * @param string $end_date Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
     *
     * @return $this
     */
    public function setEndDate($end_date)
    {
        $this->container['end_date'] = $end_date;

        return $this;
    }

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

    /**
     * Sets mail_class
     *
     * @param string $mail_class The mail class of the price.
     *
     * @return $this
     */
    public function setMailClass($mail_class)
    {
        $this->container['mail_class'] = $mail_class;

        return $this;
    }

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

    /**
     * Sets zone
     *
     * @param string $zone Indicates the price group for a given `destinationCountryCode`, `mailClass`, `mailingDate`, and `rateIndicator`.
     *
     * @return $this
     */
    public function setZone($zone)
    {
        $this->container['zone'] = $zone;

        return $this;
    }

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

    /**
     * Sets processing_category
     *
     * @param string $processing_category Processing category for the provided rate, this value can be used in the international labels API to ensure the provided rate is applied.  * `CARDS` - Cards, translates to PTR code `0` * `LETTERS` - Letters, translates to PTR code `1` * `FLATS` - Flats, translates to PTR code `2` * `MACHINABLE` - Machinable Parcel, translates to PTR code `3` * `IRREGULAR` - Irregular Parcel, translates to PTR code `4` - This option is deprecated in favor of `NONSTANDARD` and will no longer be returned as of 01/19/2025. * `NON_MACHINABLE` - Non-machinable parcel, translates to PTR code `5` - This option is deprecated in favor of `NONSTANDARD` and will no longer be returned as of 01/19/2025. * `NONSTANDARD` - Nonstandard Parcel, translates to PTR code `5` * `CATALOGS` - Catalogs, translates to PTR code `C` * `OPEN_AND_DISTRIBUTE` - Open and Distribute, translates to PTR code `O` * `RETURNS` - Returns, translates to PTR code `R` * `SOFT_PACK_MACHINABLE` - Soft Pack Machinable, translates to PTR code `S` * `SOFT_PACK_NON_MACHINABLE` - Soft Package Non-machinable, translates to PTR code `T`
     *
     * @return $this
     */
    public function setProcessingCategory($processing_category)
    {
        $allowedValues = $this->getProcessingCategoryAllowableValues();
        if (!is_null($processing_category) && !in_array($processing_category, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'processing_category', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['processing_category'] = $processing_category;

        return $this;
    }

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

    /**
     * Sets rate_indicator
     *
     * @param string $rate_indicator Two-digit rate indicator code for the provided rate, this value can be used in the international labels API to ensure the provided rate is applied.
     *
     * @return $this
     */
    public function setRateIndicator($rate_indicator)
    {
        $this->container['rate_indicator'] = $rate_indicator;

        return $this;
    }

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

    /**
     * Sets destination_entry_facility_type
     *
     * @param string $destination_entry_facility_type Destination Entry Facility type for the provided rate, this value can be used in the international labels API to ensure the provided rate is applied.  * `NONE` - None, translates to PTR code `N` * `INTERNATIONAL_SERVICE_CENTER` - International Service Center, translates to PTR code `I`
     *
     * @return $this
     */
    public function setDestinationEntryFacilityType($destination_entry_facility_type)
    {
        $allowedValues = $this->getDestinationEntryFacilityTypeAllowableValues();
        if (!is_null($destination_entry_facility_type) && !in_array($destination_entry_facility_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'destination_entry_facility_type', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['destination_entry_facility_type'] = $destination_entry_facility_type;

        return $this;
    }

    /**
     * Gets warnings
     *
     * @return \USPS\InternationalPrices\Model\WarningsList
     */
    public function getWarnings()
    {
        return $this->container['warnings'];
    }

    /**
     * Sets warnings
     *
     * @param \USPS\InternationalPrices\Model\WarningsList $warnings warnings
     *
     * @return $this
     */
    public function setWarnings($warnings)
    {
        $this->container['warnings'] = $warnings;

        return $this;
    }

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

    /**
     * Sets product_name
     *
     * @param string $product_name A business friendly name for a product that can be displayed to a customer on a shipping portal
     *
     * @return $this
     */
    public function setProductName($product_name)
    {
        $this->container['product_name'] = $product_name;

        return $this;
    }

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

    /**
     * Sets product_definition
     *
     * @param string $product_definition A business friendly description for a product that can be displayed to a customer on a shipping portal
     *
     * @return $this
     */
    public function setProductDefinition($product_definition)
    {
        $this->container['product_definition'] = $product_definition;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
