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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accountId' => 'string',
        'adapterType' => 'string',
        'agreementNo' => 'string',
        'consultMode' => 'string',
        'currency' => 'string',
        'effectiveEndDate' => 'string',
        'effectiveStartDate' => 'string',
        'enterpriseId' => 'string',
        'expenseType' => 'string',
        'institutionDesc' => 'string',
        'institutionName' => 'string',
        'institutionScopeInfo' => '\Alipay\OpenAPISDK\Model\InstitutionScopeInfo',
        'issueRuleInfoList' => '\Alipay\OpenAPISDK\Model\IssueRuleInfo[]',
        'multiEmployeeShareMode' => 'string',
        'outerSourceId' => 'string',
        'ownerIdList' => 'string[]',
        'ownerOpenIdList' => 'string[]',
        'ownerType' => 'string',
        'sceneType' => 'string',
        'standardInfoList' => '\Alipay\OpenAPISDK\Model\StandardInfo[]'
    ];

    /**
      * 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,
        'adapterType' => null,
        'agreementNo' => null,
        'consultMode' => null,
        'currency' => null,
        'effectiveEndDate' => null,
        'effectiveStartDate' => null,
        'enterpriseId' => null,
        'expenseType' => null,
        'institutionDesc' => null,
        'institutionName' => null,
        'institutionScopeInfo' => null,
        'issueRuleInfoList' => null,
        'multiEmployeeShareMode' => null,
        'outerSourceId' => null,
        'ownerIdList' => null,
        'ownerOpenIdList' => null,
        'ownerType' => null,
        'sceneType' => null,
        'standardInfoList' => 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',
        'adapterType' => 'adapter_type',
        'agreementNo' => 'agreement_no',
        'consultMode' => 'consult_mode',
        'currency' => 'currency',
        'effectiveEndDate' => 'effective_end_date',
        'effectiveStartDate' => 'effective_start_date',
        'enterpriseId' => 'enterprise_id',
        'expenseType' => 'expense_type',
        'institutionDesc' => 'institution_desc',
        'institutionName' => 'institution_name',
        'institutionScopeInfo' => 'institution_scope_info',
        'issueRuleInfoList' => 'issue_rule_info_list',
        'multiEmployeeShareMode' => 'multi_employee_share_mode',
        'outerSourceId' => 'outer_source_id',
        'ownerIdList' => 'owner_id_list',
        'ownerOpenIdList' => 'owner_open_id_list',
        'ownerType' => 'owner_type',
        'sceneType' => 'scene_type',
        'standardInfoList' => 'standard_info_list'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accountId' => 'setAccountId',
        'adapterType' => 'setAdapterType',
        'agreementNo' => 'setAgreementNo',
        'consultMode' => 'setConsultMode',
        'currency' => 'setCurrency',
        'effectiveEndDate' => 'setEffectiveEndDate',
        'effectiveStartDate' => 'setEffectiveStartDate',
        'enterpriseId' => 'setEnterpriseId',
        'expenseType' => 'setExpenseType',
        'institutionDesc' => 'setInstitutionDesc',
        'institutionName' => 'setInstitutionName',
        'institutionScopeInfo' => 'setInstitutionScopeInfo',
        'issueRuleInfoList' => 'setIssueRuleInfoList',
        'multiEmployeeShareMode' => 'setMultiEmployeeShareMode',
        'outerSourceId' => 'setOuterSourceId',
        'ownerIdList' => 'setOwnerIdList',
        'ownerOpenIdList' => 'setOwnerOpenIdList',
        'ownerType' => 'setOwnerType',
        'sceneType' => 'setSceneType',
        'standardInfoList' => 'setStandardInfoList'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accountId' => 'getAccountId',
        'adapterType' => 'getAdapterType',
        'agreementNo' => 'getAgreementNo',
        'consultMode' => 'getConsultMode',
        'currency' => 'getCurrency',
        'effectiveEndDate' => 'getEffectiveEndDate',
        'effectiveStartDate' => 'getEffectiveStartDate',
        'enterpriseId' => 'getEnterpriseId',
        'expenseType' => 'getExpenseType',
        'institutionDesc' => 'getInstitutionDesc',
        'institutionName' => 'getInstitutionName',
        'institutionScopeInfo' => 'getInstitutionScopeInfo',
        'issueRuleInfoList' => 'getIssueRuleInfoList',
        'multiEmployeeShareMode' => 'getMultiEmployeeShareMode',
        'outerSourceId' => 'getOuterSourceId',
        'ownerIdList' => 'getOwnerIdList',
        'ownerOpenIdList' => 'getOwnerOpenIdList',
        'ownerType' => 'getOwnerType',
        'sceneType' => 'getSceneType',
        'standardInfoList' => 'getStandardInfoList'
    ];

    /**
     * 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['adapterType'] = $data['adapterType'] ?? null;
        $this->container['agreementNo'] = $data['agreementNo'] ?? null;
        $this->container['consultMode'] = $data['consultMode'] ?? null;
        $this->container['currency'] = $data['currency'] ?? null;
        $this->container['effectiveEndDate'] = $data['effectiveEndDate'] ?? null;
        $this->container['effectiveStartDate'] = $data['effectiveStartDate'] ?? null;
        $this->container['enterpriseId'] = $data['enterpriseId'] ?? null;
        $this->container['expenseType'] = $data['expenseType'] ?? null;
        $this->container['institutionDesc'] = $data['institutionDesc'] ?? null;
        $this->container['institutionName'] = $data['institutionName'] ?? null;
        $this->container['institutionScopeInfo'] = $data['institutionScopeInfo'] ?? null;
        $this->container['issueRuleInfoList'] = $data['issueRuleInfoList'] ?? null;
        $this->container['multiEmployeeShareMode'] = $data['multiEmployeeShareMode'] ?? null;
        $this->container['outerSourceId'] = $data['outerSourceId'] ?? null;
        $this->container['ownerIdList'] = $data['ownerIdList'] ?? null;
        $this->container['ownerOpenIdList'] = $data['ownerOpenIdList'] ?? null;
        $this->container['ownerType'] = $data['ownerType'] ?? null;
        $this->container['sceneType'] = $data['sceneType'] ?? null;
        $this->container['standardInfoList'] = $data['standardInfoList'] ?? 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
     * @deprecated
     */
    public function getAccountId()
    {
        return $this->container['accountId'];
    }

    /**
     * Sets accountId
     *
     * @param string|null $accountId 企业共同账户id（该字段将废弃，不建议使用，可用enterprise_id字段替换）(该字段将废弃，不建议使用，可用enterprise_id字段替换)
     *
     * @return self
     * @deprecated
     */
    public function setAccountId($accountId)
    {
        $this->container['accountId'] = $accountId;

        return $this;
    }

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

    /**
     * Sets adapterType
     *
     * @param string|null $adapterType 制度适配范围(请使用institution_scope_info中adapter_type)
     *
     * @return self
     * @deprecated
     */
    public function setAdapterType($adapterType)
    {
        $this->container['adapterType'] = $adapterType;

        return $this;
    }

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

    /**
     * Sets agreementNo
     *
     * @param string|null $agreementNo 授权签约协议号（该字段将废弃，不建议使用，可用enterprise_id字段替换）(该字段将废弃，不建议使用，可用enterprise_id字段替换)
     *
     * @return self
     * @deprecated
     */
    public function setAgreementNo($agreementNo)
    {
        $this->container['agreementNo'] = $agreementNo;

        return $this;
    }

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

    /**
     * Sets consultMode
     *
     * @param string|null $consultMode 费控咨询模式，默认为0。
     *
     * @return self
     */
    public function setConsultMode($consultMode)
    {
        $this->container['consultMode'] = $consultMode;

        return $this;
    }

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

    /**
     * Sets currency
     *
     * @param string|null $currency 该字段用于管控制度下发放的资产币种，不填写默认为人民币，设置该字段后，制度下手工发放的资产币种均为设置值。
     *
     * @return self
     */
    public function setCurrency($currency)
    {
        $this->container['currency'] = $currency;

        return $this;
    }

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

    /**
     * Sets effectiveEndDate
     *
     * @param string|null $effectiveEndDate 制度生效结束时间
     *
     * @return self
     */
    public function setEffectiveEndDate($effectiveEndDate)
    {
        $this->container['effectiveEndDate'] = $effectiveEndDate;

        return $this;
    }

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

    /**
     * Sets effectiveStartDate
     *
     * @param string|null $effectiveStartDate 制度生效起始时间
     *
     * @return self
     */
    public function setEffectiveStartDate($effectiveStartDate)
    {
        $this->container['effectiveStartDate'] = $effectiveStartDate;

        return $this;
    }

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

    /**
     * Sets enterpriseId
     *
     * @param string|null $enterpriseId 企业id
     *
     * @return self
     */
    public function setEnterpriseId($enterpriseId)
    {
        $this->container['enterpriseId'] = $enterpriseId;

        return $this;
    }

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

    /**
     * Sets expenseType
     *
     * @param string|null $expenseType 费用类型
     *
     * @return self
     */
    public function setExpenseType($expenseType)
    {
        $this->container['expenseType'] = $expenseType;

        return $this;
    }

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

    /**
     * Sets institutionDesc
     *
     * @param string|null $institutionDesc 制度描述
     *
     * @return self
     */
    public function setInstitutionDesc($institutionDesc)
    {
        $this->container['institutionDesc'] = $institutionDesc;

        return $this;
    }

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

    /**
     * Sets institutionName
     *
     * @param string|null $institutionName 制度名称
     *
     * @return self
     */
    public function setInstitutionName($institutionName)
    {
        $this->container['institutionName'] = $institutionName;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets issueRuleInfoList
     *
     * @param \Alipay\OpenAPISDK\Model\IssueRuleInfo[]|null $issueRuleInfoList 发放规则列表
     *
     * @return self
     */
    public function setIssueRuleInfoList($issueRuleInfoList)
    {
        $this->container['issueRuleInfoList'] = $issueRuleInfoList;

        return $this;
    }

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

    /**
     * Sets multiEmployeeShareMode
     *
     * @param string|null $multiEmployeeShareMode 制度下额度是否支持多人共享。如果支持，则制度下资产所有人共享；如果不支持，则制度下的资产为个人资产，成员之间不共享。
     *
     * @return self
     */
    public function setMultiEmployeeShareMode($multiEmployeeShareMode)
    {
        $this->container['multiEmployeeShareMode'] = $multiEmployeeShareMode;

        return $this;
    }

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

    /**
     * Sets outerSourceId
     *
     * @param string|null $outerSourceId 外部唯一标识，可用于防止重复创建
     *
     * @return self
     */
    public function setOuterSourceId($outerSourceId)
    {
        $this->container['outerSourceId'] = $outerSourceId;

        return $this;
    }

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

    /**
     * Sets ownerIdList
     *
     * @param string[]|null $ownerIdList 适配id列表(请使用institution_scope_info中owner_id_list)
     *
     * @return self
     * @deprecated
     */
    public function setOwnerIdList($ownerIdList)
    {
        $this->container['ownerIdList'] = $ownerIdList;

        return $this;
    }

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

    /**
     * Sets ownerOpenIdList
     *
     * @param string[]|null $ownerOpenIdList 适配开放id列表(仅存量使用员工支付宝id配置适配范围的场景需要该字段，新对接方案不推荐使用员工支付宝id)
     *
     * @return self
     * @deprecated
     */
    public function setOwnerOpenIdList($ownerOpenIdList)
    {
        $this->container['ownerOpenIdList'] = $ownerOpenIdList;

        return $this;
    }

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

    /**
     * Sets ownerType
     *
     * @param string|null $ownerType 适配id类型(请使用institution_scope_info中owner_type)
     *
     * @return self
     * @deprecated
     */
    public function setOwnerType($ownerType)
    {
        $this->container['ownerType'] = $ownerType;

        return $this;
    }

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

    /**
     * Sets sceneType
     *
     * @param string|null $sceneType 因公场景(该字段将废弃，不建议使用)
     *
     * @return self
     * @deprecated
     */
    public function setSceneType($sceneType)
    {
        $this->container['sceneType'] = $sceneType;

        return $this;
    }

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

    /**
     * Sets standardInfoList
     *
     * @param \Alipay\OpenAPISDK\Model\StandardInfo[]|null $standardInfoList 使用规则列表
     *
     * @return self
     */
    public function setStandardInfoList($standardInfoList)
    {
        $this->container['standardInfoList'] = $standardInfoList;

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


