<?php

declare(strict_types=1);

/*
 * PaypalServerSDKLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

namespace PaypalServerSDKLib\Models;

use Core\Utils\CoreHelper;
use Exception;
use stdClass;

/**
 * Processor response code for the non-PayPal payment processor errors.
 */
class ProcessorResponseCode
{
    public const ENUM_0000 = '0000';

    public const ENUM_00N7 = '00N7';

    public const ENUM_0100 = '0100';

    public const ENUM_0390 = '0390';

    public const ENUM_0500 = '0500';

    public const ENUM_0580 = '0580';

    public const ENUM_0800 = '0800';

    public const ENUM_0880 = '0880';

    public const ENUM_0890 = '0890';

    public const ENUM_0960 = '0960';

    public const ENUM_0R00 = '0R00';

    public const ENUM_1000 = '1000';

    public const ENUM_10BR = '10BR';

    public const ENUM_1300 = '1300';

    public const ENUM_1310 = '1310';

    public const ENUM_1312 = '1312';

    public const ENUM_1317 = '1317';

    public const ENUM_1320 = '1320';

    public const ENUM_1330 = '1330';

    public const ENUM_1335 = '1335';

    public const ENUM_1340 = '1340';

    public const ENUM_1350 = '1350';

    public const ENUM_1352 = '1352';

    public const ENUM_1360 = '1360';

    public const ENUM_1370 = '1370';

    public const ENUM_1380 = '1380';

    public const ENUM_1382 = '1382';

    public const ENUM_1384 = '1384';

    public const ENUM_1390 = '1390';

    public const ENUM_1393 = '1393';

    public const ENUM_5100 = '5100';

    public const ENUM_5110 = '5110';

    public const ENUM_5120 = '5120';

    public const ENUM_5130 = '5130';

    public const ENUM_5135 = '5135';

    public const ENUM_5140 = '5140';

    public const ENUM_5150 = '5150';

    public const ENUM_5160 = '5160';

    public const ENUM_5170 = '5170';

    public const ENUM_5180 = '5180';

    public const ENUM_5190 = '5190';

    public const ENUM_5200 = '5200';

    public const ENUM_5210 = '5210';

    public const ENUM_5400 = '5400';

    public const ENUM_5500 = '5500';

    public const ENUM_5650 = '5650';

    public const ENUM_5700 = '5700';

    public const ENUM_5710 = '5710';

    public const ENUM_5800 = '5800';

    public const ENUM_5900 = '5900';

    public const ENUM_5910 = '5910';

    public const ENUM_5920 = '5920';

    public const ENUM_5930 = '5930';

    public const ENUM_5950 = '5950';

    public const ENUM_6300 = '6300';

    public const ENUM_7600 = '7600';

    public const ENUM_7700 = '7700';

    public const ENUM_7710 = '7710';

    public const ENUM_7800 = '7800';

    public const ENUM_7900 = '7900';

    public const ENUM_8000 = '8000';

    public const ENUM_8010 = '8010';

    public const ENUM_8020 = '8020';

    public const ENUM_8030 = '8030';

    public const ENUM_8100 = '8100';

    public const ENUM_8110 = '8110';

    public const ENUM_8220 = '8220';

    public const ENUM_9100 = '9100';

    public const ENUM_9500 = '9500';

    public const ENUM_9510 = '9510';

    public const ENUM_9520 = '9520';

    public const ENUM_9530 = '9530';

    public const ENUM_9540 = '9540';

    public const ENUM_9600 = '9600';

    public const PCNR = 'PCNR';

    public const PCVV = 'PCVV';

    public const PP06 = 'PP06';

    public const PPRN = 'PPRN';

    public const PPAD = 'PPAD';

    public const PPAB = 'PPAB';

    public const PPAE = 'PPAE';

    public const PPAG = 'PPAG';

    public const PPAI = 'PPAI';

    public const PPAR = 'PPAR';

    public const PPAU = 'PPAU';

    public const PPAV = 'PPAV';

    public const PPAX = 'PPAX';

    public const PPBG = 'PPBG';

    public const PPC2 = 'PPC2';

    public const PPCE = 'PPCE';

    public const PPCO = 'PPCO';

    public const PPCR = 'PPCR';

    public const PPCT = 'PPCT';

    public const PPCU = 'PPCU';

    public const PPD3 = 'PPD3';

    public const PPDC = 'PPDC';

    public const PPDI = 'PPDI';

    public const PPDV = 'PPDV';

    public const PPDT = 'PPDT';

    public const PPEF = 'PPEF';

    public const PPEL = 'PPEL';

    public const PPER = 'PPER';

    public const PPEX = 'PPEX';

    public const PPFE = 'PPFE';

    public const PPFI = 'PPFI';

    public const PPFR = 'PPFR';

    public const PPFV = 'PPFV';

    public const PPGR = 'PPGR';

    public const PPH1 = 'PPH1';

    public const PPIF = 'PPIF';

    public const PPII = 'PPII';

    public const PPIM = 'PPIM';

    public const PPIT = 'PPIT';

    public const PPLR = 'PPLR';

    public const PPLS = 'PPLS';

    public const PPMB = 'PPMB';

    public const PPMC = 'PPMC';

    public const PPMD = 'PPMD';

    public const PPNC = 'PPNC';

    public const PPNL = 'PPNL';

    public const PPNM = 'PPNM';

    public const PPNT = 'PPNT';

    public const PPPH = 'PPPH';

    public const PPPI = 'PPPI';

    public const PPPM = 'PPPM';

    public const PPQC = 'PPQC';

    public const PPRE = 'PPRE';

    public const PPRF = 'PPRF';

    public const PPRR = 'PPRR';

    public const PPS0 = 'PPS0';

    public const PPS1 = 'PPS1';

    public const PPS2 = 'PPS2';

    public const PPS3 = 'PPS3';

    public const PPS4 = 'PPS4';

    public const PPS5 = 'PPS5';

    public const PPS6 = 'PPS6';

    public const PPSC = 'PPSC';

    public const PPSD = 'PPSD';

    public const PPSE = 'PPSE';

    public const PPTE = 'PPTE';

    public const PPTF = 'PPTF';

    public const PPTI = 'PPTI';

    public const PPTR = 'PPTR';

    public const PPTT = 'PPTT';

    public const PPTV = 'PPTV';

    public const PPUA = 'PPUA';

    public const PPUC = 'PPUC';

    public const PPUE = 'PPUE';

    public const PPUI = 'PPUI';

    public const PPUP = 'PPUP';

    public const PPUR = 'PPUR';

    public const PPVC = 'PPVC';

    public const PPVE = 'PPVE';

    public const PPVT = 'PPVT';

    private const _ALL_VALUES = [
        self::ENUM_0000,
        self::ENUM_00N7,
        self::ENUM_0100,
        self::ENUM_0390,
        self::ENUM_0500,
        self::ENUM_0580,
        self::ENUM_0800,
        self::ENUM_0880,
        self::ENUM_0890,
        self::ENUM_0960,
        self::ENUM_0R00,
        self::ENUM_1000,
        self::ENUM_10BR,
        self::ENUM_1300,
        self::ENUM_1310,
        self::ENUM_1312,
        self::ENUM_1317,
        self::ENUM_1320,
        self::ENUM_1330,
        self::ENUM_1335,
        self::ENUM_1340,
        self::ENUM_1350,
        self::ENUM_1352,
        self::ENUM_1360,
        self::ENUM_1370,
        self::ENUM_1380,
        self::ENUM_1382,
        self::ENUM_1384,
        self::ENUM_1390,
        self::ENUM_1393,
        self::ENUM_5100,
        self::ENUM_5110,
        self::ENUM_5120,
        self::ENUM_5130,
        self::ENUM_5135,
        self::ENUM_5140,
        self::ENUM_5150,
        self::ENUM_5160,
        self::ENUM_5170,
        self::ENUM_5180,
        self::ENUM_5190,
        self::ENUM_5200,
        self::ENUM_5210,
        self::ENUM_5400,
        self::ENUM_5500,
        self::ENUM_5650,
        self::ENUM_5700,
        self::ENUM_5710,
        self::ENUM_5800,
        self::ENUM_5900,
        self::ENUM_5910,
        self::ENUM_5920,
        self::ENUM_5930,
        self::ENUM_5950,
        self::ENUM_6300,
        self::ENUM_7600,
        self::ENUM_7700,
        self::ENUM_7710,
        self::ENUM_7800,
        self::ENUM_7900,
        self::ENUM_8000,
        self::ENUM_8010,
        self::ENUM_8020,
        self::ENUM_8030,
        self::ENUM_8100,
        self::ENUM_8110,
        self::ENUM_8220,
        self::ENUM_9100,
        self::ENUM_9500,
        self::ENUM_9510,
        self::ENUM_9520,
        self::ENUM_9530,
        self::ENUM_9540,
        self::ENUM_9600,
        self::PCNR,
        self::PCVV,
        self::PP06,
        self::PPRN,
        self::PPAD,
        self::PPAB,
        self::PPAE,
        self::PPAG,
        self::PPAI,
        self::PPAR,
        self::PPAU,
        self::PPAV,
        self::PPAX,
        self::PPBG,
        self::PPC2,
        self::PPCE,
        self::PPCO,
        self::PPCR,
        self::PPCT,
        self::PPCU,
        self::PPD3,
        self::PPDC,
        self::PPDI,
        self::PPDV,
        self::PPDT,
        self::PPEF,
        self::PPEL,
        self::PPER,
        self::PPEX,
        self::PPFE,
        self::PPFI,
        self::PPFR,
        self::PPFV,
        self::PPGR,
        self::PPH1,
        self::PPIF,
        self::PPII,
        self::PPIM,
        self::PPIT,
        self::PPLR,
        self::PPLS,
        self::PPMB,
        self::PPMC,
        self::PPMD,
        self::PPNC,
        self::PPNL,
        self::PPNM,
        self::PPNT,
        self::PPPH,
        self::PPPI,
        self::PPPM,
        self::PPQC,
        self::PPRE,
        self::PPRF,
        self::PPRR,
        self::PPS0,
        self::PPS1,
        self::PPS2,
        self::PPS3,
        self::PPS4,
        self::PPS5,
        self::PPS6,
        self::PPSC,
        self::PPSD,
        self::PPSE,
        self::PPTE,
        self::PPTF,
        self::PPTI,
        self::PPTR,
        self::PPTT,
        self::PPTV,
        self::PPUA,
        self::PPUC,
        self::PPUE,
        self::PPUI,
        self::PPUP,
        self::PPUR,
        self::PPVC,
        self::PPVE,
        self::PPVT
    ];

    /**
     * Ensures that all the given values are present in this Enum.
     *
     * @param array|stdClass|null|string $value Value or a list/map of values to be checked
     *
     * @return array|null|string Input value(s), if all are a part of this Enum
     *
     * @throws Exception Throws exception if any given value is not in this Enum
     */
    public static function checkValue($value)
    {
        $value = json_decode(json_encode($value), true); // converts stdClass into array
        if (CoreHelper::checkValueOrValuesInList($value, self::_ALL_VALUES)) {
            return $value;
        }
        throw new Exception("$value is invalid for ProcessorResponseCode.");
    }
}
