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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accountId' => 'string',
        'adapterType' => 'string',
        'addOwnerIdList' => 'string[]',
        'addOwnerOpenIdList' => 'string[]',
        'agreementNo' => 'string',
        'enterpriseId' => 'string',
        'institutionId' => 'string',
        'ownerType' => 'string',
        'removeOwnerIdList' => 'string[]',
        'removeOwnerOpenIdList' => '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 = [
        'accountId' => null,
        'adapterType' => null,
        'addOwnerIdList' => null,
        'addOwnerOpenIdList' => null,
        'agreementNo' => null,
        'enterpriseId' => null,
        'institutionId' => null,
        'ownerType' => null,
        'removeOwnerIdList' => null,
        'removeOwnerOpenIdList' => 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',
        'addOwnerIdList' => 'add_owner_id_list',
        'addOwnerOpenIdList' => 'add_owner_open_id_list',
        'agreementNo' => 'agreement_no',
        'enterpriseId' => 'enterprise_id',
        'institutionId' => 'institution_id',
        'ownerType' => 'owner_type',
        'removeOwnerIdList' => 'remove_owner_id_list',
        'removeOwnerOpenIdList' => 'remove_owner_open_id_list'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accountId' => 'setAccountId',
        'adapterType' => 'setAdapterType',
        'addOwnerIdList' => 'setAddOwnerIdList',
        'addOwnerOpenIdList' => 'setAddOwnerOpenIdList',
        'agreementNo' => 'setAgreementNo',
        'enterpriseId' => 'setEnterpriseId',
        'institutionId' => 'setInstitutionId',
        'ownerType' => 'setOwnerType',
        'removeOwnerIdList' => 'setRemoveOwnerIdList',
        'removeOwnerOpenIdList' => 'setRemoveOwnerOpenIdList'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accountId' => 'getAccountId',
        'adapterType' => 'getAdapterType',
        'addOwnerIdList' => 'getAddOwnerIdList',
        'addOwnerOpenIdList' => 'getAddOwnerOpenIdList',
        'agreementNo' => 'getAgreementNo',
        'enterpriseId' => 'getEnterpriseId',
        'institutionId' => 'getInstitutionId',
        'ownerType' => 'getOwnerType',
        'removeOwnerIdList' => 'getRemoveOwnerIdList',
        'removeOwnerOpenIdList' => 'getRemoveOwnerOpenIdList'
    ];

    /**
     * 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['addOwnerIdList'] = $data['addOwnerIdList'] ?? null;
        $this->container['addOwnerOpenIdList'] = $data['addOwnerOpenIdList'] ?? null;
        $this->container['agreementNo'] = $data['agreementNo'] ?? null;
        $this->container['enterpriseId'] = $data['enterpriseId'] ?? null;
        $this->container['institutionId'] = $data['institutionId'] ?? null;
        $this->container['ownerType'] = $data['ownerType'] ?? null;
        $this->container['removeOwnerIdList'] = $data['removeOwnerIdList'] ?? null;
        $this->container['removeOwnerOpenIdList'] = $data['removeOwnerOpenIdList'] ?? 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
     */
    public function getAccountId()
    {
        return $this->container['accountId'];
    }

    /**
     * Sets accountId
     *
     * @param string|null $accountId 企业共同账户id
     *
     * @return self
     */
    public function setAccountId($accountId)
    {
        $this->container['accountId'] = $accountId;

        return $this;
    }

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

    /**
     * Sets adapterType
     *
     * @param string|null $adapterType 制度适用范围类型
     *
     * @return self
     */
    public function setAdapterType($adapterType)
    {
        $this->container['adapterType'] = $adapterType;

        return $this;
    }

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

    /**
     * Sets addOwnerIdList
     *
     * @param string[]|null $addOwnerIdList 增加适配id列表
     *
     * @return self
     */
    public function setAddOwnerIdList($addOwnerIdList)
    {
        $this->container['addOwnerIdList'] = $addOwnerIdList;

        return $this;
    }

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

    /**
     * Sets addOwnerOpenIdList
     *
     * @param string[]|null $addOwnerOpenIdList 增加适配开放id列表
     *
     * @return self
     */
    public function setAddOwnerOpenIdList($addOwnerOpenIdList)
    {
        $this->container['addOwnerOpenIdList'] = $addOwnerOpenIdList;

        return $this;
    }

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

    /**
     * Sets agreementNo
     *
     * @param string|null $agreementNo 授权签约协议号
     *
     * @return self
     */
    public function setAgreementNo($agreementNo)
    {
        $this->container['agreementNo'] = $agreementNo;

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

    /**
     * Sets institutionId
     *
     * @param string|null $institutionId 制度id
     *
     * @return self
     */
    public function setInstitutionId($institutionId)
    {
        $this->container['institutionId'] = $institutionId;

        return $this;
    }

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

    /**
     * Sets ownerType
     *
     * @param string|null $ownerType 归属类型
     *
     * @return self
     */
    public function setOwnerType($ownerType)
    {
        $this->container['ownerType'] = $ownerType;

        return $this;
    }

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

    /**
     * Sets removeOwnerIdList
     *
     * @param string[]|null $removeOwnerIdList 删除适配id列表
     *
     * @return self
     */
    public function setRemoveOwnerIdList($removeOwnerIdList)
    {
        $this->container['removeOwnerIdList'] = $removeOwnerIdList;

        return $this;
    }

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

    /**
     * Sets removeOwnerOpenIdList
     *
     * @param string[]|null $removeOwnerOpenIdList 删除适配开放id列表
     *
     * @return self
     */
    public function setRemoveOwnerOpenIdList($removeOwnerOpenIdList)
    {
        $this->container['removeOwnerOpenIdList'] = $removeOwnerOpenIdList;

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


