<?php
/**
 * QuoteDataTotalsInterface
 *
 * 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;

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

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'quote-data-totals-interface';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'grand_total' => 'float',
        'base_grand_total' => 'float',
        'subtotal' => 'float',
        'base_subtotal' => 'float',
        'discount_amount' => 'float',
        'base_discount_amount' => 'float',
        'subtotal_with_discount' => 'float',
        'base_subtotal_with_discount' => 'float',
        'shipping_amount' => 'float',
        'base_shipping_amount' => 'float',
        'shipping_discount_amount' => 'float',
        'base_shipping_discount_amount' => 'float',
        'tax_amount' => 'float',
        'base_tax_amount' => 'float',
        'weee_tax_applied_amount' => 'float',
        'shipping_tax_amount' => 'float',
        'base_shipping_tax_amount' => 'float',
        'subtotal_incl_tax' => 'float',
        'base_subtotal_incl_tax' => 'float',
        'shipping_incl_tax' => 'float',
        'base_shipping_incl_tax' => 'float',
        'base_currency_code' => 'string',
        'quote_currency_code' => 'string',
        'coupon_code' => 'string',
        'items_qty' => 'int',
        'items' => '\Magento2\Model\QuoteDataTotalsItemInterface[]',
        'total_segments' => '\Magento2\Model\QuoteDataTotalSegmentInterface[]',
        'extension_attributes' => '\Magento2\Model\QuoteDataTotalsExtensionInterface'
    ];

    /**
      * 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 = [
        'grand_total' => null,
        'base_grand_total' => null,
        'subtotal' => null,
        'base_subtotal' => null,
        'discount_amount' => null,
        'base_discount_amount' => null,
        'subtotal_with_discount' => null,
        'base_subtotal_with_discount' => null,
        'shipping_amount' => null,
        'base_shipping_amount' => null,
        'shipping_discount_amount' => null,
        'base_shipping_discount_amount' => null,
        'tax_amount' => null,
        'base_tax_amount' => null,
        'weee_tax_applied_amount' => null,
        'shipping_tax_amount' => null,
        'base_shipping_tax_amount' => null,
        'subtotal_incl_tax' => null,
        'base_subtotal_incl_tax' => null,
        'shipping_incl_tax' => null,
        'base_shipping_incl_tax' => null,
        'base_currency_code' => null,
        'quote_currency_code' => null,
        'coupon_code' => null,
        'items_qty' => null,
        'items' => null,
        'total_segments' => null,
        'extension_attributes' => 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 = [
        'grand_total' => 'grand_total',
        'base_grand_total' => 'base_grand_total',
        'subtotal' => 'subtotal',
        'base_subtotal' => 'base_subtotal',
        'discount_amount' => 'discount_amount',
        'base_discount_amount' => 'base_discount_amount',
        'subtotal_with_discount' => 'subtotal_with_discount',
        'base_subtotal_with_discount' => 'base_subtotal_with_discount',
        'shipping_amount' => 'shipping_amount',
        'base_shipping_amount' => 'base_shipping_amount',
        'shipping_discount_amount' => 'shipping_discount_amount',
        'base_shipping_discount_amount' => 'base_shipping_discount_amount',
        'tax_amount' => 'tax_amount',
        'base_tax_amount' => 'base_tax_amount',
        'weee_tax_applied_amount' => 'weee_tax_applied_amount',
        'shipping_tax_amount' => 'shipping_tax_amount',
        'base_shipping_tax_amount' => 'base_shipping_tax_amount',
        'subtotal_incl_tax' => 'subtotal_incl_tax',
        'base_subtotal_incl_tax' => 'base_subtotal_incl_tax',
        'shipping_incl_tax' => 'shipping_incl_tax',
        'base_shipping_incl_tax' => 'base_shipping_incl_tax',
        'base_currency_code' => 'base_currency_code',
        'quote_currency_code' => 'quote_currency_code',
        'coupon_code' => 'coupon_code',
        'items_qty' => 'items_qty',
        'items' => 'items',
        'total_segments' => 'total_segments',
        'extension_attributes' => 'extension_attributes'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'grand_total' => 'setGrandTotal',
        'base_grand_total' => 'setBaseGrandTotal',
        'subtotal' => 'setSubtotal',
        'base_subtotal' => 'setBaseSubtotal',
        'discount_amount' => 'setDiscountAmount',
        'base_discount_amount' => 'setBaseDiscountAmount',
        'subtotal_with_discount' => 'setSubtotalWithDiscount',
        'base_subtotal_with_discount' => 'setBaseSubtotalWithDiscount',
        'shipping_amount' => 'setShippingAmount',
        'base_shipping_amount' => 'setBaseShippingAmount',
        'shipping_discount_amount' => 'setShippingDiscountAmount',
        'base_shipping_discount_amount' => 'setBaseShippingDiscountAmount',
        'tax_amount' => 'setTaxAmount',
        'base_tax_amount' => 'setBaseTaxAmount',
        'weee_tax_applied_amount' => 'setWeeeTaxAppliedAmount',
        'shipping_tax_amount' => 'setShippingTaxAmount',
        'base_shipping_tax_amount' => 'setBaseShippingTaxAmount',
        'subtotal_incl_tax' => 'setSubtotalInclTax',
        'base_subtotal_incl_tax' => 'setBaseSubtotalInclTax',
        'shipping_incl_tax' => 'setShippingInclTax',
        'base_shipping_incl_tax' => 'setBaseShippingInclTax',
        'base_currency_code' => 'setBaseCurrencyCode',
        'quote_currency_code' => 'setQuoteCurrencyCode',
        'coupon_code' => 'setCouponCode',
        'items_qty' => 'setItemsQty',
        'items' => 'setItems',
        'total_segments' => 'setTotalSegments',
        'extension_attributes' => 'setExtensionAttributes'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'grand_total' => 'getGrandTotal',
        'base_grand_total' => 'getBaseGrandTotal',
        'subtotal' => 'getSubtotal',
        'base_subtotal' => 'getBaseSubtotal',
        'discount_amount' => 'getDiscountAmount',
        'base_discount_amount' => 'getBaseDiscountAmount',
        'subtotal_with_discount' => 'getSubtotalWithDiscount',
        'base_subtotal_with_discount' => 'getBaseSubtotalWithDiscount',
        'shipping_amount' => 'getShippingAmount',
        'base_shipping_amount' => 'getBaseShippingAmount',
        'shipping_discount_amount' => 'getShippingDiscountAmount',
        'base_shipping_discount_amount' => 'getBaseShippingDiscountAmount',
        'tax_amount' => 'getTaxAmount',
        'base_tax_amount' => 'getBaseTaxAmount',
        'weee_tax_applied_amount' => 'getWeeeTaxAppliedAmount',
        'shipping_tax_amount' => 'getShippingTaxAmount',
        'base_shipping_tax_amount' => 'getBaseShippingTaxAmount',
        'subtotal_incl_tax' => 'getSubtotalInclTax',
        'base_subtotal_incl_tax' => 'getBaseSubtotalInclTax',
        'shipping_incl_tax' => 'getShippingInclTax',
        'base_shipping_incl_tax' => 'getBaseShippingInclTax',
        'base_currency_code' => 'getBaseCurrencyCode',
        'quote_currency_code' => 'getQuoteCurrencyCode',
        'coupon_code' => 'getCouponCode',
        'items_qty' => 'getItemsQty',
        'items' => 'getItems',
        'total_segments' => 'getTotalSegments',
        'extension_attributes' => 'getExtensionAttributes'
    ];

    /**
     * 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['grand_total'] = $data['grand_total'] ?? null;
        $this->container['base_grand_total'] = $data['base_grand_total'] ?? null;
        $this->container['subtotal'] = $data['subtotal'] ?? null;
        $this->container['base_subtotal'] = $data['base_subtotal'] ?? null;
        $this->container['discount_amount'] = $data['discount_amount'] ?? null;
        $this->container['base_discount_amount'] = $data['base_discount_amount'] ?? null;
        $this->container['subtotal_with_discount'] = $data['subtotal_with_discount'] ?? null;
        $this->container['base_subtotal_with_discount'] = $data['base_subtotal_with_discount'] ?? null;
        $this->container['shipping_amount'] = $data['shipping_amount'] ?? null;
        $this->container['base_shipping_amount'] = $data['base_shipping_amount'] ?? null;
        $this->container['shipping_discount_amount'] = $data['shipping_discount_amount'] ?? null;
        $this->container['base_shipping_discount_amount'] = $data['base_shipping_discount_amount'] ?? null;
        $this->container['tax_amount'] = $data['tax_amount'] ?? null;
        $this->container['base_tax_amount'] = $data['base_tax_amount'] ?? null;
        $this->container['weee_tax_applied_amount'] = $data['weee_tax_applied_amount'] ?? null;
        $this->container['shipping_tax_amount'] = $data['shipping_tax_amount'] ?? null;
        $this->container['base_shipping_tax_amount'] = $data['base_shipping_tax_amount'] ?? null;
        $this->container['subtotal_incl_tax'] = $data['subtotal_incl_tax'] ?? null;
        $this->container['base_subtotal_incl_tax'] = $data['base_subtotal_incl_tax'] ?? null;
        $this->container['shipping_incl_tax'] = $data['shipping_incl_tax'] ?? null;
        $this->container['base_shipping_incl_tax'] = $data['base_shipping_incl_tax'] ?? null;
        $this->container['base_currency_code'] = $data['base_currency_code'] ?? null;
        $this->container['quote_currency_code'] = $data['quote_currency_code'] ?? null;
        $this->container['coupon_code'] = $data['coupon_code'] ?? null;
        $this->container['items_qty'] = $data['items_qty'] ?? null;
        $this->container['items'] = $data['items'] ?? null;
        $this->container['total_segments'] = $data['total_segments'] ?? null;
        $this->container['extension_attributes'] = $data['extension_attributes'] ?? null;
    }

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

        if ($this->container['weee_tax_applied_amount'] === null) {
            $invalidProperties[] = "'weee_tax_applied_amount' can't be null";
        }
        if ($this->container['total_segments'] === null) {
            $invalidProperties[] = "'total_segments' 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 grand_total
     *
     * @return float|null
     */
    public function getGrandTotal()
    {
        return $this->container['grand_total'];
    }

    /**
     * Sets grand_total
     *
     * @param float|null $grand_total Grand total in quote currency
     *
     * @return self
     */
    public function setGrandTotal($grand_total)
    {
        $this->container['grand_total'] = $grand_total;

        return $this;
    }

    /**
     * Gets base_grand_total
     *
     * @return float|null
     */
    public function getBaseGrandTotal()
    {
        return $this->container['base_grand_total'];
    }

    /**
     * Sets base_grand_total
     *
     * @param float|null $base_grand_total Grand total in base currency
     *
     * @return self
     */
    public function setBaseGrandTotal($base_grand_total)
    {
        $this->container['base_grand_total'] = $base_grand_total;

        return $this;
    }

    /**
     * Gets subtotal
     *
     * @return float|null
     */
    public function getSubtotal()
    {
        return $this->container['subtotal'];
    }

    /**
     * Sets subtotal
     *
     * @param float|null $subtotal Subtotal in quote currency
     *
     * @return self
     */
    public function setSubtotal($subtotal)
    {
        $this->container['subtotal'] = $subtotal;

        return $this;
    }

    /**
     * Gets base_subtotal
     *
     * @return float|null
     */
    public function getBaseSubtotal()
    {
        return $this->container['base_subtotal'];
    }

    /**
     * Sets base_subtotal
     *
     * @param float|null $base_subtotal Subtotal in base currency
     *
     * @return self
     */
    public function setBaseSubtotal($base_subtotal)
    {
        $this->container['base_subtotal'] = $base_subtotal;

        return $this;
    }

    /**
     * Gets discount_amount
     *
     * @return float|null
     */
    public function getDiscountAmount()
    {
        return $this->container['discount_amount'];
    }

    /**
     * Sets discount_amount
     *
     * @param float|null $discount_amount Discount amount in quote currency
     *
     * @return self
     */
    public function setDiscountAmount($discount_amount)
    {
        $this->container['discount_amount'] = $discount_amount;

        return $this;
    }

    /**
     * Gets base_discount_amount
     *
     * @return float|null
     */
    public function getBaseDiscountAmount()
    {
        return $this->container['base_discount_amount'];
    }

    /**
     * Sets base_discount_amount
     *
     * @param float|null $base_discount_amount Discount amount in base currency
     *
     * @return self
     */
    public function setBaseDiscountAmount($base_discount_amount)
    {
        $this->container['base_discount_amount'] = $base_discount_amount;

        return $this;
    }

    /**
     * Gets subtotal_with_discount
     *
     * @return float|null
     */
    public function getSubtotalWithDiscount()
    {
        return $this->container['subtotal_with_discount'];
    }

    /**
     * Sets subtotal_with_discount
     *
     * @param float|null $subtotal_with_discount Subtotal in quote currency with applied discount
     *
     * @return self
     */
    public function setSubtotalWithDiscount($subtotal_with_discount)
    {
        $this->container['subtotal_with_discount'] = $subtotal_with_discount;

        return $this;
    }

    /**
     * Gets base_subtotal_with_discount
     *
     * @return float|null
     */
    public function getBaseSubtotalWithDiscount()
    {
        return $this->container['base_subtotal_with_discount'];
    }

    /**
     * Sets base_subtotal_with_discount
     *
     * @param float|null $base_subtotal_with_discount Subtotal in base currency with applied discount
     *
     * @return self
     */
    public function setBaseSubtotalWithDiscount($base_subtotal_with_discount)
    {
        $this->container['base_subtotal_with_discount'] = $base_subtotal_with_discount;

        return $this;
    }

    /**
     * Gets shipping_amount
     *
     * @return float|null
     */
    public function getShippingAmount()
    {
        return $this->container['shipping_amount'];
    }

    /**
     * Sets shipping_amount
     *
     * @param float|null $shipping_amount Shipping amount in quote currency
     *
     * @return self
     */
    public function setShippingAmount($shipping_amount)
    {
        $this->container['shipping_amount'] = $shipping_amount;

        return $this;
    }

    /**
     * Gets base_shipping_amount
     *
     * @return float|null
     */
    public function getBaseShippingAmount()
    {
        return $this->container['base_shipping_amount'];
    }

    /**
     * Sets base_shipping_amount
     *
     * @param float|null $base_shipping_amount Shipping amount in base currency
     *
     * @return self
     */
    public function setBaseShippingAmount($base_shipping_amount)
    {
        $this->container['base_shipping_amount'] = $base_shipping_amount;

        return $this;
    }

    /**
     * Gets shipping_discount_amount
     *
     * @return float|null
     */
    public function getShippingDiscountAmount()
    {
        return $this->container['shipping_discount_amount'];
    }

    /**
     * Sets shipping_discount_amount
     *
     * @param float|null $shipping_discount_amount Shipping discount amount in quote currency
     *
     * @return self
     */
    public function setShippingDiscountAmount($shipping_discount_amount)
    {
        $this->container['shipping_discount_amount'] = $shipping_discount_amount;

        return $this;
    }

    /**
     * Gets base_shipping_discount_amount
     *
     * @return float|null
     */
    public function getBaseShippingDiscountAmount()
    {
        return $this->container['base_shipping_discount_amount'];
    }

    /**
     * Sets base_shipping_discount_amount
     *
     * @param float|null $base_shipping_discount_amount Shipping discount amount in base currency
     *
     * @return self
     */
    public function setBaseShippingDiscountAmount($base_shipping_discount_amount)
    {
        $this->container['base_shipping_discount_amount'] = $base_shipping_discount_amount;

        return $this;
    }

    /**
     * Gets tax_amount
     *
     * @return float|null
     */
    public function getTaxAmount()
    {
        return $this->container['tax_amount'];
    }

    /**
     * Sets tax_amount
     *
     * @param float|null $tax_amount Tax amount in quote currency
     *
     * @return self
     */
    public function setTaxAmount($tax_amount)
    {
        $this->container['tax_amount'] = $tax_amount;

        return $this;
    }

    /**
     * Gets base_tax_amount
     *
     * @return float|null
     */
    public function getBaseTaxAmount()
    {
        return $this->container['base_tax_amount'];
    }

    /**
     * Sets base_tax_amount
     *
     * @param float|null $base_tax_amount Tax amount in base currency
     *
     * @return self
     */
    public function setBaseTaxAmount($base_tax_amount)
    {
        $this->container['base_tax_amount'] = $base_tax_amount;

        return $this;
    }

    /**
     * Gets weee_tax_applied_amount
     *
     * @return float
     */
    public function getWeeeTaxAppliedAmount()
    {
        return $this->container['weee_tax_applied_amount'];
    }

    /**
     * Sets weee_tax_applied_amount
     *
     * @param float $weee_tax_applied_amount Item weee tax applied amount in quote currency.
     *
     * @return self
     */
    public function setWeeeTaxAppliedAmount($weee_tax_applied_amount)
    {
        $this->container['weee_tax_applied_amount'] = $weee_tax_applied_amount;

        return $this;
    }

    /**
     * Gets shipping_tax_amount
     *
     * @return float|null
     */
    public function getShippingTaxAmount()
    {
        return $this->container['shipping_tax_amount'];
    }

    /**
     * Sets shipping_tax_amount
     *
     * @param float|null $shipping_tax_amount Shipping tax amount in quote currency
     *
     * @return self
     */
    public function setShippingTaxAmount($shipping_tax_amount)
    {
        $this->container['shipping_tax_amount'] = $shipping_tax_amount;

        return $this;
    }

    /**
     * Gets base_shipping_tax_amount
     *
     * @return float|null
     */
    public function getBaseShippingTaxAmount()
    {
        return $this->container['base_shipping_tax_amount'];
    }

    /**
     * Sets base_shipping_tax_amount
     *
     * @param float|null $base_shipping_tax_amount Shipping tax amount in base currency
     *
     * @return self
     */
    public function setBaseShippingTaxAmount($base_shipping_tax_amount)
    {
        $this->container['base_shipping_tax_amount'] = $base_shipping_tax_amount;

        return $this;
    }

    /**
     * Gets subtotal_incl_tax
     *
     * @return float|null
     */
    public function getSubtotalInclTax()
    {
        return $this->container['subtotal_incl_tax'];
    }

    /**
     * Sets subtotal_incl_tax
     *
     * @param float|null $subtotal_incl_tax Subtotal including tax in quote currency
     *
     * @return self
     */
    public function setSubtotalInclTax($subtotal_incl_tax)
    {
        $this->container['subtotal_incl_tax'] = $subtotal_incl_tax;

        return $this;
    }

    /**
     * Gets base_subtotal_incl_tax
     *
     * @return float|null
     */
    public function getBaseSubtotalInclTax()
    {
        return $this->container['base_subtotal_incl_tax'];
    }

    /**
     * Sets base_subtotal_incl_tax
     *
     * @param float|null $base_subtotal_incl_tax Subtotal including tax in base currency
     *
     * @return self
     */
    public function setBaseSubtotalInclTax($base_subtotal_incl_tax)
    {
        $this->container['base_subtotal_incl_tax'] = $base_subtotal_incl_tax;

        return $this;
    }

    /**
     * Gets shipping_incl_tax
     *
     * @return float|null
     */
    public function getShippingInclTax()
    {
        return $this->container['shipping_incl_tax'];
    }

    /**
     * Sets shipping_incl_tax
     *
     * @param float|null $shipping_incl_tax Shipping including tax in quote currency
     *
     * @return self
     */
    public function setShippingInclTax($shipping_incl_tax)
    {
        $this->container['shipping_incl_tax'] = $shipping_incl_tax;

        return $this;
    }

    /**
     * Gets base_shipping_incl_tax
     *
     * @return float|null
     */
    public function getBaseShippingInclTax()
    {
        return $this->container['base_shipping_incl_tax'];
    }

    /**
     * Sets base_shipping_incl_tax
     *
     * @param float|null $base_shipping_incl_tax Shipping including tax in base currency
     *
     * @return self
     */
    public function setBaseShippingInclTax($base_shipping_incl_tax)
    {
        $this->container['base_shipping_incl_tax'] = $base_shipping_incl_tax;

        return $this;
    }

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

    /**
     * Sets base_currency_code
     *
     * @param string|null $base_currency_code Base currency code
     *
     * @return self
     */
    public function setBaseCurrencyCode($base_currency_code)
    {
        $this->container['base_currency_code'] = $base_currency_code;

        return $this;
    }

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

    /**
     * Sets quote_currency_code
     *
     * @param string|null $quote_currency_code Quote currency code
     *
     * @return self
     */
    public function setQuoteCurrencyCode($quote_currency_code)
    {
        $this->container['quote_currency_code'] = $quote_currency_code;

        return $this;
    }

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

    /**
     * Sets coupon_code
     *
     * @param string|null $coupon_code Applied coupon code
     *
     * @return self
     */
    public function setCouponCode($coupon_code)
    {
        $this->container['coupon_code'] = $coupon_code;

        return $this;
    }

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

    /**
     * Sets items_qty
     *
     * @param int|null $items_qty Items qty
     *
     * @return self
     */
    public function setItemsQty($items_qty)
    {
        $this->container['items_qty'] = $items_qty;

        return $this;
    }

    /**
     * Gets items
     *
     * @return \Magento2\Model\QuoteDataTotalsItemInterface[]|null
     */
    public function getItems()
    {
        return $this->container['items'];
    }

    /**
     * Sets items
     *
     * @param \Magento2\Model\QuoteDataTotalsItemInterface[]|null $items Totals by items
     *
     * @return self
     */
    public function setItems($items)
    {
        $this->container['items'] = $items;

        return $this;
    }

    /**
     * Gets total_segments
     *
     * @return \Magento2\Model\QuoteDataTotalSegmentInterface[]
     */
    public function getTotalSegments()
    {
        return $this->container['total_segments'];
    }

    /**
     * Sets total_segments
     *
     * @param \Magento2\Model\QuoteDataTotalSegmentInterface[] $total_segments Dynamically calculated totals
     *
     * @return self
     */
    public function setTotalSegments($total_segments)
    {
        $this->container['total_segments'] = $total_segments;

        return $this;
    }

    /**
     * Gets extension_attributes
     *
     * @return \Magento2\Model\QuoteDataTotalsExtensionInterface|null
     */
    public function getExtensionAttributes()
    {
        return $this->container['extension_attributes'];
    }

    /**
     * Sets extension_attributes
     *
     * @param \Magento2\Model\QuoteDataTotalsExtensionInterface|null $extension_attributes extension_attributes
     *
     * @return self
     */
    public function setExtensionAttributes($extension_attributes)
    {
        $this->container['extension_attributes'] = $extension_attributes;

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


