/* Ċ Ġ* ĠTencent Ġis Ġplease d Ġto Ġsupport Ġthe Ġopen Ġsource Ġcommunity Ġby Ġmaking ĠB K - CI Ġ èĵĿ é² ¸ æĮģ ç»Ń éĽĨ æĪĲ å¹³åı° Ġavailable . ĠĠĊ Ġ* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 1 9 ĠTH L ĠA 2 9 ĠLimited , Ġa ĠTencent Ġcompany . Ġ ĠAll Ġrights Ġreserved . Ċ Ġ* Ċ Ġ* ĠB K - CI Ġ èĵĿ é² ¸ æĮģ ç»Ń éĽĨ æĪĲ å¹³åı° Ġis Ġlicensed Ġunder Ġthe ĠMIT Ġlicense . Ċ Ġ* Ċ Ġ* ĠA Ġcopy Ġof Ġthe ĠMIT ĠLicense Ġis Ġincluded Ġin Ġthis Ġfile . Ċ Ġ* Ċ Ġ* Ċ Ġ* ĠTerms Ġof Ġthe ĠMIT ĠLicense : Ċ Ġ* Ġ------------------------------------------------ --- Ċ Ġ* ĠPermission Ġis Ġhereby Ġgranted , Ġfree Ġof Ġcharge , Ġto Ġany Ġperson Ġobtaining Ġa Ġcopy Ġof Ġthis Ġsoftware Ġand Ġassociated Ġdocumentation Ġfiles Ġ( the Ġ" Software "), Ġto Ġdeal Ġin Ġthe ĠSoftware Ġwithout Ġrestriction , Ġincluding Ġwithout Ġlimitation Ġthe Ġrights Ġto Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġpublish , Ġdistribute , Ġsublicense , Ġand / or Ġsell Ġcopies Ġof Ġthe ĠSoftware , Ġand Ġto Ġpermit Ġpersons Ġto Ġwhom Ġthe ĠSoftware Ġis Ġfurnished Ġto Ġdo Ġso , Ġsubject Ġto Ġthe Ġfollowing Ġconditions : Ċ Ġ* Ċ Ġ* ĠThe Ġabove Ġcopyright Ġnotice Ġand Ġthis Ġpermission Ġnotice Ġshall Ġbe Ġincluded Ġin Ġall Ġcopies Ġor Ġsubstantial Ġportions Ġof Ġthe ĠSoftware . Ċ Ġ* Ċ Ġ* ĠTHE ĠSOFTWARE ĠIS ĠPROVIDED Ġ" AS ĠIS ", ĠWITHOUT ĠWARRANTY ĠOF ĠANY ĠKIND , ĠEXPRESS ĠOR ĠIMPLIED , ĠINCLUDING ĠBUT ĠNOT ĠLIMITED ĠTO ĠTHE ĠWARRANTIES ĠOF ĠMERCHANTABILITY , ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE ĠAND ĠNONINFRINGEMENT . ĠIN ĠNO ĠEVENT ĠSHALL ĠTHE ĠAUTHORS ĠOR ĠCOPYRIGHT ĠHOLDERS ĠBE ĠLIABLE ĠFOR ĠANY ĠCLAIM , ĠDAMAGES ĠOR ĠOTHER ĠLIABILITY , ĠWHETHER ĠIN ĠAN ĠACTION ĠOF ĠCONTRACT , ĠTORT ĠOR ĠOTHERWISE , ĠARISING ĠFROM , ĠOUT ĠOF ĠOR ĠIN ĠCONNECTION ĠWITH ĠTHE ĠSOFTWARE ĠOR ĠTHE ĠUSE ĠOR ĠOTHER ĠDEALINGS ĠIN ĠTHE ĠSOFTWARE . Ċ Ġ* Ċ Ġ* Ċ Ġ*/ Ċ Ċ package Ġcom . tencent . bk repo . common . api . constant Ċ Ċ enum Ġclass ĠHttpStatus ( ĊĠĠĠ Ġval Ġvalue : ĠInt , ĊĠĠĠ Ġval Ġreason Phrase : ĠString Ċ ) Ġ{ ĊĠĠĠ ĠCONTINUE ( 1 0 0 , Ġ" Continue "), ĊĊĠĠĠ ĠSW ITCH ING _ PROTOCOL S ( 1 0 1 , Ġ" Switch ing ĠProto cols "), ĊĊĠĠĠ ĠPROCESS ING ( 1 0 2 , Ġ" Processing "), ĊĊĠĠĠ ĠCHECK POINT ( 1 0 3 , Ġ" Checkpoint "), ĊĊĠĠĠ ĠOK ( 2 0 0 , Ġ" OK "), ĊĊĠĠĠ ĠCRE ATED ( 2 0 1 , Ġ" Created "), ĊĊĠĠĠ ĠAC CEPT ED ( 2 0 2 , Ġ" Accepted "), ĊĊĠĠĠ ĠNON _ AUTHOR IT ATIVE _ INFORMATION ( 2 0 3 , Ġ" Non - Author itative ĠInformation "), ĊĊĠĠĠ ĠNO _ CONTENT ( 2 0 4 , Ġ" No ĠContent "), ĊĊĠĠĠ ĠRESET _ CONTENT ( 2 0 5 , Ġ" Reset ĠContent "), ĊĊĠĠĠ ĠPAR TIAL _ CONTENT ( 2 0 6 , Ġ" Partial ĠContent "), ĊĊĠĠĠ ĠMULTI _ STATUS ( 2 0 7 , Ġ" Multi - Status "), ĊĊĠĠĠ ĠAL READY _ REPORT ED ( 2 0 8 , Ġ" Already ĠReport ed "), ĊĊĠĠĠ ĠIM _ USED ( 2 2 6 , Ġ" IM ĠUsed "), Ġ// Ġ 3 xx ĠRed irection ĊĊĠĠĠ ĠMULTI PLE _ CHO ICES ( 3 0 0 , Ġ" Multiple ĠCho ices "), ĊĊĠĠĠ ĠMO VED _ PER MAN ENT LY ( 3 0 1 , Ġ" Moved ĠPer manently "), ĊĊĠĠĠ ĠFO UND ( 3 0 2 , Ġ" Found "), ĊĊĠĠĠ ĠMO VED _ TEMP OR AR IL Y ( 3 0 2 , Ġ" Moved ĠTemp or arily "), ĊĊĠĠĠ ĠS EE _ OTHER ( 3 0 3 , Ġ" See ĠOther "), ĊĊĠĠĠ ĠNOT _ MODI FIED ( 3 0 4 , Ġ" Not ĠModified "), ĊĊĠĠĠ ĠUSE _ PROXY ( 3 0 5 , Ġ" Use ĠProxy "), ĊĊĠĠĠ ĠTEMP OR ARY _ RE DIRECT ( 3 0 7 , Ġ" Temporary ĠRedirect "), ĊĊĠĠĠ ĠPER MAN ENT _ RE DIRECT ( 3 0 8 , Ġ" Permanent ĠRedirect "), Ġ// Ġ--- Ġ 4 xx ĠClient ĠError Ġ--- ĊĊĠĠĠ ĠBAD _ REQUEST ( 4 0 0 , Ġ" Bad ĠRequest "), ĊĊĠĠĠ ĠU NA UTH ORIZ ED ( 4 0 1 , Ġ" Unauthorized "), ĊĊĠĠĠ ĠP AY MENT _ REQUIRED ( 4 0 2 , Ġ" Payment ĠRequired "), ĊĊĠĠĠ ĠFOR BID DEN ( 4 0 3 , Ġ" Forbidden "), ĊĊĠĠĠ ĠNOT _ FOUND ( 4 0 4 , Ġ" Not ĠFound "), ĊĊĠĠĠ ĠMETHOD _ NOT _ ALLOWED ( 4 0 5 , Ġ" Method ĠNot ĠAllowed "), ĊĊĠĠĠ ĠNOT _ ACCEPT ABLE ( 4 0 6 , Ġ" Not ĠAccept able "), ĊĊĠĠĠ ĠPRO XY _ AUTHENT ICATION _ REQUIRED ( 4 0 7 , Ġ" Proxy ĠAuthentication ĠRequired "), ĊĊĠĠĠ ĠREQUEST _ TIMEOUT ( 4 0 8 , Ġ" Request ĠTimeout "), ĊĊĠĠĠ ĠCON FLI CT ( 4 0 9 , Ġ" Conflict "), ĊĊĠĠĠ ĠG ONE ( 4 1 0 , Ġ" G one "), ĊĊĠĠĠ ĠLEN GTH _ REQUIRED ( 4 1 1 , Ġ" Length ĠRequired "), ĊĊĠĠĠ ĠPRE CONDITION _ FAILED ( 4 1 2 , Ġ" Precondition ĠFailed "), ĊĊĠĠĠ ĠP AY LOAD _ TOO _ LARGE ( 4 1 3 , Ġ" Payload ĠToo ĠLarge "), ĊĊĠĠĠ ĠREQUEST _ ENTITY _ TOO _ LARGE ( 4 1 3 , Ġ" Request ĠEntity ĠToo ĠLarge "), ĊĊĠĠĠ ĠURI _ TOO _ LONG ( 4 1 4 , Ġ" URI ĠToo ĠLong "), ĊĊĠĠĠ ĠREQUEST _ URI _ TOO _ LONG ( 4 1 4 , Ġ" Request - URI ĠToo ĠLong "), ĊĊĠĠĠ ĠUNS UP PORT ED _ MEDIA _ TYPE ( 4 1 5 , Ġ" Unsupported ĠMedia ĠType "), ĊĊĠĠĠ ĠREQUEST ED _ RANGE _ NOT _ SAT IS FI ABLE ( 4 1 6 , Ġ" Requested Ġrange Ġnot Ġsatisf iable "), ĊĊĠĠĠ ĠEXPECT ATION _ FAILED ( 4 1 7 , Ġ" Expectation ĠFailed "), ĊĊĠĠĠ ĠI _ AM _ A _ TE AP OT ( 4 1 8 , Ġ" I 'm Ġa Ġte ap ot "), ĊĊĠĠĠ ĠIN SUFF IC IENT _ SPACE _ ON _ RESOURCE ( 4 1 9 , Ġ" Ins ufficient ĠSpace ĠOn ĠResource "), ĊĊĠĠĠ ĠMETHOD _ FAILURE ( 4 2 0 , Ġ" Method ĠFailure "), ĊĊĠĠĠ ĠDEST INATION _ LOCK ED ( 4 2 1 , Ġ" Destination ĠLocked "), ĊĊĠĠĠ ĠUN PROCESS ABLE _ ENTITY ( 4 2 2 , Ġ" Un process able ĠEntity "), ĊĊĠĠĠ ĠLOCK ED ( 4 2 3 , Ġ" Locked "), ĊĊĠĠĠ ĠFAILED _ DEPEND ENCY ( 4 2 4 , Ġ" Failed ĠDependency "), ĊĊĠĠĠ ĠTO O _ EAR LY ( 4 2 5 , Ġ" Too ĠEarly "), ĊĊĠĠĠ ĠUP GR ADE _ REQUIRED ( 4 2 6 , Ġ" Upgrade ĠRequired "), ĊĊĠĠĠ ĠPRE CONDITION _ REQUIRED ( 4 2 8 , Ġ" Precondition ĠRequired "), ĊĊĠĠĠ ĠTO O _ MAN Y _ REQUEST S ( 4 2 9 , Ġ" Too ĠMany ĠRequests "), ĊĊĠĠĠ ĠREQUEST _ HEADER _ FIELDS _ TOO _ LARGE ( 4 3 1 , Ġ" Request ĠHeader ĠFields ĠToo ĠLarge "), ĊĊĠĠĠ ĠU NA VA IL ABLE _ FOR _ LEG AL _ REASON S ( 4 5 1 , Ġ" Unavailable ĠFor ĠLeg al ĠRe asons "), Ġ// Ġ--- Ġ 5 xx ĠServer ĠError Ġ--- ĊĊĠĠĠ ĠINTERNAL _ SERVER _ ERROR ( 5 0 0 , Ġ" Internal ĠServer ĠError "), ĊĊĠĠĠ ĠNOT _ IMPLEMENTED ( 5 0 1 , Ġ" Not ĠImplemented "), ĊĊĠĠĠ ĠBAD _ GATE WAY ( 5 0 2 , Ġ" Bad ĠGateway "), ĊĊĠĠĠ ĠSERVICE _ UN AVAILABLE ( 5 0 3 , Ġ" Service ĠUn available "), ĊĊĠĠĠ ĠG ATE WAY _ TIMEOUT ( 5 0 4 , Ġ" Gateway ĠTimeout "), ĊĊĠĠĠ ĠHTTP _ VERSION _ NOT _ SUPPORTED ( 5 0 5 , Ġ" HTTP ĠVersion Ġnot Ġsupported "), ĊĊĠĠĠ ĠVARI ANT _ AL SO _ NEG OT I ATES ( 5 0 6 , Ġ" Variant ĠAlso ĠNeg oti ates "), ĊĊĠĠĠ ĠIN SUFF IC IENT _ STORAGE ( 5 0 7 , Ġ" Ins ufficient ĠStorage "), ĊĊĠĠĠ ĠLOOP _ DETECT ED ( 5 0 8 , Ġ" Loop ĠDet ected "), ĊĊĠĠĠ ĠB AND WIDTH _ LIMIT _ EX CE EDED ( 5 0 9 , Ġ" Bandwidth ĠLimit ĠEx ceeded "), ĊĊĠĠĠ ĠNOT _ EXT ENDED ( 5 1 0 , Ġ" Not ĠExtended "), ĊĊĠĠĠ ĠNET WORK _ AUTHENT ICATION _ REQUIRED ( 5 1 1 , Ġ" Network ĠAuthentication ĠRequired "); ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġvalue Of ( statusCode : ĠInt ): ĠHttpStatus Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġresolve ( statusCode ) Ġ?: Ġthrow ĠIllegalArgumentException (" No Ġmatching Ġconstant Ġfor Ġ[$ statusCode ]") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġfun Ġresolve ( statusCode : ĠInt ): ĠHttpStatus ? Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfor Ġ( status Ġin Ġvalues ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( status . value Ġ== ĠstatusCode ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġstatus ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ