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

/**
 * Fortnox API
 *
 * # Documentation   The Fortnox API is organized around REST. This means that we’ve designed it to have resource-oriented URLs and be as predictable as possible for you as developer.  It also means that we use HTTP status codes when something goes wrong and HTTP verbs understod by many API clients around the web.  We use a modified version of OAuth2 for authentication to offer a secure way for both you and our users to interact.  The API is generally built to support both XML and JSON but in this documentation all the examples will be in JSON.  We encourage you to read all the articles in the [Guides & Good to Know section](https://www.fortnox.se/developer/guides-and-good-to-know/)</a> first, before going forward and learning about the different resources.  This to ensure you get an understanding of some of the shared components of the API such as parameters and error handling.  ## Rate limits  The limit per access-token is 25 requests per 5 seconds. This equals to 300 requests per minute.  [Read more about this here.](https://www.fortnox.se/developer/guides-and-good-to-know/rate-limits-for-fortnox-api/)  ## Query parameters  Use query parameters with the ?-character and separate parameters with the &-character.   **Example:**  GET - https://api.fortnox.se/3/invoices?accountnumberfrom=3000&accountnumberto=4000 Read more about our parameters [here](https://www.fortnox.se/developer/guides-and-good-to-know/parameters/)   Search the documentation using the search field in the top left corner.
 *
 * The version of the OpenAPI document: 
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.19.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 Fortnox\Model;

use \ArrayAccess;
use \Fortnox\ObjectSerializer;

/**
 * WarehouseManualInboundDocumentRow Class Doc Comment
 *
 * @category Class
 * @package  Fortnox
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class WarehouseManualInboundDocumentRow implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'batch' => 'string',
        'cost_center_code' => 'string',
        'direct_cost' => 'float',
        'freight_cost' => 'float',
        'item_description' => 'string',
        'item_id' => 'string',
        'item_unit' => 'string',
        'other_cost' => 'float',
        'project_id' => 'string',
        'quantity' => 'float',
        'row_id' => 'int',
        'stock_location_code' => 'string',
        'stock_location_id' => 'string',
        'stock_location_name' => 'string',
        'stock_point_code' => 'string',
        'stock_point_id' => 'string',
        'stock_point_name' => '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 = [
        'batch' => null,
        'cost_center_code' => null,
        'direct_cost' => null,
        'freight_cost' => null,
        'item_description' => null,
        'item_id' => null,
        'item_unit' => null,
        'other_cost' => null,
        'project_id' => null,
        'quantity' => null,
        'row_id' => 'int64',
        'stock_location_code' => null,
        'stock_location_id' => 'uuid',
        'stock_location_name' => null,
        'stock_point_code' => null,
        'stock_point_id' => 'uuid',
        'stock_point_name' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'batch' => false,
        'cost_center_code' => false,
        'direct_cost' => false,
        'freight_cost' => false,
        'item_description' => false,
        'item_id' => false,
        'item_unit' => false,
        'other_cost' => false,
        'project_id' => false,
        'quantity' => false,
        'row_id' => false,
        'stock_location_code' => false,
        'stock_location_id' => false,
        'stock_location_name' => false,
        'stock_point_code' => false,
        'stock_point_id' => false,
        'stock_point_name' => 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 = [
        'batch' => 'batch',
        'cost_center_code' => 'costCenterCode',
        'direct_cost' => 'directCost',
        'freight_cost' => 'freightCost',
        'item_description' => 'itemDescription',
        'item_id' => 'itemId',
        'item_unit' => 'itemUnit',
        'other_cost' => 'otherCost',
        'project_id' => 'projectId',
        'quantity' => 'quantity',
        'row_id' => 'rowId',
        'stock_location_code' => 'stockLocationCode',
        'stock_location_id' => 'stockLocationId',
        'stock_location_name' => 'stockLocationName',
        'stock_point_code' => 'stockPointCode',
        'stock_point_id' => 'stockPointId',
        'stock_point_name' => 'stockPointName'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'batch' => 'setBatch',
        'cost_center_code' => 'setCostCenterCode',
        'direct_cost' => 'setDirectCost',
        'freight_cost' => 'setFreightCost',
        'item_description' => 'setItemDescription',
        'item_id' => 'setItemId',
        'item_unit' => 'setItemUnit',
        'other_cost' => 'setOtherCost',
        'project_id' => 'setProjectId',
        'quantity' => 'setQuantity',
        'row_id' => 'setRowId',
        'stock_location_code' => 'setStockLocationCode',
        'stock_location_id' => 'setStockLocationId',
        'stock_location_name' => 'setStockLocationName',
        'stock_point_code' => 'setStockPointCode',
        'stock_point_id' => 'setStockPointId',
        'stock_point_name' => 'setStockPointName'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'batch' => 'getBatch',
        'cost_center_code' => 'getCostCenterCode',
        'direct_cost' => 'getDirectCost',
        'freight_cost' => 'getFreightCost',
        'item_description' => 'getItemDescription',
        'item_id' => 'getItemId',
        'item_unit' => 'getItemUnit',
        'other_cost' => 'getOtherCost',
        'project_id' => 'getProjectId',
        'quantity' => 'getQuantity',
        'row_id' => 'getRowId',
        'stock_location_code' => 'getStockLocationCode',
        'stock_location_id' => 'getStockLocationId',
        'stock_location_name' => 'getStockLocationName',
        'stock_point_code' => 'getStockPointCode',
        'stock_point_id' => 'getStockPointId',
        'stock_point_name' => 'getStockPointName'
    ];

    /**
     * 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('batch', $data ?? [], null);
        $this->setIfExists('cost_center_code', $data ?? [], null);
        $this->setIfExists('direct_cost', $data ?? [], null);
        $this->setIfExists('freight_cost', $data ?? [], null);
        $this->setIfExists('item_description', $data ?? [], null);
        $this->setIfExists('item_id', $data ?? [], null);
        $this->setIfExists('item_unit', $data ?? [], null);
        $this->setIfExists('other_cost', $data ?? [], null);
        $this->setIfExists('project_id', $data ?? [], null);
        $this->setIfExists('quantity', $data ?? [], null);
        $this->setIfExists('row_id', $data ?? [], null);
        $this->setIfExists('stock_location_code', $data ?? [], null);
        $this->setIfExists('stock_location_id', $data ?? [], null);
        $this->setIfExists('stock_location_name', $data ?? [], null);
        $this->setIfExists('stock_point_code', $data ?? [], null);
        $this->setIfExists('stock_point_id', $data ?? [], null);
        $this->setIfExists('stock_point_name', $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 = [];

        if (!is_null($this->container['batch']) && (mb_strlen($this->container['batch']) > 50)) {
            $invalidProperties[] = "invalid value for 'batch', the character length must be smaller than or equal to 50.";
        }

        if (!is_null($this->container['direct_cost']) && ($this->container['direct_cost'] < 0)) {
            $invalidProperties[] = "invalid value for 'direct_cost', must be bigger than or equal to 0.";
        }

        if (!is_null($this->container['freight_cost']) && ($this->container['freight_cost'] < 0)) {
            $invalidProperties[] = "invalid value for 'freight_cost', must be bigger than or equal to 0.";
        }

        if ($this->container['item_id'] === null) {
            $invalidProperties[] = "'item_id' can't be null";
        }
        if ((mb_strlen($this->container['item_id']) > 50)) {
            $invalidProperties[] = "invalid value for 'item_id', the character length must be smaller than or equal to 50.";
        }

        if ((mb_strlen($this->container['item_id']) < 1)) {
            $invalidProperties[] = "invalid value for 'item_id', the character length must be bigger than or equal to 1.";
        }

        if (!is_null($this->container['other_cost']) && ($this->container['other_cost'] < 0)) {
            $invalidProperties[] = "invalid value for 'other_cost', must be bigger than or equal to 0.";
        }

        if ($this->container['quantity'] === null) {
            $invalidProperties[] = "'quantity' can't be null";
        }
        if (($this->container['quantity'] < 0.01)) {
            $invalidProperties[] = "invalid value for 'quantity', must be bigger than or equal to 0.01.";
        }

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

    /**
     * Sets batch
     *
     * @param string|null $batch batch
     *
     * @return self
     */
    public function setBatch($batch)
    {
        if (is_null($batch)) {
            throw new \InvalidArgumentException('non-nullable batch cannot be null');
        }
        if ((mb_strlen($batch) > 50)) {
            throw new \InvalidArgumentException('invalid length for $batch when calling WarehouseManualInboundDocumentRow., must be smaller than or equal to 50.');
        }

        $this->container['batch'] = $batch;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets direct_cost
     *
     * @param float|null $direct_cost direct_cost
     *
     * @return self
     */
    public function setDirectCost($direct_cost)
    {
        if (is_null($direct_cost)) {
            throw new \InvalidArgumentException('non-nullable direct_cost cannot be null');
        }

        if (($direct_cost < 0)) {
            throw new \InvalidArgumentException('invalid value for $direct_cost when calling WarehouseManualInboundDocumentRow., must be bigger than or equal to 0.');
        }

        $this->container['direct_cost'] = $direct_cost;

        return $this;
    }

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

    /**
     * Sets freight_cost
     *
     * @param float|null $freight_cost freight_cost
     *
     * @return self
     */
    public function setFreightCost($freight_cost)
    {
        if (is_null($freight_cost)) {
            throw new \InvalidArgumentException('non-nullable freight_cost cannot be null');
        }

        if (($freight_cost < 0)) {
            throw new \InvalidArgumentException('invalid value for $freight_cost when calling WarehouseManualInboundDocumentRow., must be bigger than or equal to 0.');
        }

        $this->container['freight_cost'] = $freight_cost;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets item_id
     *
     * @param string $item_id item_id
     *
     * @return self
     */
    public function setItemId($item_id)
    {
        if (is_null($item_id)) {
            throw new \InvalidArgumentException('non-nullable item_id cannot be null');
        }
        if ((mb_strlen($item_id) > 50)) {
            throw new \InvalidArgumentException('invalid length for $item_id when calling WarehouseManualInboundDocumentRow., must be smaller than or equal to 50.');
        }
        if ((mb_strlen($item_id) < 1)) {
            throw new \InvalidArgumentException('invalid length for $item_id when calling WarehouseManualInboundDocumentRow., must be bigger than or equal to 1.');
        }

        $this->container['item_id'] = $item_id;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets other_cost
     *
     * @param float|null $other_cost other_cost
     *
     * @return self
     */
    public function setOtherCost($other_cost)
    {
        if (is_null($other_cost)) {
            throw new \InvalidArgumentException('non-nullable other_cost cannot be null');
        }

        if (($other_cost < 0)) {
            throw new \InvalidArgumentException('invalid value for $other_cost when calling WarehouseManualInboundDocumentRow., must be bigger than or equal to 0.');
        }

        $this->container['other_cost'] = $other_cost;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets quantity
     *
     * @param float $quantity quantity
     *
     * @return self
     */
    public function setQuantity($quantity)
    {
        if (is_null($quantity)) {
            throw new \InvalidArgumentException('non-nullable quantity cannot be null');
        }

        if (($quantity < 0.01)) {
            throw new \InvalidArgumentException('invalid value for $quantity when calling WarehouseManualInboundDocumentRow., must be bigger than or equal to 0.01.');
        }

        $this->container['quantity'] = $quantity;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


