<?php
/**
 * BusinessParams
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'actualOrderTime' => 'string',
        'campusCard' => 'string',
        'cardType' => 'string',
        'enterprisePayAmount' => 'string',
        'enterprisePayInfo' => 'string',
        'goodTaxes' => 'string',
        'mcCreateTradeIp' => 'string',
        'tinyAppMerchantBizType' => '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 = [
        'actualOrderTime' => null,
        'campusCard' => null,
        'cardType' => null,
        'enterprisePayAmount' => null,
        'enterprisePayInfo' => null,
        'goodTaxes' => null,
        'mcCreateTradeIp' => null,
        'tinyAppMerchantBizType' => 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 = [
        'actualOrderTime' => 'actual_order_time',
        'campusCard' => 'campus_card',
        'cardType' => 'card_type',
        'enterprisePayAmount' => 'enterprise_pay_amount',
        'enterprisePayInfo' => 'enterprise_pay_info',
        'goodTaxes' => 'good_taxes',
        'mcCreateTradeIp' => 'mc_create_trade_ip',
        'tinyAppMerchantBizType' => 'tiny_app_merchant_biz_type'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'actualOrderTime' => 'setActualOrderTime',
        'campusCard' => 'setCampusCard',
        'cardType' => 'setCardType',
        'enterprisePayAmount' => 'setEnterprisePayAmount',
        'enterprisePayInfo' => 'setEnterprisePayInfo',
        'goodTaxes' => 'setGoodTaxes',
        'mcCreateTradeIp' => 'setMcCreateTradeIp',
        'tinyAppMerchantBizType' => 'setTinyAppMerchantBizType'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'actualOrderTime' => 'getActualOrderTime',
        'campusCard' => 'getCampusCard',
        'cardType' => 'getCardType',
        'enterprisePayAmount' => 'getEnterprisePayAmount',
        'enterprisePayInfo' => 'getEnterprisePayInfo',
        'goodTaxes' => 'getGoodTaxes',
        'mcCreateTradeIp' => 'getMcCreateTradeIp',
        'tinyAppMerchantBizType' => 'getTinyAppMerchantBizType'
    ];

    /**
     * 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['actualOrderTime'] = $data['actualOrderTime'] ?? null;
        $this->container['campusCard'] = $data['campusCard'] ?? null;
        $this->container['cardType'] = $data['cardType'] ?? null;
        $this->container['enterprisePayAmount'] = $data['enterprisePayAmount'] ?? null;
        $this->container['enterprisePayInfo'] = $data['enterprisePayInfo'] ?? null;
        $this->container['goodTaxes'] = $data['goodTaxes'] ?? null;
        $this->container['mcCreateTradeIp'] = $data['mcCreateTradeIp'] ?? null;
        $this->container['tinyAppMerchantBizType'] = $data['tinyAppMerchantBizType'] ?? 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 actualOrderTime
     *
     * @return string|null
     */
    public function getActualOrderTime()
    {
        return $this->container['actualOrderTime'];
    }

    /**
     * Sets actualOrderTime
     *
     * @param string|null $actualOrderTime 实际订单时间，在乘车码场景，传入的是用户刷码乘车时间
     *
     * @return self
     */
    public function setActualOrderTime($actualOrderTime)
    {
        $this->container['actualOrderTime'] = $actualOrderTime;

        return $this;
    }

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

    /**
     * Sets campusCard
     *
     * @param string|null $campusCard 校园卡编号
     *
     * @return self
     */
    public function setCampusCard($campusCard)
    {
        $this->container['campusCard'] = $campusCard;

        return $this;
    }

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

    /**
     * Sets cardType
     *
     * @param string|null $cardType 虚拟卡卡类型
     *
     * @return self
     */
    public function setCardType($cardType)
    {
        $this->container['cardType'] = $cardType;

        return $this;
    }

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

    /**
     * Sets enterprisePayAmount
     *
     * @param string|null $enterprisePayAmount 因公付金额，单位：元。
     *
     * @return self
     */
    public function setEnterprisePayAmount($enterprisePayAmount)
    {
        $this->container['enterprisePayAmount'] = $enterprisePayAmount;

        return $this;
    }

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

    /**
     * Sets enterprisePayInfo
     *
     * @param string|null $enterprisePayInfo 因公付业务信息
     *
     * @return self
     */
    public function setEnterprisePayInfo($enterprisePayInfo)
    {
        $this->container['enterprisePayInfo'] = $enterprisePayInfo;

        return $this;
    }

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

    /**
     * Sets goodTaxes
     *
     * @param string|null $goodTaxes 商户传入的交易税费。需要落地风控使用
     *
     * @return self
     */
    public function setGoodTaxes($goodTaxes)
    {
        $this->container['goodTaxes'] = $goodTaxes;

        return $this;
    }

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

    /**
     * Sets mcCreateTradeIp
     *
     * @param string|null $mcCreateTradeIp 商户端创建订单的 IP，须上传正确的用户端外网 IP，支持 ipv4/ipv6 格式； mc_create_trade_ip和mcCreateTradeIp（旧）参数描述相同，首选mc_create_trade_ip入参，请勿重复入参； 如已入参mcCreateTradeIp（旧），无需新增入参mc_create_trade_ip。
     *
     * @return self
     */
    public function setMcCreateTradeIp($mcCreateTradeIp)
    {
        $this->container['mcCreateTradeIp'] = $mcCreateTradeIp;

        return $this;
    }

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

    /**
     * Sets tinyAppMerchantBizType
     *
     * @param string|null $tinyAppMerchantBizType 当需要在 商家平台（b.alipay.com）—数据中心 中查看对应业务场景下的数据明细可以通过该参数传入 支持传入的值：<a target=\"_blank\" href=\"https://opendocs.alipay.com/mini/08by8k?pathHash=96e03412\">小程序细分业务场景</a>
     *
     * @return self
     */
    public function setTinyAppMerchantBizType($tinyAppMerchantBizType)
    {
        $this->container['tinyAppMerchantBizType'] = $tinyAppMerchantBizType;

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


