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

/**
 * SV Register Web-services
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.15
 * 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 SmartVolution\Model;

use \ArrayAccess;
use \SmartVolution\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'id' => 'int',
        'transactionId' => 'string',
        'reference' => 'string',
        'clerkId' => 'int',
        'clerkName' => 'string',
        'deviceId' => 'int',
        'price' => 'double',
        'priceWithModifiers' => 'double',
        'modified' => 'int',
        'locked' => 'bool',
        'reprintOrderReceiptEnable' => 'int',
        'approvalClerkId' => 'int',
        'parentId' => 'string',
        'suspendReasonId' => 'int',
        'originator' => 'int',
        'tipAmount' => 'double',
        'lastClerkId' => 'int',
        'readyToComplete' => 'bool',
        'useActivityDefaultPriceList' => 'bool',
        'notes' => '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 = [
        'id' => 'int64',
        'transactionId' => null,
        'reference' => null,
        'clerkId' => 'int64',
        'clerkName' => null,
        'deviceId' => 'int64',
        'price' => 'double',
        'priceWithModifiers' => 'double',
        'modified' => 'int64',
        'locked' => null,
        'reprintOrderReceiptEnable' => 'int64',
        'approvalClerkId' => 'int64',
        'parentId' => null,
        'suspendReasonId' => 'int64',
        'originator' => 'int64',
        'tipAmount' => 'double',
        'lastClerkId' => 'int64',
        'readyToComplete' => null,
        'useActivityDefaultPriceList' => null,
        'notes' => 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 = [
        'id' => 'id',
        'transactionId' => 'transactionId',
        'reference' => 'reference',
        'clerkId' => 'clerkId',
        'clerkName' => 'clerkName',
        'deviceId' => 'deviceId',
        'price' => 'price',
        'priceWithModifiers' => 'priceWithModifiers',
        'modified' => 'modified',
        'locked' => 'locked',
        'reprintOrderReceiptEnable' => 'reprintOrderReceiptEnable',
        'approvalClerkId' => 'approvalClerkId',
        'parentId' => 'parentId',
        'suspendReasonId' => 'suspendReasonId',
        'originator' => 'originator',
        'tipAmount' => 'tipAmount',
        'lastClerkId' => 'lastClerkId',
        'readyToComplete' => 'readyToComplete',
        'useActivityDefaultPriceList' => 'useActivityDefaultPriceList',
        'notes' => 'notes'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'transactionId' => 'setTransactionId',
        'reference' => 'setReference',
        'clerkId' => 'setClerkId',
        'clerkName' => 'setClerkName',
        'deviceId' => 'setDeviceId',
        'price' => 'setPrice',
        'priceWithModifiers' => 'setPriceWithModifiers',
        'modified' => 'setModified',
        'locked' => 'setLocked',
        'reprintOrderReceiptEnable' => 'setReprintOrderReceiptEnable',
        'approvalClerkId' => 'setApprovalClerkId',
        'parentId' => 'setParentId',
        'suspendReasonId' => 'setSuspendReasonId',
        'originator' => 'setOriginator',
        'tipAmount' => 'setTipAmount',
        'lastClerkId' => 'setLastClerkId',
        'readyToComplete' => 'setReadyToComplete',
        'useActivityDefaultPriceList' => 'setUseActivityDefaultPriceList',
        'notes' => 'setNotes'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'transactionId' => 'getTransactionId',
        'reference' => 'getReference',
        'clerkId' => 'getClerkId',
        'clerkName' => 'getClerkName',
        'deviceId' => 'getDeviceId',
        'price' => 'getPrice',
        'priceWithModifiers' => 'getPriceWithModifiers',
        'modified' => 'getModified',
        'locked' => 'getLocked',
        'reprintOrderReceiptEnable' => 'getReprintOrderReceiptEnable',
        'approvalClerkId' => 'getApprovalClerkId',
        'parentId' => 'getParentId',
        'suspendReasonId' => 'getSuspendReasonId',
        'originator' => 'getOriginator',
        'tipAmount' => 'getTipAmount',
        'lastClerkId' => 'getLastClerkId',
        'readyToComplete' => 'getReadyToComplete',
        'useActivityDefaultPriceList' => 'getUseActivityDefaultPriceList',
        'notes' => 'getNotes'
    ];

    /**
     * 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['id'] = $data['id'] ?? null;
        $this->container['transactionId'] = $data['transactionId'] ?? null;
        $this->container['reference'] = $data['reference'] ?? null;
        $this->container['clerkId'] = $data['clerkId'] ?? null;
        $this->container['clerkName'] = $data['clerkName'] ?? null;
        $this->container['deviceId'] = $data['deviceId'] ?? null;
        $this->container['price'] = $data['price'] ?? null;
        $this->container['priceWithModifiers'] = $data['priceWithModifiers'] ?? null;
        $this->container['modified'] = $data['modified'] ?? null;
        $this->container['locked'] = $data['locked'] ?? null;
        $this->container['reprintOrderReceiptEnable'] = $data['reprintOrderReceiptEnable'] ?? null;
        $this->container['approvalClerkId'] = $data['approvalClerkId'] ?? null;
        $this->container['parentId'] = $data['parentId'] ?? null;
        $this->container['suspendReasonId'] = $data['suspendReasonId'] ?? null;
        $this->container['originator'] = $data['originator'] ?? null;
        $this->container['tipAmount'] = $data['tipAmount'] ?? null;
        $this->container['lastClerkId'] = $data['lastClerkId'] ?? null;
        $this->container['readyToComplete'] = $data['readyToComplete'] ?? null;
        $this->container['useActivityDefaultPriceList'] = $data['useActivityDefaultPriceList'] ?? null;
        $this->container['notes'] = $data['notes'] ?? 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 id
     *
     * @return int|null
     */
    public function getId()
    {
        return $this->container['id'];
    }

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

        return $this;
    }

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

    /**
     * Sets transactionId
     *
     * @param string|null $transactionId tablet local transaction id
     *
     * @return self
     */
    public function setTransactionId($transactionId)
    {
        $this->container['transactionId'] = $transactionId;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets price
     *
     * @return double|null
     */
    public function getPrice()
    {
        return $this->container['price'];
    }

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

        return $this;
    }

    /**
     * Gets priceWithModifiers
     *
     * @return double|null
     */
    public function getPriceWithModifiers()
    {
        return $this->container['priceWithModifiers'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets locked
     *
     * @return bool|null
     */
    public function getLocked()
    {
        return $this->container['locked'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets tipAmount
     *
     * @return double|null
     */
    public function getTipAmount()
    {
        return $this->container['tipAmount'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets readyToComplete
     *
     * @return bool|null
     */
    public function getReadyToComplete()
    {
        return $this->container['readyToComplete'];
    }

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

        return $this;
    }

    /**
     * Gets useActivityDefaultPriceList
     *
     * @return bool|null
     */
    public function getUseActivityDefaultPriceList()
    {
        return $this->container['useActivityDefaultPriceList'];
    }

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

        return $this;
    }

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

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

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


