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

/**
 * 支付宝开放平台API
 *
 * 支付宝开放平台v3协议文档
 *
 * The version of the OpenAPI document: 2023-12-20
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.2.1
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Alipay\OpenAPISDK\Model;

use \ArrayAccess;
use \Alipay\OpenAPISDK\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accountLogId' => 'string',
        'alipayOrderNo' => 'string',
        'balance' => 'string',
        'billSource' => 'string',
        'bizDesc' => 'string',
        'bizNos' => 'string',
        'bizOrigNo' => 'string',
        'complementInfo' => 'string',
        'direction' => 'string',
        'merchantOrderNo' => 'string',
        'merchantOutRefundNo' => 'string',
        'otherAccount' => 'string',
        'storeName' => 'string',
        'transAmount' => 'string',
        'transDt' => 'string',
        'transMemo' => 'string',
        'type' => '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 = [
        'accountLogId' => null,
        'alipayOrderNo' => null,
        'balance' => null,
        'billSource' => null,
        'bizDesc' => null,
        'bizNos' => null,
        'bizOrigNo' => null,
        'complementInfo' => null,
        'direction' => null,
        'merchantOrderNo' => null,
        'merchantOutRefundNo' => null,
        'otherAccount' => null,
        'storeName' => null,
        'transAmount' => null,
        'transDt' => null,
        'transMemo' => null,
        'type' => 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 = [
        'accountLogId' => 'account_log_id',
        'alipayOrderNo' => 'alipay_order_no',
        'balance' => 'balance',
        'billSource' => 'bill_source',
        'bizDesc' => 'biz_desc',
        'bizNos' => 'biz_nos',
        'bizOrigNo' => 'biz_orig_no',
        'complementInfo' => 'complement_info',
        'direction' => 'direction',
        'merchantOrderNo' => 'merchant_order_no',
        'merchantOutRefundNo' => 'merchant_out_refund_no',
        'otherAccount' => 'other_account',
        'storeName' => 'store_name',
        'transAmount' => 'trans_amount',
        'transDt' => 'trans_dt',
        'transMemo' => 'trans_memo',
        'type' => 'type'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accountLogId' => 'setAccountLogId',
        'alipayOrderNo' => 'setAlipayOrderNo',
        'balance' => 'setBalance',
        'billSource' => 'setBillSource',
        'bizDesc' => 'setBizDesc',
        'bizNos' => 'setBizNos',
        'bizOrigNo' => 'setBizOrigNo',
        'complementInfo' => 'setComplementInfo',
        'direction' => 'setDirection',
        'merchantOrderNo' => 'setMerchantOrderNo',
        'merchantOutRefundNo' => 'setMerchantOutRefundNo',
        'otherAccount' => 'setOtherAccount',
        'storeName' => 'setStoreName',
        'transAmount' => 'setTransAmount',
        'transDt' => 'setTransDt',
        'transMemo' => 'setTransMemo',
        'type' => 'setType'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accountLogId' => 'getAccountLogId',
        'alipayOrderNo' => 'getAlipayOrderNo',
        'balance' => 'getBalance',
        'billSource' => 'getBillSource',
        'bizDesc' => 'getBizDesc',
        'bizNos' => 'getBizNos',
        'bizOrigNo' => 'getBizOrigNo',
        'complementInfo' => 'getComplementInfo',
        'direction' => 'getDirection',
        'merchantOrderNo' => 'getMerchantOrderNo',
        'merchantOutRefundNo' => 'getMerchantOutRefundNo',
        'otherAccount' => 'getOtherAccount',
        'storeName' => 'getStoreName',
        'transAmount' => 'getTransAmount',
        'transDt' => 'getTransDt',
        'transMemo' => 'getTransMemo',
        'type' => 'getType'
    ];

    /**
     * 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['accountLogId'] = $data['accountLogId'] ?? null;
        $this->container['alipayOrderNo'] = $data['alipayOrderNo'] ?? null;
        $this->container['balance'] = $data['balance'] ?? null;
        $this->container['billSource'] = $data['billSource'] ?? null;
        $this->container['bizDesc'] = $data['bizDesc'] ?? null;
        $this->container['bizNos'] = $data['bizNos'] ?? null;
        $this->container['bizOrigNo'] = $data['bizOrigNo'] ?? null;
        $this->container['complementInfo'] = $data['complementInfo'] ?? null;
        $this->container['direction'] = $data['direction'] ?? null;
        $this->container['merchantOrderNo'] = $data['merchantOrderNo'] ?? null;
        $this->container['merchantOutRefundNo'] = $data['merchantOutRefundNo'] ?? null;
        $this->container['otherAccount'] = $data['otherAccount'] ?? null;
        $this->container['storeName'] = $data['storeName'] ?? null;
        $this->container['transAmount'] = $data['transAmount'] ?? null;
        $this->container['transDt'] = $data['transDt'] ?? null;
        $this->container['transMemo'] = $data['transMemo'] ?? null;
        $this->container['type'] = $data['type'] ?? 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 accountLogId
     *
     * @return string|null
     */
    public function getAccountLogId()
    {
        return $this->container['accountLogId'];
    }

    /**
     * Sets accountLogId
     *
     * @param string|null $accountLogId 支付宝账务流水号。对账使用，不脱敏
     *
     * @return self
     */
    public function setAccountLogId($accountLogId)
    {
        $this->container['accountLogId'] = $accountLogId;

        return $this;
    }

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

    /**
     * Sets alipayOrderNo
     *
     * @param string|null $alipayOrderNo 支付宝订单号。对账使用，不脱敏
     *
     * @return self
     */
    public function setAlipayOrderNo($alipayOrderNo)
    {
        $this->container['alipayOrderNo'] = $alipayOrderNo;

        return $this;
    }

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

    /**
     * Sets balance
     *
     * @param string|null $balance 余额，仅供参考。由于架构原因，余额变动并不保证连续。也就是余额不一定等于上一笔余额减去当笔金额。但是会保证最终一致。
     *
     * @return self
     */
    public function setBalance($balance)
    {
        $this->container['balance'] = $balance;

        return $this;
    }

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

    /**
     * Sets billSource
     *
     * @param string|null $billSource 业务账单来源，资金收支对应的上游业务订单数据来源，确认业务订单出处。此字段供商户对账使用，不脱敏。
     *
     * @return self
     */
    public function setBillSource($billSource)
    {
        $this->container['billSource'] = $billSource;

        return $this;
    }

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

    /**
     * Sets bizDesc
     *
     * @param string|null $bizDesc 业务描述，资金收支对应的详细业务场景信息。此字段供商户对账使用，不脱敏。
     *
     * @return self
     */
    public function setBizDesc($bizDesc)
    {
        $this->container['bizDesc'] = $bizDesc;

        return $this;
    }

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

    /**
     * Sets bizNos
     *
     * @param string|null $bizNos 业务订单号，资金收支相关的业务场景订单号明细，字母大写；M：平台交易主单号，S：平台交易子单号，O：业务系统单据号（如退款订单号）。此字段供商户对账使用，不脱敏。
     *
     * @return self
     */
    public function setBizNos($bizNos)
    {
        $this->container['bizNos'] = $bizNos;

        return $this;
    }

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

    /**
     * Sets bizOrigNo
     *
     * @param string|null $bizOrigNo 业务基础订单号，资金收支对应的原始业务订单唯一识别编号。此字段供商户对账使用，不脱敏。
     *
     * @return self
     */
    public function setBizOrigNo($bizOrigNo)
    {
        $this->container['bizOrigNo'] = $bizOrigNo;

        return $this;
    }

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

    /**
     * Sets complementInfo
     *
     * @param string|null $complementInfo 账单的补全信息，用于特殊场景，普通商户不需要传值，对账时可忽略。
     *
     * @return self
     */
    public function setComplementInfo($complementInfo)
    {
        $this->container['complementInfo'] = $complementInfo;

        return $this;
    }

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

    /**
     * Sets direction
     *
     * @param string|null $direction 收入/支出。表示收支。amount是正数，返回“收入”。amount是负数，返回“支出”
     *
     * @return self
     */
    public function setDirection($direction)
    {
        $this->container['direction'] = $direction;

        return $this;
    }

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

    /**
     * Sets merchantOrderNo
     *
     * @param string|null $merchantOrderNo 商户订单号，创建支付宝交易时传入的信息。对账使用，不脱敏
     *
     * @return self
     */
    public function setMerchantOrderNo($merchantOrderNo)
    {
        $this->container['merchantOrderNo'] = $merchantOrderNo;

        return $this;
    }

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

    /**
     * Sets merchantOutRefundNo
     *
     * @param string|null $merchantOutRefundNo 支付宝交易商户退款请求号。对应商户在调用收单退款接口openApi请求传入的outRequestNo参数值
     *
     * @return self
     */
    public function setMerchantOutRefundNo($merchantOutRefundNo)
    {
        $this->container['merchantOutRefundNo'] = $merchantOutRefundNo;

        return $this;
    }

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

    /**
     * Sets otherAccount
     *
     * @param string|null $otherAccount 对方账户
     *
     * @return self
     */
    public function setOtherAccount($otherAccount)
    {
        $this->container['otherAccount'] = $otherAccount;

        return $this;
    }

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

    /**
     * Sets storeName
     *
     * @param string|null $storeName 门店信息
     *
     * @return self
     */
    public function setStoreName($storeName)
    {
        $this->container['storeName'] = $storeName;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets transDt
     *
     * @param string|null $transDt 入账时间
     *
     * @return self
     */
    public function setTransDt($transDt)
    {
        $this->container['transDt'] = $transDt;

        return $this;
    }

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

    /**
     * Sets transMemo
     *
     * @param string|null $transMemo 账务备注。由上游业务决定，不可依赖此字段进行对账
     *
     * @return self
     */
    public function setTransMemo($transMemo)
    {
        $this->container['transMemo'] = $transMemo;

        return $this;
    }

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

    /**
     * Sets type
     *
     * @param string|null $type 账务记录的类型，仅供参考
     *
     * @return self
     */
    public function setType($type)
    {
        $this->container['type'] = $type;

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


