<?php
/**
 * VersionsData
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  Vend202601
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * API 2026-01
 *
 * Lightspeed Retail (X-Series) API.
 *
 * The version of the OpenAPI document: 2026-01
 * Contact: x-series.api@lightspeedhq.com
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.21.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 Vend202601\Model;

use \ArrayAccess;
use \Vend202601\ObjectSerializer;

/**
 * VersionsData Class Doc Comment
 *
 * @category Class
 * @description Map of resource names to their current version numbers.
 * @package  Vend202601
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class VersionsData implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'brands' => 'int',
        'button_layouts' => 'int',
        'channels' => 'int',
        'consignment_products' => 'int',
        'consignments' => 'int',
        'custom_stock_adjustment_reason' => 'int',
        'customer_groups' => 'int',
        'customer_taxes' => 'int',
        'customers' => 'int',
        'outlet_taxes' => 'int',
        'outlets' => 'int',
        'payment_types' => 'int',
        'price_book_products' => 'int',
        'price_books' => 'int',
        'product_images' => 'int',
        'product_types' => 'int',
        'products' => 'int',
        'receipt_settings' => 'int',
        'receipt_template_types' => 'int',
        'receipt_templates' => 'int',
        'registers' => 'int',
        'retailer' => 'int',
        'sales' => 'int',
        'serial_numbers' => 'int',
        'shifts' => 'int',
        'stock_adjustment' => 'int',
        'suppliers' => 'int',
        'tags' => 'int',
        'taxes' => 'int',
        'users' => 'int'
    ];

    /**
     * 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 = [
        'brands' => 'int64',
        'button_layouts' => 'int64',
        'channels' => 'int64',
        'consignment_products' => 'int64',
        'consignments' => 'int64',
        'custom_stock_adjustment_reason' => 'int64',
        'customer_groups' => 'int64',
        'customer_taxes' => 'int64',
        'customers' => 'int64',
        'outlet_taxes' => 'int64',
        'outlets' => 'int64',
        'payment_types' => 'int64',
        'price_book_products' => 'int64',
        'price_books' => 'int64',
        'product_images' => 'int64',
        'product_types' => 'int64',
        'products' => 'int64',
        'receipt_settings' => 'int64',
        'receipt_template_types' => 'int64',
        'receipt_templates' => 'int64',
        'registers' => 'int64',
        'retailer' => 'int64',
        'sales' => 'int64',
        'serial_numbers' => 'int64',
        'shifts' => 'int64',
        'stock_adjustment' => 'int64',
        'suppliers' => 'int64',
        'tags' => 'int64',
        'taxes' => 'int64',
        'users' => 'int64'
    ];

    /**
     * Array of nullable properties. Used for (de)serialization
     *
     * @var boolean[]
     */
    protected static array $openAPINullables = [
        'brands' => false,
        'button_layouts' => false,
        'channels' => false,
        'consignment_products' => false,
        'consignments' => false,
        'custom_stock_adjustment_reason' => false,
        'customer_groups' => false,
        'customer_taxes' => false,
        'customers' => false,
        'outlet_taxes' => false,
        'outlets' => false,
        'payment_types' => false,
        'price_book_products' => false,
        'price_books' => false,
        'product_images' => false,
        'product_types' => false,
        'products' => false,
        'receipt_settings' => false,
        'receipt_template_types' => false,
        'receipt_templates' => false,
        'registers' => false,
        'retailer' => false,
        'sales' => false,
        'serial_numbers' => false,
        'shifts' => false,
        'stock_adjustment' => false,
        'suppliers' => false,
        'tags' => false,
        'taxes' => false,
        'users' => false
    ];

    /**
     * If a nullable field gets set to null, insert it here
     *
     * @var boolean[]
     */
    protected array $openAPINullablesSetToNull = [];

    /**
     * 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 nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'brands' => 'brands',
        'button_layouts' => 'button_layouts',
        'channels' => 'channels',
        'consignment_products' => 'consignment_products',
        'consignments' => 'consignments',
        'custom_stock_adjustment_reason' => 'custom_stock_adjustment_reason',
        'customer_groups' => 'customer_groups',
        'customer_taxes' => 'customer_taxes',
        'customers' => 'customers',
        'outlet_taxes' => 'outlet_taxes',
        'outlets' => 'outlets',
        'payment_types' => 'payment_types',
        'price_book_products' => 'price_book_products',
        'price_books' => 'price_books',
        'product_images' => 'product_images',
        'product_types' => 'product_types',
        'products' => 'products',
        'receipt_settings' => 'receipt_settings',
        'receipt_template_types' => 'receipt_template_types',
        'receipt_templates' => 'receipt_templates',
        'registers' => 'registers',
        'retailer' => 'retailer',
        'sales' => 'sales',
        'serial_numbers' => 'serial_numbers',
        'shifts' => 'shifts',
        'stock_adjustment' => 'stock_adjustment',
        'suppliers' => 'suppliers',
        'tags' => 'tags',
        'taxes' => 'taxes',
        'users' => 'users'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'brands' => 'setBrands',
        'button_layouts' => 'setButtonLayouts',
        'channels' => 'setChannels',
        'consignment_products' => 'setConsignmentProducts',
        'consignments' => 'setConsignments',
        'custom_stock_adjustment_reason' => 'setCustomStockAdjustmentReason',
        'customer_groups' => 'setCustomerGroups',
        'customer_taxes' => 'setCustomerTaxes',
        'customers' => 'setCustomers',
        'outlet_taxes' => 'setOutletTaxes',
        'outlets' => 'setOutlets',
        'payment_types' => 'setPaymentTypes',
        'price_book_products' => 'setPriceBookProducts',
        'price_books' => 'setPriceBooks',
        'product_images' => 'setProductImages',
        'product_types' => 'setProductTypes',
        'products' => 'setProducts',
        'receipt_settings' => 'setReceiptSettings',
        'receipt_template_types' => 'setReceiptTemplateTypes',
        'receipt_templates' => 'setReceiptTemplates',
        'registers' => 'setRegisters',
        'retailer' => 'setRetailer',
        'sales' => 'setSales',
        'serial_numbers' => 'setSerialNumbers',
        'shifts' => 'setShifts',
        'stock_adjustment' => 'setStockAdjustment',
        'suppliers' => 'setSuppliers',
        'tags' => 'setTags',
        'taxes' => 'setTaxes',
        'users' => 'setUsers'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'brands' => 'getBrands',
        'button_layouts' => 'getButtonLayouts',
        'channels' => 'getChannels',
        'consignment_products' => 'getConsignmentProducts',
        'consignments' => 'getConsignments',
        'custom_stock_adjustment_reason' => 'getCustomStockAdjustmentReason',
        'customer_groups' => 'getCustomerGroups',
        'customer_taxes' => 'getCustomerTaxes',
        'customers' => 'getCustomers',
        'outlet_taxes' => 'getOutletTaxes',
        'outlets' => 'getOutlets',
        'payment_types' => 'getPaymentTypes',
        'price_book_products' => 'getPriceBookProducts',
        'price_books' => 'getPriceBooks',
        'product_images' => 'getProductImages',
        'product_types' => 'getProductTypes',
        'products' => 'getProducts',
        'receipt_settings' => 'getReceiptSettings',
        'receipt_template_types' => 'getReceiptTemplateTypes',
        'receipt_templates' => 'getReceiptTemplates',
        'registers' => 'getRegisters',
        'retailer' => 'getRetailer',
        'sales' => 'getSales',
        'serial_numbers' => 'getSerialNumbers',
        'shifts' => 'getShifts',
        'stock_adjustment' => 'getStockAdjustment',
        'suppliers' => 'getSuppliers',
        'tags' => 'getTags',
        'taxes' => 'getTaxes',
        'users' => 'getUsers'
    ];

    /**
     * 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[]|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('brands', $data ?? [], null);
        $this->setIfExists('button_layouts', $data ?? [], null);
        $this->setIfExists('channels', $data ?? [], null);
        $this->setIfExists('consignment_products', $data ?? [], null);
        $this->setIfExists('consignments', $data ?? [], null);
        $this->setIfExists('custom_stock_adjustment_reason', $data ?? [], null);
        $this->setIfExists('customer_groups', $data ?? [], null);
        $this->setIfExists('customer_taxes', $data ?? [], null);
        $this->setIfExists('customers', $data ?? [], null);
        $this->setIfExists('outlet_taxes', $data ?? [], null);
        $this->setIfExists('outlets', $data ?? [], null);
        $this->setIfExists('payment_types', $data ?? [], null);
        $this->setIfExists('price_book_products', $data ?? [], null);
        $this->setIfExists('price_books', $data ?? [], null);
        $this->setIfExists('product_images', $data ?? [], null);
        $this->setIfExists('product_types', $data ?? [], null);
        $this->setIfExists('products', $data ?? [], null);
        $this->setIfExists('receipt_settings', $data ?? [], null);
        $this->setIfExists('receipt_template_types', $data ?? [], null);
        $this->setIfExists('receipt_templates', $data ?? [], null);
        $this->setIfExists('registers', $data ?? [], null);
        $this->setIfExists('retailer', $data ?? [], null);
        $this->setIfExists('sales', $data ?? [], null);
        $this->setIfExists('serial_numbers', $data ?? [], null);
        $this->setIfExists('shifts', $data ?? [], null);
        $this->setIfExists('stock_adjustment', $data ?? [], null);
        $this->setIfExists('suppliers', $data ?? [], null);
        $this->setIfExists('tags', $data ?? [], null);
        $this->setIfExists('taxes', $data ?? [], null);
        $this->setIfExists('users', $data ?? [], null);
    }

    /**
     * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
     * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
     * $this->openAPINullablesSetToNull array
     *
     * @param string $variableName
     * @param array  $fields
     * @param mixed  $defaultValue
     */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

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

    /**
     * Sets brands
     *
     * @param int|null $brands brands
     *
     * @return self
     */
    public function setBrands($brands)
    {
        if (is_null($brands)) {
            throw new \InvalidArgumentException('non-nullable brands cannot be null');
        }
        $this->container['brands'] = $brands;

        return $this;
    }

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

    /**
     * Sets button_layouts
     *
     * @param int|null $button_layouts button_layouts
     *
     * @return self
     */
    public function setButtonLayouts($button_layouts)
    {
        if (is_null($button_layouts)) {
            throw new \InvalidArgumentException('non-nullable button_layouts cannot be null');
        }
        $this->container['button_layouts'] = $button_layouts;

        return $this;
    }

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

    /**
     * Sets channels
     *
     * @param int|null $channels channels
     *
     * @return self
     */
    public function setChannels($channels)
    {
        if (is_null($channels)) {
            throw new \InvalidArgumentException('non-nullable channels cannot be null');
        }
        $this->container['channels'] = $channels;

        return $this;
    }

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

    /**
     * Sets consignment_products
     *
     * @param int|null $consignment_products consignment_products
     *
     * @return self
     */
    public function setConsignmentProducts($consignment_products)
    {
        if (is_null($consignment_products)) {
            throw new \InvalidArgumentException('non-nullable consignment_products cannot be null');
        }
        $this->container['consignment_products'] = $consignment_products;

        return $this;
    }

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

    /**
     * Sets consignments
     *
     * @param int|null $consignments consignments
     *
     * @return self
     */
    public function setConsignments($consignments)
    {
        if (is_null($consignments)) {
            throw new \InvalidArgumentException('non-nullable consignments cannot be null');
        }
        $this->container['consignments'] = $consignments;

        return $this;
    }

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

    /**
     * Sets custom_stock_adjustment_reason
     *
     * @param int|null $custom_stock_adjustment_reason custom_stock_adjustment_reason
     *
     * @return self
     */
    public function setCustomStockAdjustmentReason($custom_stock_adjustment_reason)
    {
        if (is_null($custom_stock_adjustment_reason)) {
            throw new \InvalidArgumentException('non-nullable custom_stock_adjustment_reason cannot be null');
        }
        $this->container['custom_stock_adjustment_reason'] = $custom_stock_adjustment_reason;

        return $this;
    }

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

    /**
     * Sets customer_groups
     *
     * @param int|null $customer_groups customer_groups
     *
     * @return self
     */
    public function setCustomerGroups($customer_groups)
    {
        if (is_null($customer_groups)) {
            throw new \InvalidArgumentException('non-nullable customer_groups cannot be null');
        }
        $this->container['customer_groups'] = $customer_groups;

        return $this;
    }

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

    /**
     * Sets customer_taxes
     *
     * @param int|null $customer_taxes customer_taxes
     *
     * @return self
     */
    public function setCustomerTaxes($customer_taxes)
    {
        if (is_null($customer_taxes)) {
            throw new \InvalidArgumentException('non-nullable customer_taxes cannot be null');
        }
        $this->container['customer_taxes'] = $customer_taxes;

        return $this;
    }

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

    /**
     * Sets customers
     *
     * @param int|null $customers customers
     *
     * @return self
     */
    public function setCustomers($customers)
    {
        if (is_null($customers)) {
            throw new \InvalidArgumentException('non-nullable customers cannot be null');
        }
        $this->container['customers'] = $customers;

        return $this;
    }

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

    /**
     * Sets outlet_taxes
     *
     * @param int|null $outlet_taxes outlet_taxes
     *
     * @return self
     */
    public function setOutletTaxes($outlet_taxes)
    {
        if (is_null($outlet_taxes)) {
            throw new \InvalidArgumentException('non-nullable outlet_taxes cannot be null');
        }
        $this->container['outlet_taxes'] = $outlet_taxes;

        return $this;
    }

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

    /**
     * Sets outlets
     *
     * @param int|null $outlets outlets
     *
     * @return self
     */
    public function setOutlets($outlets)
    {
        if (is_null($outlets)) {
            throw new \InvalidArgumentException('non-nullable outlets cannot be null');
        }
        $this->container['outlets'] = $outlets;

        return $this;
    }

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

    /**
     * Sets payment_types
     *
     * @param int|null $payment_types payment_types
     *
     * @return self
     */
    public function setPaymentTypes($payment_types)
    {
        if (is_null($payment_types)) {
            throw new \InvalidArgumentException('non-nullable payment_types cannot be null');
        }
        $this->container['payment_types'] = $payment_types;

        return $this;
    }

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

    /**
     * Sets price_book_products
     *
     * @param int|null $price_book_products price_book_products
     *
     * @return self
     */
    public function setPriceBookProducts($price_book_products)
    {
        if (is_null($price_book_products)) {
            throw new \InvalidArgumentException('non-nullable price_book_products cannot be null');
        }
        $this->container['price_book_products'] = $price_book_products;

        return $this;
    }

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

    /**
     * Sets price_books
     *
     * @param int|null $price_books price_books
     *
     * @return self
     */
    public function setPriceBooks($price_books)
    {
        if (is_null($price_books)) {
            throw new \InvalidArgumentException('non-nullable price_books cannot be null');
        }
        $this->container['price_books'] = $price_books;

        return $this;
    }

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

    /**
     * Sets product_images
     *
     * @param int|null $product_images product_images
     *
     * @return self
     */
    public function setProductImages($product_images)
    {
        if (is_null($product_images)) {
            throw new \InvalidArgumentException('non-nullable product_images cannot be null');
        }
        $this->container['product_images'] = $product_images;

        return $this;
    }

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

    /**
     * Sets product_types
     *
     * @param int|null $product_types product_types
     *
     * @return self
     */
    public function setProductTypes($product_types)
    {
        if (is_null($product_types)) {
            throw new \InvalidArgumentException('non-nullable product_types cannot be null');
        }
        $this->container['product_types'] = $product_types;

        return $this;
    }

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

    /**
     * Sets products
     *
     * @param int|null $products products
     *
     * @return self
     */
    public function setProducts($products)
    {
        if (is_null($products)) {
            throw new \InvalidArgumentException('non-nullable products cannot be null');
        }
        $this->container['products'] = $products;

        return $this;
    }

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

    /**
     * Sets receipt_settings
     *
     * @param int|null $receipt_settings receipt_settings
     *
     * @return self
     */
    public function setReceiptSettings($receipt_settings)
    {
        if (is_null($receipt_settings)) {
            throw new \InvalidArgumentException('non-nullable receipt_settings cannot be null');
        }
        $this->container['receipt_settings'] = $receipt_settings;

        return $this;
    }

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

    /**
     * Sets receipt_template_types
     *
     * @param int|null $receipt_template_types receipt_template_types
     *
     * @return self
     */
    public function setReceiptTemplateTypes($receipt_template_types)
    {
        if (is_null($receipt_template_types)) {
            throw new \InvalidArgumentException('non-nullable receipt_template_types cannot be null');
        }
        $this->container['receipt_template_types'] = $receipt_template_types;

        return $this;
    }

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

    /**
     * Sets receipt_templates
     *
     * @param int|null $receipt_templates receipt_templates
     *
     * @return self
     */
    public function setReceiptTemplates($receipt_templates)
    {
        if (is_null($receipt_templates)) {
            throw new \InvalidArgumentException('non-nullable receipt_templates cannot be null');
        }
        $this->container['receipt_templates'] = $receipt_templates;

        return $this;
    }

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

    /**
     * Sets registers
     *
     * @param int|null $registers registers
     *
     * @return self
     */
    public function setRegisters($registers)
    {
        if (is_null($registers)) {
            throw new \InvalidArgumentException('non-nullable registers cannot be null');
        }
        $this->container['registers'] = $registers;

        return $this;
    }

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

    /**
     * Sets retailer
     *
     * @param int|null $retailer retailer
     *
     * @return self
     */
    public function setRetailer($retailer)
    {
        if (is_null($retailer)) {
            throw new \InvalidArgumentException('non-nullable retailer cannot be null');
        }
        $this->container['retailer'] = $retailer;

        return $this;
    }

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

    /**
     * Sets sales
     *
     * @param int|null $sales sales
     *
     * @return self
     */
    public function setSales($sales)
    {
        if (is_null($sales)) {
            throw new \InvalidArgumentException('non-nullable sales cannot be null');
        }
        $this->container['sales'] = $sales;

        return $this;
    }

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

    /**
     * Sets serial_numbers
     *
     * @param int|null $serial_numbers serial_numbers
     *
     * @return self
     */
    public function setSerialNumbers($serial_numbers)
    {
        if (is_null($serial_numbers)) {
            throw new \InvalidArgumentException('non-nullable serial_numbers cannot be null');
        }
        $this->container['serial_numbers'] = $serial_numbers;

        return $this;
    }

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

    /**
     * Sets shifts
     *
     * @param int|null $shifts shifts
     *
     * @return self
     */
    public function setShifts($shifts)
    {
        if (is_null($shifts)) {
            throw new \InvalidArgumentException('non-nullable shifts cannot be null');
        }
        $this->container['shifts'] = $shifts;

        return $this;
    }

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

    /**
     * Sets stock_adjustment
     *
     * @param int|null $stock_adjustment stock_adjustment
     *
     * @return self
     */
    public function setStockAdjustment($stock_adjustment)
    {
        if (is_null($stock_adjustment)) {
            throw new \InvalidArgumentException('non-nullable stock_adjustment cannot be null');
        }
        $this->container['stock_adjustment'] = $stock_adjustment;

        return $this;
    }

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

    /**
     * Sets suppliers
     *
     * @param int|null $suppliers suppliers
     *
     * @return self
     */
    public function setSuppliers($suppliers)
    {
        if (is_null($suppliers)) {
            throw new \InvalidArgumentException('non-nullable suppliers cannot be null');
        }
        $this->container['suppliers'] = $suppliers;

        return $this;
    }

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

    /**
     * Sets tags
     *
     * @param int|null $tags tags
     *
     * @return self
     */
    public function setTags($tags)
    {
        if (is_null($tags)) {
            throw new \InvalidArgumentException('non-nullable tags cannot be null');
        }
        $this->container['tags'] = $tags;

        return $this;
    }

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

    /**
     * Sets taxes
     *
     * @param int|null $taxes taxes
     *
     * @return self
     */
    public function setTaxes($taxes)
    {
        if (is_null($taxes)) {
            throw new \InvalidArgumentException('non-nullable taxes cannot be null');
        }
        $this->container['taxes'] = $taxes;

        return $this;
    }

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

    /**
     * Sets users
     *
     * @param int|null $users users
     *
     * @return self
     */
    public function setUsers($users)
    {
        if (is_null($users)) {
            throw new \InvalidArgumentException('non-nullable users cannot be null');
        }
        $this->container['users'] = $users;

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

    /**
     * Gets offset.
     *
     * @param integer|string $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet(mixed $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|string $offset Offset
     *
     * @return void
     */
    public function offsetUnset(mixed $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));
    }
}


