v3/src/Model/AlipayOpenSpIsvOperationSyncModel.php
<?php
/**
 * AlipayOpenSpIsvOperationSyncModel
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'customerType' => 'string',
        'extInfo' => '\Alipay\OpenAPISDK\Model\OperationResultExtInfo',
        'implementEndTime' => 'string',
        'implementObjectName' => 'string',
        'implementPlace' => 'string',
        'implementResult' => 'string',
        'implementResultImage' => 'string',
        'implementResultRemark' => 'string',
        'implementStartTime' => 'string',
        'itemCode' => 'string',
        'itemPrice' => 'string',
        'merchantPid' => 'string',
        'miniAppid' => 'string',
        'opporId' => 'string',
        'orderId' => 'string',
        'outBizNo' => 'string',
        'promotorPid' => 'string',
        'shopId' => 'string',
        'subPromotorPid' => '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 = [
        'customerType' => null,
        'extInfo' => null,
        'implementEndTime' => null,
        'implementObjectName' => null,
        'implementPlace' => null,
        'implementResult' => null,
        'implementResultImage' => null,
        'implementResultRemark' => null,
        'implementStartTime' => null,
        'itemCode' => null,
        'itemPrice' => null,
        'merchantPid' => null,
        'miniAppid' => null,
        'opporId' => null,
        'orderId' => null,
        'outBizNo' => null,
        'promotorPid' => null,
        'shopId' => null,
        'subPromotorPid' => 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 = [
        'customerType' => 'customer_type',
        'extInfo' => 'ext_info',
        'implementEndTime' => 'implement_end_time',
        'implementObjectName' => 'implement_object_name',
        'implementPlace' => 'implement_place',
        'implementResult' => 'implement_result',
        'implementResultImage' => 'implement_result_image',
        'implementResultRemark' => 'implement_result_remark',
        'implementStartTime' => 'implement_start_time',
        'itemCode' => 'item_code',
        'itemPrice' => 'item_price',
        'merchantPid' => 'merchant_pid',
        'miniAppid' => 'mini_appid',
        'opporId' => 'oppor_id',
        'orderId' => 'order_id',
        'outBizNo' => 'out_biz_no',
        'promotorPid' => 'promotor_pid',
        'shopId' => 'shop_id',
        'subPromotorPid' => 'sub_promotor_pid'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'customerType' => 'setCustomerType',
        'extInfo' => 'setExtInfo',
        'implementEndTime' => 'setImplementEndTime',
        'implementObjectName' => 'setImplementObjectName',
        'implementPlace' => 'setImplementPlace',
        'implementResult' => 'setImplementResult',
        'implementResultImage' => 'setImplementResultImage',
        'implementResultRemark' => 'setImplementResultRemark',
        'implementStartTime' => 'setImplementStartTime',
        'itemCode' => 'setItemCode',
        'itemPrice' => 'setItemPrice',
        'merchantPid' => 'setMerchantPid',
        'miniAppid' => 'setMiniAppid',
        'opporId' => 'setOpporId',
        'orderId' => 'setOrderId',
        'outBizNo' => 'setOutBizNo',
        'promotorPid' => 'setPromotorPid',
        'shopId' => 'setShopId',
        'subPromotorPid' => 'setSubPromotorPid'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'customerType' => 'getCustomerType',
        'extInfo' => 'getExtInfo',
        'implementEndTime' => 'getImplementEndTime',
        'implementObjectName' => 'getImplementObjectName',
        'implementPlace' => 'getImplementPlace',
        'implementResult' => 'getImplementResult',
        'implementResultImage' => 'getImplementResultImage',
        'implementResultRemark' => 'getImplementResultRemark',
        'implementStartTime' => 'getImplementStartTime',
        'itemCode' => 'getItemCode',
        'itemPrice' => 'getItemPrice',
        'merchantPid' => 'getMerchantPid',
        'miniAppid' => 'getMiniAppid',
        'opporId' => 'getOpporId',
        'orderId' => 'getOrderId',
        'outBizNo' => 'getOutBizNo',
        'promotorPid' => 'getPromotorPid',
        'shopId' => 'getShopId',
        'subPromotorPid' => 'getSubPromotorPid'
    ];

    /**
     * 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['customerType'] = $data['customerType'] ?? null;
        $this->container['extInfo'] = $data['extInfo'] ?? null;
        $this->container['implementEndTime'] = $data['implementEndTime'] ?? null;
        $this->container['implementObjectName'] = $data['implementObjectName'] ?? null;
        $this->container['implementPlace'] = $data['implementPlace'] ?? null;
        $this->container['implementResult'] = $data['implementResult'] ?? null;
        $this->container['implementResultImage'] = $data['implementResultImage'] ?? null;
        $this->container['implementResultRemark'] = $data['implementResultRemark'] ?? null;
        $this->container['implementStartTime'] = $data['implementStartTime'] ?? null;
        $this->container['itemCode'] = $data['itemCode'] ?? null;
        $this->container['itemPrice'] = $data['itemPrice'] ?? null;
        $this->container['merchantPid'] = $data['merchantPid'] ?? null;
        $this->container['miniAppid'] = $data['miniAppid'] ?? null;
        $this->container['opporId'] = $data['opporId'] ?? null;
        $this->container['orderId'] = $data['orderId'] ?? null;
        $this->container['outBizNo'] = $data['outBizNo'] ?? null;
        $this->container['promotorPid'] = $data['promotorPid'] ?? null;
        $this->container['shopId'] = $data['shopId'] ?? null;
        $this->container['subPromotorPid'] = $data['subPromotorPid'] ?? 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 customerType
     *
     * @return string|null
     */
    public function getCustomerType()
    {
        return $this->container['customerType'];
    }

    /**
     * Sets customerType
     *
     * @param string|null $customerType 客户类型，PERSONAL表示个人，ALIPAY_RECOMMEND表示支付宝推荐
     *
     * @return self
     */
    public function setCustomerType($customerType)
    {
        $this->container['customerType'] = $customerType;

        return $this;
    }

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

    /**
     * Sets extInfo
     *
     * @param \Alipay\OpenAPISDK\Model\OperationResultExtInfo|null $extInfo extInfo
     *
     * @return self
     */
    public function setExtInfo($extInfo)
    {
        $this->container['extInfo'] = $extInfo;

        return $this;
    }

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

    /**
     * Sets implementEndTime
     *
     * @param string|null $implementEndTime 实施结束时间
     *
     * @return self
     */
    public function setImplementEndTime($implementEndTime)
    {
        $this->container['implementEndTime'] = $implementEndTime;

        return $this;
    }

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

    /**
     * Sets implementObjectName
     *
     * @param string|null $implementObjectName 实施对象名称
     *
     * @return self
     */
    public function setImplementObjectName($implementObjectName)
    {
        $this->container['implementObjectName'] = $implementObjectName;

        return $this;
    }

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

    /**
     * Sets implementPlace
     *
     * @param string|null $implementPlace 实施地点
     *
     * @return self
     */
    public function setImplementPlace($implementPlace)
    {
        $this->container['implementPlace'] = $implementPlace;

        return $this;
    }

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

    /**
     * Sets implementResult
     *
     * @param string|null $implementResult 实施结果，SUCCESS表示实施成功，FAIL表示实施失败
     *
     * @return self
     */
    public function setImplementResult($implementResult)
    {
        $this->container['implementResult'] = $implementResult;

        return $this;
    }

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

    /**
     * Sets implementResultImage
     *
     * @param string|null $implementResultImage 实施结果的照片
     *
     * @return self
     */
    public function setImplementResultImage($implementResultImage)
    {
        $this->container['implementResultImage'] = $implementResultImage;

        return $this;
    }

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

    /**
     * Sets implementResultRemark
     *
     * @param string|null $implementResultRemark 实施结果的备注
     *
     * @return self
     */
    public function setImplementResultRemark($implementResultRemark)
    {
        $this->container['implementResultRemark'] = $implementResultRemark;

        return $this;
    }

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

    /**
     * Sets implementStartTime
     *
     * @param string|null $implementStartTime 实施开始时间
     *
     * @return self
     */
    public function setImplementStartTime($implementStartTime)
    {
        $this->container['implementStartTime'] = $implementStartTime;

        return $this;
    }

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

    /**
     * Sets itemCode
     *
     * @param string|null $itemCode 服务优选商品编码
     *
     * @return self
     */
    public function setItemCode($itemCode)
    {
        $this->container['itemCode'] = $itemCode;

        return $this;
    }

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

    /**
     * Sets itemPrice
     *
     * @param string|null $itemPrice 商品价格，这里填写的是整数，单位为分，比如1元，那么输入100
     *
     * @return self
     */
    public function setItemPrice($itemPrice)
    {
        $this->container['itemPrice'] = $itemPrice;

        return $this;
    }

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

    /**
     * Sets merchantPid
     *
     * @param string|null $merchantPid 商户pid
     *
     * @return self
     */
    public function setMerchantPid($merchantPid)
    {
        $this->container['merchantPid'] = $merchantPid;

        return $this;
    }

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

    /**
     * Sets miniAppid
     *
     * @param string|null $miniAppid 商品小程序appid，若推广的商品不为小程序，则不传此参数
     *
     * @return self
     */
    public function setMiniAppid($miniAppid)
    {
        $this->container['miniAppid'] = $miniAppid;

        return $this;
    }

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

    /**
     * Sets opporId
     *
     * @param string|null $opporId 拓展助手中的商机id
     *
     * @return self
     */
    public function setOpporId($opporId)
    {
        $this->container['opporId'] = $opporId;

        return $this;
    }

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

    /**
     * Sets orderId
     *
     * @param string|null $orderId 下单订单号
     *
     * @return self
     */
    public function setOrderId($orderId)
    {
        $this->container['orderId'] = $orderId;

        return $this;
    }

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

    /**
     * Sets outBizNo
     *
     * @param string|null $outBizNo 外部业务号，传isv系统生成的账单号，需要保证唯一
     *
     * @return self
     */
    public function setOutBizNo($outBizNo)
    {
        $this->container['outBizNo'] = $outBizNo;

        return $this;
    }

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

    /**
     * Sets promotorPid
     *
     * @param string|null $promotorPid 推广服务商(S2)pid
     *
     * @return self
     */
    public function setPromotorPid($promotorPid)
    {
        $this->container['promotorPid'] = $promotorPid;

        return $this;
    }

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

    /**
     * Sets shopId
     *
     * @param string|null $shopId 店铺id
     *
     * @return self
     */
    public function setShopId($shopId)
    {
        $this->container['shopId'] = $shopId;

        return $this;
    }

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

    /**
     * Sets subPromotorPid
     *
     * @param string|null $subPromotorPid 推广服务商(S2)子账号pid
     *
     * @return self
     */
    public function setSubPromotorPid($subPromotorPid)
    {
        $this->container['subPromotorPid'] = $subPromotorPid;

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


