<?php
/**
 * InvoiceSettingsDocumentHeadings
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  SageOne
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Sage Business Cloud Accounting - Accounts
 *
 * Documentation of the Sage Business Cloud Accounting API.
 *
 * The version of the OpenAPI document: 3.1
 * 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 SageOne\Model;

use \ArrayAccess;
use \SageOne\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'sales_invoice' => 'string',
        'sales_credit_note' => 'string',
        'sales_corrective_invoice' => 'string',
        'sales_quote' => 'string',
        'sales_estimate' => 'string',
        'pro_forma' => 'string',
        'remittance_advice' => 'string',
        'statement' => 'string',
        'delivery_note' => '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 = [
        'sales_invoice' => null,
        'sales_credit_note' => null,
        'sales_corrective_invoice' => null,
        'sales_quote' => null,
        'sales_estimate' => null,
        'pro_forma' => null,
        'remittance_advice' => null,
        'statement' => null,
        'delivery_note' => 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 = [
        'sales_invoice' => 'sales_invoice',
        'sales_credit_note' => 'sales_credit_note',
        'sales_corrective_invoice' => 'sales_corrective_invoice',
        'sales_quote' => 'sales_quote',
        'sales_estimate' => 'sales_estimate',
        'pro_forma' => 'pro_forma',
        'remittance_advice' => 'remittance_advice',
        'statement' => 'statement',
        'delivery_note' => 'delivery_note'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'sales_invoice' => 'setSalesInvoice',
        'sales_credit_note' => 'setSalesCreditNote',
        'sales_corrective_invoice' => 'setSalesCorrectiveInvoice',
        'sales_quote' => 'setSalesQuote',
        'sales_estimate' => 'setSalesEstimate',
        'pro_forma' => 'setProForma',
        'remittance_advice' => 'setRemittanceAdvice',
        'statement' => 'setStatement',
        'delivery_note' => 'setDeliveryNote'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'sales_invoice' => 'getSalesInvoice',
        'sales_credit_note' => 'getSalesCreditNote',
        'sales_corrective_invoice' => 'getSalesCorrectiveInvoice',
        'sales_quote' => 'getSalesQuote',
        'sales_estimate' => 'getSalesEstimate',
        'pro_forma' => 'getProForma',
        'remittance_advice' => 'getRemittanceAdvice',
        'statement' => 'getStatement',
        'delivery_note' => 'getDeliveryNote'
    ];

    /**
     * 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['sales_invoice'] = $data['sales_invoice'] ?? null;
        $this->container['sales_credit_note'] = $data['sales_credit_note'] ?? null;
        $this->container['sales_corrective_invoice'] = $data['sales_corrective_invoice'] ?? null;
        $this->container['sales_quote'] = $data['sales_quote'] ?? null;
        $this->container['sales_estimate'] = $data['sales_estimate'] ?? null;
        $this->container['pro_forma'] = $data['pro_forma'] ?? null;
        $this->container['remittance_advice'] = $data['remittance_advice'] ?? null;
        $this->container['statement'] = $data['statement'] ?? null;
        $this->container['delivery_note'] = $data['delivery_note'] ?? 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 sales_invoice
     *
     * @return string|null
     */
    public function getSalesInvoice()
    {
        return $this->container['sales_invoice'];
    }

    /**
     * Sets sales_invoice
     *
     * @param string|null $sales_invoice The customisable sales invoice document header
     *
     * @return self
     */
    public function setSalesInvoice($sales_invoice)
    {
        $this->container['sales_invoice'] = $sales_invoice;

        return $this;
    }

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

    /**
     * Sets sales_credit_note
     *
     * @param string|null $sales_credit_note The customisable sales credit note document header
     *
     * @return self
     */
    public function setSalesCreditNote($sales_credit_note)
    {
        $this->container['sales_credit_note'] = $sales_credit_note;

        return $this;
    }

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

    /**
     * Sets sales_corrective_invoice
     *
     * @param string|null $sales_corrective_invoice The customisable sales corrective invoice document header
     *
     * @return self
     */
    public function setSalesCorrectiveInvoice($sales_corrective_invoice)
    {
        $this->container['sales_corrective_invoice'] = $sales_corrective_invoice;

        return $this;
    }

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

    /**
     * Sets sales_quote
     *
     * @param string|null $sales_quote The customisable sales quote document header
     *
     * @return self
     */
    public function setSalesQuote($sales_quote)
    {
        $this->container['sales_quote'] = $sales_quote;

        return $this;
    }

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

    /**
     * Sets sales_estimate
     *
     * @param string|null $sales_estimate The customisable sales estimate document header
     *
     * @return self
     */
    public function setSalesEstimate($sales_estimate)
    {
        $this->container['sales_estimate'] = $sales_estimate;

        return $this;
    }

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

    /**
     * Sets pro_forma
     *
     * @param string|null $pro_forma The customisable pro forma document header
     *
     * @return self
     */
    public function setProForma($pro_forma)
    {
        $this->container['pro_forma'] = $pro_forma;

        return $this;
    }

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

    /**
     * Sets remittance_advice
     *
     * @param string|null $remittance_advice The customisable remittance advice document header
     *
     * @return self
     */
    public function setRemittanceAdvice($remittance_advice)
    {
        $this->container['remittance_advice'] = $remittance_advice;

        return $this;
    }

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

    /**
     * Sets statement
     *
     * @param string|null $statement The customisable statement document header
     *
     * @return self
     */
    public function setStatement($statement)
    {
        $this->container['statement'] = $statement;

        return $this;
    }

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

    /**
     * Sets delivery_note
     *
     * @param string|null $delivery_note The customisable delivery note document header
     *
     * @return self
     */
    public function setDeliveryNote($delivery_note)
    {
        $this->container['delivery_note'] = $delivery_note;

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


