v3/src/Model/AlipayEbppInvoiceEnterpriseconsumeSummaryinvoicedetailQueryResponseModel.php
<?php
/**
 * AlipayEbppInvoiceEnterpriseconsumeSummaryinvoicedetailQueryResponseModel
 *
 * 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: 2025-08-26
 * 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;

/**
 * AlipayEbppInvoiceEnterpriseconsumeSummaryinvoicedetailQueryResponseModel 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 AlipayEbppInvoiceEnterpriseconsumeSummaryinvoicedetailQueryResponseModel implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accountId' => 'string',
        'applyDate' => 'string',
        'batchId' => 'string',
        'batchStatus' => 'string',
        'completeVoucherList' => '\Alipay\OpenAPISDK\Model\CompleteVoucherInfo[]',
        'gmtBizEnd' => 'string',
        'gmtBizStart' => 'string',
        'statusShowContent' => 'string',
        'summaryId' => 'string',
        'userId' => '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 = [
        'accountId' => null,
        'applyDate' => null,
        'batchId' => null,
        'batchStatus' => null,
        'completeVoucherList' => null,
        'gmtBizEnd' => null,
        'gmtBizStart' => null,
        'statusShowContent' => null,
        'summaryId' => null,
        'userId' => 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 = [
        'accountId' => 'account_id',
        'applyDate' => 'apply_date',
        'batchId' => 'batch_id',
        'batchStatus' => 'batch_status',
        'completeVoucherList' => 'complete_voucher_list',
        'gmtBizEnd' => 'gmt_biz_end',
        'gmtBizStart' => 'gmt_biz_start',
        'statusShowContent' => 'status_show_content',
        'summaryId' => 'summary_id',
        'userId' => 'user_id'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accountId' => 'setAccountId',
        'applyDate' => 'setApplyDate',
        'batchId' => 'setBatchId',
        'batchStatus' => 'setBatchStatus',
        'completeVoucherList' => 'setCompleteVoucherList',
        'gmtBizEnd' => 'setGmtBizEnd',
        'gmtBizStart' => 'setGmtBizStart',
        'statusShowContent' => 'setStatusShowContent',
        'summaryId' => 'setSummaryId',
        'userId' => 'setUserId'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accountId' => 'getAccountId',
        'applyDate' => 'getApplyDate',
        'batchId' => 'getBatchId',
        'batchStatus' => 'getBatchStatus',
        'completeVoucherList' => 'getCompleteVoucherList',
        'gmtBizEnd' => 'getGmtBizEnd',
        'gmtBizStart' => 'getGmtBizStart',
        'statusShowContent' => 'getStatusShowContent',
        'summaryId' => 'getSummaryId',
        'userId' => 'getUserId'
    ];

    /**
     * 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['accountId'] = $data['accountId'] ?? null;
        $this->container['applyDate'] = $data['applyDate'] ?? null;
        $this->container['batchId'] = $data['batchId'] ?? null;
        $this->container['batchStatus'] = $data['batchStatus'] ?? null;
        $this->container['completeVoucherList'] = $data['completeVoucherList'] ?? null;
        $this->container['gmtBizEnd'] = $data['gmtBizEnd'] ?? null;
        $this->container['gmtBizStart'] = $data['gmtBizStart'] ?? null;
        $this->container['statusShowContent'] = $data['statusShowContent'] ?? null;
        $this->container['summaryId'] = $data['summaryId'] ?? null;
        $this->container['userId'] = $data['userId'] ?? 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 accountId
     *
     * @return string|null
     */
    public function getAccountId()
    {
        return $this->container['accountId'];
    }

    /**
     * Sets accountId
     *
     * @param string|null $accountId 企业汇总场景下，即企业ID
     *
     * @return self
     */
    public function setAccountId($accountId)
    {
        $this->container['accountId'] = $accountId;

        return $this;
    }

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

    /**
     * Sets applyDate
     *
     * @param string|null $applyDate 申请时间
     *
     * @return self
     */
    public function setApplyDate($applyDate)
    {
        $this->container['applyDate'] = $applyDate;

        return $this;
    }

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

    /**
     * Sets batchId
     *
     * @param string|null $batchId 已废弃，开票批次 ID（建议使用summary_id）
     *
     * @return self
     */
    public function setBatchId($batchId)
    {
        $this->container['batchId'] = $batchId;

        return $this;
    }

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

    /**
     * Sets batchStatus
     *
     * @param string|null $batchStatus 批次状态<br/>     INIT：汇总批次初始化状态，未进行汇总<br/>     SUMMARY：汇总批次化汇总完成，汇总金额计算完成<br/>     PROCESS：汇总批次初始化状态，汇总开票申请提交成功<br/>     NOT_SUPPORT：汇总开票商户业务能力不支持<br/>     FAIL：汇总批次申请失败状态<br/>     SUCCESS：汇总批次申请成功状态，此时发票已回传<br/>     MANUAL_CONFIRM：汇总批次人工确认收票<br/>
     *
     * @return self
     */
    public function setBatchStatus($batchStatus)
    {
        $this->container['batchStatus'] = $batchStatus;

        return $this;
    }

    /**
     * Gets completeVoucherList
     *
     * @return \Alipay\OpenAPISDK\Model\CompleteVoucherInfo[]|null
     */
    public function getCompleteVoucherList()
    {
        return $this->container['completeVoucherList'];
    }

    /**
     * Sets completeVoucherList
     *
     * @param \Alipay\OpenAPISDK\Model\CompleteVoucherInfo[]|null $completeVoucherList 发票内容
     *
     * @return self
     */
    public function setCompleteVoucherList($completeVoucherList)
    {
        $this->container['completeVoucherList'] = $completeVoucherList;

        return $this;
    }

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

    /**
     * Sets gmtBizEnd
     *
     * @param string|null $gmtBizEnd 账期结束时间
     *
     * @return self
     */
    public function setGmtBizEnd($gmtBizEnd)
    {
        $this->container['gmtBizEnd'] = $gmtBizEnd;

        return $this;
    }

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

    /**
     * Sets gmtBizStart
     *
     * @param string|null $gmtBizStart 账期起始时间
     *
     * @return self
     */
    public function setGmtBizStart($gmtBizStart)
    {
        $this->container['gmtBizStart'] = $gmtBizStart;

        return $this;
    }

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

    /**
     * Sets statusShowContent
     *
     * @param string|null $statusShowContent 状态对应的展示明细内容<br/>     初始化<br/>     汇总完成<br/>     开票中...<br/>     不支持开票<br/>     开票失败<br/>     已开票<br/>     确认已收票<br/>
     *
     * @return self
     */
    public function setStatusShowContent($statusShowContent)
    {
        $this->container['statusShowContent'] = $statusShowContent;

        return $this;
    }

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

    /**
     * Sets summaryId
     *
     * @param string|null $summaryId 开票批次 ID
     *
     * @return self
     */
    public function setSummaryId($summaryId)
    {
        $this->container['summaryId'] = $summaryId;

        return $this;
    }

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

    /**
     * Sets userId
     *
     * @param string|null $userId 企业汇总场景下，即企业ID（请使用account_id）
     *
     * @return self
     */
    public function setUserId($userId)
    {
        $this->container['userId'] = $userId;

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


