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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accountingEntityIds' => 'string[]',
        'createShareCode' => 'bool',
        'departmentIds' => 'string[]',
        'employeeCertNo' => 'string',
        'employeeCertType' => 'string',
        'employeeEmail' => 'string',
        'employeeMobile' => 'string',
        'employeeName' => 'string',
        'employeeNo' => 'string',
        'encryptCertNo' => 'string',
        'encryptMobile' => 'string',
        'enterpriseId' => 'string',
        'freeSignToken' => 'string',
        'identity' => 'string',
        'identityOpenId' => 'string',
        'identityType' => 'string',
        'iotCheckType' => 'string',
        'iotVid' => 'string',
        'labelNames' => 'string[]',
        'profiles' => 'string',
        'roleList' => 'string[]',
        'signReturnUrl' => 'string',
        'signUrlCarryInfo' => 'bool',
        'withholdingSignStr' => '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 = [
        'accountingEntityIds' => null,
        'createShareCode' => null,
        'departmentIds' => null,
        'employeeCertNo' => null,
        'employeeCertType' => null,
        'employeeEmail' => null,
        'employeeMobile' => null,
        'employeeName' => null,
        'employeeNo' => null,
        'encryptCertNo' => null,
        'encryptMobile' => null,
        'enterpriseId' => null,
        'freeSignToken' => null,
        'identity' => null,
        'identityOpenId' => null,
        'identityType' => null,
        'iotCheckType' => null,
        'iotVid' => null,
        'labelNames' => null,
        'profiles' => null,
        'roleList' => null,
        'signReturnUrl' => null,
        'signUrlCarryInfo' => null,
        'withholdingSignStr' => 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 = [
        'accountingEntityIds' => 'accounting_entity_ids',
        'createShareCode' => 'create_share_code',
        'departmentIds' => 'department_ids',
        'employeeCertNo' => 'employee_cert_no',
        'employeeCertType' => 'employee_cert_type',
        'employeeEmail' => 'employee_email',
        'employeeMobile' => 'employee_mobile',
        'employeeName' => 'employee_name',
        'employeeNo' => 'employee_no',
        'encryptCertNo' => 'encrypt_cert_no',
        'encryptMobile' => 'encrypt_mobile',
        'enterpriseId' => 'enterprise_id',
        'freeSignToken' => 'free_sign_token',
        'identity' => 'identity',
        'identityOpenId' => 'identity_open_id',
        'identityType' => 'identity_type',
        'iotCheckType' => 'iot_check_type',
        'iotVid' => 'iot_vid',
        'labelNames' => 'label_names',
        'profiles' => 'profiles',
        'roleList' => 'role_list',
        'signReturnUrl' => 'sign_return_url',
        'signUrlCarryInfo' => 'sign_url_carry_info',
        'withholdingSignStr' => 'withholding_sign_str'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accountingEntityIds' => 'setAccountingEntityIds',
        'createShareCode' => 'setCreateShareCode',
        'departmentIds' => 'setDepartmentIds',
        'employeeCertNo' => 'setEmployeeCertNo',
        'employeeCertType' => 'setEmployeeCertType',
        'employeeEmail' => 'setEmployeeEmail',
        'employeeMobile' => 'setEmployeeMobile',
        'employeeName' => 'setEmployeeName',
        'employeeNo' => 'setEmployeeNo',
        'encryptCertNo' => 'setEncryptCertNo',
        'encryptMobile' => 'setEncryptMobile',
        'enterpriseId' => 'setEnterpriseId',
        'freeSignToken' => 'setFreeSignToken',
        'identity' => 'setIdentity',
        'identityOpenId' => 'setIdentityOpenId',
        'identityType' => 'setIdentityType',
        'iotCheckType' => 'setIotCheckType',
        'iotVid' => 'setIotVid',
        'labelNames' => 'setLabelNames',
        'profiles' => 'setProfiles',
        'roleList' => 'setRoleList',
        'signReturnUrl' => 'setSignReturnUrl',
        'signUrlCarryInfo' => 'setSignUrlCarryInfo',
        'withholdingSignStr' => 'setWithholdingSignStr'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accountingEntityIds' => 'getAccountingEntityIds',
        'createShareCode' => 'getCreateShareCode',
        'departmentIds' => 'getDepartmentIds',
        'employeeCertNo' => 'getEmployeeCertNo',
        'employeeCertType' => 'getEmployeeCertType',
        'employeeEmail' => 'getEmployeeEmail',
        'employeeMobile' => 'getEmployeeMobile',
        'employeeName' => 'getEmployeeName',
        'employeeNo' => 'getEmployeeNo',
        'encryptCertNo' => 'getEncryptCertNo',
        'encryptMobile' => 'getEncryptMobile',
        'enterpriseId' => 'getEnterpriseId',
        'freeSignToken' => 'getFreeSignToken',
        'identity' => 'getIdentity',
        'identityOpenId' => 'getIdentityOpenId',
        'identityType' => 'getIdentityType',
        'iotCheckType' => 'getIotCheckType',
        'iotVid' => 'getIotVid',
        'labelNames' => 'getLabelNames',
        'profiles' => 'getProfiles',
        'roleList' => 'getRoleList',
        'signReturnUrl' => 'getSignReturnUrl',
        'signUrlCarryInfo' => 'getSignUrlCarryInfo',
        'withholdingSignStr' => 'getWithholdingSignStr'
    ];

    /**
     * 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['accountingEntityIds'] = $data['accountingEntityIds'] ?? null;
        $this->container['createShareCode'] = $data['createShareCode'] ?? null;
        $this->container['departmentIds'] = $data['departmentIds'] ?? null;
        $this->container['employeeCertNo'] = $data['employeeCertNo'] ?? null;
        $this->container['employeeCertType'] = $data['employeeCertType'] ?? null;
        $this->container['employeeEmail'] = $data['employeeEmail'] ?? null;
        $this->container['employeeMobile'] = $data['employeeMobile'] ?? null;
        $this->container['employeeName'] = $data['employeeName'] ?? null;
        $this->container['employeeNo'] = $data['employeeNo'] ?? null;
        $this->container['encryptCertNo'] = $data['encryptCertNo'] ?? null;
        $this->container['encryptMobile'] = $data['encryptMobile'] ?? null;
        $this->container['enterpriseId'] = $data['enterpriseId'] ?? null;
        $this->container['freeSignToken'] = $data['freeSignToken'] ?? null;
        $this->container['identity'] = $data['identity'] ?? null;
        $this->container['identityOpenId'] = $data['identityOpenId'] ?? null;
        $this->container['identityType'] = $data['identityType'] ?? null;
        $this->container['iotCheckType'] = $data['iotCheckType'] ?? null;
        $this->container['iotVid'] = $data['iotVid'] ?? null;
        $this->container['labelNames'] = $data['labelNames'] ?? null;
        $this->container['profiles'] = $data['profiles'] ?? null;
        $this->container['roleList'] = $data['roleList'] ?? null;
        $this->container['signReturnUrl'] = $data['signReturnUrl'] ?? null;
        $this->container['signUrlCarryInfo'] = $data['signUrlCarryInfo'] ?? null;
        $this->container['withholdingSignStr'] = $data['withholdingSignStr'] ?? 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 accountingEntityIds
     *
     * @return string[]|null
     */
    public function getAccountingEntityIds()
    {
        return $this->container['accountingEntityIds'];
    }

    /**
     * Sets accountingEntityIds
     *
     * @param string[]|null $accountingEntityIds 员工所属核算主体，核算主体可用于管控不同员工的出资方式，建议和不同出资账户关联
     *
     * @return self
     */
    public function setAccountingEntityIds($accountingEntityIds)
    {
        $this->container['accountingEntityIds'] = $accountingEntityIds;

        return $this;
    }

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

    /**
     * Sets createShareCode
     *
     * @param bool|null $createShareCode 是否需要生成吱口令，默认不生成
     *
     * @return self
     */
    public function setCreateShareCode($createShareCode)
    {
        $this->container['createShareCode'] = $createShareCode;

        return $this;
    }

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

    /**
     * Sets departmentIds
     *
     * @param string[]|null $departmentIds 员工所属部门，支持多个部门，不传默认为根部门
     *
     * @return self
     */
    public function setDepartmentIds($departmentIds)
    {
        $this->container['departmentIds'] = $departmentIds;

        return $this;
    }

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

    /**
     * Sets employeeCertNo
     *
     * @param string|null $employeeCertNo 员工证件号码
     *
     * @return self
     */
    public function setEmployeeCertNo($employeeCertNo)
    {
        $this->container['employeeCertNo'] = $employeeCertNo;

        return $this;
    }

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

    /**
     * Sets employeeCertType
     *
     * @param string|null $employeeCertType 员工证件类型
     *
     * @return self
     */
    public function setEmployeeCertType($employeeCertType)
    {
        $this->container['employeeCertType'] = $employeeCertType;

        return $this;
    }

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

    /**
     * Sets employeeEmail
     *
     * @param string|null $employeeEmail 员工邮箱
     *
     * @return self
     */
    public function setEmployeeEmail($employeeEmail)
    {
        $this->container['employeeEmail'] = $employeeEmail;

        return $this;
    }

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

    /**
     * Sets employeeMobile
     *
     * @param string|null $employeeMobile 员工手机号
     *
     * @return self
     */
    public function setEmployeeMobile($employeeMobile)
    {
        $this->container['employeeMobile'] = $employeeMobile;

        return $this;
    }

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

    /**
     * Sets employeeName
     *
     * @param string|null $employeeName 员工姓名
     *
     * @return self
     */
    public function setEmployeeName($employeeName)
    {
        $this->container['employeeName'] = $employeeName;

        return $this;
    }

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

    /**
     * Sets employeeNo
     *
     * @param string|null $employeeNo 员工编号/工号
     *
     * @return self
     */
    public function setEmployeeNo($employeeNo)
    {
        $this->container['employeeNo'] = $employeeNo;

        return $this;
    }

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

    /**
     * Sets encryptCertNo
     *
     * @param string|null $encryptCertNo 加密证件号，需与证件类型搭配使用，可替代证件号码(employee_cert_no)字段
     *
     * @return self
     */
    public function setEncryptCertNo($encryptCertNo)
    {
        $this->container['encryptCertNo'] = $encryptCertNo;

        return $this;
    }

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

    /**
     * Sets encryptMobile
     *
     * @param string|null $encryptMobile 加密手机号，可替代手机号(employee_mobile)字段
     *
     * @return self
     */
    public function setEncryptMobile($encryptMobile)
    {
        $this->container['encryptMobile'] = $encryptMobile;

        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 freeSignToken
     *
     * @return string|null
     */
    public function getFreeSignToken()
    {
        return $this->container['freeSignToken'];
    }

    /**
     * Sets freeSignToken
     *
     * @param string|null $freeSignToken 员工签约授权密钥；<br/> 该密钥需联系企业码业务小二申请，当传入密钥有效，则员工添加时会默认签约企业因公付，并激活员工。
     *
     * @return self
     */
    public function setFreeSignToken($freeSignToken)
    {
        $this->container['freeSignToken'] = $freeSignToken;

        return $this;
    }

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

    /**
     * Sets identity
     *
     * @param string|null $identity 员工身份唯一标识
     *
     * @return self
     */
    public function setIdentity($identity)
    {
        $this->container['identity'] = $identity;

        return $this;
    }

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

    /**
     * Sets identityOpenId
     *
     * @param string|null $identityOpenId 当身份类型为支付宝会员ID(identity_type=ALIPAY_USER_ID)时，传入user_id对应的open_id
     *
     * @return self
     */
    public function setIdentityOpenId($identityOpenId)
    {
        $this->container['identityOpenId'] = $identityOpenId;

        return $this;
    }

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

    /**
     * Sets identityType
     *
     * @param string|null $identityType 员工身份类型
     *
     * @return self
     */
    public function setIdentityType($identityType)
    {
        $this->container['identityType'] = $identityType;

        return $this;
    }

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

    /**
     * Sets iotCheckType
     *
     * @param string|null $iotCheckType 员工签约开通企业刷脸付时，刷脸核身的核验方式
     *
     * @return self
     */
    public function setIotCheckType($iotCheckType)
    {
        $this->container['iotCheckType'] = $iotCheckType;

        return $this;
    }

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

    /**
     * Sets iotVid
     *
     * @param string|null $iotVid 员工在企业人脸库的人脸唯一标识（该字段已作废，不支持自定义传入）(iot不支持自定义传入)
     *
     * @return self
     * @deprecated
     */
    public function setIotVid($iotVid)
    {
        $this->container['iotVid'] = $iotVid;

        return $this;
    }

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

    /**
     * Sets labelNames
     *
     * @param string[]|null $labelNames 员工标签，用于员工的打标分类，后续费控管理可使用标签进行控制，支持输入多个标签，如“差旅员工，用餐员工”等；若企业需要将离职员工统一管理且不变更员工状态，可打标“离职员工”
     *
     * @return self
     */
    public function setLabelNames($labelNames)
    {
        $this->container['labelNames'] = $labelNames;

        return $this;
    }

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

    /**
     * Sets profiles
     *
     * @param string|null $profiles 个性化信息 <a href='https://opendocs.alipay.com/pre-open/0ceh47?pathHash=14fac87c'>详见文档</a>
     *
     * @return self
     */
    public function setProfiles($profiles)
    {
        $this->container['profiles'] = $profiles;

        return $this;
    }

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

    /**
     * Sets roleList
     *
     * @param string[]|null $roleList 默认角色列表，目前只支持默认为 USER(目前仅支持普通员工，作为默认值，无需调用方传入)
     *
     * @return self
     * @deprecated
     */
    public function setRoleList($roleList)
    {
        $this->container['roleList'] = $roleList;

        return $this;
    }

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

    /**
     * Sets signReturnUrl
     *
     * @param string|null $signReturnUrl 员工签约后回跳地址；支持 alipay scheme 协议地址，不传默认跳转企业码小程序首页
     *
     * @return self
     */
    public function setSignReturnUrl($signReturnUrl)
    {
        $this->container['signReturnUrl'] = $signReturnUrl;

        return $this;
    }

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

    /**
     * Sets signUrlCarryInfo
     *
     * @param bool|null $signUrlCarryInfo 签约链接页面是否需要自动回显员工的身份信息（手机或邮箱），默认不显示
     *
     * @return self
     */
    public function setSignUrlCarryInfo($signUrlCarryInfo)
    {
        $this->container['signUrlCarryInfo'] = $signUrlCarryInfo;

        return $this;
    }

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

    /**
     * Sets withholdingSignStr
     *
     * @param string|null $withholdingSignStr 代扣签约字符串，员工需签约开通代扣时必传，否则无需传值
     *
     * @return self
     */
    public function setWithholdingSignStr($withholdingSignStr)
    {
        $this->container['withholdingSignStr'] = $withholdingSignStr;

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


