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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'attachmentExplain' => '\Alipay\OpenAPISDK\Model\AttachmentExplainBean',
        'autoArchive' => 'bool',
        'collectAttachement' => 'bool',
        'companyNo' => 'string',
        'contractValidity' => 'int',
        'jumpUrl' => 'string',
        'merchantMiniSignUrl' => 'string',
        'noticeDeveloperUrl' => 'string',
        'platformOrderNo' => 'string',
        'serialNo' => 'string',
        'signModel' => 'int',
        'specifyAttachmentInfos' => '\Alipay\OpenAPISDK\Model\SpecifyAttachmentInfo[]'
    ];

    /**
      * 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 = [
        'attachmentExplain' => null,
        'autoArchive' => null,
        'collectAttachement' => null,
        'companyNo' => null,
        'contractValidity' => null,
        'jumpUrl' => null,
        'merchantMiniSignUrl' => null,
        'noticeDeveloperUrl' => null,
        'platformOrderNo' => null,
        'serialNo' => null,
        'signModel' => null,
        'specifyAttachmentInfos' => 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 = [
        'attachmentExplain' => 'attachment_explain',
        'autoArchive' => 'auto_archive',
        'collectAttachement' => 'collect_attachement',
        'companyNo' => 'company_no',
        'contractValidity' => 'contract_validity',
        'jumpUrl' => 'jump_url',
        'merchantMiniSignUrl' => 'merchant_mini_sign_url',
        'noticeDeveloperUrl' => 'notice_developer_url',
        'platformOrderNo' => 'platform_order_no',
        'serialNo' => 'serial_no',
        'signModel' => 'sign_model',
        'specifyAttachmentInfos' => 'specify_attachment_infos'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'attachmentExplain' => 'setAttachmentExplain',
        'autoArchive' => 'setAutoArchive',
        'collectAttachement' => 'setCollectAttachement',
        'companyNo' => 'setCompanyNo',
        'contractValidity' => 'setContractValidity',
        'jumpUrl' => 'setJumpUrl',
        'merchantMiniSignUrl' => 'setMerchantMiniSignUrl',
        'noticeDeveloperUrl' => 'setNoticeDeveloperUrl',
        'platformOrderNo' => 'setPlatformOrderNo',
        'serialNo' => 'setSerialNo',
        'signModel' => 'setSignModel',
        'specifyAttachmentInfos' => 'setSpecifyAttachmentInfos'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'attachmentExplain' => 'getAttachmentExplain',
        'autoArchive' => 'getAutoArchive',
        'collectAttachement' => 'getCollectAttachement',
        'companyNo' => 'getCompanyNo',
        'contractValidity' => 'getContractValidity',
        'jumpUrl' => 'getJumpUrl',
        'merchantMiniSignUrl' => 'getMerchantMiniSignUrl',
        'noticeDeveloperUrl' => 'getNoticeDeveloperUrl',
        'platformOrderNo' => 'getPlatformOrderNo',
        'serialNo' => 'getSerialNo',
        'signModel' => 'getSignModel',
        'specifyAttachmentInfos' => 'getSpecifyAttachmentInfos'
    ];

    /**
     * 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['attachmentExplain'] = $data['attachmentExplain'] ?? null;
        $this->container['autoArchive'] = $data['autoArchive'] ?? null;
        $this->container['collectAttachement'] = $data['collectAttachement'] ?? null;
        $this->container['companyNo'] = $data['companyNo'] ?? null;
        $this->container['contractValidity'] = $data['contractValidity'] ?? null;
        $this->container['jumpUrl'] = $data['jumpUrl'] ?? null;
        $this->container['merchantMiniSignUrl'] = $data['merchantMiniSignUrl'] ?? null;
        $this->container['noticeDeveloperUrl'] = $data['noticeDeveloperUrl'] ?? null;
        $this->container['platformOrderNo'] = $data['platformOrderNo'] ?? null;
        $this->container['serialNo'] = $data['serialNo'] ?? null;
        $this->container['signModel'] = $data['signModel'] ?? null;
        $this->container['specifyAttachmentInfos'] = $data['specifyAttachmentInfos'] ?? 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 attachmentExplain
     *
     * @return \Alipay\OpenAPISDK\Model\AttachmentExplainBean|null
     */
    public function getAttachmentExplain()
    {
        return $this->container['attachmentExplain'];
    }

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

        return $this;
    }

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

    /**
     * Sets autoArchive
     *
     * @param bool|null $autoArchive 签署完成是否自动归档，默认true，如果false，则归档需要调用签署流程归档接口
     *
     * @return self
     */
    public function setAutoArchive($autoArchive)
    {
        $this->container['autoArchive'] = $autoArchive;

        return $this;
    }

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

    /**
     * Sets collectAttachement
     *
     * @param bool|null $collectAttachement 是否收集附件（需签署人上传身份证或者其他文件的，需设置为true）
     *
     * @return self
     */
    public function setCollectAttachement($collectAttachement)
    {
        $this->container['collectAttachement'] = $collectAttachement;

        return $this;
    }

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

    /**
     * Sets companyNo
     *
     * @param string|null $companyNo 物流公司编号（目前仅支持顺丰\"SF\"） 注：避免影响生产订单，联调及测试环境请传入SF_TEST。
     *
     * @return self
     */
    public function setCompanyNo($companyNo)
    {
        $this->container['companyNo'] = $companyNo;

        return $this;
    }

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

    /**
     * Sets contractValidity
     *
     * @param int|null $contractValidity 合同过期时间：该参数设置的时间若到期，则会触发流程文件过期通知
     *
     * @return self
     */
    public function setContractValidity($contractValidity)
    {
        $this->container['contractValidity'] = $contractValidity;

        return $this;
    }

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

    /**
     * Sets jumpUrl
     *
     * @param string|null $jumpUrl 签署完成后跳转商户小程序的地址（signModel字段值为2时 选填）
     *
     * @return self
     */
    public function setJumpUrl($jumpUrl)
    {
        $this->container['jumpUrl'] = $jumpUrl;

        return $this;
    }

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

    /**
     * Sets merchantMiniSignUrl
     *
     * @param string|null $merchantMiniSignUrl 商户小程序签署地址（signModel字段值为1时 必填）
     *
     * @return self
     */
    public function setMerchantMiniSignUrl($merchantMiniSignUrl)
    {
        $this->container['merchantMiniSignUrl'] = $merchantMiniSignUrl;

        return $this;
    }

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

    /**
     * Sets noticeDeveloperUrl
     *
     * @param string|null $noticeDeveloperUrl https://esign.cn/callback
     *
     * @return self
     */
    public function setNoticeDeveloperUrl($noticeDeveloperUrl)
    {
        $this->container['noticeDeveloperUrl'] = $noticeDeveloperUrl;

        return $this;
    }

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

    /**
     * Sets platformOrderNo
     *
     * @param string|null $platformOrderNo 平台订单号，可将商户订单与电子合同进行关联。用户通过支付宝官方小程序 合同管家 查看合同时，可快速进入商家的小程序及对应的订单详情页，为商家的小程序提供了流量入口，提高用户的活跃度和留存率；
     *
     * @return self
     */
    public function setPlatformOrderNo($platformOrderNo)
    {
        $this->container['platformOrderNo'] = $platformOrderNo;

        return $this;
    }

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

    /**
     * Sets serialNo
     *
     * @param string|null $serialNo 12或15位物流单号
     *
     * @return self
     */
    public function setSerialNo($serialNo)
    {
        $this->container['serialNo'] = $serialNo;

        return $this;
    }

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

    /**
     * Sets signModel
     *
     * @param int|null $signModel 快递扫码签收方式： 1-商户小程序：扫码后跳转商户小程序进行签收； 0-e签宝小程序：如商户没有支付宝小程序，可使用e签宝小程序完成签收。
     *
     * @return self
     */
    public function setSignModel($signModel)
    {
        $this->container['signModel'] = $signModel;

        return $this;
    }

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

    /**
     * Sets specifyAttachmentInfos
     *
     * @param \Alipay\OpenAPISDK\Model\SpecifyAttachmentInfo[]|null $specifyAttachmentInfos 指定签署人需要上传的附件列表，例如：A、B、C三方签署，A需上传附件1，B需指定附件2，C需上传附件1,2,3
     *
     * @return self
     */
    public function setSpecifyAttachmentInfos($specifyAttachmentInfos)
    {
        $this->container['specifyAttachmentInfos'] = $specifyAttachmentInfos;

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


