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

/**
 * SalesDataCreditmemoExtensionInterface Class Doc Comment
 *
 * @category Class
 * @description ExtensionInterface class for @see \\Magento\\Sales\\Api\\Data\\CreditmemoInterface
 * @package  Magento2
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class SalesDataCreditmemoExtensionInterface implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'gw_base_price' => 'string',
        'gw_price' => 'string',
        'gw_items_base_price' => 'string',
        'gw_items_price' => 'string',
        'gw_card_base_price' => 'string',
        'gw_card_price' => 'string',
        'gw_base_tax_amount' => 'string',
        'gw_tax_amount' => 'string',
        'gw_items_base_tax_amount' => 'string',
        'gw_items_tax_amount' => 'string',
        'gw_card_base_tax_amount' => 'string',
        'gw_card_tax_amount' => '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 = [
        'gw_base_price' => null,
        'gw_price' => null,
        'gw_items_base_price' => null,
        'gw_items_price' => null,
        'gw_card_base_price' => null,
        'gw_card_price' => null,
        'gw_base_tax_amount' => null,
        'gw_tax_amount' => null,
        'gw_items_base_tax_amount' => null,
        'gw_items_tax_amount' => null,
        'gw_card_base_tax_amount' => null,
        'gw_card_tax_amount' => 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 = [
        'gw_base_price' => 'gw_base_price',
        'gw_price' => 'gw_price',
        'gw_items_base_price' => 'gw_items_base_price',
        'gw_items_price' => 'gw_items_price',
        'gw_card_base_price' => 'gw_card_base_price',
        'gw_card_price' => 'gw_card_price',
        'gw_base_tax_amount' => 'gw_base_tax_amount',
        'gw_tax_amount' => 'gw_tax_amount',
        'gw_items_base_tax_amount' => 'gw_items_base_tax_amount',
        'gw_items_tax_amount' => 'gw_items_tax_amount',
        'gw_card_base_tax_amount' => 'gw_card_base_tax_amount',
        'gw_card_tax_amount' => 'gw_card_tax_amount'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'gw_base_price' => 'setGwBasePrice',
        'gw_price' => 'setGwPrice',
        'gw_items_base_price' => 'setGwItemsBasePrice',
        'gw_items_price' => 'setGwItemsPrice',
        'gw_card_base_price' => 'setGwCardBasePrice',
        'gw_card_price' => 'setGwCardPrice',
        'gw_base_tax_amount' => 'setGwBaseTaxAmount',
        'gw_tax_amount' => 'setGwTaxAmount',
        'gw_items_base_tax_amount' => 'setGwItemsBaseTaxAmount',
        'gw_items_tax_amount' => 'setGwItemsTaxAmount',
        'gw_card_base_tax_amount' => 'setGwCardBaseTaxAmount',
        'gw_card_tax_amount' => 'setGwCardTaxAmount'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'gw_base_price' => 'getGwBasePrice',
        'gw_price' => 'getGwPrice',
        'gw_items_base_price' => 'getGwItemsBasePrice',
        'gw_items_price' => 'getGwItemsPrice',
        'gw_card_base_price' => 'getGwCardBasePrice',
        'gw_card_price' => 'getGwCardPrice',
        'gw_base_tax_amount' => 'getGwBaseTaxAmount',
        'gw_tax_amount' => 'getGwTaxAmount',
        'gw_items_base_tax_amount' => 'getGwItemsBaseTaxAmount',
        'gw_items_tax_amount' => 'getGwItemsTaxAmount',
        'gw_card_base_tax_amount' => 'getGwCardBaseTaxAmount',
        'gw_card_tax_amount' => 'getGwCardTaxAmount'
    ];

    /**
     * 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['gw_base_price'] = $data['gw_base_price'] ?? null;
        $this->container['gw_price'] = $data['gw_price'] ?? null;
        $this->container['gw_items_base_price'] = $data['gw_items_base_price'] ?? null;
        $this->container['gw_items_price'] = $data['gw_items_price'] ?? null;
        $this->container['gw_card_base_price'] = $data['gw_card_base_price'] ?? null;
        $this->container['gw_card_price'] = $data['gw_card_price'] ?? null;
        $this->container['gw_base_tax_amount'] = $data['gw_base_tax_amount'] ?? null;
        $this->container['gw_tax_amount'] = $data['gw_tax_amount'] ?? null;
        $this->container['gw_items_base_tax_amount'] = $data['gw_items_base_tax_amount'] ?? null;
        $this->container['gw_items_tax_amount'] = $data['gw_items_tax_amount'] ?? null;
        $this->container['gw_card_base_tax_amount'] = $data['gw_card_base_tax_amount'] ?? null;
        $this->container['gw_card_tax_amount'] = $data['gw_card_tax_amount'] ?? 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 gw_base_price
     *
     * @return string|null
     */
    public function getGwBasePrice()
    {
        return $this->container['gw_base_price'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


