<?php

/**
 * Management API
 *
 * The version of the OpenAPI document: 3
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.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 Adyen\Model\Management;

use ArrayAccess;
use Adyen\Model\Management\ObjectSerializer;

/**
 * UpdatePaymentMethodInfo Class Doc Comment
 *
 * @package  Adyen
 * @implements ArrayAccess<string, mixed>
 */
class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accel' => '\Adyen\Model\Management\AccelUpdateInfo',
        'affirm' => '\Adyen\Model\Management\AffirmUpdateInfo',
        'bcmc' => '\Adyen\Model\Management\BcmcUpdateInfo',
        'carnet' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesUpdateInfo',
        'countries' => 'string[]',
        'cup' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'currencies' => 'string[]',
        'customRoutingFlags' => 'string[]',
        'diners' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'discover' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'eftDirectdebitCA' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'eftposAustralia' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'enabled' => 'bool',
        'girocard' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'ideal' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'interacCard' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'jcb' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'maestro' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'maestroUsa' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'mc' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo',
        'nyce' => '\Adyen\Model\Management\NyceUpdateInfo',
        'paybybankPlaid' => '\Adyen\Model\Management\PayByBankPlaidUpdateInfo',
        'pulse' => '\Adyen\Model\Management\PulseUpdateInfo',
        'sepadirectdebit' => '\Adyen\Model\Management\SepaDirectDebitUpdateInfo',
        'star' => '\Adyen\Model\Management\StarUpdateInfo',
        'storeId' => 'string',
        'storeIds' => 'string[]',
        'visa' => '\Adyen\Model\Management\GenericPmWithTdiUpdateInfo'
    ];

    /**
      * 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 = [
        'accel' => null,
        'affirm' => null,
        'bcmc' => null,
        'carnet' => null,
        'cartesBancaires' => null,
        'countries' => null,
        'cup' => null,
        'currencies' => null,
        'customRoutingFlags' => null,
        'diners' => null,
        'discover' => null,
        'eftDirectdebitCA' => null,
        'eftposAustralia' => null,
        'enabled' => null,
        'girocard' => null,
        'ideal' => null,
        'interacCard' => null,
        'jcb' => null,
        'maestro' => null,
        'maestroUsa' => null,
        'mc' => null,
        'nyce' => null,
        'paybybankPlaid' => null,
        'pulse' => null,
        'sepadirectdebit' => null,
        'star' => null,
        'storeId' => null,
        'storeIds' => null,
        'visa' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static $openAPINullables = [
        'accel' => false,
        'affirm' => false,
        'bcmc' => false,
        'carnet' => false,
        'cartesBancaires' => false,
        'countries' => false,
        'cup' => false,
        'currencies' => false,
        'customRoutingFlags' => false,
        'diners' => false,
        'discover' => false,
        'eftDirectdebitCA' => false,
        'eftposAustralia' => false,
        'enabled' => false,
        'girocard' => false,
        'ideal' => false,
        'interacCard' => false,
        'jcb' => false,
        'maestro' => false,
        'maestroUsa' => false,
        'mc' => false,
        'nyce' => false,
        'paybybankPlaid' => false,
        'pulse' => false,
        'sepadirectdebit' => false,
        'star' => false,
        'storeId' => false,
        'storeIds' => false,
        'visa' => false
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected $openAPINullablesSetToNull = [];

    /**
     * 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 nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'accel' => 'accel',
        'affirm' => 'affirm',
        'bcmc' => 'bcmc',
        'carnet' => 'carnet',
        'cartesBancaires' => 'cartesBancaires',
        'countries' => 'countries',
        'cup' => 'cup',
        'currencies' => 'currencies',
        'customRoutingFlags' => 'customRoutingFlags',
        'diners' => 'diners',
        'discover' => 'discover',
        'eftDirectdebitCA' => 'eft_directdebit_CA',
        'eftposAustralia' => 'eftpos_australia',
        'enabled' => 'enabled',
        'girocard' => 'girocard',
        'ideal' => 'ideal',
        'interacCard' => 'interac_card',
        'jcb' => 'jcb',
        'maestro' => 'maestro',
        'maestroUsa' => 'maestro_usa',
        'mc' => 'mc',
        'nyce' => 'nyce',
        'paybybankPlaid' => 'paybybank_plaid',
        'pulse' => 'pulse',
        'sepadirectdebit' => 'sepadirectdebit',
        'star' => 'star',
        'storeId' => 'storeId',
        'storeIds' => 'storeIds',
        'visa' => 'visa'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accel' => 'setAccel',
        'affirm' => 'setAffirm',
        'bcmc' => 'setBcmc',
        'carnet' => 'setCarnet',
        'cartesBancaires' => 'setCartesBancaires',
        'countries' => 'setCountries',
        'cup' => 'setCup',
        'currencies' => 'setCurrencies',
        'customRoutingFlags' => 'setCustomRoutingFlags',
        'diners' => 'setDiners',
        'discover' => 'setDiscover',
        'eftDirectdebitCA' => 'setEftDirectdebitCA',
        'eftposAustralia' => 'setEftposAustralia',
        'enabled' => 'setEnabled',
        'girocard' => 'setGirocard',
        'ideal' => 'setIdeal',
        'interacCard' => 'setInteracCard',
        'jcb' => 'setJcb',
        'maestro' => 'setMaestro',
        'maestroUsa' => 'setMaestroUsa',
        'mc' => 'setMc',
        'nyce' => 'setNyce',
        'paybybankPlaid' => 'setPaybybankPlaid',
        'pulse' => 'setPulse',
        'sepadirectdebit' => 'setSepadirectdebit',
        'star' => 'setStar',
        'storeId' => 'setStoreId',
        'storeIds' => 'setStoreIds',
        'visa' => 'setVisa'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accel' => 'getAccel',
        'affirm' => 'getAffirm',
        'bcmc' => 'getBcmc',
        'carnet' => 'getCarnet',
        'cartesBancaires' => 'getCartesBancaires',
        'countries' => 'getCountries',
        'cup' => 'getCup',
        'currencies' => 'getCurrencies',
        'customRoutingFlags' => 'getCustomRoutingFlags',
        'diners' => 'getDiners',
        'discover' => 'getDiscover',
        'eftDirectdebitCA' => 'getEftDirectdebitCA',
        'eftposAustralia' => 'getEftposAustralia',
        'enabled' => 'getEnabled',
        'girocard' => 'getGirocard',
        'ideal' => 'getIdeal',
        'interacCard' => 'getInteracCard',
        'jcb' => 'getJcb',
        'maestro' => 'getMaestro',
        'maestroUsa' => 'getMaestroUsa',
        'mc' => 'getMc',
        'nyce' => 'getNyce',
        'paybybankPlaid' => 'getPaybybankPlaid',
        'pulse' => 'getPulse',
        'sepadirectdebit' => 'getSepadirectdebit',
        'star' => 'getStar',
        'storeId' => 'getStoreId',
        'storeIds' => 'getStoreIds',
        'visa' => 'getVisa'
    ];

    /**
     * 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->setIfExists('accel', $data ?? [], null);
        $this->setIfExists('affirm', $data ?? [], null);
        $this->setIfExists('bcmc', $data ?? [], null);
        $this->setIfExists('carnet', $data ?? [], null);
        $this->setIfExists('cartesBancaires', $data ?? [], null);
        $this->setIfExists('countries', $data ?? [], null);
        $this->setIfExists('cup', $data ?? [], null);
        $this->setIfExists('currencies', $data ?? [], null);
        $this->setIfExists('customRoutingFlags', $data ?? [], null);
        $this->setIfExists('diners', $data ?? [], null);
        $this->setIfExists('discover', $data ?? [], null);
        $this->setIfExists('eftDirectdebitCA', $data ?? [], null);
        $this->setIfExists('eftposAustralia', $data ?? [], null);
        $this->setIfExists('enabled', $data ?? [], null);
        $this->setIfExists('girocard', $data ?? [], null);
        $this->setIfExists('ideal', $data ?? [], null);
        $this->setIfExists('interacCard', $data ?? [], null);
        $this->setIfExists('jcb', $data ?? [], null);
        $this->setIfExists('maestro', $data ?? [], null);
        $this->setIfExists('maestroUsa', $data ?? [], null);
        $this->setIfExists('mc', $data ?? [], null);
        $this->setIfExists('nyce', $data ?? [], null);
        $this->setIfExists('paybybankPlaid', $data ?? [], null);
        $this->setIfExists('pulse', $data ?? [], null);
        $this->setIfExists('sepadirectdebit', $data ?? [], null);
        $this->setIfExists('star', $data ?? [], null);
        $this->setIfExists('storeId', $data ?? [], null);
        $this->setIfExists('storeIds', $data ?? [], null);
        $this->setIfExists('visa', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * 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 accel
     *
     * @return \Adyen\Model\Management\AccelUpdateInfo|null
     */
    public function getAccel()
    {
        return $this->container['accel'];
    }

    /**
     * Sets accel
     *
     * @param \Adyen\Model\Management\AccelUpdateInfo|null $accel accel
     *
     * @return self
     */
    public function setAccel($accel)
    {
        $this->container['accel'] = $accel;

        return $this;
    }

    /**
     * Gets affirm
     *
     * @return \Adyen\Model\Management\AffirmUpdateInfo|null
     */
    public function getAffirm()
    {
        return $this->container['affirm'];
    }

    /**
     * Sets affirm
     *
     * @param \Adyen\Model\Management\AffirmUpdateInfo|null $affirm affirm
     *
     * @return self
     */
    public function setAffirm($affirm)
    {
        $this->container['affirm'] = $affirm;

        return $this;
    }

    /**
     * Gets bcmc
     *
     * @return \Adyen\Model\Management\BcmcUpdateInfo|null
     */
    public function getBcmc()
    {
        return $this->container['bcmc'];
    }

    /**
     * Sets bcmc
     *
     * @param \Adyen\Model\Management\BcmcUpdateInfo|null $bcmc bcmc
     *
     * @return self
     */
    public function setBcmc($bcmc)
    {
        $this->container['bcmc'] = $bcmc;

        return $this;
    }

    /**
     * Gets carnet
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getCarnet()
    {
        return $this->container['carnet'];
    }

    /**
     * Sets carnet
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $carnet carnet
     *
     * @return self
     */
    public function setCarnet($carnet)
    {
        $this->container['carnet'] = $carnet;

        return $this;
    }

    /**
     * Gets cartesBancaires
     *
     * @return \Adyen\Model\Management\CartesBancairesUpdateInfo|null
     */
    public function getCartesBancaires()
    {
        return $this->container['cartesBancaires'];
    }

    /**
     * Sets cartesBancaires
     *
     * @param \Adyen\Model\Management\CartesBancairesUpdateInfo|null $cartesBancaires cartesBancaires
     *
     * @return self
     */
    public function setCartesBancaires($cartesBancaires)
    {
        $this->container['cartesBancaires'] = $cartesBancaires;

        return $this;
    }

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

    /**
     * Sets countries
     *
     * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method.
     *
     * @return self
     */
    public function setCountries($countries)
    {
        $this->container['countries'] = $countries;

        return $this;
    }

    /**
     * Gets cup
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getCup()
    {
        return $this->container['cup'];
    }

    /**
     * Sets cup
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $cup cup
     *
     * @return self
     */
    public function setCup($cup)
    {
        $this->container['cup'] = $cup;

        return $this;
    }

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

    /**
     * Sets currencies
     *
     * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method.
     *
     * @return self
     */
    public function setCurrencies($currencies)
    {
        $this->container['currencies'] = $currencies;

        return $this;
    }

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

    /**
     * Sets customRoutingFlags
     *
     * @param string[]|null $customRoutingFlags Custom routing flags for acquirer routing.
     *
     * @return self
     */
    public function setCustomRoutingFlags($customRoutingFlags)
    {
        $this->container['customRoutingFlags'] = $customRoutingFlags;

        return $this;
    }

    /**
     * Gets diners
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getDiners()
    {
        return $this->container['diners'];
    }

    /**
     * Sets diners
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $diners diners
     *
     * @return self
     */
    public function setDiners($diners)
    {
        $this->container['diners'] = $diners;

        return $this;
    }

    /**
     * Gets discover
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getDiscover()
    {
        return $this->container['discover'];
    }

    /**
     * Sets discover
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $discover discover
     *
     * @return self
     */
    public function setDiscover($discover)
    {
        $this->container['discover'] = $discover;

        return $this;
    }

    /**
     * Gets eftDirectdebitCA
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getEftDirectdebitCA()
    {
        return $this->container['eftDirectdebitCA'];
    }

    /**
     * Sets eftDirectdebitCA
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $eftDirectdebitCA eftDirectdebitCA
     *
     * @return self
     */
    public function setEftDirectdebitCA($eftDirectdebitCA)
    {
        $this->container['eftDirectdebitCA'] = $eftDirectdebitCA;

        return $this;
    }

    /**
     * Gets eftposAustralia
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getEftposAustralia()
    {
        return $this->container['eftposAustralia'];
    }

    /**
     * Sets eftposAustralia
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $eftposAustralia eftposAustralia
     *
     * @return self
     */
    public function setEftposAustralia($eftposAustralia)
    {
        $this->container['eftposAustralia'] = $eftposAustralia;

        return $this;
    }

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

    /**
     * Sets enabled
     *
     * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**).
     *
     * @return self
     */
    public function setEnabled($enabled)
    {
        $this->container['enabled'] = $enabled;

        return $this;
    }

    /**
     * Gets girocard
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getGirocard()
    {
        return $this->container['girocard'];
    }

    /**
     * Sets girocard
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $girocard girocard
     *
     * @return self
     */
    public function setGirocard($girocard)
    {
        $this->container['girocard'] = $girocard;

        return $this;
    }

    /**
     * Gets ideal
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getIdeal()
    {
        return $this->container['ideal'];
    }

    /**
     * Sets ideal
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $ideal ideal
     *
     * @return self
     */
    public function setIdeal($ideal)
    {
        $this->container['ideal'] = $ideal;

        return $this;
    }

    /**
     * Gets interacCard
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getInteracCard()
    {
        return $this->container['interacCard'];
    }

    /**
     * Sets interacCard
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $interacCard interacCard
     *
     * @return self
     */
    public function setInteracCard($interacCard)
    {
        $this->container['interacCard'] = $interacCard;

        return $this;
    }

    /**
     * Gets jcb
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getJcb()
    {
        return $this->container['jcb'];
    }

    /**
     * Sets jcb
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $jcb jcb
     *
     * @return self
     */
    public function setJcb($jcb)
    {
        $this->container['jcb'] = $jcb;

        return $this;
    }

    /**
     * Gets maestro
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getMaestro()
    {
        return $this->container['maestro'];
    }

    /**
     * Sets maestro
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $maestro maestro
     *
     * @return self
     */
    public function setMaestro($maestro)
    {
        $this->container['maestro'] = $maestro;

        return $this;
    }

    /**
     * Gets maestroUsa
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getMaestroUsa()
    {
        return $this->container['maestroUsa'];
    }

    /**
     * Sets maestroUsa
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $maestroUsa maestroUsa
     *
     * @return self
     */
    public function setMaestroUsa($maestroUsa)
    {
        $this->container['maestroUsa'] = $maestroUsa;

        return $this;
    }

    /**
     * Gets mc
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getMc()
    {
        return $this->container['mc'];
    }

    /**
     * Sets mc
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $mc mc
     *
     * @return self
     */
    public function setMc($mc)
    {
        $this->container['mc'] = $mc;

        return $this;
    }

    /**
     * Gets nyce
     *
     * @return \Adyen\Model\Management\NyceUpdateInfo|null
     */
    public function getNyce()
    {
        return $this->container['nyce'];
    }

    /**
     * Sets nyce
     *
     * @param \Adyen\Model\Management\NyceUpdateInfo|null $nyce nyce
     *
     * @return self
     */
    public function setNyce($nyce)
    {
        $this->container['nyce'] = $nyce;

        return $this;
    }

    /**
     * Gets paybybankPlaid
     *
     * @return \Adyen\Model\Management\PayByBankPlaidUpdateInfo|null
     */
    public function getPaybybankPlaid()
    {
        return $this->container['paybybankPlaid'];
    }

    /**
     * Sets paybybankPlaid
     *
     * @param \Adyen\Model\Management\PayByBankPlaidUpdateInfo|null $paybybankPlaid paybybankPlaid
     *
     * @return self
     */
    public function setPaybybankPlaid($paybybankPlaid)
    {
        $this->container['paybybankPlaid'] = $paybybankPlaid;

        return $this;
    }

    /**
     * Gets pulse
     *
     * @return \Adyen\Model\Management\PulseUpdateInfo|null
     */
    public function getPulse()
    {
        return $this->container['pulse'];
    }

    /**
     * Sets pulse
     *
     * @param \Adyen\Model\Management\PulseUpdateInfo|null $pulse pulse
     *
     * @return self
     */
    public function setPulse($pulse)
    {
        $this->container['pulse'] = $pulse;

        return $this;
    }

    /**
     * Gets sepadirectdebit
     *
     * @return \Adyen\Model\Management\SepaDirectDebitUpdateInfo|null
     */
    public function getSepadirectdebit()
    {
        return $this->container['sepadirectdebit'];
    }

    /**
     * Sets sepadirectdebit
     *
     * @param \Adyen\Model\Management\SepaDirectDebitUpdateInfo|null $sepadirectdebit sepadirectdebit
     *
     * @return self
     */
    public function setSepadirectdebit($sepadirectdebit)
    {
        $this->container['sepadirectdebit'] = $sepadirectdebit;

        return $this;
    }

    /**
     * Gets star
     *
     * @return \Adyen\Model\Management\StarUpdateInfo|null
     */
    public function getStar()
    {
        return $this->container['star'];
    }

    /**
     * Sets star
     *
     * @param \Adyen\Model\Management\StarUpdateInfo|null $star star
     *
     * @return self
     */
    public function setStar($star)
    {
        $this->container['star'] = $star;

        return $this;
    }

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

    /**
     * Sets storeId
     *
     * @param string|null $storeId The store for this payment method
     *
     * @return self
     */
    public function setStoreId($storeId)
    {
        $this->container['storeId'] = $storeId;

        return $this;
    }

    /**
     * Gets storeIds
     *
     * @return string[]|null
     * @deprecated since Management API v3. "Use `storeId` instead. Only one store per payment method is allowed."
     */
    public function getStoreIds()
    {
        return $this->container['storeIds'];
    }

    /**
     * Sets storeIds
     *
     * @param string[]|null $storeIds The list of stores for this payment method
     *
     * @return self
     * @deprecated since Management API v3. "Use `storeId` instead. Only one store per payment method is allowed."
     */
    public function setStoreIds($storeIds)
    {
        $this->container['storeIds'] = $storeIds;

        return $this;
    }

    /**
     * Gets visa
     *
     * @return \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null
     */
    public function getVisa()
    {
        return $this->container['visa'];
    }

    /**
     * Sets visa
     *
     * @param \Adyen\Model\Management\GenericPmWithTdiUpdateInfo|null $visa visa
     *
     * @return self
     */
    public function setVisa($visa)
    {
        $this->container['visa'] = $visa;

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

    public function toArray(): array
    {
        $array = [];
        foreach (self::$openAPITypes as $propertyName => $propertyType) {
            $propertyValue = $this[$propertyName];
            if ($propertyValue !== null) {
                // Check if the property value is an object and has a toArray() method
                if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
                    $array[$propertyName] = $propertyValue->toArray();
                // Check if it's type datetime
                } elseif ($propertyValue instanceof \DateTime) {
                    $array[$propertyName] = $propertyValue->format(DATE_ATOM);
                // If it's an array type we should check whether it contains objects and if so call toArray method
                } elseif (is_array($propertyValue)) {
                    $array[$propertyName] = array_map(function ($item) {
                        return $item instanceof ModelInterface ? $item->toArray() : $item;
                    }, $propertyValue);
                } else {
                    // Otherwise, directly assign the property value to the array
                    $array[$propertyName] = $propertyValue;
                }
            }
        }
        return $array;
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }
}
