Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

opencode_api_client.gen.go 402KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979
  1. // Package opencode provides primitives to interact with the openapi HTTP API.
  2. //
  3. // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
  4. package opencode
  5. import (
  6. "bytes"
  7. "context"
  8. "encoding/json"
  9. "fmt"
  10. "io"
  11. "net/http"
  12. "net/url"
  13. "strings"
  14. "github.com/oapi-codegen/runtime"
  15. )
  16. // RequestEditorFn is the function signature for the RequestEditor callback function
  17. type RequestEditorFn func(ctx context.Context, req *http.Request) error
  18. // Doer performs HTTP requests.
  19. //
  20. // The standard http.Client implements this interface.
  21. type HttpRequestDoer interface {
  22. Do(req *http.Request) (*http.Response, error)
  23. }
  24. // Client which conforms to the OpenAPI3 specification for this service.
  25. type Client struct {
  26. // The endpoint of the server conforming to this interface, with scheme,
  27. // https://api.deepmap.com for example. This can contain a path relative
  28. // to the server, such as https://api.deepmap.com/dev-test, and all the
  29. // paths in the swagger spec will be appended to the server.
  30. Server string
  31. // Doer for performing requests, typically a *http.Client with any
  32. // customized settings, such as certificate chains.
  33. Client HttpRequestDoer
  34. // A list of callbacks for modifying requests which are generated before sending over
  35. // the network.
  36. RequestEditors []RequestEditorFn
  37. }
  38. // ClientOption allows setting custom parameters during construction
  39. type ClientOption func(*Client) error
  40. // Creates a new Client, with reasonable defaults
  41. func NewClient(server string, opts ...ClientOption) (*Client, error) {
  42. // create a client with sane default values
  43. client := Client{
  44. Server: server,
  45. }
  46. // mutate client and add all optional params
  47. for _, o := range opts {
  48. if err := o(&client); err != nil {
  49. return nil, err
  50. }
  51. }
  52. // ensure the server URL always has a trailing slash
  53. if !strings.HasSuffix(client.Server, "/") {
  54. client.Server += "/"
  55. }
  56. // create httpClient, if not already present
  57. if client.Client == nil {
  58. client.Client = &http.Client{}
  59. }
  60. return &client, nil
  61. }
  62. // WithHTTPClient allows overriding the default Doer, which is
  63. // automatically created using http.Client. This is useful for tests.
  64. func WithHTTPClient(doer HttpRequestDoer) ClientOption {
  65. return func(c *Client) error {
  66. c.Client = doer
  67. return nil
  68. }
  69. }
  70. // WithRequestEditorFn allows setting up a callback function, which will be
  71. // called right before sending the request. This can be used to mutate the request.
  72. func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
  73. return func(c *Client) error {
  74. c.RequestEditors = append(c.RequestEditors, fn)
  75. return nil
  76. }
  77. }
  78. // The interface specification for the client above.
  79. type ClientInterface interface {
  80. // AppAgents request
  81. AppAgents(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  82. // AuthSetWithBody request with any body
  83. AuthSetWithBody(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  84. AuthSet(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  85. // CommandList request
  86. CommandList(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  87. // ConfigGet request
  88. ConfigGet(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  89. // ConfigUpdateWithBody request with any body
  90. ConfigUpdateWithBody(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  91. ConfigUpdate(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  92. // ConfigProviders request
  93. ConfigProviders(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  94. // EventSubscribe request
  95. EventSubscribe(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  96. // ExperimentalResourceList request
  97. ExperimentalResourceList(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  98. // ToolList request
  99. ToolList(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  100. // ToolIds request
  101. ToolIds(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  102. // WorktreeList request
  103. WorktreeList(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  104. // WorktreeCreateWithBody request with any body
  105. WorktreeCreateWithBody(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  106. WorktreeCreate(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  107. // FileList request
  108. FileList(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  109. // FileRead request
  110. FileRead(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  111. // FileStatus request
  112. FileStatus(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  113. // FindText request
  114. FindText(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  115. // FindFiles request
  116. FindFiles(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  117. // FindSymbols request
  118. FindSymbols(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  119. // FormatterStatus request
  120. FormatterStatus(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  121. // GlobalDispose request
  122. GlobalDispose(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  123. // GlobalEvent request
  124. GlobalEvent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  125. // GlobalHealth request
  126. GlobalHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  127. // InstanceDispose request
  128. InstanceDispose(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  129. // AppLogWithBody request with any body
  130. AppLogWithBody(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  131. AppLog(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  132. // LspStatus request
  133. LspStatus(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  134. // McpStatus request
  135. McpStatus(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  136. // McpAddWithBody request with any body
  137. McpAddWithBody(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  138. McpAdd(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  139. // McpAuthRemove request
  140. McpAuthRemove(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  141. // McpAuthStart request
  142. McpAuthStart(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  143. // McpAuthAuthenticate request
  144. McpAuthAuthenticate(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  145. // McpAuthCallbackWithBody request with any body
  146. McpAuthCallbackWithBody(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  147. McpAuthCallback(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  148. // McpConnect request
  149. McpConnect(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  150. // McpDisconnect request
  151. McpDisconnect(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  152. // PathGet request
  153. PathGet(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  154. // PermissionList request
  155. PermissionList(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  156. // PermissionReplyWithBody request with any body
  157. PermissionReplyWithBody(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  158. PermissionReply(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  159. // ProjectList request
  160. ProjectList(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  161. // ProjectCurrent request
  162. ProjectCurrent(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  163. // ProjectUpdateWithBody request with any body
  164. ProjectUpdateWithBody(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  165. ProjectUpdate(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  166. // ProviderList request
  167. ProviderList(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  168. // ProviderAuth request
  169. ProviderAuth(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  170. // ProviderOauthAuthorizeWithBody request with any body
  171. ProviderOauthAuthorizeWithBody(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  172. ProviderOauthAuthorize(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  173. // ProviderOauthCallbackWithBody request with any body
  174. ProviderOauthCallbackWithBody(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  175. ProviderOauthCallback(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  176. // PtyList request
  177. PtyList(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  178. // PtyCreateWithBody request with any body
  179. PtyCreateWithBody(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  180. PtyCreate(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  181. // PtyRemove request
  182. PtyRemove(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  183. // PtyGet request
  184. PtyGet(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  185. // PtyUpdateWithBody request with any body
  186. PtyUpdateWithBody(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  187. PtyUpdate(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  188. // PtyConnect request
  189. PtyConnect(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  190. // QuestionList request
  191. QuestionList(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  192. // QuestionReject request
  193. QuestionReject(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  194. // QuestionReplyWithBody request with any body
  195. QuestionReplyWithBody(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  196. QuestionReply(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  197. // SessionList request
  198. SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  199. // SessionCreateWithBody request with any body
  200. SessionCreateWithBody(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  201. SessionCreate(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  202. // SessionStatus request
  203. SessionStatus(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  204. // SessionDelete request
  205. SessionDelete(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  206. // SessionGet request
  207. SessionGet(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  208. // SessionUpdateWithBody request with any body
  209. SessionUpdateWithBody(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  210. SessionUpdate(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  211. // SessionAbort request
  212. SessionAbort(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  213. // SessionChildren request
  214. SessionChildren(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  215. // SessionCommandWithBody request with any body
  216. SessionCommandWithBody(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  217. SessionCommand(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  218. // SessionDiff request
  219. SessionDiff(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  220. // SessionForkWithBody request with any body
  221. SessionForkWithBody(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  222. SessionFork(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  223. // SessionInitWithBody request with any body
  224. SessionInitWithBody(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  225. SessionInit(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  226. // SessionMessages request
  227. SessionMessages(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  228. // SessionPromptWithBody request with any body
  229. SessionPromptWithBody(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  230. SessionPrompt(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  231. // SessionMessage request
  232. SessionMessage(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  233. // PartDelete request
  234. PartDelete(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  235. // PartUpdateWithBody request with any body
  236. PartUpdateWithBody(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  237. PartUpdate(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  238. // PermissionRespondWithBody request with any body
  239. PermissionRespondWithBody(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  240. PermissionRespond(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  241. // SessionPromptAsyncWithBody request with any body
  242. SessionPromptAsyncWithBody(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  243. SessionPromptAsync(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  244. // SessionRevertWithBody request with any body
  245. SessionRevertWithBody(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  246. SessionRevert(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  247. // SessionUnshare request
  248. SessionUnshare(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  249. // SessionShare request
  250. SessionShare(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  251. // SessionShellWithBody request with any body
  252. SessionShellWithBody(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  253. SessionShell(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  254. // SessionSummarizeWithBody request with any body
  255. SessionSummarizeWithBody(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  256. SessionSummarize(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  257. // SessionTodo request
  258. SessionTodo(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  259. // SessionUnrevert request
  260. SessionUnrevert(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  261. // TuiAppendPromptWithBody request with any body
  262. TuiAppendPromptWithBody(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  263. TuiAppendPrompt(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  264. // TuiClearPrompt request
  265. TuiClearPrompt(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  266. // TuiControlNext request
  267. TuiControlNext(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  268. // TuiControlResponseWithBody request with any body
  269. TuiControlResponseWithBody(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  270. TuiControlResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  271. // TuiExecuteCommandWithBody request with any body
  272. TuiExecuteCommandWithBody(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  273. TuiExecuteCommand(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  274. // TuiOpenHelp request
  275. TuiOpenHelp(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  276. // TuiOpenModels request
  277. TuiOpenModels(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  278. // TuiOpenSessions request
  279. TuiOpenSessions(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  280. // TuiOpenThemes request
  281. TuiOpenThemes(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  282. // TuiPublishWithBody request with any body
  283. TuiPublishWithBody(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  284. TuiPublish(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  285. // TuiSelectSessionWithBody request with any body
  286. TuiSelectSessionWithBody(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  287. TuiSelectSession(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  288. // TuiShowToastWithBody request with any body
  289. TuiShowToastWithBody(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  290. TuiShowToast(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  291. // TuiSubmitPrompt request
  292. TuiSubmitPrompt(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  293. // VcsGet request
  294. VcsGet(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  295. }
  296. func (c *Client) AppAgents(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  297. req, err := NewAppAgentsRequest(c.Server, params)
  298. if err != nil {
  299. return nil, err
  300. }
  301. req = req.WithContext(ctx)
  302. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  303. return nil, err
  304. }
  305. return c.Client.Do(req)
  306. }
  307. func (c *Client) AuthSetWithBody(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  308. req, err := NewAuthSetRequestWithBody(c.Server, providerID, params, contentType, body)
  309. if err != nil {
  310. return nil, err
  311. }
  312. req = req.WithContext(ctx)
  313. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  314. return nil, err
  315. }
  316. return c.Client.Do(req)
  317. }
  318. func (c *Client) AuthSet(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  319. req, err := NewAuthSetRequest(c.Server, providerID, params, body)
  320. if err != nil {
  321. return nil, err
  322. }
  323. req = req.WithContext(ctx)
  324. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  325. return nil, err
  326. }
  327. return c.Client.Do(req)
  328. }
  329. func (c *Client) CommandList(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  330. req, err := NewCommandListRequest(c.Server, params)
  331. if err != nil {
  332. return nil, err
  333. }
  334. req = req.WithContext(ctx)
  335. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  336. return nil, err
  337. }
  338. return c.Client.Do(req)
  339. }
  340. func (c *Client) ConfigGet(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  341. req, err := NewConfigGetRequest(c.Server, params)
  342. if err != nil {
  343. return nil, err
  344. }
  345. req = req.WithContext(ctx)
  346. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  347. return nil, err
  348. }
  349. return c.Client.Do(req)
  350. }
  351. func (c *Client) ConfigUpdateWithBody(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  352. req, err := NewConfigUpdateRequestWithBody(c.Server, params, contentType, body)
  353. if err != nil {
  354. return nil, err
  355. }
  356. req = req.WithContext(ctx)
  357. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  358. return nil, err
  359. }
  360. return c.Client.Do(req)
  361. }
  362. func (c *Client) ConfigUpdate(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  363. req, err := NewConfigUpdateRequest(c.Server, params, body)
  364. if err != nil {
  365. return nil, err
  366. }
  367. req = req.WithContext(ctx)
  368. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  369. return nil, err
  370. }
  371. return c.Client.Do(req)
  372. }
  373. func (c *Client) ConfigProviders(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  374. req, err := NewConfigProvidersRequest(c.Server, params)
  375. if err != nil {
  376. return nil, err
  377. }
  378. req = req.WithContext(ctx)
  379. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  380. return nil, err
  381. }
  382. return c.Client.Do(req)
  383. }
  384. func (c *Client) EventSubscribe(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  385. req, err := NewEventSubscribeRequest(c.Server, params)
  386. if err != nil {
  387. return nil, err
  388. }
  389. req = req.WithContext(ctx)
  390. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  391. return nil, err
  392. }
  393. return c.Client.Do(req)
  394. }
  395. func (c *Client) ExperimentalResourceList(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  396. req, err := NewExperimentalResourceListRequest(c.Server, params)
  397. if err != nil {
  398. return nil, err
  399. }
  400. req = req.WithContext(ctx)
  401. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  402. return nil, err
  403. }
  404. return c.Client.Do(req)
  405. }
  406. func (c *Client) ToolList(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  407. req, err := NewToolListRequest(c.Server, params)
  408. if err != nil {
  409. return nil, err
  410. }
  411. req = req.WithContext(ctx)
  412. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  413. return nil, err
  414. }
  415. return c.Client.Do(req)
  416. }
  417. func (c *Client) ToolIds(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  418. req, err := NewToolIdsRequest(c.Server, params)
  419. if err != nil {
  420. return nil, err
  421. }
  422. req = req.WithContext(ctx)
  423. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  424. return nil, err
  425. }
  426. return c.Client.Do(req)
  427. }
  428. func (c *Client) WorktreeList(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  429. req, err := NewWorktreeListRequest(c.Server, params)
  430. if err != nil {
  431. return nil, err
  432. }
  433. req = req.WithContext(ctx)
  434. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  435. return nil, err
  436. }
  437. return c.Client.Do(req)
  438. }
  439. func (c *Client) WorktreeCreateWithBody(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  440. req, err := NewWorktreeCreateRequestWithBody(c.Server, params, contentType, body)
  441. if err != nil {
  442. return nil, err
  443. }
  444. req = req.WithContext(ctx)
  445. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  446. return nil, err
  447. }
  448. return c.Client.Do(req)
  449. }
  450. func (c *Client) WorktreeCreate(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  451. req, err := NewWorktreeCreateRequest(c.Server, params, body)
  452. if err != nil {
  453. return nil, err
  454. }
  455. req = req.WithContext(ctx)
  456. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  457. return nil, err
  458. }
  459. return c.Client.Do(req)
  460. }
  461. func (c *Client) FileList(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  462. req, err := NewFileListRequest(c.Server, params)
  463. if err != nil {
  464. return nil, err
  465. }
  466. req = req.WithContext(ctx)
  467. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  468. return nil, err
  469. }
  470. return c.Client.Do(req)
  471. }
  472. func (c *Client) FileRead(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  473. req, err := NewFileReadRequest(c.Server, params)
  474. if err != nil {
  475. return nil, err
  476. }
  477. req = req.WithContext(ctx)
  478. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  479. return nil, err
  480. }
  481. return c.Client.Do(req)
  482. }
  483. func (c *Client) FileStatus(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  484. req, err := NewFileStatusRequest(c.Server, params)
  485. if err != nil {
  486. return nil, err
  487. }
  488. req = req.WithContext(ctx)
  489. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  490. return nil, err
  491. }
  492. return c.Client.Do(req)
  493. }
  494. func (c *Client) FindText(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  495. req, err := NewFindTextRequest(c.Server, params)
  496. if err != nil {
  497. return nil, err
  498. }
  499. req = req.WithContext(ctx)
  500. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  501. return nil, err
  502. }
  503. return c.Client.Do(req)
  504. }
  505. func (c *Client) FindFiles(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  506. req, err := NewFindFilesRequest(c.Server, params)
  507. if err != nil {
  508. return nil, err
  509. }
  510. req = req.WithContext(ctx)
  511. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  512. return nil, err
  513. }
  514. return c.Client.Do(req)
  515. }
  516. func (c *Client) FindSymbols(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  517. req, err := NewFindSymbolsRequest(c.Server, params)
  518. if err != nil {
  519. return nil, err
  520. }
  521. req = req.WithContext(ctx)
  522. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  523. return nil, err
  524. }
  525. return c.Client.Do(req)
  526. }
  527. func (c *Client) FormatterStatus(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  528. req, err := NewFormatterStatusRequest(c.Server, params)
  529. if err != nil {
  530. return nil, err
  531. }
  532. req = req.WithContext(ctx)
  533. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  534. return nil, err
  535. }
  536. return c.Client.Do(req)
  537. }
  538. func (c *Client) GlobalDispose(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  539. req, err := NewGlobalDisposeRequest(c.Server)
  540. if err != nil {
  541. return nil, err
  542. }
  543. req = req.WithContext(ctx)
  544. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  545. return nil, err
  546. }
  547. return c.Client.Do(req)
  548. }
  549. func (c *Client) GlobalEvent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  550. req, err := NewGlobalEventRequest(c.Server)
  551. if err != nil {
  552. return nil, err
  553. }
  554. req = req.WithContext(ctx)
  555. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  556. return nil, err
  557. }
  558. return c.Client.Do(req)
  559. }
  560. func (c *Client) GlobalHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  561. req, err := NewGlobalHealthRequest(c.Server)
  562. if err != nil {
  563. return nil, err
  564. }
  565. req = req.WithContext(ctx)
  566. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  567. return nil, err
  568. }
  569. return c.Client.Do(req)
  570. }
  571. func (c *Client) InstanceDispose(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  572. req, err := NewInstanceDisposeRequest(c.Server, params)
  573. if err != nil {
  574. return nil, err
  575. }
  576. req = req.WithContext(ctx)
  577. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  578. return nil, err
  579. }
  580. return c.Client.Do(req)
  581. }
  582. func (c *Client) AppLogWithBody(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  583. req, err := NewAppLogRequestWithBody(c.Server, params, contentType, body)
  584. if err != nil {
  585. return nil, err
  586. }
  587. req = req.WithContext(ctx)
  588. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  589. return nil, err
  590. }
  591. return c.Client.Do(req)
  592. }
  593. func (c *Client) AppLog(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  594. req, err := NewAppLogRequest(c.Server, params, body)
  595. if err != nil {
  596. return nil, err
  597. }
  598. req = req.WithContext(ctx)
  599. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  600. return nil, err
  601. }
  602. return c.Client.Do(req)
  603. }
  604. func (c *Client) LspStatus(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  605. req, err := NewLspStatusRequest(c.Server, params)
  606. if err != nil {
  607. return nil, err
  608. }
  609. req = req.WithContext(ctx)
  610. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  611. return nil, err
  612. }
  613. return c.Client.Do(req)
  614. }
  615. func (c *Client) McpStatus(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  616. req, err := NewMcpStatusRequest(c.Server, params)
  617. if err != nil {
  618. return nil, err
  619. }
  620. req = req.WithContext(ctx)
  621. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  622. return nil, err
  623. }
  624. return c.Client.Do(req)
  625. }
  626. func (c *Client) McpAddWithBody(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  627. req, err := NewMcpAddRequestWithBody(c.Server, params, contentType, body)
  628. if err != nil {
  629. return nil, err
  630. }
  631. req = req.WithContext(ctx)
  632. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  633. return nil, err
  634. }
  635. return c.Client.Do(req)
  636. }
  637. func (c *Client) McpAdd(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  638. req, err := NewMcpAddRequest(c.Server, params, body)
  639. if err != nil {
  640. return nil, err
  641. }
  642. req = req.WithContext(ctx)
  643. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  644. return nil, err
  645. }
  646. return c.Client.Do(req)
  647. }
  648. func (c *Client) McpAuthRemove(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  649. req, err := NewMcpAuthRemoveRequest(c.Server, name, params)
  650. if err != nil {
  651. return nil, err
  652. }
  653. req = req.WithContext(ctx)
  654. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  655. return nil, err
  656. }
  657. return c.Client.Do(req)
  658. }
  659. func (c *Client) McpAuthStart(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  660. req, err := NewMcpAuthStartRequest(c.Server, name, params)
  661. if err != nil {
  662. return nil, err
  663. }
  664. req = req.WithContext(ctx)
  665. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  666. return nil, err
  667. }
  668. return c.Client.Do(req)
  669. }
  670. func (c *Client) McpAuthAuthenticate(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  671. req, err := NewMcpAuthAuthenticateRequest(c.Server, name, params)
  672. if err != nil {
  673. return nil, err
  674. }
  675. req = req.WithContext(ctx)
  676. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  677. return nil, err
  678. }
  679. return c.Client.Do(req)
  680. }
  681. func (c *Client) McpAuthCallbackWithBody(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  682. req, err := NewMcpAuthCallbackRequestWithBody(c.Server, name, params, contentType, body)
  683. if err != nil {
  684. return nil, err
  685. }
  686. req = req.WithContext(ctx)
  687. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  688. return nil, err
  689. }
  690. return c.Client.Do(req)
  691. }
  692. func (c *Client) McpAuthCallback(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  693. req, err := NewMcpAuthCallbackRequest(c.Server, name, params, body)
  694. if err != nil {
  695. return nil, err
  696. }
  697. req = req.WithContext(ctx)
  698. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  699. return nil, err
  700. }
  701. return c.Client.Do(req)
  702. }
  703. func (c *Client) McpConnect(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  704. req, err := NewMcpConnectRequest(c.Server, name, params)
  705. if err != nil {
  706. return nil, err
  707. }
  708. req = req.WithContext(ctx)
  709. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  710. return nil, err
  711. }
  712. return c.Client.Do(req)
  713. }
  714. func (c *Client) McpDisconnect(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  715. req, err := NewMcpDisconnectRequest(c.Server, name, params)
  716. if err != nil {
  717. return nil, err
  718. }
  719. req = req.WithContext(ctx)
  720. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  721. return nil, err
  722. }
  723. return c.Client.Do(req)
  724. }
  725. func (c *Client) PathGet(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  726. req, err := NewPathGetRequest(c.Server, params)
  727. if err != nil {
  728. return nil, err
  729. }
  730. req = req.WithContext(ctx)
  731. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  732. return nil, err
  733. }
  734. return c.Client.Do(req)
  735. }
  736. func (c *Client) PermissionList(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  737. req, err := NewPermissionListRequest(c.Server, params)
  738. if err != nil {
  739. return nil, err
  740. }
  741. req = req.WithContext(ctx)
  742. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  743. return nil, err
  744. }
  745. return c.Client.Do(req)
  746. }
  747. func (c *Client) PermissionReplyWithBody(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  748. req, err := NewPermissionReplyRequestWithBody(c.Server, requestID, params, contentType, body)
  749. if err != nil {
  750. return nil, err
  751. }
  752. req = req.WithContext(ctx)
  753. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  754. return nil, err
  755. }
  756. return c.Client.Do(req)
  757. }
  758. func (c *Client) PermissionReply(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  759. req, err := NewPermissionReplyRequest(c.Server, requestID, params, body)
  760. if err != nil {
  761. return nil, err
  762. }
  763. req = req.WithContext(ctx)
  764. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  765. return nil, err
  766. }
  767. return c.Client.Do(req)
  768. }
  769. func (c *Client) ProjectList(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  770. req, err := NewProjectListRequest(c.Server, params)
  771. if err != nil {
  772. return nil, err
  773. }
  774. req = req.WithContext(ctx)
  775. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  776. return nil, err
  777. }
  778. return c.Client.Do(req)
  779. }
  780. func (c *Client) ProjectCurrent(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  781. req, err := NewProjectCurrentRequest(c.Server, params)
  782. if err != nil {
  783. return nil, err
  784. }
  785. req = req.WithContext(ctx)
  786. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  787. return nil, err
  788. }
  789. return c.Client.Do(req)
  790. }
  791. func (c *Client) ProjectUpdateWithBody(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  792. req, err := NewProjectUpdateRequestWithBody(c.Server, projectID, params, contentType, body)
  793. if err != nil {
  794. return nil, err
  795. }
  796. req = req.WithContext(ctx)
  797. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  798. return nil, err
  799. }
  800. return c.Client.Do(req)
  801. }
  802. func (c *Client) ProjectUpdate(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  803. req, err := NewProjectUpdateRequest(c.Server, projectID, params, body)
  804. if err != nil {
  805. return nil, err
  806. }
  807. req = req.WithContext(ctx)
  808. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  809. return nil, err
  810. }
  811. return c.Client.Do(req)
  812. }
  813. func (c *Client) ProviderList(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  814. req, err := NewProviderListRequest(c.Server, params)
  815. if err != nil {
  816. return nil, err
  817. }
  818. req = req.WithContext(ctx)
  819. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  820. return nil, err
  821. }
  822. return c.Client.Do(req)
  823. }
  824. func (c *Client) ProviderAuth(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  825. req, err := NewProviderAuthRequest(c.Server, params)
  826. if err != nil {
  827. return nil, err
  828. }
  829. req = req.WithContext(ctx)
  830. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  831. return nil, err
  832. }
  833. return c.Client.Do(req)
  834. }
  835. func (c *Client) ProviderOauthAuthorizeWithBody(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  836. req, err := NewProviderOauthAuthorizeRequestWithBody(c.Server, providerID, params, contentType, body)
  837. if err != nil {
  838. return nil, err
  839. }
  840. req = req.WithContext(ctx)
  841. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  842. return nil, err
  843. }
  844. return c.Client.Do(req)
  845. }
  846. func (c *Client) ProviderOauthAuthorize(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  847. req, err := NewProviderOauthAuthorizeRequest(c.Server, providerID, params, body)
  848. if err != nil {
  849. return nil, err
  850. }
  851. req = req.WithContext(ctx)
  852. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  853. return nil, err
  854. }
  855. return c.Client.Do(req)
  856. }
  857. func (c *Client) ProviderOauthCallbackWithBody(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  858. req, err := NewProviderOauthCallbackRequestWithBody(c.Server, providerID, params, contentType, body)
  859. if err != nil {
  860. return nil, err
  861. }
  862. req = req.WithContext(ctx)
  863. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  864. return nil, err
  865. }
  866. return c.Client.Do(req)
  867. }
  868. func (c *Client) ProviderOauthCallback(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  869. req, err := NewProviderOauthCallbackRequest(c.Server, providerID, params, body)
  870. if err != nil {
  871. return nil, err
  872. }
  873. req = req.WithContext(ctx)
  874. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  875. return nil, err
  876. }
  877. return c.Client.Do(req)
  878. }
  879. func (c *Client) PtyList(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  880. req, err := NewPtyListRequest(c.Server, params)
  881. if err != nil {
  882. return nil, err
  883. }
  884. req = req.WithContext(ctx)
  885. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  886. return nil, err
  887. }
  888. return c.Client.Do(req)
  889. }
  890. func (c *Client) PtyCreateWithBody(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  891. req, err := NewPtyCreateRequestWithBody(c.Server, params, contentType, body)
  892. if err != nil {
  893. return nil, err
  894. }
  895. req = req.WithContext(ctx)
  896. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  897. return nil, err
  898. }
  899. return c.Client.Do(req)
  900. }
  901. func (c *Client) PtyCreate(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  902. req, err := NewPtyCreateRequest(c.Server, params, body)
  903. if err != nil {
  904. return nil, err
  905. }
  906. req = req.WithContext(ctx)
  907. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  908. return nil, err
  909. }
  910. return c.Client.Do(req)
  911. }
  912. func (c *Client) PtyRemove(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  913. req, err := NewPtyRemoveRequest(c.Server, ptyID, params)
  914. if err != nil {
  915. return nil, err
  916. }
  917. req = req.WithContext(ctx)
  918. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  919. return nil, err
  920. }
  921. return c.Client.Do(req)
  922. }
  923. func (c *Client) PtyGet(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  924. req, err := NewPtyGetRequest(c.Server, ptyID, params)
  925. if err != nil {
  926. return nil, err
  927. }
  928. req = req.WithContext(ctx)
  929. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  930. return nil, err
  931. }
  932. return c.Client.Do(req)
  933. }
  934. func (c *Client) PtyUpdateWithBody(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  935. req, err := NewPtyUpdateRequestWithBody(c.Server, ptyID, params, contentType, body)
  936. if err != nil {
  937. return nil, err
  938. }
  939. req = req.WithContext(ctx)
  940. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  941. return nil, err
  942. }
  943. return c.Client.Do(req)
  944. }
  945. func (c *Client) PtyUpdate(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  946. req, err := NewPtyUpdateRequest(c.Server, ptyID, params, body)
  947. if err != nil {
  948. return nil, err
  949. }
  950. req = req.WithContext(ctx)
  951. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  952. return nil, err
  953. }
  954. return c.Client.Do(req)
  955. }
  956. func (c *Client) PtyConnect(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  957. req, err := NewPtyConnectRequest(c.Server, ptyID, params)
  958. if err != nil {
  959. return nil, err
  960. }
  961. req = req.WithContext(ctx)
  962. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  963. return nil, err
  964. }
  965. return c.Client.Do(req)
  966. }
  967. func (c *Client) QuestionList(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  968. req, err := NewQuestionListRequest(c.Server, params)
  969. if err != nil {
  970. return nil, err
  971. }
  972. req = req.WithContext(ctx)
  973. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  974. return nil, err
  975. }
  976. return c.Client.Do(req)
  977. }
  978. func (c *Client) QuestionReject(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  979. req, err := NewQuestionRejectRequest(c.Server, requestID, params)
  980. if err != nil {
  981. return nil, err
  982. }
  983. req = req.WithContext(ctx)
  984. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  985. return nil, err
  986. }
  987. return c.Client.Do(req)
  988. }
  989. func (c *Client) QuestionReplyWithBody(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  990. req, err := NewQuestionReplyRequestWithBody(c.Server, requestID, params, contentType, body)
  991. if err != nil {
  992. return nil, err
  993. }
  994. req = req.WithContext(ctx)
  995. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  996. return nil, err
  997. }
  998. return c.Client.Do(req)
  999. }
  1000. func (c *Client) QuestionReply(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1001. req, err := NewQuestionReplyRequest(c.Server, requestID, params, body)
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. req = req.WithContext(ctx)
  1006. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1007. return nil, err
  1008. }
  1009. return c.Client.Do(req)
  1010. }
  1011. func (c *Client) SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1012. req, err := NewSessionListRequest(c.Server, params)
  1013. if err != nil {
  1014. return nil, err
  1015. }
  1016. req = req.WithContext(ctx)
  1017. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1018. return nil, err
  1019. }
  1020. return c.Client.Do(req)
  1021. }
  1022. func (c *Client) SessionCreateWithBody(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1023. req, err := NewSessionCreateRequestWithBody(c.Server, params, contentType, body)
  1024. if err != nil {
  1025. return nil, err
  1026. }
  1027. req = req.WithContext(ctx)
  1028. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1029. return nil, err
  1030. }
  1031. return c.Client.Do(req)
  1032. }
  1033. func (c *Client) SessionCreate(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1034. req, err := NewSessionCreateRequest(c.Server, params, body)
  1035. if err != nil {
  1036. return nil, err
  1037. }
  1038. req = req.WithContext(ctx)
  1039. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1040. return nil, err
  1041. }
  1042. return c.Client.Do(req)
  1043. }
  1044. func (c *Client) SessionStatus(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1045. req, err := NewSessionStatusRequest(c.Server, params)
  1046. if err != nil {
  1047. return nil, err
  1048. }
  1049. req = req.WithContext(ctx)
  1050. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1051. return nil, err
  1052. }
  1053. return c.Client.Do(req)
  1054. }
  1055. func (c *Client) SessionDelete(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1056. req, err := NewSessionDeleteRequest(c.Server, sessionID, params)
  1057. if err != nil {
  1058. return nil, err
  1059. }
  1060. req = req.WithContext(ctx)
  1061. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1062. return nil, err
  1063. }
  1064. return c.Client.Do(req)
  1065. }
  1066. func (c *Client) SessionGet(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1067. req, err := NewSessionGetRequest(c.Server, sessionID, params)
  1068. if err != nil {
  1069. return nil, err
  1070. }
  1071. req = req.WithContext(ctx)
  1072. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1073. return nil, err
  1074. }
  1075. return c.Client.Do(req)
  1076. }
  1077. func (c *Client) SessionUpdateWithBody(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1078. req, err := NewSessionUpdateRequestWithBody(c.Server, sessionID, params, contentType, body)
  1079. if err != nil {
  1080. return nil, err
  1081. }
  1082. req = req.WithContext(ctx)
  1083. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1084. return nil, err
  1085. }
  1086. return c.Client.Do(req)
  1087. }
  1088. func (c *Client) SessionUpdate(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1089. req, err := NewSessionUpdateRequest(c.Server, sessionID, params, body)
  1090. if err != nil {
  1091. return nil, err
  1092. }
  1093. req = req.WithContext(ctx)
  1094. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1095. return nil, err
  1096. }
  1097. return c.Client.Do(req)
  1098. }
  1099. func (c *Client) SessionAbort(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1100. req, err := NewSessionAbortRequest(c.Server, sessionID, params)
  1101. if err != nil {
  1102. return nil, err
  1103. }
  1104. req = req.WithContext(ctx)
  1105. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1106. return nil, err
  1107. }
  1108. return c.Client.Do(req)
  1109. }
  1110. func (c *Client) SessionChildren(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1111. req, err := NewSessionChildrenRequest(c.Server, sessionID, params)
  1112. if err != nil {
  1113. return nil, err
  1114. }
  1115. req = req.WithContext(ctx)
  1116. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1117. return nil, err
  1118. }
  1119. return c.Client.Do(req)
  1120. }
  1121. func (c *Client) SessionCommandWithBody(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1122. req, err := NewSessionCommandRequestWithBody(c.Server, sessionID, params, contentType, body)
  1123. if err != nil {
  1124. return nil, err
  1125. }
  1126. req = req.WithContext(ctx)
  1127. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1128. return nil, err
  1129. }
  1130. return c.Client.Do(req)
  1131. }
  1132. func (c *Client) SessionCommand(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1133. req, err := NewSessionCommandRequest(c.Server, sessionID, params, body)
  1134. if err != nil {
  1135. return nil, err
  1136. }
  1137. req = req.WithContext(ctx)
  1138. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1139. return nil, err
  1140. }
  1141. return c.Client.Do(req)
  1142. }
  1143. func (c *Client) SessionDiff(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1144. req, err := NewSessionDiffRequest(c.Server, sessionID, params)
  1145. if err != nil {
  1146. return nil, err
  1147. }
  1148. req = req.WithContext(ctx)
  1149. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1150. return nil, err
  1151. }
  1152. return c.Client.Do(req)
  1153. }
  1154. func (c *Client) SessionForkWithBody(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1155. req, err := NewSessionForkRequestWithBody(c.Server, sessionID, params, contentType, body)
  1156. if err != nil {
  1157. return nil, err
  1158. }
  1159. req = req.WithContext(ctx)
  1160. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1161. return nil, err
  1162. }
  1163. return c.Client.Do(req)
  1164. }
  1165. func (c *Client) SessionFork(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1166. req, err := NewSessionForkRequest(c.Server, sessionID, params, body)
  1167. if err != nil {
  1168. return nil, err
  1169. }
  1170. req = req.WithContext(ctx)
  1171. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1172. return nil, err
  1173. }
  1174. return c.Client.Do(req)
  1175. }
  1176. func (c *Client) SessionInitWithBody(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1177. req, err := NewSessionInitRequestWithBody(c.Server, sessionID, params, contentType, body)
  1178. if err != nil {
  1179. return nil, err
  1180. }
  1181. req = req.WithContext(ctx)
  1182. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1183. return nil, err
  1184. }
  1185. return c.Client.Do(req)
  1186. }
  1187. func (c *Client) SessionInit(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1188. req, err := NewSessionInitRequest(c.Server, sessionID, params, body)
  1189. if err != nil {
  1190. return nil, err
  1191. }
  1192. req = req.WithContext(ctx)
  1193. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1194. return nil, err
  1195. }
  1196. return c.Client.Do(req)
  1197. }
  1198. func (c *Client) SessionMessages(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1199. req, err := NewSessionMessagesRequest(c.Server, sessionID, params)
  1200. if err != nil {
  1201. return nil, err
  1202. }
  1203. req = req.WithContext(ctx)
  1204. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1205. return nil, err
  1206. }
  1207. return c.Client.Do(req)
  1208. }
  1209. func (c *Client) SessionPromptWithBody(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1210. req, err := NewSessionPromptRequestWithBody(c.Server, sessionID, params, contentType, body)
  1211. if err != nil {
  1212. return nil, err
  1213. }
  1214. req = req.WithContext(ctx)
  1215. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1216. return nil, err
  1217. }
  1218. return c.Client.Do(req)
  1219. }
  1220. func (c *Client) SessionPrompt(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1221. req, err := NewSessionPromptRequest(c.Server, sessionID, params, body)
  1222. if err != nil {
  1223. return nil, err
  1224. }
  1225. req = req.WithContext(ctx)
  1226. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1227. return nil, err
  1228. }
  1229. return c.Client.Do(req)
  1230. }
  1231. func (c *Client) SessionMessage(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1232. req, err := NewSessionMessageRequest(c.Server, sessionID, messageID, params)
  1233. if err != nil {
  1234. return nil, err
  1235. }
  1236. req = req.WithContext(ctx)
  1237. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1238. return nil, err
  1239. }
  1240. return c.Client.Do(req)
  1241. }
  1242. func (c *Client) PartDelete(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1243. req, err := NewPartDeleteRequest(c.Server, sessionID, messageID, partID, params)
  1244. if err != nil {
  1245. return nil, err
  1246. }
  1247. req = req.WithContext(ctx)
  1248. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1249. return nil, err
  1250. }
  1251. return c.Client.Do(req)
  1252. }
  1253. func (c *Client) PartUpdateWithBody(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1254. req, err := NewPartUpdateRequestWithBody(c.Server, sessionID, messageID, partID, params, contentType, body)
  1255. if err != nil {
  1256. return nil, err
  1257. }
  1258. req = req.WithContext(ctx)
  1259. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1260. return nil, err
  1261. }
  1262. return c.Client.Do(req)
  1263. }
  1264. func (c *Client) PartUpdate(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1265. req, err := NewPartUpdateRequest(c.Server, sessionID, messageID, partID, params, body)
  1266. if err != nil {
  1267. return nil, err
  1268. }
  1269. req = req.WithContext(ctx)
  1270. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1271. return nil, err
  1272. }
  1273. return c.Client.Do(req)
  1274. }
  1275. func (c *Client) PermissionRespondWithBody(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1276. req, err := NewPermissionRespondRequestWithBody(c.Server, sessionID, permissionID, params, contentType, body)
  1277. if err != nil {
  1278. return nil, err
  1279. }
  1280. req = req.WithContext(ctx)
  1281. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1282. return nil, err
  1283. }
  1284. return c.Client.Do(req)
  1285. }
  1286. func (c *Client) PermissionRespond(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1287. req, err := NewPermissionRespondRequest(c.Server, sessionID, permissionID, params, body)
  1288. if err != nil {
  1289. return nil, err
  1290. }
  1291. req = req.WithContext(ctx)
  1292. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1293. return nil, err
  1294. }
  1295. return c.Client.Do(req)
  1296. }
  1297. func (c *Client) SessionPromptAsyncWithBody(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1298. req, err := NewSessionPromptAsyncRequestWithBody(c.Server, sessionID, params, contentType, body)
  1299. if err != nil {
  1300. return nil, err
  1301. }
  1302. req = req.WithContext(ctx)
  1303. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1304. return nil, err
  1305. }
  1306. return c.Client.Do(req)
  1307. }
  1308. func (c *Client) SessionPromptAsync(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1309. req, err := NewSessionPromptAsyncRequest(c.Server, sessionID, params, body)
  1310. if err != nil {
  1311. return nil, err
  1312. }
  1313. req = req.WithContext(ctx)
  1314. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1315. return nil, err
  1316. }
  1317. return c.Client.Do(req)
  1318. }
  1319. func (c *Client) SessionRevertWithBody(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1320. req, err := NewSessionRevertRequestWithBody(c.Server, sessionID, params, contentType, body)
  1321. if err != nil {
  1322. return nil, err
  1323. }
  1324. req = req.WithContext(ctx)
  1325. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1326. return nil, err
  1327. }
  1328. return c.Client.Do(req)
  1329. }
  1330. func (c *Client) SessionRevert(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1331. req, err := NewSessionRevertRequest(c.Server, sessionID, params, body)
  1332. if err != nil {
  1333. return nil, err
  1334. }
  1335. req = req.WithContext(ctx)
  1336. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1337. return nil, err
  1338. }
  1339. return c.Client.Do(req)
  1340. }
  1341. func (c *Client) SessionUnshare(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1342. req, err := NewSessionUnshareRequest(c.Server, sessionID, params)
  1343. if err != nil {
  1344. return nil, err
  1345. }
  1346. req = req.WithContext(ctx)
  1347. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1348. return nil, err
  1349. }
  1350. return c.Client.Do(req)
  1351. }
  1352. func (c *Client) SessionShare(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1353. req, err := NewSessionShareRequest(c.Server, sessionID, params)
  1354. if err != nil {
  1355. return nil, err
  1356. }
  1357. req = req.WithContext(ctx)
  1358. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1359. return nil, err
  1360. }
  1361. return c.Client.Do(req)
  1362. }
  1363. func (c *Client) SessionShellWithBody(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1364. req, err := NewSessionShellRequestWithBody(c.Server, sessionID, params, contentType, body)
  1365. if err != nil {
  1366. return nil, err
  1367. }
  1368. req = req.WithContext(ctx)
  1369. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1370. return nil, err
  1371. }
  1372. return c.Client.Do(req)
  1373. }
  1374. func (c *Client) SessionShell(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1375. req, err := NewSessionShellRequest(c.Server, sessionID, params, body)
  1376. if err != nil {
  1377. return nil, err
  1378. }
  1379. req = req.WithContext(ctx)
  1380. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1381. return nil, err
  1382. }
  1383. return c.Client.Do(req)
  1384. }
  1385. func (c *Client) SessionSummarizeWithBody(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1386. req, err := NewSessionSummarizeRequestWithBody(c.Server, sessionID, params, contentType, body)
  1387. if err != nil {
  1388. return nil, err
  1389. }
  1390. req = req.WithContext(ctx)
  1391. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1392. return nil, err
  1393. }
  1394. return c.Client.Do(req)
  1395. }
  1396. func (c *Client) SessionSummarize(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1397. req, err := NewSessionSummarizeRequest(c.Server, sessionID, params, body)
  1398. if err != nil {
  1399. return nil, err
  1400. }
  1401. req = req.WithContext(ctx)
  1402. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1403. return nil, err
  1404. }
  1405. return c.Client.Do(req)
  1406. }
  1407. func (c *Client) SessionTodo(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1408. req, err := NewSessionTodoRequest(c.Server, sessionID, params)
  1409. if err != nil {
  1410. return nil, err
  1411. }
  1412. req = req.WithContext(ctx)
  1413. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1414. return nil, err
  1415. }
  1416. return c.Client.Do(req)
  1417. }
  1418. func (c *Client) SessionUnrevert(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1419. req, err := NewSessionUnrevertRequest(c.Server, sessionID, params)
  1420. if err != nil {
  1421. return nil, err
  1422. }
  1423. req = req.WithContext(ctx)
  1424. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1425. return nil, err
  1426. }
  1427. return c.Client.Do(req)
  1428. }
  1429. func (c *Client) TuiAppendPromptWithBody(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1430. req, err := NewTuiAppendPromptRequestWithBody(c.Server, params, contentType, body)
  1431. if err != nil {
  1432. return nil, err
  1433. }
  1434. req = req.WithContext(ctx)
  1435. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1436. return nil, err
  1437. }
  1438. return c.Client.Do(req)
  1439. }
  1440. func (c *Client) TuiAppendPrompt(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1441. req, err := NewTuiAppendPromptRequest(c.Server, params, body)
  1442. if err != nil {
  1443. return nil, err
  1444. }
  1445. req = req.WithContext(ctx)
  1446. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1447. return nil, err
  1448. }
  1449. return c.Client.Do(req)
  1450. }
  1451. func (c *Client) TuiClearPrompt(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1452. req, err := NewTuiClearPromptRequest(c.Server, params)
  1453. if err != nil {
  1454. return nil, err
  1455. }
  1456. req = req.WithContext(ctx)
  1457. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1458. return nil, err
  1459. }
  1460. return c.Client.Do(req)
  1461. }
  1462. func (c *Client) TuiControlNext(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1463. req, err := NewTuiControlNextRequest(c.Server, params)
  1464. if err != nil {
  1465. return nil, err
  1466. }
  1467. req = req.WithContext(ctx)
  1468. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1469. return nil, err
  1470. }
  1471. return c.Client.Do(req)
  1472. }
  1473. func (c *Client) TuiControlResponseWithBody(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1474. req, err := NewTuiControlResponseRequestWithBody(c.Server, params, contentType, body)
  1475. if err != nil {
  1476. return nil, err
  1477. }
  1478. req = req.WithContext(ctx)
  1479. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1480. return nil, err
  1481. }
  1482. return c.Client.Do(req)
  1483. }
  1484. func (c *Client) TuiControlResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1485. req, err := NewTuiControlResponseRequest(c.Server, params, body)
  1486. if err != nil {
  1487. return nil, err
  1488. }
  1489. req = req.WithContext(ctx)
  1490. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1491. return nil, err
  1492. }
  1493. return c.Client.Do(req)
  1494. }
  1495. func (c *Client) TuiExecuteCommandWithBody(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1496. req, err := NewTuiExecuteCommandRequestWithBody(c.Server, params, contentType, body)
  1497. if err != nil {
  1498. return nil, err
  1499. }
  1500. req = req.WithContext(ctx)
  1501. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1502. return nil, err
  1503. }
  1504. return c.Client.Do(req)
  1505. }
  1506. func (c *Client) TuiExecuteCommand(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1507. req, err := NewTuiExecuteCommandRequest(c.Server, params, body)
  1508. if err != nil {
  1509. return nil, err
  1510. }
  1511. req = req.WithContext(ctx)
  1512. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1513. return nil, err
  1514. }
  1515. return c.Client.Do(req)
  1516. }
  1517. func (c *Client) TuiOpenHelp(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1518. req, err := NewTuiOpenHelpRequest(c.Server, params)
  1519. if err != nil {
  1520. return nil, err
  1521. }
  1522. req = req.WithContext(ctx)
  1523. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1524. return nil, err
  1525. }
  1526. return c.Client.Do(req)
  1527. }
  1528. func (c *Client) TuiOpenModels(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1529. req, err := NewTuiOpenModelsRequest(c.Server, params)
  1530. if err != nil {
  1531. return nil, err
  1532. }
  1533. req = req.WithContext(ctx)
  1534. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1535. return nil, err
  1536. }
  1537. return c.Client.Do(req)
  1538. }
  1539. func (c *Client) TuiOpenSessions(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1540. req, err := NewTuiOpenSessionsRequest(c.Server, params)
  1541. if err != nil {
  1542. return nil, err
  1543. }
  1544. req = req.WithContext(ctx)
  1545. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1546. return nil, err
  1547. }
  1548. return c.Client.Do(req)
  1549. }
  1550. func (c *Client) TuiOpenThemes(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1551. req, err := NewTuiOpenThemesRequest(c.Server, params)
  1552. if err != nil {
  1553. return nil, err
  1554. }
  1555. req = req.WithContext(ctx)
  1556. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1557. return nil, err
  1558. }
  1559. return c.Client.Do(req)
  1560. }
  1561. func (c *Client) TuiPublishWithBody(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1562. req, err := NewTuiPublishRequestWithBody(c.Server, params, contentType, body)
  1563. if err != nil {
  1564. return nil, err
  1565. }
  1566. req = req.WithContext(ctx)
  1567. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1568. return nil, err
  1569. }
  1570. return c.Client.Do(req)
  1571. }
  1572. func (c *Client) TuiPublish(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1573. req, err := NewTuiPublishRequest(c.Server, params, body)
  1574. if err != nil {
  1575. return nil, err
  1576. }
  1577. req = req.WithContext(ctx)
  1578. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1579. return nil, err
  1580. }
  1581. return c.Client.Do(req)
  1582. }
  1583. func (c *Client) TuiSelectSessionWithBody(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1584. req, err := NewTuiSelectSessionRequestWithBody(c.Server, params, contentType, body)
  1585. if err != nil {
  1586. return nil, err
  1587. }
  1588. req = req.WithContext(ctx)
  1589. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1590. return nil, err
  1591. }
  1592. return c.Client.Do(req)
  1593. }
  1594. func (c *Client) TuiSelectSession(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1595. req, err := NewTuiSelectSessionRequest(c.Server, params, body)
  1596. if err != nil {
  1597. return nil, err
  1598. }
  1599. req = req.WithContext(ctx)
  1600. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1601. return nil, err
  1602. }
  1603. return c.Client.Do(req)
  1604. }
  1605. func (c *Client) TuiShowToastWithBody(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1606. req, err := NewTuiShowToastRequestWithBody(c.Server, params, contentType, body)
  1607. if err != nil {
  1608. return nil, err
  1609. }
  1610. req = req.WithContext(ctx)
  1611. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1612. return nil, err
  1613. }
  1614. return c.Client.Do(req)
  1615. }
  1616. func (c *Client) TuiShowToast(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1617. req, err := NewTuiShowToastRequest(c.Server, params, body)
  1618. if err != nil {
  1619. return nil, err
  1620. }
  1621. req = req.WithContext(ctx)
  1622. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1623. return nil, err
  1624. }
  1625. return c.Client.Do(req)
  1626. }
  1627. func (c *Client) TuiSubmitPrompt(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1628. req, err := NewTuiSubmitPromptRequest(c.Server, params)
  1629. if err != nil {
  1630. return nil, err
  1631. }
  1632. req = req.WithContext(ctx)
  1633. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1634. return nil, err
  1635. }
  1636. return c.Client.Do(req)
  1637. }
  1638. func (c *Client) VcsGet(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1639. req, err := NewVcsGetRequest(c.Server, params)
  1640. if err != nil {
  1641. return nil, err
  1642. }
  1643. req = req.WithContext(ctx)
  1644. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1645. return nil, err
  1646. }
  1647. return c.Client.Do(req)
  1648. }
  1649. // NewAppAgentsRequest generates requests for AppAgents
  1650. func NewAppAgentsRequest(server string, params *AppAgentsParams) (*http.Request, error) {
  1651. var err error
  1652. serverURL, err := url.Parse(server)
  1653. if err != nil {
  1654. return nil, err
  1655. }
  1656. operationPath := fmt.Sprintf("/agent")
  1657. if operationPath[0] == '/' {
  1658. operationPath = "." + operationPath
  1659. }
  1660. queryURL, err := serverURL.Parse(operationPath)
  1661. if err != nil {
  1662. return nil, err
  1663. }
  1664. if params != nil {
  1665. queryValues := queryURL.Query()
  1666. if params.Directory != nil {
  1667. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1668. return nil, err
  1669. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1670. return nil, err
  1671. } else {
  1672. for k, v := range parsed {
  1673. for _, v2 := range v {
  1674. queryValues.Add(k, v2)
  1675. }
  1676. }
  1677. }
  1678. }
  1679. queryURL.RawQuery = queryValues.Encode()
  1680. }
  1681. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1682. if err != nil {
  1683. return nil, err
  1684. }
  1685. return req, nil
  1686. }
  1687. // NewAuthSetRequest calls the generic AuthSet builder with application/json body
  1688. func NewAuthSetRequest(server string, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody) (*http.Request, error) {
  1689. var bodyReader io.Reader
  1690. buf, err := json.Marshal(body)
  1691. if err != nil {
  1692. return nil, err
  1693. }
  1694. bodyReader = bytes.NewReader(buf)
  1695. return NewAuthSetRequestWithBody(server, providerID, params, "application/json", bodyReader)
  1696. }
  1697. // NewAuthSetRequestWithBody generates requests for AuthSet with any type of body
  1698. func NewAuthSetRequestWithBody(server string, providerID string, params *AuthSetParams, contentType string, body io.Reader) (*http.Request, error) {
  1699. var err error
  1700. var pathParam0 string
  1701. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  1702. if err != nil {
  1703. return nil, err
  1704. }
  1705. serverURL, err := url.Parse(server)
  1706. if err != nil {
  1707. return nil, err
  1708. }
  1709. operationPath := fmt.Sprintf("/auth/%s", pathParam0)
  1710. if operationPath[0] == '/' {
  1711. operationPath = "." + operationPath
  1712. }
  1713. queryURL, err := serverURL.Parse(operationPath)
  1714. if err != nil {
  1715. return nil, err
  1716. }
  1717. if params != nil {
  1718. queryValues := queryURL.Query()
  1719. if params.Directory != nil {
  1720. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1721. return nil, err
  1722. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1723. return nil, err
  1724. } else {
  1725. for k, v := range parsed {
  1726. for _, v2 := range v {
  1727. queryValues.Add(k, v2)
  1728. }
  1729. }
  1730. }
  1731. }
  1732. queryURL.RawQuery = queryValues.Encode()
  1733. }
  1734. req, err := http.NewRequest("PUT", queryURL.String(), body)
  1735. if err != nil {
  1736. return nil, err
  1737. }
  1738. req.Header.Add("Content-Type", contentType)
  1739. return req, nil
  1740. }
  1741. // NewCommandListRequest generates requests for CommandList
  1742. func NewCommandListRequest(server string, params *CommandListParams) (*http.Request, error) {
  1743. var err error
  1744. serverURL, err := url.Parse(server)
  1745. if err != nil {
  1746. return nil, err
  1747. }
  1748. operationPath := fmt.Sprintf("/command")
  1749. if operationPath[0] == '/' {
  1750. operationPath = "." + operationPath
  1751. }
  1752. queryURL, err := serverURL.Parse(operationPath)
  1753. if err != nil {
  1754. return nil, err
  1755. }
  1756. if params != nil {
  1757. queryValues := queryURL.Query()
  1758. if params.Directory != nil {
  1759. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1760. return nil, err
  1761. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1762. return nil, err
  1763. } else {
  1764. for k, v := range parsed {
  1765. for _, v2 := range v {
  1766. queryValues.Add(k, v2)
  1767. }
  1768. }
  1769. }
  1770. }
  1771. queryURL.RawQuery = queryValues.Encode()
  1772. }
  1773. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1774. if err != nil {
  1775. return nil, err
  1776. }
  1777. return req, nil
  1778. }
  1779. // NewConfigGetRequest generates requests for ConfigGet
  1780. func NewConfigGetRequest(server string, params *ConfigGetParams) (*http.Request, error) {
  1781. var err error
  1782. serverURL, err := url.Parse(server)
  1783. if err != nil {
  1784. return nil, err
  1785. }
  1786. operationPath := fmt.Sprintf("/config")
  1787. if operationPath[0] == '/' {
  1788. operationPath = "." + operationPath
  1789. }
  1790. queryURL, err := serverURL.Parse(operationPath)
  1791. if err != nil {
  1792. return nil, err
  1793. }
  1794. if params != nil {
  1795. queryValues := queryURL.Query()
  1796. if params.Directory != nil {
  1797. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1798. return nil, err
  1799. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1800. return nil, err
  1801. } else {
  1802. for k, v := range parsed {
  1803. for _, v2 := range v {
  1804. queryValues.Add(k, v2)
  1805. }
  1806. }
  1807. }
  1808. }
  1809. queryURL.RawQuery = queryValues.Encode()
  1810. }
  1811. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1812. if err != nil {
  1813. return nil, err
  1814. }
  1815. return req, nil
  1816. }
  1817. // NewConfigUpdateRequest calls the generic ConfigUpdate builder with application/json body
  1818. func NewConfigUpdateRequest(server string, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody) (*http.Request, error) {
  1819. var bodyReader io.Reader
  1820. buf, err := json.Marshal(body)
  1821. if err != nil {
  1822. return nil, err
  1823. }
  1824. bodyReader = bytes.NewReader(buf)
  1825. return NewConfigUpdateRequestWithBody(server, params, "application/json", bodyReader)
  1826. }
  1827. // NewConfigUpdateRequestWithBody generates requests for ConfigUpdate with any type of body
  1828. func NewConfigUpdateRequestWithBody(server string, params *ConfigUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  1829. var err error
  1830. serverURL, err := url.Parse(server)
  1831. if err != nil {
  1832. return nil, err
  1833. }
  1834. operationPath := fmt.Sprintf("/config")
  1835. if operationPath[0] == '/' {
  1836. operationPath = "." + operationPath
  1837. }
  1838. queryURL, err := serverURL.Parse(operationPath)
  1839. if err != nil {
  1840. return nil, err
  1841. }
  1842. if params != nil {
  1843. queryValues := queryURL.Query()
  1844. if params.Directory != nil {
  1845. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1846. return nil, err
  1847. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1848. return nil, err
  1849. } else {
  1850. for k, v := range parsed {
  1851. for _, v2 := range v {
  1852. queryValues.Add(k, v2)
  1853. }
  1854. }
  1855. }
  1856. }
  1857. queryURL.RawQuery = queryValues.Encode()
  1858. }
  1859. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  1860. if err != nil {
  1861. return nil, err
  1862. }
  1863. req.Header.Add("Content-Type", contentType)
  1864. return req, nil
  1865. }
  1866. // NewConfigProvidersRequest generates requests for ConfigProviders
  1867. func NewConfigProvidersRequest(server string, params *ConfigProvidersParams) (*http.Request, error) {
  1868. var err error
  1869. serverURL, err := url.Parse(server)
  1870. if err != nil {
  1871. return nil, err
  1872. }
  1873. operationPath := fmt.Sprintf("/config/providers")
  1874. if operationPath[0] == '/' {
  1875. operationPath = "." + operationPath
  1876. }
  1877. queryURL, err := serverURL.Parse(operationPath)
  1878. if err != nil {
  1879. return nil, err
  1880. }
  1881. if params != nil {
  1882. queryValues := queryURL.Query()
  1883. if params.Directory != nil {
  1884. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1885. return nil, err
  1886. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1887. return nil, err
  1888. } else {
  1889. for k, v := range parsed {
  1890. for _, v2 := range v {
  1891. queryValues.Add(k, v2)
  1892. }
  1893. }
  1894. }
  1895. }
  1896. queryURL.RawQuery = queryValues.Encode()
  1897. }
  1898. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1899. if err != nil {
  1900. return nil, err
  1901. }
  1902. return req, nil
  1903. }
  1904. // NewEventSubscribeRequest generates requests for EventSubscribe
  1905. func NewEventSubscribeRequest(server string, params *EventSubscribeParams) (*http.Request, error) {
  1906. var err error
  1907. serverURL, err := url.Parse(server)
  1908. if err != nil {
  1909. return nil, err
  1910. }
  1911. operationPath := fmt.Sprintf("/event")
  1912. if operationPath[0] == '/' {
  1913. operationPath = "." + operationPath
  1914. }
  1915. queryURL, err := serverURL.Parse(operationPath)
  1916. if err != nil {
  1917. return nil, err
  1918. }
  1919. if params != nil {
  1920. queryValues := queryURL.Query()
  1921. if params.Directory != nil {
  1922. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1923. return nil, err
  1924. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1925. return nil, err
  1926. } else {
  1927. for k, v := range parsed {
  1928. for _, v2 := range v {
  1929. queryValues.Add(k, v2)
  1930. }
  1931. }
  1932. }
  1933. }
  1934. queryURL.RawQuery = queryValues.Encode()
  1935. }
  1936. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1937. if err != nil {
  1938. return nil, err
  1939. }
  1940. return req, nil
  1941. }
  1942. // NewExperimentalResourceListRequest generates requests for ExperimentalResourceList
  1943. func NewExperimentalResourceListRequest(server string, params *ExperimentalResourceListParams) (*http.Request, error) {
  1944. var err error
  1945. serverURL, err := url.Parse(server)
  1946. if err != nil {
  1947. return nil, err
  1948. }
  1949. operationPath := fmt.Sprintf("/experimental/resource")
  1950. if operationPath[0] == '/' {
  1951. operationPath = "." + operationPath
  1952. }
  1953. queryURL, err := serverURL.Parse(operationPath)
  1954. if err != nil {
  1955. return nil, err
  1956. }
  1957. if params != nil {
  1958. queryValues := queryURL.Query()
  1959. if params.Directory != nil {
  1960. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1961. return nil, err
  1962. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1963. return nil, err
  1964. } else {
  1965. for k, v := range parsed {
  1966. for _, v2 := range v {
  1967. queryValues.Add(k, v2)
  1968. }
  1969. }
  1970. }
  1971. }
  1972. queryURL.RawQuery = queryValues.Encode()
  1973. }
  1974. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1975. if err != nil {
  1976. return nil, err
  1977. }
  1978. return req, nil
  1979. }
  1980. // NewToolListRequest generates requests for ToolList
  1981. func NewToolListRequest(server string, params *ToolListParams) (*http.Request, error) {
  1982. var err error
  1983. serverURL, err := url.Parse(server)
  1984. if err != nil {
  1985. return nil, err
  1986. }
  1987. operationPath := fmt.Sprintf("/experimental/tool")
  1988. if operationPath[0] == '/' {
  1989. operationPath = "." + operationPath
  1990. }
  1991. queryURL, err := serverURL.Parse(operationPath)
  1992. if err != nil {
  1993. return nil, err
  1994. }
  1995. if params != nil {
  1996. queryValues := queryURL.Query()
  1997. if params.Directory != nil {
  1998. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1999. return nil, err
  2000. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2001. return nil, err
  2002. } else {
  2003. for k, v := range parsed {
  2004. for _, v2 := range v {
  2005. queryValues.Add(k, v2)
  2006. }
  2007. }
  2008. }
  2009. }
  2010. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider", runtime.ParamLocationQuery, params.Provider); err != nil {
  2011. return nil, err
  2012. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2013. return nil, err
  2014. } else {
  2015. for k, v := range parsed {
  2016. for _, v2 := range v {
  2017. queryValues.Add(k, v2)
  2018. }
  2019. }
  2020. }
  2021. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "model", runtime.ParamLocationQuery, params.Model); err != nil {
  2022. return nil, err
  2023. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2024. return nil, err
  2025. } else {
  2026. for k, v := range parsed {
  2027. for _, v2 := range v {
  2028. queryValues.Add(k, v2)
  2029. }
  2030. }
  2031. }
  2032. queryURL.RawQuery = queryValues.Encode()
  2033. }
  2034. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2035. if err != nil {
  2036. return nil, err
  2037. }
  2038. return req, nil
  2039. }
  2040. // NewToolIdsRequest generates requests for ToolIds
  2041. func NewToolIdsRequest(server string, params *ToolIdsParams) (*http.Request, error) {
  2042. var err error
  2043. serverURL, err := url.Parse(server)
  2044. if err != nil {
  2045. return nil, err
  2046. }
  2047. operationPath := fmt.Sprintf("/experimental/tool/ids")
  2048. if operationPath[0] == '/' {
  2049. operationPath = "." + operationPath
  2050. }
  2051. queryURL, err := serverURL.Parse(operationPath)
  2052. if err != nil {
  2053. return nil, err
  2054. }
  2055. if params != nil {
  2056. queryValues := queryURL.Query()
  2057. if params.Directory != nil {
  2058. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2059. return nil, err
  2060. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2061. return nil, err
  2062. } else {
  2063. for k, v := range parsed {
  2064. for _, v2 := range v {
  2065. queryValues.Add(k, v2)
  2066. }
  2067. }
  2068. }
  2069. }
  2070. queryURL.RawQuery = queryValues.Encode()
  2071. }
  2072. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2073. if err != nil {
  2074. return nil, err
  2075. }
  2076. return req, nil
  2077. }
  2078. // NewWorktreeListRequest generates requests for WorktreeList
  2079. func NewWorktreeListRequest(server string, params *WorktreeListParams) (*http.Request, error) {
  2080. var err error
  2081. serverURL, err := url.Parse(server)
  2082. if err != nil {
  2083. return nil, err
  2084. }
  2085. operationPath := fmt.Sprintf("/experimental/worktree")
  2086. if operationPath[0] == '/' {
  2087. operationPath = "." + operationPath
  2088. }
  2089. queryURL, err := serverURL.Parse(operationPath)
  2090. if err != nil {
  2091. return nil, err
  2092. }
  2093. if params != nil {
  2094. queryValues := queryURL.Query()
  2095. if params.Directory != nil {
  2096. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2097. return nil, err
  2098. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2099. return nil, err
  2100. } else {
  2101. for k, v := range parsed {
  2102. for _, v2 := range v {
  2103. queryValues.Add(k, v2)
  2104. }
  2105. }
  2106. }
  2107. }
  2108. queryURL.RawQuery = queryValues.Encode()
  2109. }
  2110. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2111. if err != nil {
  2112. return nil, err
  2113. }
  2114. return req, nil
  2115. }
  2116. // NewWorktreeCreateRequest calls the generic WorktreeCreate builder with application/json body
  2117. func NewWorktreeCreateRequest(server string, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody) (*http.Request, error) {
  2118. var bodyReader io.Reader
  2119. buf, err := json.Marshal(body)
  2120. if err != nil {
  2121. return nil, err
  2122. }
  2123. bodyReader = bytes.NewReader(buf)
  2124. return NewWorktreeCreateRequestWithBody(server, params, "application/json", bodyReader)
  2125. }
  2126. // NewWorktreeCreateRequestWithBody generates requests for WorktreeCreate with any type of body
  2127. func NewWorktreeCreateRequestWithBody(server string, params *WorktreeCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  2128. var err error
  2129. serverURL, err := url.Parse(server)
  2130. if err != nil {
  2131. return nil, err
  2132. }
  2133. operationPath := fmt.Sprintf("/experimental/worktree")
  2134. if operationPath[0] == '/' {
  2135. operationPath = "." + operationPath
  2136. }
  2137. queryURL, err := serverURL.Parse(operationPath)
  2138. if err != nil {
  2139. return nil, err
  2140. }
  2141. if params != nil {
  2142. queryValues := queryURL.Query()
  2143. if params.Directory != nil {
  2144. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2145. return nil, err
  2146. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2147. return nil, err
  2148. } else {
  2149. for k, v := range parsed {
  2150. for _, v2 := range v {
  2151. queryValues.Add(k, v2)
  2152. }
  2153. }
  2154. }
  2155. }
  2156. queryURL.RawQuery = queryValues.Encode()
  2157. }
  2158. req, err := http.NewRequest("POST", queryURL.String(), body)
  2159. if err != nil {
  2160. return nil, err
  2161. }
  2162. req.Header.Add("Content-Type", contentType)
  2163. return req, nil
  2164. }
  2165. // NewFileListRequest generates requests for FileList
  2166. func NewFileListRequest(server string, params *FileListParams) (*http.Request, error) {
  2167. var err error
  2168. serverURL, err := url.Parse(server)
  2169. if err != nil {
  2170. return nil, err
  2171. }
  2172. operationPath := fmt.Sprintf("/file")
  2173. if operationPath[0] == '/' {
  2174. operationPath = "." + operationPath
  2175. }
  2176. queryURL, err := serverURL.Parse(operationPath)
  2177. if err != nil {
  2178. return nil, err
  2179. }
  2180. if params != nil {
  2181. queryValues := queryURL.Query()
  2182. if params.Directory != nil {
  2183. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2184. return nil, err
  2185. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2186. return nil, err
  2187. } else {
  2188. for k, v := range parsed {
  2189. for _, v2 := range v {
  2190. queryValues.Add(k, v2)
  2191. }
  2192. }
  2193. }
  2194. }
  2195. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "path", runtime.ParamLocationQuery, params.Path); err != nil {
  2196. return nil, err
  2197. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2198. return nil, err
  2199. } else {
  2200. for k, v := range parsed {
  2201. for _, v2 := range v {
  2202. queryValues.Add(k, v2)
  2203. }
  2204. }
  2205. }
  2206. queryURL.RawQuery = queryValues.Encode()
  2207. }
  2208. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2209. if err != nil {
  2210. return nil, err
  2211. }
  2212. return req, nil
  2213. }
  2214. // NewFileReadRequest generates requests for FileRead
  2215. func NewFileReadRequest(server string, params *FileReadParams) (*http.Request, error) {
  2216. var err error
  2217. serverURL, err := url.Parse(server)
  2218. if err != nil {
  2219. return nil, err
  2220. }
  2221. operationPath := fmt.Sprintf("/file/content")
  2222. if operationPath[0] == '/' {
  2223. operationPath = "." + operationPath
  2224. }
  2225. queryURL, err := serverURL.Parse(operationPath)
  2226. if err != nil {
  2227. return nil, err
  2228. }
  2229. if params != nil {
  2230. queryValues := queryURL.Query()
  2231. if params.Directory != nil {
  2232. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2233. return nil, err
  2234. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2235. return nil, err
  2236. } else {
  2237. for k, v := range parsed {
  2238. for _, v2 := range v {
  2239. queryValues.Add(k, v2)
  2240. }
  2241. }
  2242. }
  2243. }
  2244. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "path", runtime.ParamLocationQuery, params.Path); err != nil {
  2245. return nil, err
  2246. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2247. return nil, err
  2248. } else {
  2249. for k, v := range parsed {
  2250. for _, v2 := range v {
  2251. queryValues.Add(k, v2)
  2252. }
  2253. }
  2254. }
  2255. queryURL.RawQuery = queryValues.Encode()
  2256. }
  2257. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2258. if err != nil {
  2259. return nil, err
  2260. }
  2261. return req, nil
  2262. }
  2263. // NewFileStatusRequest generates requests for FileStatus
  2264. func NewFileStatusRequest(server string, params *FileStatusParams) (*http.Request, error) {
  2265. var err error
  2266. serverURL, err := url.Parse(server)
  2267. if err != nil {
  2268. return nil, err
  2269. }
  2270. operationPath := fmt.Sprintf("/file/status")
  2271. if operationPath[0] == '/' {
  2272. operationPath = "." + operationPath
  2273. }
  2274. queryURL, err := serverURL.Parse(operationPath)
  2275. if err != nil {
  2276. return nil, err
  2277. }
  2278. if params != nil {
  2279. queryValues := queryURL.Query()
  2280. if params.Directory != nil {
  2281. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2282. return nil, err
  2283. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2284. return nil, err
  2285. } else {
  2286. for k, v := range parsed {
  2287. for _, v2 := range v {
  2288. queryValues.Add(k, v2)
  2289. }
  2290. }
  2291. }
  2292. }
  2293. queryURL.RawQuery = queryValues.Encode()
  2294. }
  2295. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2296. if err != nil {
  2297. return nil, err
  2298. }
  2299. return req, nil
  2300. }
  2301. // NewFindTextRequest generates requests for FindText
  2302. func NewFindTextRequest(server string, params *FindTextParams) (*http.Request, error) {
  2303. var err error
  2304. serverURL, err := url.Parse(server)
  2305. if err != nil {
  2306. return nil, err
  2307. }
  2308. operationPath := fmt.Sprintf("/find")
  2309. if operationPath[0] == '/' {
  2310. operationPath = "." + operationPath
  2311. }
  2312. queryURL, err := serverURL.Parse(operationPath)
  2313. if err != nil {
  2314. return nil, err
  2315. }
  2316. if params != nil {
  2317. queryValues := queryURL.Query()
  2318. if params.Directory != nil {
  2319. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2320. return nil, err
  2321. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2322. return nil, err
  2323. } else {
  2324. for k, v := range parsed {
  2325. for _, v2 := range v {
  2326. queryValues.Add(k, v2)
  2327. }
  2328. }
  2329. }
  2330. }
  2331. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pattern", runtime.ParamLocationQuery, params.Pattern); err != nil {
  2332. return nil, err
  2333. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2334. return nil, err
  2335. } else {
  2336. for k, v := range parsed {
  2337. for _, v2 := range v {
  2338. queryValues.Add(k, v2)
  2339. }
  2340. }
  2341. }
  2342. queryURL.RawQuery = queryValues.Encode()
  2343. }
  2344. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2345. if err != nil {
  2346. return nil, err
  2347. }
  2348. return req, nil
  2349. }
  2350. // NewFindFilesRequest generates requests for FindFiles
  2351. func NewFindFilesRequest(server string, params *FindFilesParams) (*http.Request, error) {
  2352. var err error
  2353. serverURL, err := url.Parse(server)
  2354. if err != nil {
  2355. return nil, err
  2356. }
  2357. operationPath := fmt.Sprintf("/find/file")
  2358. if operationPath[0] == '/' {
  2359. operationPath = "." + operationPath
  2360. }
  2361. queryURL, err := serverURL.Parse(operationPath)
  2362. if err != nil {
  2363. return nil, err
  2364. }
  2365. if params != nil {
  2366. queryValues := queryURL.Query()
  2367. if params.Directory != nil {
  2368. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2369. return nil, err
  2370. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2371. return nil, err
  2372. } else {
  2373. for k, v := range parsed {
  2374. for _, v2 := range v {
  2375. queryValues.Add(k, v2)
  2376. }
  2377. }
  2378. }
  2379. }
  2380. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "query", runtime.ParamLocationQuery, params.Query); err != nil {
  2381. return nil, err
  2382. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2383. return nil, err
  2384. } else {
  2385. for k, v := range parsed {
  2386. for _, v2 := range v {
  2387. queryValues.Add(k, v2)
  2388. }
  2389. }
  2390. }
  2391. if params.Dirs != nil {
  2392. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dirs", runtime.ParamLocationQuery, *params.Dirs); err != nil {
  2393. return nil, err
  2394. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2395. return nil, err
  2396. } else {
  2397. for k, v := range parsed {
  2398. for _, v2 := range v {
  2399. queryValues.Add(k, v2)
  2400. }
  2401. }
  2402. }
  2403. }
  2404. if params.Type != nil {
  2405. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil {
  2406. return nil, err
  2407. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2408. return nil, err
  2409. } else {
  2410. for k, v := range parsed {
  2411. for _, v2 := range v {
  2412. queryValues.Add(k, v2)
  2413. }
  2414. }
  2415. }
  2416. }
  2417. if params.Limit != nil {
  2418. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  2419. return nil, err
  2420. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2421. return nil, err
  2422. } else {
  2423. for k, v := range parsed {
  2424. for _, v2 := range v {
  2425. queryValues.Add(k, v2)
  2426. }
  2427. }
  2428. }
  2429. }
  2430. queryURL.RawQuery = queryValues.Encode()
  2431. }
  2432. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2433. if err != nil {
  2434. return nil, err
  2435. }
  2436. return req, nil
  2437. }
  2438. // NewFindSymbolsRequest generates requests for FindSymbols
  2439. func NewFindSymbolsRequest(server string, params *FindSymbolsParams) (*http.Request, error) {
  2440. var err error
  2441. serverURL, err := url.Parse(server)
  2442. if err != nil {
  2443. return nil, err
  2444. }
  2445. operationPath := fmt.Sprintf("/find/symbol")
  2446. if operationPath[0] == '/' {
  2447. operationPath = "." + operationPath
  2448. }
  2449. queryURL, err := serverURL.Parse(operationPath)
  2450. if err != nil {
  2451. return nil, err
  2452. }
  2453. if params != nil {
  2454. queryValues := queryURL.Query()
  2455. if params.Directory != nil {
  2456. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2457. return nil, err
  2458. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2459. return nil, err
  2460. } else {
  2461. for k, v := range parsed {
  2462. for _, v2 := range v {
  2463. queryValues.Add(k, v2)
  2464. }
  2465. }
  2466. }
  2467. }
  2468. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "query", runtime.ParamLocationQuery, params.Query); err != nil {
  2469. return nil, err
  2470. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2471. return nil, err
  2472. } else {
  2473. for k, v := range parsed {
  2474. for _, v2 := range v {
  2475. queryValues.Add(k, v2)
  2476. }
  2477. }
  2478. }
  2479. queryURL.RawQuery = queryValues.Encode()
  2480. }
  2481. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2482. if err != nil {
  2483. return nil, err
  2484. }
  2485. return req, nil
  2486. }
  2487. // NewFormatterStatusRequest generates requests for FormatterStatus
  2488. func NewFormatterStatusRequest(server string, params *FormatterStatusParams) (*http.Request, error) {
  2489. var err error
  2490. serverURL, err := url.Parse(server)
  2491. if err != nil {
  2492. return nil, err
  2493. }
  2494. operationPath := fmt.Sprintf("/formatter")
  2495. if operationPath[0] == '/' {
  2496. operationPath = "." + operationPath
  2497. }
  2498. queryURL, err := serverURL.Parse(operationPath)
  2499. if err != nil {
  2500. return nil, err
  2501. }
  2502. if params != nil {
  2503. queryValues := queryURL.Query()
  2504. if params.Directory != nil {
  2505. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2506. return nil, err
  2507. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2508. return nil, err
  2509. } else {
  2510. for k, v := range parsed {
  2511. for _, v2 := range v {
  2512. queryValues.Add(k, v2)
  2513. }
  2514. }
  2515. }
  2516. }
  2517. queryURL.RawQuery = queryValues.Encode()
  2518. }
  2519. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2520. if err != nil {
  2521. return nil, err
  2522. }
  2523. return req, nil
  2524. }
  2525. // NewGlobalDisposeRequest generates requests for GlobalDispose
  2526. func NewGlobalDisposeRequest(server string) (*http.Request, error) {
  2527. var err error
  2528. serverURL, err := url.Parse(server)
  2529. if err != nil {
  2530. return nil, err
  2531. }
  2532. operationPath := fmt.Sprintf("/global/dispose")
  2533. if operationPath[0] == '/' {
  2534. operationPath = "." + operationPath
  2535. }
  2536. queryURL, err := serverURL.Parse(operationPath)
  2537. if err != nil {
  2538. return nil, err
  2539. }
  2540. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2541. if err != nil {
  2542. return nil, err
  2543. }
  2544. return req, nil
  2545. }
  2546. // NewGlobalEventRequest generates requests for GlobalEvent
  2547. func NewGlobalEventRequest(server string) (*http.Request, error) {
  2548. var err error
  2549. serverURL, err := url.Parse(server)
  2550. if err != nil {
  2551. return nil, err
  2552. }
  2553. operationPath := fmt.Sprintf("/global/event")
  2554. if operationPath[0] == '/' {
  2555. operationPath = "." + operationPath
  2556. }
  2557. queryURL, err := serverURL.Parse(operationPath)
  2558. if err != nil {
  2559. return nil, err
  2560. }
  2561. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2562. if err != nil {
  2563. return nil, err
  2564. }
  2565. return req, nil
  2566. }
  2567. // NewGlobalHealthRequest generates requests for GlobalHealth
  2568. func NewGlobalHealthRequest(server string) (*http.Request, error) {
  2569. var err error
  2570. serverURL, err := url.Parse(server)
  2571. if err != nil {
  2572. return nil, err
  2573. }
  2574. operationPath := fmt.Sprintf("/global/health")
  2575. if operationPath[0] == '/' {
  2576. operationPath = "." + operationPath
  2577. }
  2578. queryURL, err := serverURL.Parse(operationPath)
  2579. if err != nil {
  2580. return nil, err
  2581. }
  2582. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2583. if err != nil {
  2584. return nil, err
  2585. }
  2586. return req, nil
  2587. }
  2588. // NewInstanceDisposeRequest generates requests for InstanceDispose
  2589. func NewInstanceDisposeRequest(server string, params *InstanceDisposeParams) (*http.Request, error) {
  2590. var err error
  2591. serverURL, err := url.Parse(server)
  2592. if err != nil {
  2593. return nil, err
  2594. }
  2595. operationPath := fmt.Sprintf("/instance/dispose")
  2596. if operationPath[0] == '/' {
  2597. operationPath = "." + operationPath
  2598. }
  2599. queryURL, err := serverURL.Parse(operationPath)
  2600. if err != nil {
  2601. return nil, err
  2602. }
  2603. if params != nil {
  2604. queryValues := queryURL.Query()
  2605. if params.Directory != nil {
  2606. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2607. return nil, err
  2608. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2609. return nil, err
  2610. } else {
  2611. for k, v := range parsed {
  2612. for _, v2 := range v {
  2613. queryValues.Add(k, v2)
  2614. }
  2615. }
  2616. }
  2617. }
  2618. queryURL.RawQuery = queryValues.Encode()
  2619. }
  2620. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2621. if err != nil {
  2622. return nil, err
  2623. }
  2624. return req, nil
  2625. }
  2626. // NewAppLogRequest calls the generic AppLog builder with application/json body
  2627. func NewAppLogRequest(server string, params *AppLogParams, body AppLogJSONRequestBody) (*http.Request, error) {
  2628. var bodyReader io.Reader
  2629. buf, err := json.Marshal(body)
  2630. if err != nil {
  2631. return nil, err
  2632. }
  2633. bodyReader = bytes.NewReader(buf)
  2634. return NewAppLogRequestWithBody(server, params, "application/json", bodyReader)
  2635. }
  2636. // NewAppLogRequestWithBody generates requests for AppLog with any type of body
  2637. func NewAppLogRequestWithBody(server string, params *AppLogParams, contentType string, body io.Reader) (*http.Request, error) {
  2638. var err error
  2639. serverURL, err := url.Parse(server)
  2640. if err != nil {
  2641. return nil, err
  2642. }
  2643. operationPath := fmt.Sprintf("/log")
  2644. if operationPath[0] == '/' {
  2645. operationPath = "." + operationPath
  2646. }
  2647. queryURL, err := serverURL.Parse(operationPath)
  2648. if err != nil {
  2649. return nil, err
  2650. }
  2651. if params != nil {
  2652. queryValues := queryURL.Query()
  2653. if params.Directory != nil {
  2654. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2655. return nil, err
  2656. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2657. return nil, err
  2658. } else {
  2659. for k, v := range parsed {
  2660. for _, v2 := range v {
  2661. queryValues.Add(k, v2)
  2662. }
  2663. }
  2664. }
  2665. }
  2666. queryURL.RawQuery = queryValues.Encode()
  2667. }
  2668. req, err := http.NewRequest("POST", queryURL.String(), body)
  2669. if err != nil {
  2670. return nil, err
  2671. }
  2672. req.Header.Add("Content-Type", contentType)
  2673. return req, nil
  2674. }
  2675. // NewLspStatusRequest generates requests for LspStatus
  2676. func NewLspStatusRequest(server string, params *LspStatusParams) (*http.Request, error) {
  2677. var err error
  2678. serverURL, err := url.Parse(server)
  2679. if err != nil {
  2680. return nil, err
  2681. }
  2682. operationPath := fmt.Sprintf("/lsp")
  2683. if operationPath[0] == '/' {
  2684. operationPath = "." + operationPath
  2685. }
  2686. queryURL, err := serverURL.Parse(operationPath)
  2687. if err != nil {
  2688. return nil, err
  2689. }
  2690. if params != nil {
  2691. queryValues := queryURL.Query()
  2692. if params.Directory != nil {
  2693. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2694. return nil, err
  2695. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2696. return nil, err
  2697. } else {
  2698. for k, v := range parsed {
  2699. for _, v2 := range v {
  2700. queryValues.Add(k, v2)
  2701. }
  2702. }
  2703. }
  2704. }
  2705. queryURL.RawQuery = queryValues.Encode()
  2706. }
  2707. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2708. if err != nil {
  2709. return nil, err
  2710. }
  2711. return req, nil
  2712. }
  2713. // NewMcpStatusRequest generates requests for McpStatus
  2714. func NewMcpStatusRequest(server string, params *McpStatusParams) (*http.Request, error) {
  2715. var err error
  2716. serverURL, err := url.Parse(server)
  2717. if err != nil {
  2718. return nil, err
  2719. }
  2720. operationPath := fmt.Sprintf("/mcp")
  2721. if operationPath[0] == '/' {
  2722. operationPath = "." + operationPath
  2723. }
  2724. queryURL, err := serverURL.Parse(operationPath)
  2725. if err != nil {
  2726. return nil, err
  2727. }
  2728. if params != nil {
  2729. queryValues := queryURL.Query()
  2730. if params.Directory != nil {
  2731. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2732. return nil, err
  2733. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2734. return nil, err
  2735. } else {
  2736. for k, v := range parsed {
  2737. for _, v2 := range v {
  2738. queryValues.Add(k, v2)
  2739. }
  2740. }
  2741. }
  2742. }
  2743. queryURL.RawQuery = queryValues.Encode()
  2744. }
  2745. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2746. if err != nil {
  2747. return nil, err
  2748. }
  2749. return req, nil
  2750. }
  2751. // NewMcpAddRequest calls the generic McpAdd builder with application/json body
  2752. func NewMcpAddRequest(server string, params *McpAddParams, body McpAddJSONRequestBody) (*http.Request, error) {
  2753. var bodyReader io.Reader
  2754. buf, err := json.Marshal(body)
  2755. if err != nil {
  2756. return nil, err
  2757. }
  2758. bodyReader = bytes.NewReader(buf)
  2759. return NewMcpAddRequestWithBody(server, params, "application/json", bodyReader)
  2760. }
  2761. // NewMcpAddRequestWithBody generates requests for McpAdd with any type of body
  2762. func NewMcpAddRequestWithBody(server string, params *McpAddParams, contentType string, body io.Reader) (*http.Request, error) {
  2763. var err error
  2764. serverURL, err := url.Parse(server)
  2765. if err != nil {
  2766. return nil, err
  2767. }
  2768. operationPath := fmt.Sprintf("/mcp")
  2769. if operationPath[0] == '/' {
  2770. operationPath = "." + operationPath
  2771. }
  2772. queryURL, err := serverURL.Parse(operationPath)
  2773. if err != nil {
  2774. return nil, err
  2775. }
  2776. if params != nil {
  2777. queryValues := queryURL.Query()
  2778. if params.Directory != nil {
  2779. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2780. return nil, err
  2781. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2782. return nil, err
  2783. } else {
  2784. for k, v := range parsed {
  2785. for _, v2 := range v {
  2786. queryValues.Add(k, v2)
  2787. }
  2788. }
  2789. }
  2790. }
  2791. queryURL.RawQuery = queryValues.Encode()
  2792. }
  2793. req, err := http.NewRequest("POST", queryURL.String(), body)
  2794. if err != nil {
  2795. return nil, err
  2796. }
  2797. req.Header.Add("Content-Type", contentType)
  2798. return req, nil
  2799. }
  2800. // NewMcpAuthRemoveRequest generates requests for McpAuthRemove
  2801. func NewMcpAuthRemoveRequest(server string, name string, params *McpAuthRemoveParams) (*http.Request, error) {
  2802. var err error
  2803. var pathParam0 string
  2804. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2805. if err != nil {
  2806. return nil, err
  2807. }
  2808. serverURL, err := url.Parse(server)
  2809. if err != nil {
  2810. return nil, err
  2811. }
  2812. operationPath := fmt.Sprintf("/mcp/%s/auth", pathParam0)
  2813. if operationPath[0] == '/' {
  2814. operationPath = "." + operationPath
  2815. }
  2816. queryURL, err := serverURL.Parse(operationPath)
  2817. if err != nil {
  2818. return nil, err
  2819. }
  2820. if params != nil {
  2821. queryValues := queryURL.Query()
  2822. if params.Directory != nil {
  2823. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2824. return nil, err
  2825. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2826. return nil, err
  2827. } else {
  2828. for k, v := range parsed {
  2829. for _, v2 := range v {
  2830. queryValues.Add(k, v2)
  2831. }
  2832. }
  2833. }
  2834. }
  2835. queryURL.RawQuery = queryValues.Encode()
  2836. }
  2837. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  2838. if err != nil {
  2839. return nil, err
  2840. }
  2841. return req, nil
  2842. }
  2843. // NewMcpAuthStartRequest generates requests for McpAuthStart
  2844. func NewMcpAuthStartRequest(server string, name string, params *McpAuthStartParams) (*http.Request, error) {
  2845. var err error
  2846. var pathParam0 string
  2847. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2848. if err != nil {
  2849. return nil, err
  2850. }
  2851. serverURL, err := url.Parse(server)
  2852. if err != nil {
  2853. return nil, err
  2854. }
  2855. operationPath := fmt.Sprintf("/mcp/%s/auth", pathParam0)
  2856. if operationPath[0] == '/' {
  2857. operationPath = "." + operationPath
  2858. }
  2859. queryURL, err := serverURL.Parse(operationPath)
  2860. if err != nil {
  2861. return nil, err
  2862. }
  2863. if params != nil {
  2864. queryValues := queryURL.Query()
  2865. if params.Directory != nil {
  2866. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2867. return nil, err
  2868. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2869. return nil, err
  2870. } else {
  2871. for k, v := range parsed {
  2872. for _, v2 := range v {
  2873. queryValues.Add(k, v2)
  2874. }
  2875. }
  2876. }
  2877. }
  2878. queryURL.RawQuery = queryValues.Encode()
  2879. }
  2880. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2881. if err != nil {
  2882. return nil, err
  2883. }
  2884. return req, nil
  2885. }
  2886. // NewMcpAuthAuthenticateRequest generates requests for McpAuthAuthenticate
  2887. func NewMcpAuthAuthenticateRequest(server string, name string, params *McpAuthAuthenticateParams) (*http.Request, error) {
  2888. var err error
  2889. var pathParam0 string
  2890. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2891. if err != nil {
  2892. return nil, err
  2893. }
  2894. serverURL, err := url.Parse(server)
  2895. if err != nil {
  2896. return nil, err
  2897. }
  2898. operationPath := fmt.Sprintf("/mcp/%s/auth/authenticate", pathParam0)
  2899. if operationPath[0] == '/' {
  2900. operationPath = "." + operationPath
  2901. }
  2902. queryURL, err := serverURL.Parse(operationPath)
  2903. if err != nil {
  2904. return nil, err
  2905. }
  2906. if params != nil {
  2907. queryValues := queryURL.Query()
  2908. if params.Directory != nil {
  2909. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2910. return nil, err
  2911. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2912. return nil, err
  2913. } else {
  2914. for k, v := range parsed {
  2915. for _, v2 := range v {
  2916. queryValues.Add(k, v2)
  2917. }
  2918. }
  2919. }
  2920. }
  2921. queryURL.RawQuery = queryValues.Encode()
  2922. }
  2923. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2924. if err != nil {
  2925. return nil, err
  2926. }
  2927. return req, nil
  2928. }
  2929. // NewMcpAuthCallbackRequest calls the generic McpAuthCallback builder with application/json body
  2930. func NewMcpAuthCallbackRequest(server string, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody) (*http.Request, error) {
  2931. var bodyReader io.Reader
  2932. buf, err := json.Marshal(body)
  2933. if err != nil {
  2934. return nil, err
  2935. }
  2936. bodyReader = bytes.NewReader(buf)
  2937. return NewMcpAuthCallbackRequestWithBody(server, name, params, "application/json", bodyReader)
  2938. }
  2939. // NewMcpAuthCallbackRequestWithBody generates requests for McpAuthCallback with any type of body
  2940. func NewMcpAuthCallbackRequestWithBody(server string, name string, params *McpAuthCallbackParams, contentType string, body io.Reader) (*http.Request, error) {
  2941. var err error
  2942. var pathParam0 string
  2943. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2944. if err != nil {
  2945. return nil, err
  2946. }
  2947. serverURL, err := url.Parse(server)
  2948. if err != nil {
  2949. return nil, err
  2950. }
  2951. operationPath := fmt.Sprintf("/mcp/%s/auth/callback", pathParam0)
  2952. if operationPath[0] == '/' {
  2953. operationPath = "." + operationPath
  2954. }
  2955. queryURL, err := serverURL.Parse(operationPath)
  2956. if err != nil {
  2957. return nil, err
  2958. }
  2959. if params != nil {
  2960. queryValues := queryURL.Query()
  2961. if params.Directory != nil {
  2962. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2963. return nil, err
  2964. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2965. return nil, err
  2966. } else {
  2967. for k, v := range parsed {
  2968. for _, v2 := range v {
  2969. queryValues.Add(k, v2)
  2970. }
  2971. }
  2972. }
  2973. }
  2974. queryURL.RawQuery = queryValues.Encode()
  2975. }
  2976. req, err := http.NewRequest("POST", queryURL.String(), body)
  2977. if err != nil {
  2978. return nil, err
  2979. }
  2980. req.Header.Add("Content-Type", contentType)
  2981. return req, nil
  2982. }
  2983. // NewMcpConnectRequest generates requests for McpConnect
  2984. func NewMcpConnectRequest(server string, name string, params *McpConnectParams) (*http.Request, error) {
  2985. var err error
  2986. var pathParam0 string
  2987. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2988. if err != nil {
  2989. return nil, err
  2990. }
  2991. serverURL, err := url.Parse(server)
  2992. if err != nil {
  2993. return nil, err
  2994. }
  2995. operationPath := fmt.Sprintf("/mcp/%s/connect", pathParam0)
  2996. if operationPath[0] == '/' {
  2997. operationPath = "." + operationPath
  2998. }
  2999. queryURL, err := serverURL.Parse(operationPath)
  3000. if err != nil {
  3001. return nil, err
  3002. }
  3003. if params != nil {
  3004. queryValues := queryURL.Query()
  3005. if params.Directory != nil {
  3006. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3007. return nil, err
  3008. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3009. return nil, err
  3010. } else {
  3011. for k, v := range parsed {
  3012. for _, v2 := range v {
  3013. queryValues.Add(k, v2)
  3014. }
  3015. }
  3016. }
  3017. }
  3018. queryURL.RawQuery = queryValues.Encode()
  3019. }
  3020. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3021. if err != nil {
  3022. return nil, err
  3023. }
  3024. return req, nil
  3025. }
  3026. // NewMcpDisconnectRequest generates requests for McpDisconnect
  3027. func NewMcpDisconnectRequest(server string, name string, params *McpDisconnectParams) (*http.Request, error) {
  3028. var err error
  3029. var pathParam0 string
  3030. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  3031. if err != nil {
  3032. return nil, err
  3033. }
  3034. serverURL, err := url.Parse(server)
  3035. if err != nil {
  3036. return nil, err
  3037. }
  3038. operationPath := fmt.Sprintf("/mcp/%s/disconnect", pathParam0)
  3039. if operationPath[0] == '/' {
  3040. operationPath = "." + operationPath
  3041. }
  3042. queryURL, err := serverURL.Parse(operationPath)
  3043. if err != nil {
  3044. return nil, err
  3045. }
  3046. if params != nil {
  3047. queryValues := queryURL.Query()
  3048. if params.Directory != nil {
  3049. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3050. return nil, err
  3051. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3052. return nil, err
  3053. } else {
  3054. for k, v := range parsed {
  3055. for _, v2 := range v {
  3056. queryValues.Add(k, v2)
  3057. }
  3058. }
  3059. }
  3060. }
  3061. queryURL.RawQuery = queryValues.Encode()
  3062. }
  3063. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3064. if err != nil {
  3065. return nil, err
  3066. }
  3067. return req, nil
  3068. }
  3069. // NewPathGetRequest generates requests for PathGet
  3070. func NewPathGetRequest(server string, params *PathGetParams) (*http.Request, error) {
  3071. var err error
  3072. serverURL, err := url.Parse(server)
  3073. if err != nil {
  3074. return nil, err
  3075. }
  3076. operationPath := fmt.Sprintf("/path")
  3077. if operationPath[0] == '/' {
  3078. operationPath = "." + operationPath
  3079. }
  3080. queryURL, err := serverURL.Parse(operationPath)
  3081. if err != nil {
  3082. return nil, err
  3083. }
  3084. if params != nil {
  3085. queryValues := queryURL.Query()
  3086. if params.Directory != nil {
  3087. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3088. return nil, err
  3089. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3090. return nil, err
  3091. } else {
  3092. for k, v := range parsed {
  3093. for _, v2 := range v {
  3094. queryValues.Add(k, v2)
  3095. }
  3096. }
  3097. }
  3098. }
  3099. queryURL.RawQuery = queryValues.Encode()
  3100. }
  3101. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3102. if err != nil {
  3103. return nil, err
  3104. }
  3105. return req, nil
  3106. }
  3107. // NewPermissionListRequest generates requests for PermissionList
  3108. func NewPermissionListRequest(server string, params *PermissionListParams) (*http.Request, error) {
  3109. var err error
  3110. serverURL, err := url.Parse(server)
  3111. if err != nil {
  3112. return nil, err
  3113. }
  3114. operationPath := fmt.Sprintf("/permission")
  3115. if operationPath[0] == '/' {
  3116. operationPath = "." + operationPath
  3117. }
  3118. queryURL, err := serverURL.Parse(operationPath)
  3119. if err != nil {
  3120. return nil, err
  3121. }
  3122. if params != nil {
  3123. queryValues := queryURL.Query()
  3124. if params.Directory != nil {
  3125. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3126. return nil, err
  3127. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3128. return nil, err
  3129. } else {
  3130. for k, v := range parsed {
  3131. for _, v2 := range v {
  3132. queryValues.Add(k, v2)
  3133. }
  3134. }
  3135. }
  3136. }
  3137. queryURL.RawQuery = queryValues.Encode()
  3138. }
  3139. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3140. if err != nil {
  3141. return nil, err
  3142. }
  3143. return req, nil
  3144. }
  3145. // NewPermissionReplyRequest calls the generic PermissionReply builder with application/json body
  3146. func NewPermissionReplyRequest(server string, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody) (*http.Request, error) {
  3147. var bodyReader io.Reader
  3148. buf, err := json.Marshal(body)
  3149. if err != nil {
  3150. return nil, err
  3151. }
  3152. bodyReader = bytes.NewReader(buf)
  3153. return NewPermissionReplyRequestWithBody(server, requestID, params, "application/json", bodyReader)
  3154. }
  3155. // NewPermissionReplyRequestWithBody generates requests for PermissionReply with any type of body
  3156. func NewPermissionReplyRequestWithBody(server string, requestID string, params *PermissionReplyParams, contentType string, body io.Reader) (*http.Request, error) {
  3157. var err error
  3158. var pathParam0 string
  3159. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3160. if err != nil {
  3161. return nil, err
  3162. }
  3163. serverURL, err := url.Parse(server)
  3164. if err != nil {
  3165. return nil, err
  3166. }
  3167. operationPath := fmt.Sprintf("/permission/%s/reply", pathParam0)
  3168. if operationPath[0] == '/' {
  3169. operationPath = "." + operationPath
  3170. }
  3171. queryURL, err := serverURL.Parse(operationPath)
  3172. if err != nil {
  3173. return nil, err
  3174. }
  3175. if params != nil {
  3176. queryValues := queryURL.Query()
  3177. if params.Directory != nil {
  3178. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3179. return nil, err
  3180. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3181. return nil, err
  3182. } else {
  3183. for k, v := range parsed {
  3184. for _, v2 := range v {
  3185. queryValues.Add(k, v2)
  3186. }
  3187. }
  3188. }
  3189. }
  3190. queryURL.RawQuery = queryValues.Encode()
  3191. }
  3192. req, err := http.NewRequest("POST", queryURL.String(), body)
  3193. if err != nil {
  3194. return nil, err
  3195. }
  3196. req.Header.Add("Content-Type", contentType)
  3197. return req, nil
  3198. }
  3199. // NewProjectListRequest generates requests for ProjectList
  3200. func NewProjectListRequest(server string, params *ProjectListParams) (*http.Request, error) {
  3201. var err error
  3202. serverURL, err := url.Parse(server)
  3203. if err != nil {
  3204. return nil, err
  3205. }
  3206. operationPath := fmt.Sprintf("/project")
  3207. if operationPath[0] == '/' {
  3208. operationPath = "." + operationPath
  3209. }
  3210. queryURL, err := serverURL.Parse(operationPath)
  3211. if err != nil {
  3212. return nil, err
  3213. }
  3214. if params != nil {
  3215. queryValues := queryURL.Query()
  3216. if params.Directory != nil {
  3217. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3218. return nil, err
  3219. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3220. return nil, err
  3221. } else {
  3222. for k, v := range parsed {
  3223. for _, v2 := range v {
  3224. queryValues.Add(k, v2)
  3225. }
  3226. }
  3227. }
  3228. }
  3229. queryURL.RawQuery = queryValues.Encode()
  3230. }
  3231. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3232. if err != nil {
  3233. return nil, err
  3234. }
  3235. return req, nil
  3236. }
  3237. // NewProjectCurrentRequest generates requests for ProjectCurrent
  3238. func NewProjectCurrentRequest(server string, params *ProjectCurrentParams) (*http.Request, error) {
  3239. var err error
  3240. serverURL, err := url.Parse(server)
  3241. if err != nil {
  3242. return nil, err
  3243. }
  3244. operationPath := fmt.Sprintf("/project/current")
  3245. if operationPath[0] == '/' {
  3246. operationPath = "." + operationPath
  3247. }
  3248. queryURL, err := serverURL.Parse(operationPath)
  3249. if err != nil {
  3250. return nil, err
  3251. }
  3252. if params != nil {
  3253. queryValues := queryURL.Query()
  3254. if params.Directory != nil {
  3255. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3256. return nil, err
  3257. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3258. return nil, err
  3259. } else {
  3260. for k, v := range parsed {
  3261. for _, v2 := range v {
  3262. queryValues.Add(k, v2)
  3263. }
  3264. }
  3265. }
  3266. }
  3267. queryURL.RawQuery = queryValues.Encode()
  3268. }
  3269. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3270. if err != nil {
  3271. return nil, err
  3272. }
  3273. return req, nil
  3274. }
  3275. // NewProjectUpdateRequest calls the generic ProjectUpdate builder with application/json body
  3276. func NewProjectUpdateRequest(server string, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody) (*http.Request, error) {
  3277. var bodyReader io.Reader
  3278. buf, err := json.Marshal(body)
  3279. if err != nil {
  3280. return nil, err
  3281. }
  3282. bodyReader = bytes.NewReader(buf)
  3283. return NewProjectUpdateRequestWithBody(server, projectID, params, "application/json", bodyReader)
  3284. }
  3285. // NewProjectUpdateRequestWithBody generates requests for ProjectUpdate with any type of body
  3286. func NewProjectUpdateRequestWithBody(server string, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  3287. var err error
  3288. var pathParam0 string
  3289. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID)
  3290. if err != nil {
  3291. return nil, err
  3292. }
  3293. serverURL, err := url.Parse(server)
  3294. if err != nil {
  3295. return nil, err
  3296. }
  3297. operationPath := fmt.Sprintf("/project/%s", pathParam0)
  3298. if operationPath[0] == '/' {
  3299. operationPath = "." + operationPath
  3300. }
  3301. queryURL, err := serverURL.Parse(operationPath)
  3302. if err != nil {
  3303. return nil, err
  3304. }
  3305. if params != nil {
  3306. queryValues := queryURL.Query()
  3307. if params.Directory != nil {
  3308. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3309. return nil, err
  3310. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3311. return nil, err
  3312. } else {
  3313. for k, v := range parsed {
  3314. for _, v2 := range v {
  3315. queryValues.Add(k, v2)
  3316. }
  3317. }
  3318. }
  3319. }
  3320. queryURL.RawQuery = queryValues.Encode()
  3321. }
  3322. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  3323. if err != nil {
  3324. return nil, err
  3325. }
  3326. req.Header.Add("Content-Type", contentType)
  3327. return req, nil
  3328. }
  3329. // NewProviderListRequest generates requests for ProviderList
  3330. func NewProviderListRequest(server string, params *ProviderListParams) (*http.Request, error) {
  3331. var err error
  3332. serverURL, err := url.Parse(server)
  3333. if err != nil {
  3334. return nil, err
  3335. }
  3336. operationPath := fmt.Sprintf("/provider")
  3337. if operationPath[0] == '/' {
  3338. operationPath = "." + operationPath
  3339. }
  3340. queryURL, err := serverURL.Parse(operationPath)
  3341. if err != nil {
  3342. return nil, err
  3343. }
  3344. if params != nil {
  3345. queryValues := queryURL.Query()
  3346. if params.Directory != nil {
  3347. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3348. return nil, err
  3349. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3350. return nil, err
  3351. } else {
  3352. for k, v := range parsed {
  3353. for _, v2 := range v {
  3354. queryValues.Add(k, v2)
  3355. }
  3356. }
  3357. }
  3358. }
  3359. queryURL.RawQuery = queryValues.Encode()
  3360. }
  3361. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3362. if err != nil {
  3363. return nil, err
  3364. }
  3365. return req, nil
  3366. }
  3367. // NewProviderAuthRequest generates requests for ProviderAuth
  3368. func NewProviderAuthRequest(server string, params *ProviderAuthParams) (*http.Request, error) {
  3369. var err error
  3370. serverURL, err := url.Parse(server)
  3371. if err != nil {
  3372. return nil, err
  3373. }
  3374. operationPath := fmt.Sprintf("/provider/auth")
  3375. if operationPath[0] == '/' {
  3376. operationPath = "." + operationPath
  3377. }
  3378. queryURL, err := serverURL.Parse(operationPath)
  3379. if err != nil {
  3380. return nil, err
  3381. }
  3382. if params != nil {
  3383. queryValues := queryURL.Query()
  3384. if params.Directory != nil {
  3385. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3386. return nil, err
  3387. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3388. return nil, err
  3389. } else {
  3390. for k, v := range parsed {
  3391. for _, v2 := range v {
  3392. queryValues.Add(k, v2)
  3393. }
  3394. }
  3395. }
  3396. }
  3397. queryURL.RawQuery = queryValues.Encode()
  3398. }
  3399. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3400. if err != nil {
  3401. return nil, err
  3402. }
  3403. return req, nil
  3404. }
  3405. // NewProviderOauthAuthorizeRequest calls the generic ProviderOauthAuthorize builder with application/json body
  3406. func NewProviderOauthAuthorizeRequest(server string, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody) (*http.Request, error) {
  3407. var bodyReader io.Reader
  3408. buf, err := json.Marshal(body)
  3409. if err != nil {
  3410. return nil, err
  3411. }
  3412. bodyReader = bytes.NewReader(buf)
  3413. return NewProviderOauthAuthorizeRequestWithBody(server, providerID, params, "application/json", bodyReader)
  3414. }
  3415. // NewProviderOauthAuthorizeRequestWithBody generates requests for ProviderOauthAuthorize with any type of body
  3416. func NewProviderOauthAuthorizeRequestWithBody(server string, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader) (*http.Request, error) {
  3417. var err error
  3418. var pathParam0 string
  3419. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  3420. if err != nil {
  3421. return nil, err
  3422. }
  3423. serverURL, err := url.Parse(server)
  3424. if err != nil {
  3425. return nil, err
  3426. }
  3427. operationPath := fmt.Sprintf("/provider/%s/oauth/authorize", pathParam0)
  3428. if operationPath[0] == '/' {
  3429. operationPath = "." + operationPath
  3430. }
  3431. queryURL, err := serverURL.Parse(operationPath)
  3432. if err != nil {
  3433. return nil, err
  3434. }
  3435. if params != nil {
  3436. queryValues := queryURL.Query()
  3437. if params.Directory != nil {
  3438. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3439. return nil, err
  3440. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3441. return nil, err
  3442. } else {
  3443. for k, v := range parsed {
  3444. for _, v2 := range v {
  3445. queryValues.Add(k, v2)
  3446. }
  3447. }
  3448. }
  3449. }
  3450. queryURL.RawQuery = queryValues.Encode()
  3451. }
  3452. req, err := http.NewRequest("POST", queryURL.String(), body)
  3453. if err != nil {
  3454. return nil, err
  3455. }
  3456. req.Header.Add("Content-Type", contentType)
  3457. return req, nil
  3458. }
  3459. // NewProviderOauthCallbackRequest calls the generic ProviderOauthCallback builder with application/json body
  3460. func NewProviderOauthCallbackRequest(server string, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody) (*http.Request, error) {
  3461. var bodyReader io.Reader
  3462. buf, err := json.Marshal(body)
  3463. if err != nil {
  3464. return nil, err
  3465. }
  3466. bodyReader = bytes.NewReader(buf)
  3467. return NewProviderOauthCallbackRequestWithBody(server, providerID, params, "application/json", bodyReader)
  3468. }
  3469. // NewProviderOauthCallbackRequestWithBody generates requests for ProviderOauthCallback with any type of body
  3470. func NewProviderOauthCallbackRequestWithBody(server string, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader) (*http.Request, error) {
  3471. var err error
  3472. var pathParam0 string
  3473. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  3474. if err != nil {
  3475. return nil, err
  3476. }
  3477. serverURL, err := url.Parse(server)
  3478. if err != nil {
  3479. return nil, err
  3480. }
  3481. operationPath := fmt.Sprintf("/provider/%s/oauth/callback", pathParam0)
  3482. if operationPath[0] == '/' {
  3483. operationPath = "." + operationPath
  3484. }
  3485. queryURL, err := serverURL.Parse(operationPath)
  3486. if err != nil {
  3487. return nil, err
  3488. }
  3489. if params != nil {
  3490. queryValues := queryURL.Query()
  3491. if params.Directory != nil {
  3492. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3493. return nil, err
  3494. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3495. return nil, err
  3496. } else {
  3497. for k, v := range parsed {
  3498. for _, v2 := range v {
  3499. queryValues.Add(k, v2)
  3500. }
  3501. }
  3502. }
  3503. }
  3504. queryURL.RawQuery = queryValues.Encode()
  3505. }
  3506. req, err := http.NewRequest("POST", queryURL.String(), body)
  3507. if err != nil {
  3508. return nil, err
  3509. }
  3510. req.Header.Add("Content-Type", contentType)
  3511. return req, nil
  3512. }
  3513. // NewPtyListRequest generates requests for PtyList
  3514. func NewPtyListRequest(server string, params *PtyListParams) (*http.Request, error) {
  3515. var err error
  3516. serverURL, err := url.Parse(server)
  3517. if err != nil {
  3518. return nil, err
  3519. }
  3520. operationPath := fmt.Sprintf("/pty")
  3521. if operationPath[0] == '/' {
  3522. operationPath = "." + operationPath
  3523. }
  3524. queryURL, err := serverURL.Parse(operationPath)
  3525. if err != nil {
  3526. return nil, err
  3527. }
  3528. if params != nil {
  3529. queryValues := queryURL.Query()
  3530. if params.Directory != nil {
  3531. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3532. return nil, err
  3533. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3534. return nil, err
  3535. } else {
  3536. for k, v := range parsed {
  3537. for _, v2 := range v {
  3538. queryValues.Add(k, v2)
  3539. }
  3540. }
  3541. }
  3542. }
  3543. queryURL.RawQuery = queryValues.Encode()
  3544. }
  3545. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3546. if err != nil {
  3547. return nil, err
  3548. }
  3549. return req, nil
  3550. }
  3551. // NewPtyCreateRequest calls the generic PtyCreate builder with application/json body
  3552. func NewPtyCreateRequest(server string, params *PtyCreateParams, body PtyCreateJSONRequestBody) (*http.Request, error) {
  3553. var bodyReader io.Reader
  3554. buf, err := json.Marshal(body)
  3555. if err != nil {
  3556. return nil, err
  3557. }
  3558. bodyReader = bytes.NewReader(buf)
  3559. return NewPtyCreateRequestWithBody(server, params, "application/json", bodyReader)
  3560. }
  3561. // NewPtyCreateRequestWithBody generates requests for PtyCreate with any type of body
  3562. func NewPtyCreateRequestWithBody(server string, params *PtyCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  3563. var err error
  3564. serverURL, err := url.Parse(server)
  3565. if err != nil {
  3566. return nil, err
  3567. }
  3568. operationPath := fmt.Sprintf("/pty")
  3569. if operationPath[0] == '/' {
  3570. operationPath = "." + operationPath
  3571. }
  3572. queryURL, err := serverURL.Parse(operationPath)
  3573. if err != nil {
  3574. return nil, err
  3575. }
  3576. if params != nil {
  3577. queryValues := queryURL.Query()
  3578. if params.Directory != nil {
  3579. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3580. return nil, err
  3581. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3582. return nil, err
  3583. } else {
  3584. for k, v := range parsed {
  3585. for _, v2 := range v {
  3586. queryValues.Add(k, v2)
  3587. }
  3588. }
  3589. }
  3590. }
  3591. queryURL.RawQuery = queryValues.Encode()
  3592. }
  3593. req, err := http.NewRequest("POST", queryURL.String(), body)
  3594. if err != nil {
  3595. return nil, err
  3596. }
  3597. req.Header.Add("Content-Type", contentType)
  3598. return req, nil
  3599. }
  3600. // NewPtyRemoveRequest generates requests for PtyRemove
  3601. func NewPtyRemoveRequest(server string, ptyID string, params *PtyRemoveParams) (*http.Request, error) {
  3602. var err error
  3603. var pathParam0 string
  3604. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3605. if err != nil {
  3606. return nil, err
  3607. }
  3608. serverURL, err := url.Parse(server)
  3609. if err != nil {
  3610. return nil, err
  3611. }
  3612. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3613. if operationPath[0] == '/' {
  3614. operationPath = "." + operationPath
  3615. }
  3616. queryURL, err := serverURL.Parse(operationPath)
  3617. if err != nil {
  3618. return nil, err
  3619. }
  3620. if params != nil {
  3621. queryValues := queryURL.Query()
  3622. if params.Directory != nil {
  3623. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3624. return nil, err
  3625. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3626. return nil, err
  3627. } else {
  3628. for k, v := range parsed {
  3629. for _, v2 := range v {
  3630. queryValues.Add(k, v2)
  3631. }
  3632. }
  3633. }
  3634. }
  3635. queryURL.RawQuery = queryValues.Encode()
  3636. }
  3637. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  3638. if err != nil {
  3639. return nil, err
  3640. }
  3641. return req, nil
  3642. }
  3643. // NewPtyGetRequest generates requests for PtyGet
  3644. func NewPtyGetRequest(server string, ptyID string, params *PtyGetParams) (*http.Request, error) {
  3645. var err error
  3646. var pathParam0 string
  3647. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3648. if err != nil {
  3649. return nil, err
  3650. }
  3651. serverURL, err := url.Parse(server)
  3652. if err != nil {
  3653. return nil, err
  3654. }
  3655. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3656. if operationPath[0] == '/' {
  3657. operationPath = "." + operationPath
  3658. }
  3659. queryURL, err := serverURL.Parse(operationPath)
  3660. if err != nil {
  3661. return nil, err
  3662. }
  3663. if params != nil {
  3664. queryValues := queryURL.Query()
  3665. if params.Directory != nil {
  3666. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3667. return nil, err
  3668. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3669. return nil, err
  3670. } else {
  3671. for k, v := range parsed {
  3672. for _, v2 := range v {
  3673. queryValues.Add(k, v2)
  3674. }
  3675. }
  3676. }
  3677. }
  3678. queryURL.RawQuery = queryValues.Encode()
  3679. }
  3680. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3681. if err != nil {
  3682. return nil, err
  3683. }
  3684. return req, nil
  3685. }
  3686. // NewPtyUpdateRequest calls the generic PtyUpdate builder with application/json body
  3687. func NewPtyUpdateRequest(server string, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody) (*http.Request, error) {
  3688. var bodyReader io.Reader
  3689. buf, err := json.Marshal(body)
  3690. if err != nil {
  3691. return nil, err
  3692. }
  3693. bodyReader = bytes.NewReader(buf)
  3694. return NewPtyUpdateRequestWithBody(server, ptyID, params, "application/json", bodyReader)
  3695. }
  3696. // NewPtyUpdateRequestWithBody generates requests for PtyUpdate with any type of body
  3697. func NewPtyUpdateRequestWithBody(server string, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  3698. var err error
  3699. var pathParam0 string
  3700. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3701. if err != nil {
  3702. return nil, err
  3703. }
  3704. serverURL, err := url.Parse(server)
  3705. if err != nil {
  3706. return nil, err
  3707. }
  3708. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3709. if operationPath[0] == '/' {
  3710. operationPath = "." + operationPath
  3711. }
  3712. queryURL, err := serverURL.Parse(operationPath)
  3713. if err != nil {
  3714. return nil, err
  3715. }
  3716. if params != nil {
  3717. queryValues := queryURL.Query()
  3718. if params.Directory != nil {
  3719. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3720. return nil, err
  3721. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3722. return nil, err
  3723. } else {
  3724. for k, v := range parsed {
  3725. for _, v2 := range v {
  3726. queryValues.Add(k, v2)
  3727. }
  3728. }
  3729. }
  3730. }
  3731. queryURL.RawQuery = queryValues.Encode()
  3732. }
  3733. req, err := http.NewRequest("PUT", queryURL.String(), body)
  3734. if err != nil {
  3735. return nil, err
  3736. }
  3737. req.Header.Add("Content-Type", contentType)
  3738. return req, nil
  3739. }
  3740. // NewPtyConnectRequest generates requests for PtyConnect
  3741. func NewPtyConnectRequest(server string, ptyID string, params *PtyConnectParams) (*http.Request, error) {
  3742. var err error
  3743. var pathParam0 string
  3744. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3745. if err != nil {
  3746. return nil, err
  3747. }
  3748. serverURL, err := url.Parse(server)
  3749. if err != nil {
  3750. return nil, err
  3751. }
  3752. operationPath := fmt.Sprintf("/pty/%s/connect", pathParam0)
  3753. if operationPath[0] == '/' {
  3754. operationPath = "." + operationPath
  3755. }
  3756. queryURL, err := serverURL.Parse(operationPath)
  3757. if err != nil {
  3758. return nil, err
  3759. }
  3760. if params != nil {
  3761. queryValues := queryURL.Query()
  3762. if params.Directory != nil {
  3763. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3764. return nil, err
  3765. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3766. return nil, err
  3767. } else {
  3768. for k, v := range parsed {
  3769. for _, v2 := range v {
  3770. queryValues.Add(k, v2)
  3771. }
  3772. }
  3773. }
  3774. }
  3775. queryURL.RawQuery = queryValues.Encode()
  3776. }
  3777. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3778. if err != nil {
  3779. return nil, err
  3780. }
  3781. return req, nil
  3782. }
  3783. // NewQuestionListRequest generates requests for QuestionList
  3784. func NewQuestionListRequest(server string, params *QuestionListParams) (*http.Request, error) {
  3785. var err error
  3786. serverURL, err := url.Parse(server)
  3787. if err != nil {
  3788. return nil, err
  3789. }
  3790. operationPath := fmt.Sprintf("/question")
  3791. if operationPath[0] == '/' {
  3792. operationPath = "." + operationPath
  3793. }
  3794. queryURL, err := serverURL.Parse(operationPath)
  3795. if err != nil {
  3796. return nil, err
  3797. }
  3798. if params != nil {
  3799. queryValues := queryURL.Query()
  3800. if params.Directory != nil {
  3801. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3802. return nil, err
  3803. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3804. return nil, err
  3805. } else {
  3806. for k, v := range parsed {
  3807. for _, v2 := range v {
  3808. queryValues.Add(k, v2)
  3809. }
  3810. }
  3811. }
  3812. }
  3813. queryURL.RawQuery = queryValues.Encode()
  3814. }
  3815. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3816. if err != nil {
  3817. return nil, err
  3818. }
  3819. return req, nil
  3820. }
  3821. // NewQuestionRejectRequest generates requests for QuestionReject
  3822. func NewQuestionRejectRequest(server string, requestID string, params *QuestionRejectParams) (*http.Request, error) {
  3823. var err error
  3824. var pathParam0 string
  3825. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3826. if err != nil {
  3827. return nil, err
  3828. }
  3829. serverURL, err := url.Parse(server)
  3830. if err != nil {
  3831. return nil, err
  3832. }
  3833. operationPath := fmt.Sprintf("/question/%s/reject", pathParam0)
  3834. if operationPath[0] == '/' {
  3835. operationPath = "." + operationPath
  3836. }
  3837. queryURL, err := serverURL.Parse(operationPath)
  3838. if err != nil {
  3839. return nil, err
  3840. }
  3841. if params != nil {
  3842. queryValues := queryURL.Query()
  3843. if params.Directory != nil {
  3844. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3845. return nil, err
  3846. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3847. return nil, err
  3848. } else {
  3849. for k, v := range parsed {
  3850. for _, v2 := range v {
  3851. queryValues.Add(k, v2)
  3852. }
  3853. }
  3854. }
  3855. }
  3856. queryURL.RawQuery = queryValues.Encode()
  3857. }
  3858. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3859. if err != nil {
  3860. return nil, err
  3861. }
  3862. return req, nil
  3863. }
  3864. // NewQuestionReplyRequest calls the generic QuestionReply builder with application/json body
  3865. func NewQuestionReplyRequest(server string, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody) (*http.Request, error) {
  3866. var bodyReader io.Reader
  3867. buf, err := json.Marshal(body)
  3868. if err != nil {
  3869. return nil, err
  3870. }
  3871. bodyReader = bytes.NewReader(buf)
  3872. return NewQuestionReplyRequestWithBody(server, requestID, params, "application/json", bodyReader)
  3873. }
  3874. // NewQuestionReplyRequestWithBody generates requests for QuestionReply with any type of body
  3875. func NewQuestionReplyRequestWithBody(server string, requestID string, params *QuestionReplyParams, contentType string, body io.Reader) (*http.Request, error) {
  3876. var err error
  3877. var pathParam0 string
  3878. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3879. if err != nil {
  3880. return nil, err
  3881. }
  3882. serverURL, err := url.Parse(server)
  3883. if err != nil {
  3884. return nil, err
  3885. }
  3886. operationPath := fmt.Sprintf("/question/%s/reply", pathParam0)
  3887. if operationPath[0] == '/' {
  3888. operationPath = "." + operationPath
  3889. }
  3890. queryURL, err := serverURL.Parse(operationPath)
  3891. if err != nil {
  3892. return nil, err
  3893. }
  3894. if params != nil {
  3895. queryValues := queryURL.Query()
  3896. if params.Directory != nil {
  3897. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3898. return nil, err
  3899. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3900. return nil, err
  3901. } else {
  3902. for k, v := range parsed {
  3903. for _, v2 := range v {
  3904. queryValues.Add(k, v2)
  3905. }
  3906. }
  3907. }
  3908. }
  3909. queryURL.RawQuery = queryValues.Encode()
  3910. }
  3911. req, err := http.NewRequest("POST", queryURL.String(), body)
  3912. if err != nil {
  3913. return nil, err
  3914. }
  3915. req.Header.Add("Content-Type", contentType)
  3916. return req, nil
  3917. }
  3918. // NewSessionListRequest generates requests for SessionList
  3919. func NewSessionListRequest(server string, params *SessionListParams) (*http.Request, error) {
  3920. var err error
  3921. serverURL, err := url.Parse(server)
  3922. if err != nil {
  3923. return nil, err
  3924. }
  3925. operationPath := fmt.Sprintf("/session")
  3926. if operationPath[0] == '/' {
  3927. operationPath = "." + operationPath
  3928. }
  3929. queryURL, err := serverURL.Parse(operationPath)
  3930. if err != nil {
  3931. return nil, err
  3932. }
  3933. if params != nil {
  3934. queryValues := queryURL.Query()
  3935. if params.Directory != nil {
  3936. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3937. return nil, err
  3938. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3939. return nil, err
  3940. } else {
  3941. for k, v := range parsed {
  3942. for _, v2 := range v {
  3943. queryValues.Add(k, v2)
  3944. }
  3945. }
  3946. }
  3947. }
  3948. if params.Roots != nil {
  3949. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roots", runtime.ParamLocationQuery, *params.Roots); err != nil {
  3950. return nil, err
  3951. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3952. return nil, err
  3953. } else {
  3954. for k, v := range parsed {
  3955. for _, v2 := range v {
  3956. queryValues.Add(k, v2)
  3957. }
  3958. }
  3959. }
  3960. }
  3961. if params.Start != nil {
  3962. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil {
  3963. return nil, err
  3964. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3965. return nil, err
  3966. } else {
  3967. for k, v := range parsed {
  3968. for _, v2 := range v {
  3969. queryValues.Add(k, v2)
  3970. }
  3971. }
  3972. }
  3973. }
  3974. if params.Search != nil {
  3975. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil {
  3976. return nil, err
  3977. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3978. return nil, err
  3979. } else {
  3980. for k, v := range parsed {
  3981. for _, v2 := range v {
  3982. queryValues.Add(k, v2)
  3983. }
  3984. }
  3985. }
  3986. }
  3987. if params.Limit != nil {
  3988. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  3989. return nil, err
  3990. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3991. return nil, err
  3992. } else {
  3993. for k, v := range parsed {
  3994. for _, v2 := range v {
  3995. queryValues.Add(k, v2)
  3996. }
  3997. }
  3998. }
  3999. }
  4000. queryURL.RawQuery = queryValues.Encode()
  4001. }
  4002. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4003. if err != nil {
  4004. return nil, err
  4005. }
  4006. return req, nil
  4007. }
  4008. // NewSessionCreateRequest calls the generic SessionCreate builder with application/json body
  4009. func NewSessionCreateRequest(server string, params *SessionCreateParams, body SessionCreateJSONRequestBody) (*http.Request, error) {
  4010. var bodyReader io.Reader
  4011. buf, err := json.Marshal(body)
  4012. if err != nil {
  4013. return nil, err
  4014. }
  4015. bodyReader = bytes.NewReader(buf)
  4016. return NewSessionCreateRequestWithBody(server, params, "application/json", bodyReader)
  4017. }
  4018. // NewSessionCreateRequestWithBody generates requests for SessionCreate with any type of body
  4019. func NewSessionCreateRequestWithBody(server string, params *SessionCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  4020. var err error
  4021. serverURL, err := url.Parse(server)
  4022. if err != nil {
  4023. return nil, err
  4024. }
  4025. operationPath := fmt.Sprintf("/session")
  4026. if operationPath[0] == '/' {
  4027. operationPath = "." + operationPath
  4028. }
  4029. queryURL, err := serverURL.Parse(operationPath)
  4030. if err != nil {
  4031. return nil, err
  4032. }
  4033. if params != nil {
  4034. queryValues := queryURL.Query()
  4035. if params.Directory != nil {
  4036. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4037. return nil, err
  4038. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4039. return nil, err
  4040. } else {
  4041. for k, v := range parsed {
  4042. for _, v2 := range v {
  4043. queryValues.Add(k, v2)
  4044. }
  4045. }
  4046. }
  4047. }
  4048. queryURL.RawQuery = queryValues.Encode()
  4049. }
  4050. req, err := http.NewRequest("POST", queryURL.String(), body)
  4051. if err != nil {
  4052. return nil, err
  4053. }
  4054. req.Header.Add("Content-Type", contentType)
  4055. return req, nil
  4056. }
  4057. // NewSessionStatusRequest generates requests for SessionStatus
  4058. func NewSessionStatusRequest(server string, params *SessionStatusParams) (*http.Request, error) {
  4059. var err error
  4060. serverURL, err := url.Parse(server)
  4061. if err != nil {
  4062. return nil, err
  4063. }
  4064. operationPath := fmt.Sprintf("/session/status")
  4065. if operationPath[0] == '/' {
  4066. operationPath = "." + operationPath
  4067. }
  4068. queryURL, err := serverURL.Parse(operationPath)
  4069. if err != nil {
  4070. return nil, err
  4071. }
  4072. if params != nil {
  4073. queryValues := queryURL.Query()
  4074. if params.Directory != nil {
  4075. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4076. return nil, err
  4077. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4078. return nil, err
  4079. } else {
  4080. for k, v := range parsed {
  4081. for _, v2 := range v {
  4082. queryValues.Add(k, v2)
  4083. }
  4084. }
  4085. }
  4086. }
  4087. queryURL.RawQuery = queryValues.Encode()
  4088. }
  4089. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4090. if err != nil {
  4091. return nil, err
  4092. }
  4093. return req, nil
  4094. }
  4095. // NewSessionDeleteRequest generates requests for SessionDelete
  4096. func NewSessionDeleteRequest(server string, sessionID string, params *SessionDeleteParams) (*http.Request, error) {
  4097. var err error
  4098. var pathParam0 string
  4099. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4100. if err != nil {
  4101. return nil, err
  4102. }
  4103. serverURL, err := url.Parse(server)
  4104. if err != nil {
  4105. return nil, err
  4106. }
  4107. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4108. if operationPath[0] == '/' {
  4109. operationPath = "." + operationPath
  4110. }
  4111. queryURL, err := serverURL.Parse(operationPath)
  4112. if err != nil {
  4113. return nil, err
  4114. }
  4115. if params != nil {
  4116. queryValues := queryURL.Query()
  4117. if params.Directory != nil {
  4118. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4119. return nil, err
  4120. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4121. return nil, err
  4122. } else {
  4123. for k, v := range parsed {
  4124. for _, v2 := range v {
  4125. queryValues.Add(k, v2)
  4126. }
  4127. }
  4128. }
  4129. }
  4130. queryURL.RawQuery = queryValues.Encode()
  4131. }
  4132. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  4133. if err != nil {
  4134. return nil, err
  4135. }
  4136. return req, nil
  4137. }
  4138. // NewSessionGetRequest generates requests for SessionGet
  4139. func NewSessionGetRequest(server string, sessionID string, params *SessionGetParams) (*http.Request, error) {
  4140. var err error
  4141. var pathParam0 string
  4142. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4143. if err != nil {
  4144. return nil, err
  4145. }
  4146. serverURL, err := url.Parse(server)
  4147. if err != nil {
  4148. return nil, err
  4149. }
  4150. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4151. if operationPath[0] == '/' {
  4152. operationPath = "." + operationPath
  4153. }
  4154. queryURL, err := serverURL.Parse(operationPath)
  4155. if err != nil {
  4156. return nil, err
  4157. }
  4158. if params != nil {
  4159. queryValues := queryURL.Query()
  4160. if params.Directory != nil {
  4161. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4162. return nil, err
  4163. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4164. return nil, err
  4165. } else {
  4166. for k, v := range parsed {
  4167. for _, v2 := range v {
  4168. queryValues.Add(k, v2)
  4169. }
  4170. }
  4171. }
  4172. }
  4173. queryURL.RawQuery = queryValues.Encode()
  4174. }
  4175. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4176. if err != nil {
  4177. return nil, err
  4178. }
  4179. return req, nil
  4180. }
  4181. // NewSessionUpdateRequest calls the generic SessionUpdate builder with application/json body
  4182. func NewSessionUpdateRequest(server string, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody) (*http.Request, error) {
  4183. var bodyReader io.Reader
  4184. buf, err := json.Marshal(body)
  4185. if err != nil {
  4186. return nil, err
  4187. }
  4188. bodyReader = bytes.NewReader(buf)
  4189. return NewSessionUpdateRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4190. }
  4191. // NewSessionUpdateRequestWithBody generates requests for SessionUpdate with any type of body
  4192. func NewSessionUpdateRequestWithBody(server string, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  4193. var err error
  4194. var pathParam0 string
  4195. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4196. if err != nil {
  4197. return nil, err
  4198. }
  4199. serverURL, err := url.Parse(server)
  4200. if err != nil {
  4201. return nil, err
  4202. }
  4203. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4204. if operationPath[0] == '/' {
  4205. operationPath = "." + operationPath
  4206. }
  4207. queryURL, err := serverURL.Parse(operationPath)
  4208. if err != nil {
  4209. return nil, err
  4210. }
  4211. if params != nil {
  4212. queryValues := queryURL.Query()
  4213. if params.Directory != nil {
  4214. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4215. return nil, err
  4216. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4217. return nil, err
  4218. } else {
  4219. for k, v := range parsed {
  4220. for _, v2 := range v {
  4221. queryValues.Add(k, v2)
  4222. }
  4223. }
  4224. }
  4225. }
  4226. queryURL.RawQuery = queryValues.Encode()
  4227. }
  4228. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  4229. if err != nil {
  4230. return nil, err
  4231. }
  4232. req.Header.Add("Content-Type", contentType)
  4233. return req, nil
  4234. }
  4235. // NewSessionAbortRequest generates requests for SessionAbort
  4236. func NewSessionAbortRequest(server string, sessionID string, params *SessionAbortParams) (*http.Request, error) {
  4237. var err error
  4238. var pathParam0 string
  4239. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4240. if err != nil {
  4241. return nil, err
  4242. }
  4243. serverURL, err := url.Parse(server)
  4244. if err != nil {
  4245. return nil, err
  4246. }
  4247. operationPath := fmt.Sprintf("/session/%s/abort", pathParam0)
  4248. if operationPath[0] == '/' {
  4249. operationPath = "." + operationPath
  4250. }
  4251. queryURL, err := serverURL.Parse(operationPath)
  4252. if err != nil {
  4253. return nil, err
  4254. }
  4255. if params != nil {
  4256. queryValues := queryURL.Query()
  4257. if params.Directory != nil {
  4258. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4259. return nil, err
  4260. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4261. return nil, err
  4262. } else {
  4263. for k, v := range parsed {
  4264. for _, v2 := range v {
  4265. queryValues.Add(k, v2)
  4266. }
  4267. }
  4268. }
  4269. }
  4270. queryURL.RawQuery = queryValues.Encode()
  4271. }
  4272. req, err := http.NewRequest("POST", queryURL.String(), nil)
  4273. if err != nil {
  4274. return nil, err
  4275. }
  4276. return req, nil
  4277. }
  4278. // NewSessionChildrenRequest generates requests for SessionChildren
  4279. func NewSessionChildrenRequest(server string, sessionID string, params *SessionChildrenParams) (*http.Request, error) {
  4280. var err error
  4281. var pathParam0 string
  4282. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4283. if err != nil {
  4284. return nil, err
  4285. }
  4286. serverURL, err := url.Parse(server)
  4287. if err != nil {
  4288. return nil, err
  4289. }
  4290. operationPath := fmt.Sprintf("/session/%s/children", pathParam0)
  4291. if operationPath[0] == '/' {
  4292. operationPath = "." + operationPath
  4293. }
  4294. queryURL, err := serverURL.Parse(operationPath)
  4295. if err != nil {
  4296. return nil, err
  4297. }
  4298. if params != nil {
  4299. queryValues := queryURL.Query()
  4300. if params.Directory != nil {
  4301. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4302. return nil, err
  4303. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4304. return nil, err
  4305. } else {
  4306. for k, v := range parsed {
  4307. for _, v2 := range v {
  4308. queryValues.Add(k, v2)
  4309. }
  4310. }
  4311. }
  4312. }
  4313. queryURL.RawQuery = queryValues.Encode()
  4314. }
  4315. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4316. if err != nil {
  4317. return nil, err
  4318. }
  4319. return req, nil
  4320. }
  4321. // NewSessionCommandRequest calls the generic SessionCommand builder with application/json body
  4322. func NewSessionCommandRequest(server string, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody) (*http.Request, error) {
  4323. var bodyReader io.Reader
  4324. buf, err := json.Marshal(body)
  4325. if err != nil {
  4326. return nil, err
  4327. }
  4328. bodyReader = bytes.NewReader(buf)
  4329. return NewSessionCommandRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4330. }
  4331. // NewSessionCommandRequestWithBody generates requests for SessionCommand with any type of body
  4332. func NewSessionCommandRequestWithBody(server string, sessionID string, params *SessionCommandParams, contentType string, body io.Reader) (*http.Request, error) {
  4333. var err error
  4334. var pathParam0 string
  4335. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4336. if err != nil {
  4337. return nil, err
  4338. }
  4339. serverURL, err := url.Parse(server)
  4340. if err != nil {
  4341. return nil, err
  4342. }
  4343. operationPath := fmt.Sprintf("/session/%s/command", pathParam0)
  4344. if operationPath[0] == '/' {
  4345. operationPath = "." + operationPath
  4346. }
  4347. queryURL, err := serverURL.Parse(operationPath)
  4348. if err != nil {
  4349. return nil, err
  4350. }
  4351. if params != nil {
  4352. queryValues := queryURL.Query()
  4353. if params.Directory != nil {
  4354. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4355. return nil, err
  4356. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4357. return nil, err
  4358. } else {
  4359. for k, v := range parsed {
  4360. for _, v2 := range v {
  4361. queryValues.Add(k, v2)
  4362. }
  4363. }
  4364. }
  4365. }
  4366. queryURL.RawQuery = queryValues.Encode()
  4367. }
  4368. req, err := http.NewRequest("POST", queryURL.String(), body)
  4369. if err != nil {
  4370. return nil, err
  4371. }
  4372. req.Header.Add("Content-Type", contentType)
  4373. return req, nil
  4374. }
  4375. // NewSessionDiffRequest generates requests for SessionDiff
  4376. func NewSessionDiffRequest(server string, sessionID string, params *SessionDiffParams) (*http.Request, error) {
  4377. var err error
  4378. var pathParam0 string
  4379. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4380. if err != nil {
  4381. return nil, err
  4382. }
  4383. serverURL, err := url.Parse(server)
  4384. if err != nil {
  4385. return nil, err
  4386. }
  4387. operationPath := fmt.Sprintf("/session/%s/diff", pathParam0)
  4388. if operationPath[0] == '/' {
  4389. operationPath = "." + operationPath
  4390. }
  4391. queryURL, err := serverURL.Parse(operationPath)
  4392. if err != nil {
  4393. return nil, err
  4394. }
  4395. if params != nil {
  4396. queryValues := queryURL.Query()
  4397. if params.Directory != nil {
  4398. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4399. return nil, err
  4400. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4401. return nil, err
  4402. } else {
  4403. for k, v := range parsed {
  4404. for _, v2 := range v {
  4405. queryValues.Add(k, v2)
  4406. }
  4407. }
  4408. }
  4409. }
  4410. if params.MessageID != nil {
  4411. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "messageID", runtime.ParamLocationQuery, *params.MessageID); err != nil {
  4412. return nil, err
  4413. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4414. return nil, err
  4415. } else {
  4416. for k, v := range parsed {
  4417. for _, v2 := range v {
  4418. queryValues.Add(k, v2)
  4419. }
  4420. }
  4421. }
  4422. }
  4423. queryURL.RawQuery = queryValues.Encode()
  4424. }
  4425. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4426. if err != nil {
  4427. return nil, err
  4428. }
  4429. return req, nil
  4430. }
  4431. // NewSessionForkRequest calls the generic SessionFork builder with application/json body
  4432. func NewSessionForkRequest(server string, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody) (*http.Request, error) {
  4433. var bodyReader io.Reader
  4434. buf, err := json.Marshal(body)
  4435. if err != nil {
  4436. return nil, err
  4437. }
  4438. bodyReader = bytes.NewReader(buf)
  4439. return NewSessionForkRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4440. }
  4441. // NewSessionForkRequestWithBody generates requests for SessionFork with any type of body
  4442. func NewSessionForkRequestWithBody(server string, sessionID string, params *SessionForkParams, contentType string, body io.Reader) (*http.Request, error) {
  4443. var err error
  4444. var pathParam0 string
  4445. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4446. if err != nil {
  4447. return nil, err
  4448. }
  4449. serverURL, err := url.Parse(server)
  4450. if err != nil {
  4451. return nil, err
  4452. }
  4453. operationPath := fmt.Sprintf("/session/%s/fork", pathParam0)
  4454. if operationPath[0] == '/' {
  4455. operationPath = "." + operationPath
  4456. }
  4457. queryURL, err := serverURL.Parse(operationPath)
  4458. if err != nil {
  4459. return nil, err
  4460. }
  4461. if params != nil {
  4462. queryValues := queryURL.Query()
  4463. if params.Directory != nil {
  4464. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4465. return nil, err
  4466. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4467. return nil, err
  4468. } else {
  4469. for k, v := range parsed {
  4470. for _, v2 := range v {
  4471. queryValues.Add(k, v2)
  4472. }
  4473. }
  4474. }
  4475. }
  4476. queryURL.RawQuery = queryValues.Encode()
  4477. }
  4478. req, err := http.NewRequest("POST", queryURL.String(), body)
  4479. if err != nil {
  4480. return nil, err
  4481. }
  4482. req.Header.Add("Content-Type", contentType)
  4483. return req, nil
  4484. }
  4485. // NewSessionInitRequest calls the generic SessionInit builder with application/json body
  4486. func NewSessionInitRequest(server string, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody) (*http.Request, error) {
  4487. var bodyReader io.Reader
  4488. buf, err := json.Marshal(body)
  4489. if err != nil {
  4490. return nil, err
  4491. }
  4492. bodyReader = bytes.NewReader(buf)
  4493. return NewSessionInitRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4494. }
  4495. // NewSessionInitRequestWithBody generates requests for SessionInit with any type of body
  4496. func NewSessionInitRequestWithBody(server string, sessionID string, params *SessionInitParams, contentType string, body io.Reader) (*http.Request, error) {
  4497. var err error
  4498. var pathParam0 string
  4499. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4500. if err != nil {
  4501. return nil, err
  4502. }
  4503. serverURL, err := url.Parse(server)
  4504. if err != nil {
  4505. return nil, err
  4506. }
  4507. operationPath := fmt.Sprintf("/session/%s/init", pathParam0)
  4508. if operationPath[0] == '/' {
  4509. operationPath = "." + operationPath
  4510. }
  4511. queryURL, err := serverURL.Parse(operationPath)
  4512. if err != nil {
  4513. return nil, err
  4514. }
  4515. if params != nil {
  4516. queryValues := queryURL.Query()
  4517. if params.Directory != nil {
  4518. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4519. return nil, err
  4520. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4521. return nil, err
  4522. } else {
  4523. for k, v := range parsed {
  4524. for _, v2 := range v {
  4525. queryValues.Add(k, v2)
  4526. }
  4527. }
  4528. }
  4529. }
  4530. queryURL.RawQuery = queryValues.Encode()
  4531. }
  4532. req, err := http.NewRequest("POST", queryURL.String(), body)
  4533. if err != nil {
  4534. return nil, err
  4535. }
  4536. req.Header.Add("Content-Type", contentType)
  4537. return req, nil
  4538. }
  4539. // NewSessionMessagesRequest generates requests for SessionMessages
  4540. func NewSessionMessagesRequest(server string, sessionID string, params *SessionMessagesParams) (*http.Request, error) {
  4541. var err error
  4542. var pathParam0 string
  4543. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4544. if err != nil {
  4545. return nil, err
  4546. }
  4547. serverURL, err := url.Parse(server)
  4548. if err != nil {
  4549. return nil, err
  4550. }
  4551. operationPath := fmt.Sprintf("/session/%s/message", pathParam0)
  4552. if operationPath[0] == '/' {
  4553. operationPath = "." + operationPath
  4554. }
  4555. queryURL, err := serverURL.Parse(operationPath)
  4556. if err != nil {
  4557. return nil, err
  4558. }
  4559. if params != nil {
  4560. queryValues := queryURL.Query()
  4561. if params.Directory != nil {
  4562. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4563. return nil, err
  4564. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4565. return nil, err
  4566. } else {
  4567. for k, v := range parsed {
  4568. for _, v2 := range v {
  4569. queryValues.Add(k, v2)
  4570. }
  4571. }
  4572. }
  4573. }
  4574. if params.Limit != nil {
  4575. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  4576. return nil, err
  4577. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4578. return nil, err
  4579. } else {
  4580. for k, v := range parsed {
  4581. for _, v2 := range v {
  4582. queryValues.Add(k, v2)
  4583. }
  4584. }
  4585. }
  4586. }
  4587. queryURL.RawQuery = queryValues.Encode()
  4588. }
  4589. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4590. if err != nil {
  4591. return nil, err
  4592. }
  4593. return req, nil
  4594. }
  4595. // NewSessionPromptRequest calls the generic SessionPrompt builder with application/json body
  4596. func NewSessionPromptRequest(server string, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody) (*http.Request, error) {
  4597. var bodyReader io.Reader
  4598. buf, err := json.Marshal(body)
  4599. if err != nil {
  4600. return nil, err
  4601. }
  4602. bodyReader = bytes.NewReader(buf)
  4603. return NewSessionPromptRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4604. }
  4605. // NewSessionPromptRequestWithBody generates requests for SessionPrompt with any type of body
  4606. func NewSessionPromptRequestWithBody(server string, sessionID string, params *SessionPromptParams, contentType string, body io.Reader) (*http.Request, error) {
  4607. var err error
  4608. var pathParam0 string
  4609. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4610. if err != nil {
  4611. return nil, err
  4612. }
  4613. serverURL, err := url.Parse(server)
  4614. if err != nil {
  4615. return nil, err
  4616. }
  4617. operationPath := fmt.Sprintf("/session/%s/message", pathParam0)
  4618. if operationPath[0] == '/' {
  4619. operationPath = "." + operationPath
  4620. }
  4621. queryURL, err := serverURL.Parse(operationPath)
  4622. if err != nil {
  4623. return nil, err
  4624. }
  4625. if params != nil {
  4626. queryValues := queryURL.Query()
  4627. if params.Directory != nil {
  4628. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4629. return nil, err
  4630. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4631. return nil, err
  4632. } else {
  4633. for k, v := range parsed {
  4634. for _, v2 := range v {
  4635. queryValues.Add(k, v2)
  4636. }
  4637. }
  4638. }
  4639. }
  4640. queryURL.RawQuery = queryValues.Encode()
  4641. }
  4642. req, err := http.NewRequest("POST", queryURL.String(), body)
  4643. if err != nil {
  4644. return nil, err
  4645. }
  4646. req.Header.Add("Content-Type", contentType)
  4647. return req, nil
  4648. }
  4649. // NewSessionMessageRequest generates requests for SessionMessage
  4650. func NewSessionMessageRequest(server string, sessionID string, messageID string, params *SessionMessageParams) (*http.Request, error) {
  4651. var err error
  4652. var pathParam0 string
  4653. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4654. if err != nil {
  4655. return nil, err
  4656. }
  4657. var pathParam1 string
  4658. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4659. if err != nil {
  4660. return nil, err
  4661. }
  4662. serverURL, err := url.Parse(server)
  4663. if err != nil {
  4664. return nil, err
  4665. }
  4666. operationPath := fmt.Sprintf("/session/%s/message/%s", pathParam0, pathParam1)
  4667. if operationPath[0] == '/' {
  4668. operationPath = "." + operationPath
  4669. }
  4670. queryURL, err := serverURL.Parse(operationPath)
  4671. if err != nil {
  4672. return nil, err
  4673. }
  4674. if params != nil {
  4675. queryValues := queryURL.Query()
  4676. if params.Directory != nil {
  4677. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4678. return nil, err
  4679. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4680. return nil, err
  4681. } else {
  4682. for k, v := range parsed {
  4683. for _, v2 := range v {
  4684. queryValues.Add(k, v2)
  4685. }
  4686. }
  4687. }
  4688. }
  4689. queryURL.RawQuery = queryValues.Encode()
  4690. }
  4691. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4692. if err != nil {
  4693. return nil, err
  4694. }
  4695. return req, nil
  4696. }
  4697. // NewPartDeleteRequest generates requests for PartDelete
  4698. func NewPartDeleteRequest(server string, sessionID string, messageID string, partID string, params *PartDeleteParams) (*http.Request, error) {
  4699. var err error
  4700. var pathParam0 string
  4701. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4702. if err != nil {
  4703. return nil, err
  4704. }
  4705. var pathParam1 string
  4706. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4707. if err != nil {
  4708. return nil, err
  4709. }
  4710. var pathParam2 string
  4711. pathParam2, err = runtime.StyleParamWithLocation("simple", false, "partID", runtime.ParamLocationPath, partID)
  4712. if err != nil {
  4713. return nil, err
  4714. }
  4715. serverURL, err := url.Parse(server)
  4716. if err != nil {
  4717. return nil, err
  4718. }
  4719. operationPath := fmt.Sprintf("/session/%s/message/%s/part/%s", pathParam0, pathParam1, pathParam2)
  4720. if operationPath[0] == '/' {
  4721. operationPath = "." + operationPath
  4722. }
  4723. queryURL, err := serverURL.Parse(operationPath)
  4724. if err != nil {
  4725. return nil, err
  4726. }
  4727. if params != nil {
  4728. queryValues := queryURL.Query()
  4729. if params.Directory != nil {
  4730. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4731. return nil, err
  4732. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4733. return nil, err
  4734. } else {
  4735. for k, v := range parsed {
  4736. for _, v2 := range v {
  4737. queryValues.Add(k, v2)
  4738. }
  4739. }
  4740. }
  4741. }
  4742. queryURL.RawQuery = queryValues.Encode()
  4743. }
  4744. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  4745. if err != nil {
  4746. return nil, err
  4747. }
  4748. return req, nil
  4749. }
  4750. // NewPartUpdateRequest calls the generic PartUpdate builder with application/json body
  4751. func NewPartUpdateRequest(server string, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody) (*http.Request, error) {
  4752. var bodyReader io.Reader
  4753. buf, err := json.Marshal(body)
  4754. if err != nil {
  4755. return nil, err
  4756. }
  4757. bodyReader = bytes.NewReader(buf)
  4758. return NewPartUpdateRequestWithBody(server, sessionID, messageID, partID, params, "application/json", bodyReader)
  4759. }
  4760. // NewPartUpdateRequestWithBody generates requests for PartUpdate with any type of body
  4761. func NewPartUpdateRequestWithBody(server string, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  4762. var err error
  4763. var pathParam0 string
  4764. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4765. if err != nil {
  4766. return nil, err
  4767. }
  4768. var pathParam1 string
  4769. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4770. if err != nil {
  4771. return nil, err
  4772. }
  4773. var pathParam2 string
  4774. pathParam2, err = runtime.StyleParamWithLocation("simple", false, "partID", runtime.ParamLocationPath, partID)
  4775. if err != nil {
  4776. return nil, err
  4777. }
  4778. serverURL, err := url.Parse(server)
  4779. if err != nil {
  4780. return nil, err
  4781. }
  4782. operationPath := fmt.Sprintf("/session/%s/message/%s/part/%s", pathParam0, pathParam1, pathParam2)
  4783. if operationPath[0] == '/' {
  4784. operationPath = "." + operationPath
  4785. }
  4786. queryURL, err := serverURL.Parse(operationPath)
  4787. if err != nil {
  4788. return nil, err
  4789. }
  4790. if params != nil {
  4791. queryValues := queryURL.Query()
  4792. if params.Directory != nil {
  4793. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4794. return nil, err
  4795. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4796. return nil, err
  4797. } else {
  4798. for k, v := range parsed {
  4799. for _, v2 := range v {
  4800. queryValues.Add(k, v2)
  4801. }
  4802. }
  4803. }
  4804. }
  4805. queryURL.RawQuery = queryValues.Encode()
  4806. }
  4807. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  4808. if err != nil {
  4809. return nil, err
  4810. }
  4811. req.Header.Add("Content-Type", contentType)
  4812. return req, nil
  4813. }
  4814. // NewPermissionRespondRequest calls the generic PermissionRespond builder with application/json body
  4815. func NewPermissionRespondRequest(server string, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody) (*http.Request, error) {
  4816. var bodyReader io.Reader
  4817. buf, err := json.Marshal(body)
  4818. if err != nil {
  4819. return nil, err
  4820. }
  4821. bodyReader = bytes.NewReader(buf)
  4822. return NewPermissionRespondRequestWithBody(server, sessionID, permissionID, params, "application/json", bodyReader)
  4823. }
  4824. // NewPermissionRespondRequestWithBody generates requests for PermissionRespond with any type of body
  4825. func NewPermissionRespondRequestWithBody(server string, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader) (*http.Request, error) {
  4826. var err error
  4827. var pathParam0 string
  4828. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4829. if err != nil {
  4830. return nil, err
  4831. }
  4832. var pathParam1 string
  4833. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "permissionID", runtime.ParamLocationPath, permissionID)
  4834. if err != nil {
  4835. return nil, err
  4836. }
  4837. serverURL, err := url.Parse(server)
  4838. if err != nil {
  4839. return nil, err
  4840. }
  4841. operationPath := fmt.Sprintf("/session/%s/permissions/%s", pathParam0, pathParam1)
  4842. if operationPath[0] == '/' {
  4843. operationPath = "." + operationPath
  4844. }
  4845. queryURL, err := serverURL.Parse(operationPath)
  4846. if err != nil {
  4847. return nil, err
  4848. }
  4849. if params != nil {
  4850. queryValues := queryURL.Query()
  4851. if params.Directory != nil {
  4852. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4853. return nil, err
  4854. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4855. return nil, err
  4856. } else {
  4857. for k, v := range parsed {
  4858. for _, v2 := range v {
  4859. queryValues.Add(k, v2)
  4860. }
  4861. }
  4862. }
  4863. }
  4864. queryURL.RawQuery = queryValues.Encode()
  4865. }
  4866. req, err := http.NewRequest("POST", queryURL.String(), body)
  4867. if err != nil {
  4868. return nil, err
  4869. }
  4870. req.Header.Add("Content-Type", contentType)
  4871. return req, nil
  4872. }
  4873. // NewSessionPromptAsyncRequest calls the generic SessionPromptAsync builder with application/json body
  4874. func NewSessionPromptAsyncRequest(server string, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody) (*http.Request, error) {
  4875. var bodyReader io.Reader
  4876. buf, err := json.Marshal(body)
  4877. if err != nil {
  4878. return nil, err
  4879. }
  4880. bodyReader = bytes.NewReader(buf)
  4881. return NewSessionPromptAsyncRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4882. }
  4883. // NewSessionPromptAsyncRequestWithBody generates requests for SessionPromptAsync with any type of body
  4884. func NewSessionPromptAsyncRequestWithBody(server string, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader) (*http.Request, error) {
  4885. var err error
  4886. var pathParam0 string
  4887. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4888. if err != nil {
  4889. return nil, err
  4890. }
  4891. serverURL, err := url.Parse(server)
  4892. if err != nil {
  4893. return nil, err
  4894. }
  4895. operationPath := fmt.Sprintf("/session/%s/prompt_async", pathParam0)
  4896. if operationPath[0] == '/' {
  4897. operationPath = "." + operationPath
  4898. }
  4899. queryURL, err := serverURL.Parse(operationPath)
  4900. if err != nil {
  4901. return nil, err
  4902. }
  4903. if params != nil {
  4904. queryValues := queryURL.Query()
  4905. if params.Directory != nil {
  4906. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4907. return nil, err
  4908. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4909. return nil, err
  4910. } else {
  4911. for k, v := range parsed {
  4912. for _, v2 := range v {
  4913. queryValues.Add(k, v2)
  4914. }
  4915. }
  4916. }
  4917. }
  4918. queryURL.RawQuery = queryValues.Encode()
  4919. }
  4920. req, err := http.NewRequest("POST", queryURL.String(), body)
  4921. if err != nil {
  4922. return nil, err
  4923. }
  4924. req.Header.Add("Content-Type", contentType)
  4925. return req, nil
  4926. }
  4927. // NewSessionRevertRequest calls the generic SessionRevert builder with application/json body
  4928. func NewSessionRevertRequest(server string, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody) (*http.Request, error) {
  4929. var bodyReader io.Reader
  4930. buf, err := json.Marshal(body)
  4931. if err != nil {
  4932. return nil, err
  4933. }
  4934. bodyReader = bytes.NewReader(buf)
  4935. return NewSessionRevertRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4936. }
  4937. // NewSessionRevertRequestWithBody generates requests for SessionRevert with any type of body
  4938. func NewSessionRevertRequestWithBody(server string, sessionID string, params *SessionRevertParams, contentType string, body io.Reader) (*http.Request, error) {
  4939. var err error
  4940. var pathParam0 string
  4941. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4942. if err != nil {
  4943. return nil, err
  4944. }
  4945. serverURL, err := url.Parse(server)
  4946. if err != nil {
  4947. return nil, err
  4948. }
  4949. operationPath := fmt.Sprintf("/session/%s/revert", pathParam0)
  4950. if operationPath[0] == '/' {
  4951. operationPath = "." + operationPath
  4952. }
  4953. queryURL, err := serverURL.Parse(operationPath)
  4954. if err != nil {
  4955. return nil, err
  4956. }
  4957. if params != nil {
  4958. queryValues := queryURL.Query()
  4959. if params.Directory != nil {
  4960. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4961. return nil, err
  4962. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4963. return nil, err
  4964. } else {
  4965. for k, v := range parsed {
  4966. for _, v2 := range v {
  4967. queryValues.Add(k, v2)
  4968. }
  4969. }
  4970. }
  4971. }
  4972. queryURL.RawQuery = queryValues.Encode()
  4973. }
  4974. req, err := http.NewRequest("POST", queryURL.String(), body)
  4975. if err != nil {
  4976. return nil, err
  4977. }
  4978. req.Header.Add("Content-Type", contentType)
  4979. return req, nil
  4980. }
  4981. // NewSessionUnshareRequest generates requests for SessionUnshare
  4982. func NewSessionUnshareRequest(server string, sessionID string, params *SessionUnshareParams) (*http.Request, error) {
  4983. var err error
  4984. var pathParam0 string
  4985. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4986. if err != nil {
  4987. return nil, err
  4988. }
  4989. serverURL, err := url.Parse(server)
  4990. if err != nil {
  4991. return nil, err
  4992. }
  4993. operationPath := fmt.Sprintf("/session/%s/share", pathParam0)
  4994. if operationPath[0] == '/' {
  4995. operationPath = "." + operationPath
  4996. }
  4997. queryURL, err := serverURL.Parse(operationPath)
  4998. if err != nil {
  4999. return nil, err
  5000. }
  5001. if params != nil {
  5002. queryValues := queryURL.Query()
  5003. if params.Directory != nil {
  5004. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5005. return nil, err
  5006. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5007. return nil, err
  5008. } else {
  5009. for k, v := range parsed {
  5010. for _, v2 := range v {
  5011. queryValues.Add(k, v2)
  5012. }
  5013. }
  5014. }
  5015. }
  5016. queryURL.RawQuery = queryValues.Encode()
  5017. }
  5018. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  5019. if err != nil {
  5020. return nil, err
  5021. }
  5022. return req, nil
  5023. }
  5024. // NewSessionShareRequest generates requests for SessionShare
  5025. func NewSessionShareRequest(server string, sessionID string, params *SessionShareParams) (*http.Request, error) {
  5026. var err error
  5027. var pathParam0 string
  5028. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5029. if err != nil {
  5030. return nil, err
  5031. }
  5032. serverURL, err := url.Parse(server)
  5033. if err != nil {
  5034. return nil, err
  5035. }
  5036. operationPath := fmt.Sprintf("/session/%s/share", pathParam0)
  5037. if operationPath[0] == '/' {
  5038. operationPath = "." + operationPath
  5039. }
  5040. queryURL, err := serverURL.Parse(operationPath)
  5041. if err != nil {
  5042. return nil, err
  5043. }
  5044. if params != nil {
  5045. queryValues := queryURL.Query()
  5046. if params.Directory != nil {
  5047. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5048. return nil, err
  5049. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5050. return nil, err
  5051. } else {
  5052. for k, v := range parsed {
  5053. for _, v2 := range v {
  5054. queryValues.Add(k, v2)
  5055. }
  5056. }
  5057. }
  5058. }
  5059. queryURL.RawQuery = queryValues.Encode()
  5060. }
  5061. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5062. if err != nil {
  5063. return nil, err
  5064. }
  5065. return req, nil
  5066. }
  5067. // NewSessionShellRequest calls the generic SessionShell builder with application/json body
  5068. func NewSessionShellRequest(server string, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody) (*http.Request, error) {
  5069. var bodyReader io.Reader
  5070. buf, err := json.Marshal(body)
  5071. if err != nil {
  5072. return nil, err
  5073. }
  5074. bodyReader = bytes.NewReader(buf)
  5075. return NewSessionShellRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  5076. }
  5077. // NewSessionShellRequestWithBody generates requests for SessionShell with any type of body
  5078. func NewSessionShellRequestWithBody(server string, sessionID string, params *SessionShellParams, contentType string, body io.Reader) (*http.Request, error) {
  5079. var err error
  5080. var pathParam0 string
  5081. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5082. if err != nil {
  5083. return nil, err
  5084. }
  5085. serverURL, err := url.Parse(server)
  5086. if err != nil {
  5087. return nil, err
  5088. }
  5089. operationPath := fmt.Sprintf("/session/%s/shell", pathParam0)
  5090. if operationPath[0] == '/' {
  5091. operationPath = "." + operationPath
  5092. }
  5093. queryURL, err := serverURL.Parse(operationPath)
  5094. if err != nil {
  5095. return nil, err
  5096. }
  5097. if params != nil {
  5098. queryValues := queryURL.Query()
  5099. if params.Directory != nil {
  5100. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5101. return nil, err
  5102. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5103. return nil, err
  5104. } else {
  5105. for k, v := range parsed {
  5106. for _, v2 := range v {
  5107. queryValues.Add(k, v2)
  5108. }
  5109. }
  5110. }
  5111. }
  5112. queryURL.RawQuery = queryValues.Encode()
  5113. }
  5114. req, err := http.NewRequest("POST", queryURL.String(), body)
  5115. if err != nil {
  5116. return nil, err
  5117. }
  5118. req.Header.Add("Content-Type", contentType)
  5119. return req, nil
  5120. }
  5121. // NewSessionSummarizeRequest calls the generic SessionSummarize builder with application/json body
  5122. func NewSessionSummarizeRequest(server string, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody) (*http.Request, error) {
  5123. var bodyReader io.Reader
  5124. buf, err := json.Marshal(body)
  5125. if err != nil {
  5126. return nil, err
  5127. }
  5128. bodyReader = bytes.NewReader(buf)
  5129. return NewSessionSummarizeRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  5130. }
  5131. // NewSessionSummarizeRequestWithBody generates requests for SessionSummarize with any type of body
  5132. func NewSessionSummarizeRequestWithBody(server string, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader) (*http.Request, error) {
  5133. var err error
  5134. var pathParam0 string
  5135. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5136. if err != nil {
  5137. return nil, err
  5138. }
  5139. serverURL, err := url.Parse(server)
  5140. if err != nil {
  5141. return nil, err
  5142. }
  5143. operationPath := fmt.Sprintf("/session/%s/summarize", pathParam0)
  5144. if operationPath[0] == '/' {
  5145. operationPath = "." + operationPath
  5146. }
  5147. queryURL, err := serverURL.Parse(operationPath)
  5148. if err != nil {
  5149. return nil, err
  5150. }
  5151. if params != nil {
  5152. queryValues := queryURL.Query()
  5153. if params.Directory != nil {
  5154. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5155. return nil, err
  5156. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5157. return nil, err
  5158. } else {
  5159. for k, v := range parsed {
  5160. for _, v2 := range v {
  5161. queryValues.Add(k, v2)
  5162. }
  5163. }
  5164. }
  5165. }
  5166. queryURL.RawQuery = queryValues.Encode()
  5167. }
  5168. req, err := http.NewRequest("POST", queryURL.String(), body)
  5169. if err != nil {
  5170. return nil, err
  5171. }
  5172. req.Header.Add("Content-Type", contentType)
  5173. return req, nil
  5174. }
  5175. // NewSessionTodoRequest generates requests for SessionTodo
  5176. func NewSessionTodoRequest(server string, sessionID string, params *SessionTodoParams) (*http.Request, error) {
  5177. var err error
  5178. var pathParam0 string
  5179. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5180. if err != nil {
  5181. return nil, err
  5182. }
  5183. serverURL, err := url.Parse(server)
  5184. if err != nil {
  5185. return nil, err
  5186. }
  5187. operationPath := fmt.Sprintf("/session/%s/todo", pathParam0)
  5188. if operationPath[0] == '/' {
  5189. operationPath = "." + operationPath
  5190. }
  5191. queryURL, err := serverURL.Parse(operationPath)
  5192. if err != nil {
  5193. return nil, err
  5194. }
  5195. if params != nil {
  5196. queryValues := queryURL.Query()
  5197. if params.Directory != nil {
  5198. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5199. return nil, err
  5200. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5201. return nil, err
  5202. } else {
  5203. for k, v := range parsed {
  5204. for _, v2 := range v {
  5205. queryValues.Add(k, v2)
  5206. }
  5207. }
  5208. }
  5209. }
  5210. queryURL.RawQuery = queryValues.Encode()
  5211. }
  5212. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5213. if err != nil {
  5214. return nil, err
  5215. }
  5216. return req, nil
  5217. }
  5218. // NewSessionUnrevertRequest generates requests for SessionUnrevert
  5219. func NewSessionUnrevertRequest(server string, sessionID string, params *SessionUnrevertParams) (*http.Request, error) {
  5220. var err error
  5221. var pathParam0 string
  5222. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5223. if err != nil {
  5224. return nil, err
  5225. }
  5226. serverURL, err := url.Parse(server)
  5227. if err != nil {
  5228. return nil, err
  5229. }
  5230. operationPath := fmt.Sprintf("/session/%s/unrevert", pathParam0)
  5231. if operationPath[0] == '/' {
  5232. operationPath = "." + operationPath
  5233. }
  5234. queryURL, err := serverURL.Parse(operationPath)
  5235. if err != nil {
  5236. return nil, err
  5237. }
  5238. if params != nil {
  5239. queryValues := queryURL.Query()
  5240. if params.Directory != nil {
  5241. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5242. return nil, err
  5243. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5244. return nil, err
  5245. } else {
  5246. for k, v := range parsed {
  5247. for _, v2 := range v {
  5248. queryValues.Add(k, v2)
  5249. }
  5250. }
  5251. }
  5252. }
  5253. queryURL.RawQuery = queryValues.Encode()
  5254. }
  5255. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5256. if err != nil {
  5257. return nil, err
  5258. }
  5259. return req, nil
  5260. }
  5261. // NewTuiAppendPromptRequest calls the generic TuiAppendPrompt builder with application/json body
  5262. func NewTuiAppendPromptRequest(server string, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody) (*http.Request, error) {
  5263. var bodyReader io.Reader
  5264. buf, err := json.Marshal(body)
  5265. if err != nil {
  5266. return nil, err
  5267. }
  5268. bodyReader = bytes.NewReader(buf)
  5269. return NewTuiAppendPromptRequestWithBody(server, params, "application/json", bodyReader)
  5270. }
  5271. // NewTuiAppendPromptRequestWithBody generates requests for TuiAppendPrompt with any type of body
  5272. func NewTuiAppendPromptRequestWithBody(server string, params *TuiAppendPromptParams, contentType string, body io.Reader) (*http.Request, error) {
  5273. var err error
  5274. serverURL, err := url.Parse(server)
  5275. if err != nil {
  5276. return nil, err
  5277. }
  5278. operationPath := fmt.Sprintf("/tui/append-prompt")
  5279. if operationPath[0] == '/' {
  5280. operationPath = "." + operationPath
  5281. }
  5282. queryURL, err := serverURL.Parse(operationPath)
  5283. if err != nil {
  5284. return nil, err
  5285. }
  5286. if params != nil {
  5287. queryValues := queryURL.Query()
  5288. if params.Directory != nil {
  5289. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5290. return nil, err
  5291. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5292. return nil, err
  5293. } else {
  5294. for k, v := range parsed {
  5295. for _, v2 := range v {
  5296. queryValues.Add(k, v2)
  5297. }
  5298. }
  5299. }
  5300. }
  5301. queryURL.RawQuery = queryValues.Encode()
  5302. }
  5303. req, err := http.NewRequest("POST", queryURL.String(), body)
  5304. if err != nil {
  5305. return nil, err
  5306. }
  5307. req.Header.Add("Content-Type", contentType)
  5308. return req, nil
  5309. }
  5310. // NewTuiClearPromptRequest generates requests for TuiClearPrompt
  5311. func NewTuiClearPromptRequest(server string, params *TuiClearPromptParams) (*http.Request, error) {
  5312. var err error
  5313. serverURL, err := url.Parse(server)
  5314. if err != nil {
  5315. return nil, err
  5316. }
  5317. operationPath := fmt.Sprintf("/tui/clear-prompt")
  5318. if operationPath[0] == '/' {
  5319. operationPath = "." + operationPath
  5320. }
  5321. queryURL, err := serverURL.Parse(operationPath)
  5322. if err != nil {
  5323. return nil, err
  5324. }
  5325. if params != nil {
  5326. queryValues := queryURL.Query()
  5327. if params.Directory != nil {
  5328. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5329. return nil, err
  5330. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5331. return nil, err
  5332. } else {
  5333. for k, v := range parsed {
  5334. for _, v2 := range v {
  5335. queryValues.Add(k, v2)
  5336. }
  5337. }
  5338. }
  5339. }
  5340. queryURL.RawQuery = queryValues.Encode()
  5341. }
  5342. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5343. if err != nil {
  5344. return nil, err
  5345. }
  5346. return req, nil
  5347. }
  5348. // NewTuiControlNextRequest generates requests for TuiControlNext
  5349. func NewTuiControlNextRequest(server string, params *TuiControlNextParams) (*http.Request, error) {
  5350. var err error
  5351. serverURL, err := url.Parse(server)
  5352. if err != nil {
  5353. return nil, err
  5354. }
  5355. operationPath := fmt.Sprintf("/tui/control/next")
  5356. if operationPath[0] == '/' {
  5357. operationPath = "." + operationPath
  5358. }
  5359. queryURL, err := serverURL.Parse(operationPath)
  5360. if err != nil {
  5361. return nil, err
  5362. }
  5363. if params != nil {
  5364. queryValues := queryURL.Query()
  5365. if params.Directory != nil {
  5366. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5367. return nil, err
  5368. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5369. return nil, err
  5370. } else {
  5371. for k, v := range parsed {
  5372. for _, v2 := range v {
  5373. queryValues.Add(k, v2)
  5374. }
  5375. }
  5376. }
  5377. }
  5378. queryURL.RawQuery = queryValues.Encode()
  5379. }
  5380. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5381. if err != nil {
  5382. return nil, err
  5383. }
  5384. return req, nil
  5385. }
  5386. // NewTuiControlResponseRequest calls the generic TuiControlResponse builder with application/json body
  5387. func NewTuiControlResponseRequest(server string, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody) (*http.Request, error) {
  5388. var bodyReader io.Reader
  5389. buf, err := json.Marshal(body)
  5390. if err != nil {
  5391. return nil, err
  5392. }
  5393. bodyReader = bytes.NewReader(buf)
  5394. return NewTuiControlResponseRequestWithBody(server, params, "application/json", bodyReader)
  5395. }
  5396. // NewTuiControlResponseRequestWithBody generates requests for TuiControlResponse with any type of body
  5397. func NewTuiControlResponseRequestWithBody(server string, params *TuiControlResponseParams, contentType string, body io.Reader) (*http.Request, error) {
  5398. var err error
  5399. serverURL, err := url.Parse(server)
  5400. if err != nil {
  5401. return nil, err
  5402. }
  5403. operationPath := fmt.Sprintf("/tui/control/response")
  5404. if operationPath[0] == '/' {
  5405. operationPath = "." + operationPath
  5406. }
  5407. queryURL, err := serverURL.Parse(operationPath)
  5408. if err != nil {
  5409. return nil, err
  5410. }
  5411. if params != nil {
  5412. queryValues := queryURL.Query()
  5413. if params.Directory != nil {
  5414. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5415. return nil, err
  5416. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5417. return nil, err
  5418. } else {
  5419. for k, v := range parsed {
  5420. for _, v2 := range v {
  5421. queryValues.Add(k, v2)
  5422. }
  5423. }
  5424. }
  5425. }
  5426. queryURL.RawQuery = queryValues.Encode()
  5427. }
  5428. req, err := http.NewRequest("POST", queryURL.String(), body)
  5429. if err != nil {
  5430. return nil, err
  5431. }
  5432. req.Header.Add("Content-Type", contentType)
  5433. return req, nil
  5434. }
  5435. // NewTuiExecuteCommandRequest calls the generic TuiExecuteCommand builder with application/json body
  5436. func NewTuiExecuteCommandRequest(server string, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody) (*http.Request, error) {
  5437. var bodyReader io.Reader
  5438. buf, err := json.Marshal(body)
  5439. if err != nil {
  5440. return nil, err
  5441. }
  5442. bodyReader = bytes.NewReader(buf)
  5443. return NewTuiExecuteCommandRequestWithBody(server, params, "application/json", bodyReader)
  5444. }
  5445. // NewTuiExecuteCommandRequestWithBody generates requests for TuiExecuteCommand with any type of body
  5446. func NewTuiExecuteCommandRequestWithBody(server string, params *TuiExecuteCommandParams, contentType string, body io.Reader) (*http.Request, error) {
  5447. var err error
  5448. serverURL, err := url.Parse(server)
  5449. if err != nil {
  5450. return nil, err
  5451. }
  5452. operationPath := fmt.Sprintf("/tui/execute-command")
  5453. if operationPath[0] == '/' {
  5454. operationPath = "." + operationPath
  5455. }
  5456. queryURL, err := serverURL.Parse(operationPath)
  5457. if err != nil {
  5458. return nil, err
  5459. }
  5460. if params != nil {
  5461. queryValues := queryURL.Query()
  5462. if params.Directory != nil {
  5463. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5464. return nil, err
  5465. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5466. return nil, err
  5467. } else {
  5468. for k, v := range parsed {
  5469. for _, v2 := range v {
  5470. queryValues.Add(k, v2)
  5471. }
  5472. }
  5473. }
  5474. }
  5475. queryURL.RawQuery = queryValues.Encode()
  5476. }
  5477. req, err := http.NewRequest("POST", queryURL.String(), body)
  5478. if err != nil {
  5479. return nil, err
  5480. }
  5481. req.Header.Add("Content-Type", contentType)
  5482. return req, nil
  5483. }
  5484. // NewTuiOpenHelpRequest generates requests for TuiOpenHelp
  5485. func NewTuiOpenHelpRequest(server string, params *TuiOpenHelpParams) (*http.Request, error) {
  5486. var err error
  5487. serverURL, err := url.Parse(server)
  5488. if err != nil {
  5489. return nil, err
  5490. }
  5491. operationPath := fmt.Sprintf("/tui/open-help")
  5492. if operationPath[0] == '/' {
  5493. operationPath = "." + operationPath
  5494. }
  5495. queryURL, err := serverURL.Parse(operationPath)
  5496. if err != nil {
  5497. return nil, err
  5498. }
  5499. if params != nil {
  5500. queryValues := queryURL.Query()
  5501. if params.Directory != nil {
  5502. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5503. return nil, err
  5504. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5505. return nil, err
  5506. } else {
  5507. for k, v := range parsed {
  5508. for _, v2 := range v {
  5509. queryValues.Add(k, v2)
  5510. }
  5511. }
  5512. }
  5513. }
  5514. queryURL.RawQuery = queryValues.Encode()
  5515. }
  5516. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5517. if err != nil {
  5518. return nil, err
  5519. }
  5520. return req, nil
  5521. }
  5522. // NewTuiOpenModelsRequest generates requests for TuiOpenModels
  5523. func NewTuiOpenModelsRequest(server string, params *TuiOpenModelsParams) (*http.Request, error) {
  5524. var err error
  5525. serverURL, err := url.Parse(server)
  5526. if err != nil {
  5527. return nil, err
  5528. }
  5529. operationPath := fmt.Sprintf("/tui/open-models")
  5530. if operationPath[0] == '/' {
  5531. operationPath = "." + operationPath
  5532. }
  5533. queryURL, err := serverURL.Parse(operationPath)
  5534. if err != nil {
  5535. return nil, err
  5536. }
  5537. if params != nil {
  5538. queryValues := queryURL.Query()
  5539. if params.Directory != nil {
  5540. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5541. return nil, err
  5542. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5543. return nil, err
  5544. } else {
  5545. for k, v := range parsed {
  5546. for _, v2 := range v {
  5547. queryValues.Add(k, v2)
  5548. }
  5549. }
  5550. }
  5551. }
  5552. queryURL.RawQuery = queryValues.Encode()
  5553. }
  5554. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5555. if err != nil {
  5556. return nil, err
  5557. }
  5558. return req, nil
  5559. }
  5560. // NewTuiOpenSessionsRequest generates requests for TuiOpenSessions
  5561. func NewTuiOpenSessionsRequest(server string, params *TuiOpenSessionsParams) (*http.Request, error) {
  5562. var err error
  5563. serverURL, err := url.Parse(server)
  5564. if err != nil {
  5565. return nil, err
  5566. }
  5567. operationPath := fmt.Sprintf("/tui/open-sessions")
  5568. if operationPath[0] == '/' {
  5569. operationPath = "." + operationPath
  5570. }
  5571. queryURL, err := serverURL.Parse(operationPath)
  5572. if err != nil {
  5573. return nil, err
  5574. }
  5575. if params != nil {
  5576. queryValues := queryURL.Query()
  5577. if params.Directory != nil {
  5578. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5579. return nil, err
  5580. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5581. return nil, err
  5582. } else {
  5583. for k, v := range parsed {
  5584. for _, v2 := range v {
  5585. queryValues.Add(k, v2)
  5586. }
  5587. }
  5588. }
  5589. }
  5590. queryURL.RawQuery = queryValues.Encode()
  5591. }
  5592. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5593. if err != nil {
  5594. return nil, err
  5595. }
  5596. return req, nil
  5597. }
  5598. // NewTuiOpenThemesRequest generates requests for TuiOpenThemes
  5599. func NewTuiOpenThemesRequest(server string, params *TuiOpenThemesParams) (*http.Request, error) {
  5600. var err error
  5601. serverURL, err := url.Parse(server)
  5602. if err != nil {
  5603. return nil, err
  5604. }
  5605. operationPath := fmt.Sprintf("/tui/open-themes")
  5606. if operationPath[0] == '/' {
  5607. operationPath = "." + operationPath
  5608. }
  5609. queryURL, err := serverURL.Parse(operationPath)
  5610. if err != nil {
  5611. return nil, err
  5612. }
  5613. if params != nil {
  5614. queryValues := queryURL.Query()
  5615. if params.Directory != nil {
  5616. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5617. return nil, err
  5618. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5619. return nil, err
  5620. } else {
  5621. for k, v := range parsed {
  5622. for _, v2 := range v {
  5623. queryValues.Add(k, v2)
  5624. }
  5625. }
  5626. }
  5627. }
  5628. queryURL.RawQuery = queryValues.Encode()
  5629. }
  5630. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5631. if err != nil {
  5632. return nil, err
  5633. }
  5634. return req, nil
  5635. }
  5636. // NewTuiPublishRequest calls the generic TuiPublish builder with application/json body
  5637. func NewTuiPublishRequest(server string, params *TuiPublishParams, body TuiPublishJSONRequestBody) (*http.Request, error) {
  5638. var bodyReader io.Reader
  5639. buf, err := json.Marshal(body)
  5640. if err != nil {
  5641. return nil, err
  5642. }
  5643. bodyReader = bytes.NewReader(buf)
  5644. return NewTuiPublishRequestWithBody(server, params, "application/json", bodyReader)
  5645. }
  5646. // NewTuiPublishRequestWithBody generates requests for TuiPublish with any type of body
  5647. func NewTuiPublishRequestWithBody(server string, params *TuiPublishParams, contentType string, body io.Reader) (*http.Request, error) {
  5648. var err error
  5649. serverURL, err := url.Parse(server)
  5650. if err != nil {
  5651. return nil, err
  5652. }
  5653. operationPath := fmt.Sprintf("/tui/publish")
  5654. if operationPath[0] == '/' {
  5655. operationPath = "." + operationPath
  5656. }
  5657. queryURL, err := serverURL.Parse(operationPath)
  5658. if err != nil {
  5659. return nil, err
  5660. }
  5661. if params != nil {
  5662. queryValues := queryURL.Query()
  5663. if params.Directory != nil {
  5664. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5665. return nil, err
  5666. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5667. return nil, err
  5668. } else {
  5669. for k, v := range parsed {
  5670. for _, v2 := range v {
  5671. queryValues.Add(k, v2)
  5672. }
  5673. }
  5674. }
  5675. }
  5676. queryURL.RawQuery = queryValues.Encode()
  5677. }
  5678. req, err := http.NewRequest("POST", queryURL.String(), body)
  5679. if err != nil {
  5680. return nil, err
  5681. }
  5682. req.Header.Add("Content-Type", contentType)
  5683. return req, nil
  5684. }
  5685. // NewTuiSelectSessionRequest calls the generic TuiSelectSession builder with application/json body
  5686. func NewTuiSelectSessionRequest(server string, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody) (*http.Request, error) {
  5687. var bodyReader io.Reader
  5688. buf, err := json.Marshal(body)
  5689. if err != nil {
  5690. return nil, err
  5691. }
  5692. bodyReader = bytes.NewReader(buf)
  5693. return NewTuiSelectSessionRequestWithBody(server, params, "application/json", bodyReader)
  5694. }
  5695. // NewTuiSelectSessionRequestWithBody generates requests for TuiSelectSession with any type of body
  5696. func NewTuiSelectSessionRequestWithBody(server string, params *TuiSelectSessionParams, contentType string, body io.Reader) (*http.Request, error) {
  5697. var err error
  5698. serverURL, err := url.Parse(server)
  5699. if err != nil {
  5700. return nil, err
  5701. }
  5702. operationPath := fmt.Sprintf("/tui/select-session")
  5703. if operationPath[0] == '/' {
  5704. operationPath = "." + operationPath
  5705. }
  5706. queryURL, err := serverURL.Parse(operationPath)
  5707. if err != nil {
  5708. return nil, err
  5709. }
  5710. if params != nil {
  5711. queryValues := queryURL.Query()
  5712. if params.Directory != nil {
  5713. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5714. return nil, err
  5715. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5716. return nil, err
  5717. } else {
  5718. for k, v := range parsed {
  5719. for _, v2 := range v {
  5720. queryValues.Add(k, v2)
  5721. }
  5722. }
  5723. }
  5724. }
  5725. queryURL.RawQuery = queryValues.Encode()
  5726. }
  5727. req, err := http.NewRequest("POST", queryURL.String(), body)
  5728. if err != nil {
  5729. return nil, err
  5730. }
  5731. req.Header.Add("Content-Type", contentType)
  5732. return req, nil
  5733. }
  5734. // NewTuiShowToastRequest calls the generic TuiShowToast builder with application/json body
  5735. func NewTuiShowToastRequest(server string, params *TuiShowToastParams, body TuiShowToastJSONRequestBody) (*http.Request, error) {
  5736. var bodyReader io.Reader
  5737. buf, err := json.Marshal(body)
  5738. if err != nil {
  5739. return nil, err
  5740. }
  5741. bodyReader = bytes.NewReader(buf)
  5742. return NewTuiShowToastRequestWithBody(server, params, "application/json", bodyReader)
  5743. }
  5744. // NewTuiShowToastRequestWithBody generates requests for TuiShowToast with any type of body
  5745. func NewTuiShowToastRequestWithBody(server string, params *TuiShowToastParams, contentType string, body io.Reader) (*http.Request, error) {
  5746. var err error
  5747. serverURL, err := url.Parse(server)
  5748. if err != nil {
  5749. return nil, err
  5750. }
  5751. operationPath := fmt.Sprintf("/tui/show-toast")
  5752. if operationPath[0] == '/' {
  5753. operationPath = "." + operationPath
  5754. }
  5755. queryURL, err := serverURL.Parse(operationPath)
  5756. if err != nil {
  5757. return nil, err
  5758. }
  5759. if params != nil {
  5760. queryValues := queryURL.Query()
  5761. if params.Directory != nil {
  5762. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5763. return nil, err
  5764. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5765. return nil, err
  5766. } else {
  5767. for k, v := range parsed {
  5768. for _, v2 := range v {
  5769. queryValues.Add(k, v2)
  5770. }
  5771. }
  5772. }
  5773. }
  5774. queryURL.RawQuery = queryValues.Encode()
  5775. }
  5776. req, err := http.NewRequest("POST", queryURL.String(), body)
  5777. if err != nil {
  5778. return nil, err
  5779. }
  5780. req.Header.Add("Content-Type", contentType)
  5781. return req, nil
  5782. }
  5783. // NewTuiSubmitPromptRequest generates requests for TuiSubmitPrompt
  5784. func NewTuiSubmitPromptRequest(server string, params *TuiSubmitPromptParams) (*http.Request, error) {
  5785. var err error
  5786. serverURL, err := url.Parse(server)
  5787. if err != nil {
  5788. return nil, err
  5789. }
  5790. operationPath := fmt.Sprintf("/tui/submit-prompt")
  5791. if operationPath[0] == '/' {
  5792. operationPath = "." + operationPath
  5793. }
  5794. queryURL, err := serverURL.Parse(operationPath)
  5795. if err != nil {
  5796. return nil, err
  5797. }
  5798. if params != nil {
  5799. queryValues := queryURL.Query()
  5800. if params.Directory != nil {
  5801. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5802. return nil, err
  5803. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5804. return nil, err
  5805. } else {
  5806. for k, v := range parsed {
  5807. for _, v2 := range v {
  5808. queryValues.Add(k, v2)
  5809. }
  5810. }
  5811. }
  5812. }
  5813. queryURL.RawQuery = queryValues.Encode()
  5814. }
  5815. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5816. if err != nil {
  5817. return nil, err
  5818. }
  5819. return req, nil
  5820. }
  5821. // NewVcsGetRequest generates requests for VcsGet
  5822. func NewVcsGetRequest(server string, params *VcsGetParams) (*http.Request, error) {
  5823. var err error
  5824. serverURL, err := url.Parse(server)
  5825. if err != nil {
  5826. return nil, err
  5827. }
  5828. operationPath := fmt.Sprintf("/vcs")
  5829. if operationPath[0] == '/' {
  5830. operationPath = "." + operationPath
  5831. }
  5832. queryURL, err := serverURL.Parse(operationPath)
  5833. if err != nil {
  5834. return nil, err
  5835. }
  5836. if params != nil {
  5837. queryValues := queryURL.Query()
  5838. if params.Directory != nil {
  5839. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5840. return nil, err
  5841. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5842. return nil, err
  5843. } else {
  5844. for k, v := range parsed {
  5845. for _, v2 := range v {
  5846. queryValues.Add(k, v2)
  5847. }
  5848. }
  5849. }
  5850. }
  5851. queryURL.RawQuery = queryValues.Encode()
  5852. }
  5853. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5854. if err != nil {
  5855. return nil, err
  5856. }
  5857. return req, nil
  5858. }
  5859. func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
  5860. for _, r := range c.RequestEditors {
  5861. if err := r(ctx, req); err != nil {
  5862. return err
  5863. }
  5864. }
  5865. for _, r := range additionalEditors {
  5866. if err := r(ctx, req); err != nil {
  5867. return err
  5868. }
  5869. }
  5870. return nil
  5871. }
  5872. // ClientWithResponses builds on ClientInterface to offer response payloads
  5873. type ClientWithResponses struct {
  5874. ClientInterface
  5875. }
  5876. // NewClientWithResponses creates a new ClientWithResponses, which wraps
  5877. // Client with return type handling
  5878. func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
  5879. client, err := NewClient(server, opts...)
  5880. if err != nil {
  5881. return nil, err
  5882. }
  5883. return &ClientWithResponses{client}, nil
  5884. }
  5885. // WithBaseURL overrides the baseURL.
  5886. func WithBaseURL(baseURL string) ClientOption {
  5887. return func(c *Client) error {
  5888. newBaseURL, err := url.Parse(baseURL)
  5889. if err != nil {
  5890. return err
  5891. }
  5892. c.Server = newBaseURL.String()
  5893. return nil
  5894. }
  5895. }
  5896. // ClientWithResponsesInterface is the interface specification for the client with responses above.
  5897. type ClientWithResponsesInterface interface {
  5898. // AppAgentsWithResponse request
  5899. AppAgentsWithResponse(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*AppAgentsResponse, error)
  5900. // AuthSetWithBodyWithResponse request with any body
  5901. AuthSetWithBodyWithResponse(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthSetResponse, error)
  5902. AuthSetWithResponse(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthSetResponse, error)
  5903. // CommandListWithResponse request
  5904. CommandListWithResponse(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*CommandListResponse, error)
  5905. // ConfigGetWithResponse request
  5906. ConfigGetWithResponse(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*ConfigGetResponse, error)
  5907. // ConfigUpdateWithBodyWithResponse request with any body
  5908. ConfigUpdateWithBodyWithResponse(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error)
  5909. ConfigUpdateWithResponse(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error)
  5910. // ConfigProvidersWithResponse request
  5911. ConfigProvidersWithResponse(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*ConfigProvidersResponse, error)
  5912. // EventSubscribeWithResponse request
  5913. EventSubscribeWithResponse(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*EventSubscribeResponse, error)
  5914. // ExperimentalResourceListWithResponse request
  5915. ExperimentalResourceListWithResponse(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*ExperimentalResourceListResponse, error)
  5916. // ToolListWithResponse request
  5917. ToolListWithResponse(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*ToolListResponse, error)
  5918. // ToolIdsWithResponse request
  5919. ToolIdsWithResponse(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*ToolIdsResponse, error)
  5920. // WorktreeListWithResponse request
  5921. WorktreeListWithResponse(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*WorktreeListResponse, error)
  5922. // WorktreeCreateWithBodyWithResponse request with any body
  5923. WorktreeCreateWithBodyWithResponse(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error)
  5924. WorktreeCreateWithResponse(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error)
  5925. // FileListWithResponse request
  5926. FileListWithResponse(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*FileListResponse, error)
  5927. // FileReadWithResponse request
  5928. FileReadWithResponse(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*FileReadResponse, error)
  5929. // FileStatusWithResponse request
  5930. FileStatusWithResponse(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*FileStatusResponse, error)
  5931. // FindTextWithResponse request
  5932. FindTextWithResponse(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*FindTextResponse, error)
  5933. // FindFilesWithResponse request
  5934. FindFilesWithResponse(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*FindFilesResponse, error)
  5935. // FindSymbolsWithResponse request
  5936. FindSymbolsWithResponse(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*FindSymbolsResponse, error)
  5937. // FormatterStatusWithResponse request
  5938. FormatterStatusWithResponse(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*FormatterStatusResponse, error)
  5939. // GlobalDisposeWithResponse request
  5940. GlobalDisposeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalDisposeResponse, error)
  5941. // GlobalEventWithResponse request
  5942. GlobalEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalEventResponse, error)
  5943. // GlobalHealthWithResponse request
  5944. GlobalHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalHealthResponse, error)
  5945. // InstanceDisposeWithResponse request
  5946. InstanceDisposeWithResponse(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*InstanceDisposeResponse, error)
  5947. // AppLogWithBodyWithResponse request with any body
  5948. AppLogWithBodyWithResponse(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppLogResponse, error)
  5949. AppLogWithResponse(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*AppLogResponse, error)
  5950. // LspStatusWithResponse request
  5951. LspStatusWithResponse(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*LspStatusResponse, error)
  5952. // McpStatusWithResponse request
  5953. McpStatusWithResponse(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*McpStatusResponse, error)
  5954. // McpAddWithBodyWithResponse request with any body
  5955. McpAddWithBodyWithResponse(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAddResponse, error)
  5956. McpAddWithResponse(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAddResponse, error)
  5957. // McpAuthRemoveWithResponse request
  5958. McpAuthRemoveWithResponse(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*McpAuthRemoveResponse, error)
  5959. // McpAuthStartWithResponse request
  5960. McpAuthStartWithResponse(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*McpAuthStartResponse, error)
  5961. // McpAuthAuthenticateWithResponse request
  5962. McpAuthAuthenticateWithResponse(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*McpAuthAuthenticateResponse, error)
  5963. // McpAuthCallbackWithBodyWithResponse request with any body
  5964. McpAuthCallbackWithBodyWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error)
  5965. McpAuthCallbackWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error)
  5966. // McpConnectWithResponse request
  5967. McpConnectWithResponse(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*McpConnectResponse, error)
  5968. // McpDisconnectWithResponse request
  5969. McpDisconnectWithResponse(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*McpDisconnectResponse, error)
  5970. // PathGetWithResponse request
  5971. PathGetWithResponse(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*PathGetResponse, error)
  5972. // PermissionListWithResponse request
  5973. PermissionListWithResponse(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*PermissionListResponse, error)
  5974. // PermissionReplyWithBodyWithResponse request with any body
  5975. PermissionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error)
  5976. PermissionReplyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error)
  5977. // ProjectListWithResponse request
  5978. ProjectListWithResponse(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*ProjectListResponse, error)
  5979. // ProjectCurrentWithResponse request
  5980. ProjectCurrentWithResponse(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*ProjectCurrentResponse, error)
  5981. // ProjectUpdateWithBodyWithResponse request with any body
  5982. ProjectUpdateWithBodyWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error)
  5983. ProjectUpdateWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error)
  5984. // ProviderListWithResponse request
  5985. ProviderListWithResponse(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*ProviderListResponse, error)
  5986. // ProviderAuthWithResponse request
  5987. ProviderAuthWithResponse(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*ProviderAuthResponse, error)
  5988. // ProviderOauthAuthorizeWithBodyWithResponse request with any body
  5989. ProviderOauthAuthorizeWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error)
  5990. ProviderOauthAuthorizeWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error)
  5991. // ProviderOauthCallbackWithBodyWithResponse request with any body
  5992. ProviderOauthCallbackWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error)
  5993. ProviderOauthCallbackWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error)
  5994. // PtyListWithResponse request
  5995. PtyListWithResponse(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*PtyListResponse, error)
  5996. // PtyCreateWithBodyWithResponse request with any body
  5997. PtyCreateWithBodyWithResponse(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error)
  5998. PtyCreateWithResponse(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error)
  5999. // PtyRemoveWithResponse request
  6000. PtyRemoveWithResponse(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*PtyRemoveResponse, error)
  6001. // PtyGetWithResponse request
  6002. PtyGetWithResponse(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*PtyGetResponse, error)
  6003. // PtyUpdateWithBodyWithResponse request with any body
  6004. PtyUpdateWithBodyWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error)
  6005. PtyUpdateWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error)
  6006. // PtyConnectWithResponse request
  6007. PtyConnectWithResponse(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*PtyConnectResponse, error)
  6008. // QuestionListWithResponse request
  6009. QuestionListWithResponse(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*QuestionListResponse, error)
  6010. // QuestionRejectWithResponse request
  6011. QuestionRejectWithResponse(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*QuestionRejectResponse, error)
  6012. // QuestionReplyWithBodyWithResponse request with any body
  6013. QuestionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error)
  6014. QuestionReplyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error)
  6015. // SessionListWithResponse request
  6016. SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error)
  6017. // SessionCreateWithBodyWithResponse request with any body
  6018. SessionCreateWithBodyWithResponse(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error)
  6019. SessionCreateWithResponse(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error)
  6020. // SessionStatusWithResponse request
  6021. SessionStatusWithResponse(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*SessionStatusResponse, error)
  6022. // SessionDeleteWithResponse request
  6023. SessionDeleteWithResponse(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*SessionDeleteResponse, error)
  6024. // SessionGetWithResponse request
  6025. SessionGetWithResponse(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*SessionGetResponse, error)
  6026. // SessionUpdateWithBodyWithResponse request with any body
  6027. SessionUpdateWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error)
  6028. SessionUpdateWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error)
  6029. // SessionAbortWithResponse request
  6030. SessionAbortWithResponse(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*SessionAbortResponse, error)
  6031. // SessionChildrenWithResponse request
  6032. SessionChildrenWithResponse(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*SessionChildrenResponse, error)
  6033. // SessionCommandWithBodyWithResponse request with any body
  6034. SessionCommandWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error)
  6035. SessionCommandWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error)
  6036. // SessionDiffWithResponse request
  6037. SessionDiffWithResponse(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*SessionDiffResponse, error)
  6038. // SessionForkWithBodyWithResponse request with any body
  6039. SessionForkWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionForkResponse, error)
  6040. SessionForkWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionForkResponse, error)
  6041. // SessionInitWithBodyWithResponse request with any body
  6042. SessionInitWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionInitResponse, error)
  6043. SessionInitWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionInitResponse, error)
  6044. // SessionMessagesWithResponse request
  6045. SessionMessagesWithResponse(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*SessionMessagesResponse, error)
  6046. // SessionPromptWithBodyWithResponse request with any body
  6047. SessionPromptWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error)
  6048. SessionPromptWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error)
  6049. // SessionMessageWithResponse request
  6050. SessionMessageWithResponse(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*SessionMessageResponse, error)
  6051. // PartDeleteWithResponse request
  6052. PartDeleteWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*PartDeleteResponse, error)
  6053. // PartUpdateWithBodyWithResponse request with any body
  6054. PartUpdateWithBodyWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error)
  6055. PartUpdateWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error)
  6056. // PermissionRespondWithBodyWithResponse request with any body
  6057. PermissionRespondWithBodyWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error)
  6058. PermissionRespondWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error)
  6059. // SessionPromptAsyncWithBodyWithResponse request with any body
  6060. SessionPromptAsyncWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error)
  6061. SessionPromptAsyncWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error)
  6062. // SessionRevertWithBodyWithResponse request with any body
  6063. SessionRevertWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error)
  6064. SessionRevertWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error)
  6065. // SessionUnshareWithResponse request
  6066. SessionUnshareWithResponse(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*SessionUnshareResponse, error)
  6067. // SessionShareWithResponse request
  6068. SessionShareWithResponse(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*SessionShareResponse, error)
  6069. // SessionShellWithBodyWithResponse request with any body
  6070. SessionShellWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionShellResponse, error)
  6071. SessionShellWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionShellResponse, error)
  6072. // SessionSummarizeWithBodyWithResponse request with any body
  6073. SessionSummarizeWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error)
  6074. SessionSummarizeWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error)
  6075. // SessionTodoWithResponse request
  6076. SessionTodoWithResponse(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*SessionTodoResponse, error)
  6077. // SessionUnrevertWithResponse request
  6078. SessionUnrevertWithResponse(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*SessionUnrevertResponse, error)
  6079. // TuiAppendPromptWithBodyWithResponse request with any body
  6080. TuiAppendPromptWithBodyWithResponse(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error)
  6081. TuiAppendPromptWithResponse(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error)
  6082. // TuiClearPromptWithResponse request
  6083. TuiClearPromptWithResponse(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*TuiClearPromptResponse, error)
  6084. // TuiControlNextWithResponse request
  6085. TuiControlNextWithResponse(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*TuiControlNextResponse, error)
  6086. // TuiControlResponseWithBodyWithResponse request with any body
  6087. TuiControlResponseWithBodyWithResponse(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error)
  6088. TuiControlResponseWithResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error)
  6089. // TuiExecuteCommandWithBodyWithResponse request with any body
  6090. TuiExecuteCommandWithBodyWithResponse(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error)
  6091. TuiExecuteCommandWithResponse(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error)
  6092. // TuiOpenHelpWithResponse request
  6093. TuiOpenHelpWithResponse(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*TuiOpenHelpResponse, error)
  6094. // TuiOpenModelsWithResponse request
  6095. TuiOpenModelsWithResponse(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*TuiOpenModelsResponse, error)
  6096. // TuiOpenSessionsWithResponse request
  6097. TuiOpenSessionsWithResponse(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*TuiOpenSessionsResponse, error)
  6098. // TuiOpenThemesWithResponse request
  6099. TuiOpenThemesWithResponse(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*TuiOpenThemesResponse, error)
  6100. // TuiPublishWithBodyWithResponse request with any body
  6101. TuiPublishWithBodyWithResponse(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error)
  6102. TuiPublishWithResponse(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error)
  6103. // TuiSelectSessionWithBodyWithResponse request with any body
  6104. TuiSelectSessionWithBodyWithResponse(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error)
  6105. TuiSelectSessionWithResponse(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error)
  6106. // TuiShowToastWithBodyWithResponse request with any body
  6107. TuiShowToastWithBodyWithResponse(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error)
  6108. TuiShowToastWithResponse(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error)
  6109. // TuiSubmitPromptWithResponse request
  6110. TuiSubmitPromptWithResponse(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*TuiSubmitPromptResponse, error)
  6111. // VcsGetWithResponse request
  6112. VcsGetWithResponse(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*VcsGetResponse, error)
  6113. }
  6114. type AppAgentsResponse struct {
  6115. Body []byte
  6116. HTTPResponse *http.Response
  6117. JSON200 *[]Agent
  6118. }
  6119. // Status returns HTTPResponse.Status
  6120. func (r AppAgentsResponse) Status() string {
  6121. if r.HTTPResponse != nil {
  6122. return r.HTTPResponse.Status
  6123. }
  6124. return http.StatusText(0)
  6125. }
  6126. // StatusCode returns HTTPResponse.StatusCode
  6127. func (r AppAgentsResponse) StatusCode() int {
  6128. if r.HTTPResponse != nil {
  6129. return r.HTTPResponse.StatusCode
  6130. }
  6131. return 0
  6132. }
  6133. type AuthSetResponse struct {
  6134. Body []byte
  6135. HTTPResponse *http.Response
  6136. JSON200 *bool
  6137. JSON400 *BadRequestError
  6138. }
  6139. // Status returns HTTPResponse.Status
  6140. func (r AuthSetResponse) Status() string {
  6141. if r.HTTPResponse != nil {
  6142. return r.HTTPResponse.Status
  6143. }
  6144. return http.StatusText(0)
  6145. }
  6146. // StatusCode returns HTTPResponse.StatusCode
  6147. func (r AuthSetResponse) StatusCode() int {
  6148. if r.HTTPResponse != nil {
  6149. return r.HTTPResponse.StatusCode
  6150. }
  6151. return 0
  6152. }
  6153. type CommandListResponse struct {
  6154. Body []byte
  6155. HTTPResponse *http.Response
  6156. JSON200 *[]Command
  6157. }
  6158. // Status returns HTTPResponse.Status
  6159. func (r CommandListResponse) Status() string {
  6160. if r.HTTPResponse != nil {
  6161. return r.HTTPResponse.Status
  6162. }
  6163. return http.StatusText(0)
  6164. }
  6165. // StatusCode returns HTTPResponse.StatusCode
  6166. func (r CommandListResponse) StatusCode() int {
  6167. if r.HTTPResponse != nil {
  6168. return r.HTTPResponse.StatusCode
  6169. }
  6170. return 0
  6171. }
  6172. type ConfigGetResponse struct {
  6173. Body []byte
  6174. HTTPResponse *http.Response
  6175. JSON200 *Config
  6176. }
  6177. // Status returns HTTPResponse.Status
  6178. func (r ConfigGetResponse) Status() string {
  6179. if r.HTTPResponse != nil {
  6180. return r.HTTPResponse.Status
  6181. }
  6182. return http.StatusText(0)
  6183. }
  6184. // StatusCode returns HTTPResponse.StatusCode
  6185. func (r ConfigGetResponse) StatusCode() int {
  6186. if r.HTTPResponse != nil {
  6187. return r.HTTPResponse.StatusCode
  6188. }
  6189. return 0
  6190. }
  6191. type ConfigUpdateResponse struct {
  6192. Body []byte
  6193. HTTPResponse *http.Response
  6194. JSON200 *Config
  6195. JSON400 *BadRequestError
  6196. }
  6197. // Status returns HTTPResponse.Status
  6198. func (r ConfigUpdateResponse) Status() string {
  6199. if r.HTTPResponse != nil {
  6200. return r.HTTPResponse.Status
  6201. }
  6202. return http.StatusText(0)
  6203. }
  6204. // StatusCode returns HTTPResponse.StatusCode
  6205. func (r ConfigUpdateResponse) StatusCode() int {
  6206. if r.HTTPResponse != nil {
  6207. return r.HTTPResponse.StatusCode
  6208. }
  6209. return 0
  6210. }
  6211. type ConfigProvidersResponse struct {
  6212. Body []byte
  6213. HTTPResponse *http.Response
  6214. JSON200 *struct {
  6215. Default map[string]string `json:"default"`
  6216. Providers []Provider `json:"providers"`
  6217. }
  6218. }
  6219. // Status returns HTTPResponse.Status
  6220. func (r ConfigProvidersResponse) Status() string {
  6221. if r.HTTPResponse != nil {
  6222. return r.HTTPResponse.Status
  6223. }
  6224. return http.StatusText(0)
  6225. }
  6226. // StatusCode returns HTTPResponse.StatusCode
  6227. func (r ConfigProvidersResponse) StatusCode() int {
  6228. if r.HTTPResponse != nil {
  6229. return r.HTTPResponse.StatusCode
  6230. }
  6231. return 0
  6232. }
  6233. type EventSubscribeResponse struct {
  6234. Body []byte
  6235. HTTPResponse *http.Response
  6236. }
  6237. // Status returns HTTPResponse.Status
  6238. func (r EventSubscribeResponse) Status() string {
  6239. if r.HTTPResponse != nil {
  6240. return r.HTTPResponse.Status
  6241. }
  6242. return http.StatusText(0)
  6243. }
  6244. // StatusCode returns HTTPResponse.StatusCode
  6245. func (r EventSubscribeResponse) StatusCode() int {
  6246. if r.HTTPResponse != nil {
  6247. return r.HTTPResponse.StatusCode
  6248. }
  6249. return 0
  6250. }
  6251. type ExperimentalResourceListResponse struct {
  6252. Body []byte
  6253. HTTPResponse *http.Response
  6254. JSON200 *map[string]McpResource
  6255. }
  6256. // Status returns HTTPResponse.Status
  6257. func (r ExperimentalResourceListResponse) Status() string {
  6258. if r.HTTPResponse != nil {
  6259. return r.HTTPResponse.Status
  6260. }
  6261. return http.StatusText(0)
  6262. }
  6263. // StatusCode returns HTTPResponse.StatusCode
  6264. func (r ExperimentalResourceListResponse) StatusCode() int {
  6265. if r.HTTPResponse != nil {
  6266. return r.HTTPResponse.StatusCode
  6267. }
  6268. return 0
  6269. }
  6270. type ToolListResponse struct {
  6271. Body []byte
  6272. HTTPResponse *http.Response
  6273. JSON200 *ToolList
  6274. JSON400 *BadRequestError
  6275. }
  6276. // Status returns HTTPResponse.Status
  6277. func (r ToolListResponse) Status() string {
  6278. if r.HTTPResponse != nil {
  6279. return r.HTTPResponse.Status
  6280. }
  6281. return http.StatusText(0)
  6282. }
  6283. // StatusCode returns HTTPResponse.StatusCode
  6284. func (r ToolListResponse) StatusCode() int {
  6285. if r.HTTPResponse != nil {
  6286. return r.HTTPResponse.StatusCode
  6287. }
  6288. return 0
  6289. }
  6290. type ToolIdsResponse struct {
  6291. Body []byte
  6292. HTTPResponse *http.Response
  6293. JSON200 *ToolIDs
  6294. JSON400 *BadRequestError
  6295. }
  6296. // Status returns HTTPResponse.Status
  6297. func (r ToolIdsResponse) Status() string {
  6298. if r.HTTPResponse != nil {
  6299. return r.HTTPResponse.Status
  6300. }
  6301. return http.StatusText(0)
  6302. }
  6303. // StatusCode returns HTTPResponse.StatusCode
  6304. func (r ToolIdsResponse) StatusCode() int {
  6305. if r.HTTPResponse != nil {
  6306. return r.HTTPResponse.StatusCode
  6307. }
  6308. return 0
  6309. }
  6310. type WorktreeListResponse struct {
  6311. Body []byte
  6312. HTTPResponse *http.Response
  6313. JSON200 *[]string
  6314. }
  6315. // Status returns HTTPResponse.Status
  6316. func (r WorktreeListResponse) Status() string {
  6317. if r.HTTPResponse != nil {
  6318. return r.HTTPResponse.Status
  6319. }
  6320. return http.StatusText(0)
  6321. }
  6322. // StatusCode returns HTTPResponse.StatusCode
  6323. func (r WorktreeListResponse) StatusCode() int {
  6324. if r.HTTPResponse != nil {
  6325. return r.HTTPResponse.StatusCode
  6326. }
  6327. return 0
  6328. }
  6329. type WorktreeCreateResponse struct {
  6330. Body []byte
  6331. HTTPResponse *http.Response
  6332. JSON200 *Worktree
  6333. JSON400 *BadRequestError
  6334. }
  6335. // Status returns HTTPResponse.Status
  6336. func (r WorktreeCreateResponse) Status() string {
  6337. if r.HTTPResponse != nil {
  6338. return r.HTTPResponse.Status
  6339. }
  6340. return http.StatusText(0)
  6341. }
  6342. // StatusCode returns HTTPResponse.StatusCode
  6343. func (r WorktreeCreateResponse) StatusCode() int {
  6344. if r.HTTPResponse != nil {
  6345. return r.HTTPResponse.StatusCode
  6346. }
  6347. return 0
  6348. }
  6349. type FileListResponse struct {
  6350. Body []byte
  6351. HTTPResponse *http.Response
  6352. JSON200 *[]FileNode
  6353. }
  6354. // Status returns HTTPResponse.Status
  6355. func (r FileListResponse) Status() string {
  6356. if r.HTTPResponse != nil {
  6357. return r.HTTPResponse.Status
  6358. }
  6359. return http.StatusText(0)
  6360. }
  6361. // StatusCode returns HTTPResponse.StatusCode
  6362. func (r FileListResponse) StatusCode() int {
  6363. if r.HTTPResponse != nil {
  6364. return r.HTTPResponse.StatusCode
  6365. }
  6366. return 0
  6367. }
  6368. type FileReadResponse struct {
  6369. Body []byte
  6370. HTTPResponse *http.Response
  6371. JSON200 *FileContent
  6372. }
  6373. // Status returns HTTPResponse.Status
  6374. func (r FileReadResponse) Status() string {
  6375. if r.HTTPResponse != nil {
  6376. return r.HTTPResponse.Status
  6377. }
  6378. return http.StatusText(0)
  6379. }
  6380. // StatusCode returns HTTPResponse.StatusCode
  6381. func (r FileReadResponse) StatusCode() int {
  6382. if r.HTTPResponse != nil {
  6383. return r.HTTPResponse.StatusCode
  6384. }
  6385. return 0
  6386. }
  6387. type FileStatusResponse struct {
  6388. Body []byte
  6389. HTTPResponse *http.Response
  6390. JSON200 *[]File
  6391. }
  6392. // Status returns HTTPResponse.Status
  6393. func (r FileStatusResponse) Status() string {
  6394. if r.HTTPResponse != nil {
  6395. return r.HTTPResponse.Status
  6396. }
  6397. return http.StatusText(0)
  6398. }
  6399. // StatusCode returns HTTPResponse.StatusCode
  6400. func (r FileStatusResponse) StatusCode() int {
  6401. if r.HTTPResponse != nil {
  6402. return r.HTTPResponse.StatusCode
  6403. }
  6404. return 0
  6405. }
  6406. type FindTextResponse struct {
  6407. Body []byte
  6408. HTTPResponse *http.Response
  6409. JSON200 *[]struct {
  6410. AbsoluteOffset float32 `json:"absolute_offset"`
  6411. LineNumber float32 `json:"line_number"`
  6412. Lines struct {
  6413. Text string `json:"text"`
  6414. } `json:"lines"`
  6415. Path struct {
  6416. Text string `json:"text"`
  6417. } `json:"path"`
  6418. Submatches []struct {
  6419. End float32 `json:"end"`
  6420. Match struct {
  6421. Text string `json:"text"`
  6422. } `json:"match"`
  6423. Start float32 `json:"start"`
  6424. } `json:"submatches"`
  6425. }
  6426. }
  6427. // Status returns HTTPResponse.Status
  6428. func (r FindTextResponse) Status() string {
  6429. if r.HTTPResponse != nil {
  6430. return r.HTTPResponse.Status
  6431. }
  6432. return http.StatusText(0)
  6433. }
  6434. // StatusCode returns HTTPResponse.StatusCode
  6435. func (r FindTextResponse) StatusCode() int {
  6436. if r.HTTPResponse != nil {
  6437. return r.HTTPResponse.StatusCode
  6438. }
  6439. return 0
  6440. }
  6441. type FindFilesResponse struct {
  6442. Body []byte
  6443. HTTPResponse *http.Response
  6444. JSON200 *[]string
  6445. }
  6446. // Status returns HTTPResponse.Status
  6447. func (r FindFilesResponse) Status() string {
  6448. if r.HTTPResponse != nil {
  6449. return r.HTTPResponse.Status
  6450. }
  6451. return http.StatusText(0)
  6452. }
  6453. // StatusCode returns HTTPResponse.StatusCode
  6454. func (r FindFilesResponse) StatusCode() int {
  6455. if r.HTTPResponse != nil {
  6456. return r.HTTPResponse.StatusCode
  6457. }
  6458. return 0
  6459. }
  6460. type FindSymbolsResponse struct {
  6461. Body []byte
  6462. HTTPResponse *http.Response
  6463. JSON200 *[]Symbol
  6464. }
  6465. // Status returns HTTPResponse.Status
  6466. func (r FindSymbolsResponse) Status() string {
  6467. if r.HTTPResponse != nil {
  6468. return r.HTTPResponse.Status
  6469. }
  6470. return http.StatusText(0)
  6471. }
  6472. // StatusCode returns HTTPResponse.StatusCode
  6473. func (r FindSymbolsResponse) StatusCode() int {
  6474. if r.HTTPResponse != nil {
  6475. return r.HTTPResponse.StatusCode
  6476. }
  6477. return 0
  6478. }
  6479. type FormatterStatusResponse struct {
  6480. Body []byte
  6481. HTTPResponse *http.Response
  6482. JSON200 *[]FormatterStatus
  6483. }
  6484. // Status returns HTTPResponse.Status
  6485. func (r FormatterStatusResponse) Status() string {
  6486. if r.HTTPResponse != nil {
  6487. return r.HTTPResponse.Status
  6488. }
  6489. return http.StatusText(0)
  6490. }
  6491. // StatusCode returns HTTPResponse.StatusCode
  6492. func (r FormatterStatusResponse) StatusCode() int {
  6493. if r.HTTPResponse != nil {
  6494. return r.HTTPResponse.StatusCode
  6495. }
  6496. return 0
  6497. }
  6498. type GlobalDisposeResponse struct {
  6499. Body []byte
  6500. HTTPResponse *http.Response
  6501. JSON200 *bool
  6502. }
  6503. // Status returns HTTPResponse.Status
  6504. func (r GlobalDisposeResponse) Status() string {
  6505. if r.HTTPResponse != nil {
  6506. return r.HTTPResponse.Status
  6507. }
  6508. return http.StatusText(0)
  6509. }
  6510. // StatusCode returns HTTPResponse.StatusCode
  6511. func (r GlobalDisposeResponse) StatusCode() int {
  6512. if r.HTTPResponse != nil {
  6513. return r.HTTPResponse.StatusCode
  6514. }
  6515. return 0
  6516. }
  6517. type GlobalEventResponse struct {
  6518. Body []byte
  6519. HTTPResponse *http.Response
  6520. }
  6521. // Status returns HTTPResponse.Status
  6522. func (r GlobalEventResponse) Status() string {
  6523. if r.HTTPResponse != nil {
  6524. return r.HTTPResponse.Status
  6525. }
  6526. return http.StatusText(0)
  6527. }
  6528. // StatusCode returns HTTPResponse.StatusCode
  6529. func (r GlobalEventResponse) StatusCode() int {
  6530. if r.HTTPResponse != nil {
  6531. return r.HTTPResponse.StatusCode
  6532. }
  6533. return 0
  6534. }
  6535. type GlobalHealthResponse struct {
  6536. Body []byte
  6537. HTTPResponse *http.Response
  6538. JSON200 *struct {
  6539. Healthy bool `json:"healthy"`
  6540. Version string `json:"version"`
  6541. }
  6542. }
  6543. // Status returns HTTPResponse.Status
  6544. func (r GlobalHealthResponse) Status() string {
  6545. if r.HTTPResponse != nil {
  6546. return r.HTTPResponse.Status
  6547. }
  6548. return http.StatusText(0)
  6549. }
  6550. // StatusCode returns HTTPResponse.StatusCode
  6551. func (r GlobalHealthResponse) StatusCode() int {
  6552. if r.HTTPResponse != nil {
  6553. return r.HTTPResponse.StatusCode
  6554. }
  6555. return 0
  6556. }
  6557. type InstanceDisposeResponse struct {
  6558. Body []byte
  6559. HTTPResponse *http.Response
  6560. JSON200 *bool
  6561. }
  6562. // Status returns HTTPResponse.Status
  6563. func (r InstanceDisposeResponse) Status() string {
  6564. if r.HTTPResponse != nil {
  6565. return r.HTTPResponse.Status
  6566. }
  6567. return http.StatusText(0)
  6568. }
  6569. // StatusCode returns HTTPResponse.StatusCode
  6570. func (r InstanceDisposeResponse) StatusCode() int {
  6571. if r.HTTPResponse != nil {
  6572. return r.HTTPResponse.StatusCode
  6573. }
  6574. return 0
  6575. }
  6576. type AppLogResponse struct {
  6577. Body []byte
  6578. HTTPResponse *http.Response
  6579. JSON200 *bool
  6580. JSON400 *BadRequestError
  6581. }
  6582. // Status returns HTTPResponse.Status
  6583. func (r AppLogResponse) Status() string {
  6584. if r.HTTPResponse != nil {
  6585. return r.HTTPResponse.Status
  6586. }
  6587. return http.StatusText(0)
  6588. }
  6589. // StatusCode returns HTTPResponse.StatusCode
  6590. func (r AppLogResponse) StatusCode() int {
  6591. if r.HTTPResponse != nil {
  6592. return r.HTTPResponse.StatusCode
  6593. }
  6594. return 0
  6595. }
  6596. type LspStatusResponse struct {
  6597. Body []byte
  6598. HTTPResponse *http.Response
  6599. JSON200 *[]LSPStatus
  6600. }
  6601. // Status returns HTTPResponse.Status
  6602. func (r LspStatusResponse) Status() string {
  6603. if r.HTTPResponse != nil {
  6604. return r.HTTPResponse.Status
  6605. }
  6606. return http.StatusText(0)
  6607. }
  6608. // StatusCode returns HTTPResponse.StatusCode
  6609. func (r LspStatusResponse) StatusCode() int {
  6610. if r.HTTPResponse != nil {
  6611. return r.HTTPResponse.StatusCode
  6612. }
  6613. return 0
  6614. }
  6615. type McpStatusResponse struct {
  6616. Body []byte
  6617. HTTPResponse *http.Response
  6618. JSON200 *map[string]MCPStatus
  6619. }
  6620. // Status returns HTTPResponse.Status
  6621. func (r McpStatusResponse) Status() string {
  6622. if r.HTTPResponse != nil {
  6623. return r.HTTPResponse.Status
  6624. }
  6625. return http.StatusText(0)
  6626. }
  6627. // StatusCode returns HTTPResponse.StatusCode
  6628. func (r McpStatusResponse) StatusCode() int {
  6629. if r.HTTPResponse != nil {
  6630. return r.HTTPResponse.StatusCode
  6631. }
  6632. return 0
  6633. }
  6634. type McpAddResponse struct {
  6635. Body []byte
  6636. HTTPResponse *http.Response
  6637. JSON200 *map[string]MCPStatus
  6638. JSON400 *BadRequestError
  6639. }
  6640. // Status returns HTTPResponse.Status
  6641. func (r McpAddResponse) Status() string {
  6642. if r.HTTPResponse != nil {
  6643. return r.HTTPResponse.Status
  6644. }
  6645. return http.StatusText(0)
  6646. }
  6647. // StatusCode returns HTTPResponse.StatusCode
  6648. func (r McpAddResponse) StatusCode() int {
  6649. if r.HTTPResponse != nil {
  6650. return r.HTTPResponse.StatusCode
  6651. }
  6652. return 0
  6653. }
  6654. type McpAuthRemoveResponse struct {
  6655. Body []byte
  6656. HTTPResponse *http.Response
  6657. JSON200 *struct {
  6658. Success bool `json:"success"`
  6659. }
  6660. JSON404 *NotFoundError
  6661. }
  6662. // Status returns HTTPResponse.Status
  6663. func (r McpAuthRemoveResponse) Status() string {
  6664. if r.HTTPResponse != nil {
  6665. return r.HTTPResponse.Status
  6666. }
  6667. return http.StatusText(0)
  6668. }
  6669. // StatusCode returns HTTPResponse.StatusCode
  6670. func (r McpAuthRemoveResponse) StatusCode() int {
  6671. if r.HTTPResponse != nil {
  6672. return r.HTTPResponse.StatusCode
  6673. }
  6674. return 0
  6675. }
  6676. type McpAuthStartResponse struct {
  6677. Body []byte
  6678. HTTPResponse *http.Response
  6679. JSON200 *struct {
  6680. // AuthorizationUrl URL to open in browser for authorization
  6681. AuthorizationUrl string `json:"authorizationUrl"`
  6682. }
  6683. JSON400 *BadRequestError
  6684. JSON404 *NotFoundError
  6685. }
  6686. // Status returns HTTPResponse.Status
  6687. func (r McpAuthStartResponse) Status() string {
  6688. if r.HTTPResponse != nil {
  6689. return r.HTTPResponse.Status
  6690. }
  6691. return http.StatusText(0)
  6692. }
  6693. // StatusCode returns HTTPResponse.StatusCode
  6694. func (r McpAuthStartResponse) StatusCode() int {
  6695. if r.HTTPResponse != nil {
  6696. return r.HTTPResponse.StatusCode
  6697. }
  6698. return 0
  6699. }
  6700. type McpAuthAuthenticateResponse struct {
  6701. Body []byte
  6702. HTTPResponse *http.Response
  6703. JSON200 *MCPStatus
  6704. JSON400 *BadRequestError
  6705. JSON404 *NotFoundError
  6706. }
  6707. // Status returns HTTPResponse.Status
  6708. func (r McpAuthAuthenticateResponse) Status() string {
  6709. if r.HTTPResponse != nil {
  6710. return r.HTTPResponse.Status
  6711. }
  6712. return http.StatusText(0)
  6713. }
  6714. // StatusCode returns HTTPResponse.StatusCode
  6715. func (r McpAuthAuthenticateResponse) StatusCode() int {
  6716. if r.HTTPResponse != nil {
  6717. return r.HTTPResponse.StatusCode
  6718. }
  6719. return 0
  6720. }
  6721. type McpAuthCallbackResponse struct {
  6722. Body []byte
  6723. HTTPResponse *http.Response
  6724. JSON200 *MCPStatus
  6725. JSON400 *BadRequestError
  6726. JSON404 *NotFoundError
  6727. }
  6728. // Status returns HTTPResponse.Status
  6729. func (r McpAuthCallbackResponse) Status() string {
  6730. if r.HTTPResponse != nil {
  6731. return r.HTTPResponse.Status
  6732. }
  6733. return http.StatusText(0)
  6734. }
  6735. // StatusCode returns HTTPResponse.StatusCode
  6736. func (r McpAuthCallbackResponse) StatusCode() int {
  6737. if r.HTTPResponse != nil {
  6738. return r.HTTPResponse.StatusCode
  6739. }
  6740. return 0
  6741. }
  6742. type McpConnectResponse struct {
  6743. Body []byte
  6744. HTTPResponse *http.Response
  6745. JSON200 *bool
  6746. }
  6747. // Status returns HTTPResponse.Status
  6748. func (r McpConnectResponse) Status() string {
  6749. if r.HTTPResponse != nil {
  6750. return r.HTTPResponse.Status
  6751. }
  6752. return http.StatusText(0)
  6753. }
  6754. // StatusCode returns HTTPResponse.StatusCode
  6755. func (r McpConnectResponse) StatusCode() int {
  6756. if r.HTTPResponse != nil {
  6757. return r.HTTPResponse.StatusCode
  6758. }
  6759. return 0
  6760. }
  6761. type McpDisconnectResponse struct {
  6762. Body []byte
  6763. HTTPResponse *http.Response
  6764. JSON200 *bool
  6765. }
  6766. // Status returns HTTPResponse.Status
  6767. func (r McpDisconnectResponse) Status() string {
  6768. if r.HTTPResponse != nil {
  6769. return r.HTTPResponse.Status
  6770. }
  6771. return http.StatusText(0)
  6772. }
  6773. // StatusCode returns HTTPResponse.StatusCode
  6774. func (r McpDisconnectResponse) StatusCode() int {
  6775. if r.HTTPResponse != nil {
  6776. return r.HTTPResponse.StatusCode
  6777. }
  6778. return 0
  6779. }
  6780. type PathGetResponse struct {
  6781. Body []byte
  6782. HTTPResponse *http.Response
  6783. JSON200 *Path
  6784. }
  6785. // Status returns HTTPResponse.Status
  6786. func (r PathGetResponse) Status() string {
  6787. if r.HTTPResponse != nil {
  6788. return r.HTTPResponse.Status
  6789. }
  6790. return http.StatusText(0)
  6791. }
  6792. // StatusCode returns HTTPResponse.StatusCode
  6793. func (r PathGetResponse) StatusCode() int {
  6794. if r.HTTPResponse != nil {
  6795. return r.HTTPResponse.StatusCode
  6796. }
  6797. return 0
  6798. }
  6799. type PermissionListResponse struct {
  6800. Body []byte
  6801. HTTPResponse *http.Response
  6802. JSON200 *[]PermissionRequest
  6803. }
  6804. // Status returns HTTPResponse.Status
  6805. func (r PermissionListResponse) Status() string {
  6806. if r.HTTPResponse != nil {
  6807. return r.HTTPResponse.Status
  6808. }
  6809. return http.StatusText(0)
  6810. }
  6811. // StatusCode returns HTTPResponse.StatusCode
  6812. func (r PermissionListResponse) StatusCode() int {
  6813. if r.HTTPResponse != nil {
  6814. return r.HTTPResponse.StatusCode
  6815. }
  6816. return 0
  6817. }
  6818. type PermissionReplyResponse struct {
  6819. Body []byte
  6820. HTTPResponse *http.Response
  6821. JSON200 *bool
  6822. JSON400 *BadRequestError
  6823. JSON404 *NotFoundError
  6824. }
  6825. // Status returns HTTPResponse.Status
  6826. func (r PermissionReplyResponse) Status() string {
  6827. if r.HTTPResponse != nil {
  6828. return r.HTTPResponse.Status
  6829. }
  6830. return http.StatusText(0)
  6831. }
  6832. // StatusCode returns HTTPResponse.StatusCode
  6833. func (r PermissionReplyResponse) StatusCode() int {
  6834. if r.HTTPResponse != nil {
  6835. return r.HTTPResponse.StatusCode
  6836. }
  6837. return 0
  6838. }
  6839. type ProjectListResponse struct {
  6840. Body []byte
  6841. HTTPResponse *http.Response
  6842. JSON200 *[]Project
  6843. }
  6844. // Status returns HTTPResponse.Status
  6845. func (r ProjectListResponse) Status() string {
  6846. if r.HTTPResponse != nil {
  6847. return r.HTTPResponse.Status
  6848. }
  6849. return http.StatusText(0)
  6850. }
  6851. // StatusCode returns HTTPResponse.StatusCode
  6852. func (r ProjectListResponse) StatusCode() int {
  6853. if r.HTTPResponse != nil {
  6854. return r.HTTPResponse.StatusCode
  6855. }
  6856. return 0
  6857. }
  6858. type ProjectCurrentResponse struct {
  6859. Body []byte
  6860. HTTPResponse *http.Response
  6861. JSON200 *Project
  6862. }
  6863. // Status returns HTTPResponse.Status
  6864. func (r ProjectCurrentResponse) Status() string {
  6865. if r.HTTPResponse != nil {
  6866. return r.HTTPResponse.Status
  6867. }
  6868. return http.StatusText(0)
  6869. }
  6870. // StatusCode returns HTTPResponse.StatusCode
  6871. func (r ProjectCurrentResponse) StatusCode() int {
  6872. if r.HTTPResponse != nil {
  6873. return r.HTTPResponse.StatusCode
  6874. }
  6875. return 0
  6876. }
  6877. type ProjectUpdateResponse struct {
  6878. Body []byte
  6879. HTTPResponse *http.Response
  6880. JSON200 *Project
  6881. JSON400 *BadRequestError
  6882. JSON404 *NotFoundError
  6883. }
  6884. // Status returns HTTPResponse.Status
  6885. func (r ProjectUpdateResponse) Status() string {
  6886. if r.HTTPResponse != nil {
  6887. return r.HTTPResponse.Status
  6888. }
  6889. return http.StatusText(0)
  6890. }
  6891. // StatusCode returns HTTPResponse.StatusCode
  6892. func (r ProjectUpdateResponse) StatusCode() int {
  6893. if r.HTTPResponse != nil {
  6894. return r.HTTPResponse.StatusCode
  6895. }
  6896. return 0
  6897. }
  6898. type ProviderListResponse struct {
  6899. Body []byte
  6900. HTTPResponse *http.Response
  6901. JSON200 *struct {
  6902. All []struct {
  6903. Api *string `json:"api,omitempty"`
  6904. Env []string `json:"env"`
  6905. Id string `json:"id"`
  6906. Models map[string]struct {
  6907. Attachment bool `json:"attachment"`
  6908. Cost *struct {
  6909. CacheRead *float32 `json:"cache_read,omitempty"`
  6910. CacheWrite *float32 `json:"cache_write,omitempty"`
  6911. ContextOver200k *struct {
  6912. CacheRead *float32 `json:"cache_read,omitempty"`
  6913. CacheWrite *float32 `json:"cache_write,omitempty"`
  6914. Input float32 `json:"input"`
  6915. Output float32 `json:"output"`
  6916. } `json:"context_over_200k,omitempty"`
  6917. Input float32 `json:"input"`
  6918. Output float32 `json:"output"`
  6919. } `json:"cost,omitempty"`
  6920. Experimental *bool `json:"experimental,omitempty"`
  6921. Family *string `json:"family,omitempty"`
  6922. Headers *map[string]string `json:"headers,omitempty"`
  6923. Id string `json:"id"`
  6924. Interleaved *ProviderList_200_All_Models_Interleaved `json:"interleaved,omitempty"`
  6925. Limit struct {
  6926. Context float32 `json:"context"`
  6927. Input *float32 `json:"input,omitempty"`
  6928. Output float32 `json:"output"`
  6929. } `json:"limit"`
  6930. Modalities *struct {
  6931. Input []ProviderList200AllModelsModalitiesInput `json:"input"`
  6932. Output []ProviderList200AllModelsModalitiesOutput `json:"output"`
  6933. } `json:"modalities,omitempty"`
  6934. Name string `json:"name"`
  6935. Options map[string]interface{} `json:"options"`
  6936. Provider *struct {
  6937. Npm string `json:"npm"`
  6938. } `json:"provider,omitempty"`
  6939. Reasoning bool `json:"reasoning"`
  6940. ReleaseDate string `json:"release_date"`
  6941. Status *ProviderList200AllModelsStatus `json:"status,omitempty"`
  6942. Temperature bool `json:"temperature"`
  6943. ToolCall bool `json:"tool_call"`
  6944. Variants *map[string]map[string]interface{} `json:"variants,omitempty"`
  6945. } `json:"models"`
  6946. Name string `json:"name"`
  6947. Npm *string `json:"npm,omitempty"`
  6948. } `json:"all"`
  6949. Connected []string `json:"connected"`
  6950. Default map[string]string `json:"default"`
  6951. }
  6952. }
  6953. type ProviderList200AllModelsInterleaved0 = bool
  6954. type ProviderList200AllModelsInterleaved1 struct {
  6955. Field ProviderList200AllModelsInterleaved1Field `json:"field"`
  6956. }
  6957. type ProviderList200AllModelsInterleaved1Field string
  6958. type ProviderList_200_All_Models_Interleaved struct {
  6959. union json.RawMessage
  6960. }
  6961. type ProviderList200AllModelsModalitiesInput string
  6962. type ProviderList200AllModelsModalitiesOutput string
  6963. type ProviderList200AllModelsStatus string
  6964. // Status returns HTTPResponse.Status
  6965. func (r ProviderListResponse) Status() string {
  6966. if r.HTTPResponse != nil {
  6967. return r.HTTPResponse.Status
  6968. }
  6969. return http.StatusText(0)
  6970. }
  6971. // StatusCode returns HTTPResponse.StatusCode
  6972. func (r ProviderListResponse) StatusCode() int {
  6973. if r.HTTPResponse != nil {
  6974. return r.HTTPResponse.StatusCode
  6975. }
  6976. return 0
  6977. }
  6978. type ProviderAuthResponse struct {
  6979. Body []byte
  6980. HTTPResponse *http.Response
  6981. JSON200 *map[string][]ProviderAuthMethod
  6982. }
  6983. // Status returns HTTPResponse.Status
  6984. func (r ProviderAuthResponse) Status() string {
  6985. if r.HTTPResponse != nil {
  6986. return r.HTTPResponse.Status
  6987. }
  6988. return http.StatusText(0)
  6989. }
  6990. // StatusCode returns HTTPResponse.StatusCode
  6991. func (r ProviderAuthResponse) StatusCode() int {
  6992. if r.HTTPResponse != nil {
  6993. return r.HTTPResponse.StatusCode
  6994. }
  6995. return 0
  6996. }
  6997. type ProviderOauthAuthorizeResponse struct {
  6998. Body []byte
  6999. HTTPResponse *http.Response
  7000. JSON200 *ProviderAuthAuthorization
  7001. JSON400 *BadRequestError
  7002. }
  7003. // Status returns HTTPResponse.Status
  7004. func (r ProviderOauthAuthorizeResponse) Status() string {
  7005. if r.HTTPResponse != nil {
  7006. return r.HTTPResponse.Status
  7007. }
  7008. return http.StatusText(0)
  7009. }
  7010. // StatusCode returns HTTPResponse.StatusCode
  7011. func (r ProviderOauthAuthorizeResponse) StatusCode() int {
  7012. if r.HTTPResponse != nil {
  7013. return r.HTTPResponse.StatusCode
  7014. }
  7015. return 0
  7016. }
  7017. type ProviderOauthCallbackResponse struct {
  7018. Body []byte
  7019. HTTPResponse *http.Response
  7020. JSON200 *bool
  7021. JSON400 *BadRequestError
  7022. }
  7023. // Status returns HTTPResponse.Status
  7024. func (r ProviderOauthCallbackResponse) Status() string {
  7025. if r.HTTPResponse != nil {
  7026. return r.HTTPResponse.Status
  7027. }
  7028. return http.StatusText(0)
  7029. }
  7030. // StatusCode returns HTTPResponse.StatusCode
  7031. func (r ProviderOauthCallbackResponse) StatusCode() int {
  7032. if r.HTTPResponse != nil {
  7033. return r.HTTPResponse.StatusCode
  7034. }
  7035. return 0
  7036. }
  7037. type PtyListResponse struct {
  7038. Body []byte
  7039. HTTPResponse *http.Response
  7040. JSON200 *[]Pty
  7041. }
  7042. // Status returns HTTPResponse.Status
  7043. func (r PtyListResponse) Status() string {
  7044. if r.HTTPResponse != nil {
  7045. return r.HTTPResponse.Status
  7046. }
  7047. return http.StatusText(0)
  7048. }
  7049. // StatusCode returns HTTPResponse.StatusCode
  7050. func (r PtyListResponse) StatusCode() int {
  7051. if r.HTTPResponse != nil {
  7052. return r.HTTPResponse.StatusCode
  7053. }
  7054. return 0
  7055. }
  7056. type PtyCreateResponse struct {
  7057. Body []byte
  7058. HTTPResponse *http.Response
  7059. JSON200 *Pty
  7060. JSON400 *BadRequestError
  7061. }
  7062. // Status returns HTTPResponse.Status
  7063. func (r PtyCreateResponse) Status() string {
  7064. if r.HTTPResponse != nil {
  7065. return r.HTTPResponse.Status
  7066. }
  7067. return http.StatusText(0)
  7068. }
  7069. // StatusCode returns HTTPResponse.StatusCode
  7070. func (r PtyCreateResponse) StatusCode() int {
  7071. if r.HTTPResponse != nil {
  7072. return r.HTTPResponse.StatusCode
  7073. }
  7074. return 0
  7075. }
  7076. type PtyRemoveResponse struct {
  7077. Body []byte
  7078. HTTPResponse *http.Response
  7079. JSON200 *bool
  7080. JSON404 *NotFoundError
  7081. }
  7082. // Status returns HTTPResponse.Status
  7083. func (r PtyRemoveResponse) Status() string {
  7084. if r.HTTPResponse != nil {
  7085. return r.HTTPResponse.Status
  7086. }
  7087. return http.StatusText(0)
  7088. }
  7089. // StatusCode returns HTTPResponse.StatusCode
  7090. func (r PtyRemoveResponse) StatusCode() int {
  7091. if r.HTTPResponse != nil {
  7092. return r.HTTPResponse.StatusCode
  7093. }
  7094. return 0
  7095. }
  7096. type PtyGetResponse struct {
  7097. Body []byte
  7098. HTTPResponse *http.Response
  7099. JSON200 *Pty
  7100. JSON404 *NotFoundError
  7101. }
  7102. // Status returns HTTPResponse.Status
  7103. func (r PtyGetResponse) Status() string {
  7104. if r.HTTPResponse != nil {
  7105. return r.HTTPResponse.Status
  7106. }
  7107. return http.StatusText(0)
  7108. }
  7109. // StatusCode returns HTTPResponse.StatusCode
  7110. func (r PtyGetResponse) StatusCode() int {
  7111. if r.HTTPResponse != nil {
  7112. return r.HTTPResponse.StatusCode
  7113. }
  7114. return 0
  7115. }
  7116. type PtyUpdateResponse struct {
  7117. Body []byte
  7118. HTTPResponse *http.Response
  7119. JSON200 *Pty
  7120. JSON400 *BadRequestError
  7121. }
  7122. // Status returns HTTPResponse.Status
  7123. func (r PtyUpdateResponse) Status() string {
  7124. if r.HTTPResponse != nil {
  7125. return r.HTTPResponse.Status
  7126. }
  7127. return http.StatusText(0)
  7128. }
  7129. // StatusCode returns HTTPResponse.StatusCode
  7130. func (r PtyUpdateResponse) StatusCode() int {
  7131. if r.HTTPResponse != nil {
  7132. return r.HTTPResponse.StatusCode
  7133. }
  7134. return 0
  7135. }
  7136. type PtyConnectResponse struct {
  7137. Body []byte
  7138. HTTPResponse *http.Response
  7139. JSON200 *bool
  7140. JSON404 *NotFoundError
  7141. }
  7142. // Status returns HTTPResponse.Status
  7143. func (r PtyConnectResponse) Status() string {
  7144. if r.HTTPResponse != nil {
  7145. return r.HTTPResponse.Status
  7146. }
  7147. return http.StatusText(0)
  7148. }
  7149. // StatusCode returns HTTPResponse.StatusCode
  7150. func (r PtyConnectResponse) StatusCode() int {
  7151. if r.HTTPResponse != nil {
  7152. return r.HTTPResponse.StatusCode
  7153. }
  7154. return 0
  7155. }
  7156. type QuestionListResponse struct {
  7157. Body []byte
  7158. HTTPResponse *http.Response
  7159. JSON200 *[]QuestionRequest
  7160. }
  7161. // Status returns HTTPResponse.Status
  7162. func (r QuestionListResponse) Status() string {
  7163. if r.HTTPResponse != nil {
  7164. return r.HTTPResponse.Status
  7165. }
  7166. return http.StatusText(0)
  7167. }
  7168. // StatusCode returns HTTPResponse.StatusCode
  7169. func (r QuestionListResponse) StatusCode() int {
  7170. if r.HTTPResponse != nil {
  7171. return r.HTTPResponse.StatusCode
  7172. }
  7173. return 0
  7174. }
  7175. type QuestionRejectResponse struct {
  7176. Body []byte
  7177. HTTPResponse *http.Response
  7178. JSON200 *bool
  7179. JSON400 *BadRequestError
  7180. JSON404 *NotFoundError
  7181. }
  7182. // Status returns HTTPResponse.Status
  7183. func (r QuestionRejectResponse) Status() string {
  7184. if r.HTTPResponse != nil {
  7185. return r.HTTPResponse.Status
  7186. }
  7187. return http.StatusText(0)
  7188. }
  7189. // StatusCode returns HTTPResponse.StatusCode
  7190. func (r QuestionRejectResponse) StatusCode() int {
  7191. if r.HTTPResponse != nil {
  7192. return r.HTTPResponse.StatusCode
  7193. }
  7194. return 0
  7195. }
  7196. type QuestionReplyResponse struct {
  7197. Body []byte
  7198. HTTPResponse *http.Response
  7199. JSON200 *bool
  7200. JSON400 *BadRequestError
  7201. JSON404 *NotFoundError
  7202. }
  7203. // Status returns HTTPResponse.Status
  7204. func (r QuestionReplyResponse) Status() string {
  7205. if r.HTTPResponse != nil {
  7206. return r.HTTPResponse.Status
  7207. }
  7208. return http.StatusText(0)
  7209. }
  7210. // StatusCode returns HTTPResponse.StatusCode
  7211. func (r QuestionReplyResponse) StatusCode() int {
  7212. if r.HTTPResponse != nil {
  7213. return r.HTTPResponse.StatusCode
  7214. }
  7215. return 0
  7216. }
  7217. type SessionListResponse struct {
  7218. Body []byte
  7219. HTTPResponse *http.Response
  7220. JSON200 *[]Session
  7221. }
  7222. // Status returns HTTPResponse.Status
  7223. func (r SessionListResponse) Status() string {
  7224. if r.HTTPResponse != nil {
  7225. return r.HTTPResponse.Status
  7226. }
  7227. return http.StatusText(0)
  7228. }
  7229. // StatusCode returns HTTPResponse.StatusCode
  7230. func (r SessionListResponse) StatusCode() int {
  7231. if r.HTTPResponse != nil {
  7232. return r.HTTPResponse.StatusCode
  7233. }
  7234. return 0
  7235. }
  7236. type SessionCreateResponse struct {
  7237. Body []byte
  7238. HTTPResponse *http.Response
  7239. JSON200 *Session
  7240. JSON400 *BadRequestError
  7241. }
  7242. // Status returns HTTPResponse.Status
  7243. func (r SessionCreateResponse) Status() string {
  7244. if r.HTTPResponse != nil {
  7245. return r.HTTPResponse.Status
  7246. }
  7247. return http.StatusText(0)
  7248. }
  7249. // StatusCode returns HTTPResponse.StatusCode
  7250. func (r SessionCreateResponse) StatusCode() int {
  7251. if r.HTTPResponse != nil {
  7252. return r.HTTPResponse.StatusCode
  7253. }
  7254. return 0
  7255. }
  7256. type SessionStatusResponse struct {
  7257. Body []byte
  7258. HTTPResponse *http.Response
  7259. JSON200 *map[string]SessionStatus
  7260. JSON400 *BadRequestError
  7261. }
  7262. // Status returns HTTPResponse.Status
  7263. func (r SessionStatusResponse) Status() string {
  7264. if r.HTTPResponse != nil {
  7265. return r.HTTPResponse.Status
  7266. }
  7267. return http.StatusText(0)
  7268. }
  7269. // StatusCode returns HTTPResponse.StatusCode
  7270. func (r SessionStatusResponse) StatusCode() int {
  7271. if r.HTTPResponse != nil {
  7272. return r.HTTPResponse.StatusCode
  7273. }
  7274. return 0
  7275. }
  7276. type SessionDeleteResponse struct {
  7277. Body []byte
  7278. HTTPResponse *http.Response
  7279. JSON200 *bool
  7280. JSON400 *BadRequestError
  7281. JSON404 *NotFoundError
  7282. }
  7283. // Status returns HTTPResponse.Status
  7284. func (r SessionDeleteResponse) Status() string {
  7285. if r.HTTPResponse != nil {
  7286. return r.HTTPResponse.Status
  7287. }
  7288. return http.StatusText(0)
  7289. }
  7290. // StatusCode returns HTTPResponse.StatusCode
  7291. func (r SessionDeleteResponse) StatusCode() int {
  7292. if r.HTTPResponse != nil {
  7293. return r.HTTPResponse.StatusCode
  7294. }
  7295. return 0
  7296. }
  7297. type SessionGetResponse struct {
  7298. Body []byte
  7299. HTTPResponse *http.Response
  7300. JSON200 *Session
  7301. JSON400 *BadRequestError
  7302. JSON404 *NotFoundError
  7303. }
  7304. // Status returns HTTPResponse.Status
  7305. func (r SessionGetResponse) Status() string {
  7306. if r.HTTPResponse != nil {
  7307. return r.HTTPResponse.Status
  7308. }
  7309. return http.StatusText(0)
  7310. }
  7311. // StatusCode returns HTTPResponse.StatusCode
  7312. func (r SessionGetResponse) StatusCode() int {
  7313. if r.HTTPResponse != nil {
  7314. return r.HTTPResponse.StatusCode
  7315. }
  7316. return 0
  7317. }
  7318. type SessionUpdateResponse struct {
  7319. Body []byte
  7320. HTTPResponse *http.Response
  7321. JSON200 *Session
  7322. JSON400 *BadRequestError
  7323. JSON404 *NotFoundError
  7324. }
  7325. // Status returns HTTPResponse.Status
  7326. func (r SessionUpdateResponse) Status() string {
  7327. if r.HTTPResponse != nil {
  7328. return r.HTTPResponse.Status
  7329. }
  7330. return http.StatusText(0)
  7331. }
  7332. // StatusCode returns HTTPResponse.StatusCode
  7333. func (r SessionUpdateResponse) StatusCode() int {
  7334. if r.HTTPResponse != nil {
  7335. return r.HTTPResponse.StatusCode
  7336. }
  7337. return 0
  7338. }
  7339. type SessionAbortResponse struct {
  7340. Body []byte
  7341. HTTPResponse *http.Response
  7342. JSON200 *bool
  7343. JSON400 *BadRequestError
  7344. JSON404 *NotFoundError
  7345. }
  7346. // Status returns HTTPResponse.Status
  7347. func (r SessionAbortResponse) Status() string {
  7348. if r.HTTPResponse != nil {
  7349. return r.HTTPResponse.Status
  7350. }
  7351. return http.StatusText(0)
  7352. }
  7353. // StatusCode returns HTTPResponse.StatusCode
  7354. func (r SessionAbortResponse) StatusCode() int {
  7355. if r.HTTPResponse != nil {
  7356. return r.HTTPResponse.StatusCode
  7357. }
  7358. return 0
  7359. }
  7360. type SessionChildrenResponse struct {
  7361. Body []byte
  7362. HTTPResponse *http.Response
  7363. JSON200 *[]Session
  7364. JSON400 *BadRequestError
  7365. JSON404 *NotFoundError
  7366. }
  7367. // Status returns HTTPResponse.Status
  7368. func (r SessionChildrenResponse) Status() string {
  7369. if r.HTTPResponse != nil {
  7370. return r.HTTPResponse.Status
  7371. }
  7372. return http.StatusText(0)
  7373. }
  7374. // StatusCode returns HTTPResponse.StatusCode
  7375. func (r SessionChildrenResponse) StatusCode() int {
  7376. if r.HTTPResponse != nil {
  7377. return r.HTTPResponse.StatusCode
  7378. }
  7379. return 0
  7380. }
  7381. type SessionCommandResponse struct {
  7382. Body []byte
  7383. HTTPResponse *http.Response
  7384. JSON200 *struct {
  7385. Info AssistantMessage `json:"info"`
  7386. Parts []Part `json:"parts"`
  7387. }
  7388. JSON400 *BadRequestError
  7389. JSON404 *NotFoundError
  7390. }
  7391. // Status returns HTTPResponse.Status
  7392. func (r SessionCommandResponse) Status() string {
  7393. if r.HTTPResponse != nil {
  7394. return r.HTTPResponse.Status
  7395. }
  7396. return http.StatusText(0)
  7397. }
  7398. // StatusCode returns HTTPResponse.StatusCode
  7399. func (r SessionCommandResponse) StatusCode() int {
  7400. if r.HTTPResponse != nil {
  7401. return r.HTTPResponse.StatusCode
  7402. }
  7403. return 0
  7404. }
  7405. type SessionDiffResponse struct {
  7406. Body []byte
  7407. HTTPResponse *http.Response
  7408. JSON200 *[]FileDiff
  7409. JSON400 *BadRequestError
  7410. JSON404 *NotFoundError
  7411. }
  7412. // Status returns HTTPResponse.Status
  7413. func (r SessionDiffResponse) Status() string {
  7414. if r.HTTPResponse != nil {
  7415. return r.HTTPResponse.Status
  7416. }
  7417. return http.StatusText(0)
  7418. }
  7419. // StatusCode returns HTTPResponse.StatusCode
  7420. func (r SessionDiffResponse) StatusCode() int {
  7421. if r.HTTPResponse != nil {
  7422. return r.HTTPResponse.StatusCode
  7423. }
  7424. return 0
  7425. }
  7426. type SessionForkResponse struct {
  7427. Body []byte
  7428. HTTPResponse *http.Response
  7429. JSON200 *Session
  7430. }
  7431. // Status returns HTTPResponse.Status
  7432. func (r SessionForkResponse) Status() string {
  7433. if r.HTTPResponse != nil {
  7434. return r.HTTPResponse.Status
  7435. }
  7436. return http.StatusText(0)
  7437. }
  7438. // StatusCode returns HTTPResponse.StatusCode
  7439. func (r SessionForkResponse) StatusCode() int {
  7440. if r.HTTPResponse != nil {
  7441. return r.HTTPResponse.StatusCode
  7442. }
  7443. return 0
  7444. }
  7445. type SessionInitResponse struct {
  7446. Body []byte
  7447. HTTPResponse *http.Response
  7448. JSON200 *bool
  7449. JSON400 *BadRequestError
  7450. JSON404 *NotFoundError
  7451. }
  7452. // Status returns HTTPResponse.Status
  7453. func (r SessionInitResponse) Status() string {
  7454. if r.HTTPResponse != nil {
  7455. return r.HTTPResponse.Status
  7456. }
  7457. return http.StatusText(0)
  7458. }
  7459. // StatusCode returns HTTPResponse.StatusCode
  7460. func (r SessionInitResponse) StatusCode() int {
  7461. if r.HTTPResponse != nil {
  7462. return r.HTTPResponse.StatusCode
  7463. }
  7464. return 0
  7465. }
  7466. type SessionMessagesResponse struct {
  7467. Body []byte
  7468. HTTPResponse *http.Response
  7469. JSON200 *[]struct {
  7470. Info Message `json:"info"`
  7471. Parts []Part `json:"parts"`
  7472. }
  7473. JSON400 *BadRequestError
  7474. JSON404 *NotFoundError
  7475. }
  7476. // Status returns HTTPResponse.Status
  7477. func (r SessionMessagesResponse) Status() string {
  7478. if r.HTTPResponse != nil {
  7479. return r.HTTPResponse.Status
  7480. }
  7481. return http.StatusText(0)
  7482. }
  7483. // StatusCode returns HTTPResponse.StatusCode
  7484. func (r SessionMessagesResponse) StatusCode() int {
  7485. if r.HTTPResponse != nil {
  7486. return r.HTTPResponse.StatusCode
  7487. }
  7488. return 0
  7489. }
  7490. type SessionPromptResponse struct {
  7491. Body []byte
  7492. HTTPResponse *http.Response
  7493. JSON200 *struct {
  7494. Info AssistantMessage `json:"info"`
  7495. Parts []Part `json:"parts"`
  7496. }
  7497. JSON400 *BadRequestError
  7498. JSON404 *NotFoundError
  7499. }
  7500. // Status returns HTTPResponse.Status
  7501. func (r SessionPromptResponse) Status() string {
  7502. if r.HTTPResponse != nil {
  7503. return r.HTTPResponse.Status
  7504. }
  7505. return http.StatusText(0)
  7506. }
  7507. // StatusCode returns HTTPResponse.StatusCode
  7508. func (r SessionPromptResponse) StatusCode() int {
  7509. if r.HTTPResponse != nil {
  7510. return r.HTTPResponse.StatusCode
  7511. }
  7512. return 0
  7513. }
  7514. type SessionMessageResponse struct {
  7515. Body []byte
  7516. HTTPResponse *http.Response
  7517. JSON200 *struct {
  7518. Info Message `json:"info"`
  7519. Parts []Part `json:"parts"`
  7520. }
  7521. JSON400 *BadRequestError
  7522. JSON404 *NotFoundError
  7523. }
  7524. // Status returns HTTPResponse.Status
  7525. func (r SessionMessageResponse) Status() string {
  7526. if r.HTTPResponse != nil {
  7527. return r.HTTPResponse.Status
  7528. }
  7529. return http.StatusText(0)
  7530. }
  7531. // StatusCode returns HTTPResponse.StatusCode
  7532. func (r SessionMessageResponse) StatusCode() int {
  7533. if r.HTTPResponse != nil {
  7534. return r.HTTPResponse.StatusCode
  7535. }
  7536. return 0
  7537. }
  7538. type PartDeleteResponse struct {
  7539. Body []byte
  7540. HTTPResponse *http.Response
  7541. JSON200 *bool
  7542. JSON400 *BadRequestError
  7543. JSON404 *NotFoundError
  7544. }
  7545. // Status returns HTTPResponse.Status
  7546. func (r PartDeleteResponse) Status() string {
  7547. if r.HTTPResponse != nil {
  7548. return r.HTTPResponse.Status
  7549. }
  7550. return http.StatusText(0)
  7551. }
  7552. // StatusCode returns HTTPResponse.StatusCode
  7553. func (r PartDeleteResponse) StatusCode() int {
  7554. if r.HTTPResponse != nil {
  7555. return r.HTTPResponse.StatusCode
  7556. }
  7557. return 0
  7558. }
  7559. type PartUpdateResponse struct {
  7560. Body []byte
  7561. HTTPResponse *http.Response
  7562. JSON200 *Part
  7563. JSON400 *BadRequestError
  7564. JSON404 *NotFoundError
  7565. }
  7566. // Status returns HTTPResponse.Status
  7567. func (r PartUpdateResponse) Status() string {
  7568. if r.HTTPResponse != nil {
  7569. return r.HTTPResponse.Status
  7570. }
  7571. return http.StatusText(0)
  7572. }
  7573. // StatusCode returns HTTPResponse.StatusCode
  7574. func (r PartUpdateResponse) StatusCode() int {
  7575. if r.HTTPResponse != nil {
  7576. return r.HTTPResponse.StatusCode
  7577. }
  7578. return 0
  7579. }
  7580. type PermissionRespondResponse struct {
  7581. Body []byte
  7582. HTTPResponse *http.Response
  7583. JSON200 *bool
  7584. JSON400 *BadRequestError
  7585. JSON404 *NotFoundError
  7586. }
  7587. // Status returns HTTPResponse.Status
  7588. func (r PermissionRespondResponse) Status() string {
  7589. if r.HTTPResponse != nil {
  7590. return r.HTTPResponse.Status
  7591. }
  7592. return http.StatusText(0)
  7593. }
  7594. // StatusCode returns HTTPResponse.StatusCode
  7595. func (r PermissionRespondResponse) StatusCode() int {
  7596. if r.HTTPResponse != nil {
  7597. return r.HTTPResponse.StatusCode
  7598. }
  7599. return 0
  7600. }
  7601. type SessionPromptAsyncResponse struct {
  7602. Body []byte
  7603. HTTPResponse *http.Response
  7604. JSON400 *BadRequestError
  7605. JSON404 *NotFoundError
  7606. }
  7607. // Status returns HTTPResponse.Status
  7608. func (r SessionPromptAsyncResponse) Status() string {
  7609. if r.HTTPResponse != nil {
  7610. return r.HTTPResponse.Status
  7611. }
  7612. return http.StatusText(0)
  7613. }
  7614. // StatusCode returns HTTPResponse.StatusCode
  7615. func (r SessionPromptAsyncResponse) StatusCode() int {
  7616. if r.HTTPResponse != nil {
  7617. return r.HTTPResponse.StatusCode
  7618. }
  7619. return 0
  7620. }
  7621. type SessionRevertResponse struct {
  7622. Body []byte
  7623. HTTPResponse *http.Response
  7624. JSON200 *Session
  7625. JSON400 *BadRequestError
  7626. JSON404 *NotFoundError
  7627. }
  7628. // Status returns HTTPResponse.Status
  7629. func (r SessionRevertResponse) Status() string {
  7630. if r.HTTPResponse != nil {
  7631. return r.HTTPResponse.Status
  7632. }
  7633. return http.StatusText(0)
  7634. }
  7635. // StatusCode returns HTTPResponse.StatusCode
  7636. func (r SessionRevertResponse) StatusCode() int {
  7637. if r.HTTPResponse != nil {
  7638. return r.HTTPResponse.StatusCode
  7639. }
  7640. return 0
  7641. }
  7642. type SessionUnshareResponse struct {
  7643. Body []byte
  7644. HTTPResponse *http.Response
  7645. JSON200 *Session
  7646. JSON400 *BadRequestError
  7647. JSON404 *NotFoundError
  7648. }
  7649. // Status returns HTTPResponse.Status
  7650. func (r SessionUnshareResponse) Status() string {
  7651. if r.HTTPResponse != nil {
  7652. return r.HTTPResponse.Status
  7653. }
  7654. return http.StatusText(0)
  7655. }
  7656. // StatusCode returns HTTPResponse.StatusCode
  7657. func (r SessionUnshareResponse) StatusCode() int {
  7658. if r.HTTPResponse != nil {
  7659. return r.HTTPResponse.StatusCode
  7660. }
  7661. return 0
  7662. }
  7663. type SessionShareResponse struct {
  7664. Body []byte
  7665. HTTPResponse *http.Response
  7666. JSON200 *Session
  7667. JSON400 *BadRequestError
  7668. JSON404 *NotFoundError
  7669. }
  7670. // Status returns HTTPResponse.Status
  7671. func (r SessionShareResponse) Status() string {
  7672. if r.HTTPResponse != nil {
  7673. return r.HTTPResponse.Status
  7674. }
  7675. return http.StatusText(0)
  7676. }
  7677. // StatusCode returns HTTPResponse.StatusCode
  7678. func (r SessionShareResponse) StatusCode() int {
  7679. if r.HTTPResponse != nil {
  7680. return r.HTTPResponse.StatusCode
  7681. }
  7682. return 0
  7683. }
  7684. type SessionShellResponse struct {
  7685. Body []byte
  7686. HTTPResponse *http.Response
  7687. JSON200 *AssistantMessage
  7688. JSON400 *BadRequestError
  7689. JSON404 *NotFoundError
  7690. }
  7691. // Status returns HTTPResponse.Status
  7692. func (r SessionShellResponse) Status() string {
  7693. if r.HTTPResponse != nil {
  7694. return r.HTTPResponse.Status
  7695. }
  7696. return http.StatusText(0)
  7697. }
  7698. // StatusCode returns HTTPResponse.StatusCode
  7699. func (r SessionShellResponse) StatusCode() int {
  7700. if r.HTTPResponse != nil {
  7701. return r.HTTPResponse.StatusCode
  7702. }
  7703. return 0
  7704. }
  7705. type SessionSummarizeResponse struct {
  7706. Body []byte
  7707. HTTPResponse *http.Response
  7708. JSON200 *bool
  7709. JSON400 *BadRequestError
  7710. JSON404 *NotFoundError
  7711. }
  7712. // Status returns HTTPResponse.Status
  7713. func (r SessionSummarizeResponse) Status() string {
  7714. if r.HTTPResponse != nil {
  7715. return r.HTTPResponse.Status
  7716. }
  7717. return http.StatusText(0)
  7718. }
  7719. // StatusCode returns HTTPResponse.StatusCode
  7720. func (r SessionSummarizeResponse) StatusCode() int {
  7721. if r.HTTPResponse != nil {
  7722. return r.HTTPResponse.StatusCode
  7723. }
  7724. return 0
  7725. }
  7726. type SessionTodoResponse struct {
  7727. Body []byte
  7728. HTTPResponse *http.Response
  7729. JSON200 *[]Todo
  7730. JSON400 *BadRequestError
  7731. JSON404 *NotFoundError
  7732. }
  7733. // Status returns HTTPResponse.Status
  7734. func (r SessionTodoResponse) Status() string {
  7735. if r.HTTPResponse != nil {
  7736. return r.HTTPResponse.Status
  7737. }
  7738. return http.StatusText(0)
  7739. }
  7740. // StatusCode returns HTTPResponse.StatusCode
  7741. func (r SessionTodoResponse) StatusCode() int {
  7742. if r.HTTPResponse != nil {
  7743. return r.HTTPResponse.StatusCode
  7744. }
  7745. return 0
  7746. }
  7747. type SessionUnrevertResponse struct {
  7748. Body []byte
  7749. HTTPResponse *http.Response
  7750. JSON200 *Session
  7751. JSON400 *BadRequestError
  7752. JSON404 *NotFoundError
  7753. }
  7754. // Status returns HTTPResponse.Status
  7755. func (r SessionUnrevertResponse) Status() string {
  7756. if r.HTTPResponse != nil {
  7757. return r.HTTPResponse.Status
  7758. }
  7759. return http.StatusText(0)
  7760. }
  7761. // StatusCode returns HTTPResponse.StatusCode
  7762. func (r SessionUnrevertResponse) StatusCode() int {
  7763. if r.HTTPResponse != nil {
  7764. return r.HTTPResponse.StatusCode
  7765. }
  7766. return 0
  7767. }
  7768. type TuiAppendPromptResponse struct {
  7769. Body []byte
  7770. HTTPResponse *http.Response
  7771. JSON200 *bool
  7772. JSON400 *BadRequestError
  7773. }
  7774. // Status returns HTTPResponse.Status
  7775. func (r TuiAppendPromptResponse) Status() string {
  7776. if r.HTTPResponse != nil {
  7777. return r.HTTPResponse.Status
  7778. }
  7779. return http.StatusText(0)
  7780. }
  7781. // StatusCode returns HTTPResponse.StatusCode
  7782. func (r TuiAppendPromptResponse) StatusCode() int {
  7783. if r.HTTPResponse != nil {
  7784. return r.HTTPResponse.StatusCode
  7785. }
  7786. return 0
  7787. }
  7788. type TuiClearPromptResponse struct {
  7789. Body []byte
  7790. HTTPResponse *http.Response
  7791. JSON200 *bool
  7792. }
  7793. // Status returns HTTPResponse.Status
  7794. func (r TuiClearPromptResponse) Status() string {
  7795. if r.HTTPResponse != nil {
  7796. return r.HTTPResponse.Status
  7797. }
  7798. return http.StatusText(0)
  7799. }
  7800. // StatusCode returns HTTPResponse.StatusCode
  7801. func (r TuiClearPromptResponse) StatusCode() int {
  7802. if r.HTTPResponse != nil {
  7803. return r.HTTPResponse.StatusCode
  7804. }
  7805. return 0
  7806. }
  7807. type TuiControlNextResponse struct {
  7808. Body []byte
  7809. HTTPResponse *http.Response
  7810. JSON200 *struct {
  7811. Body interface{} `json:"body"`
  7812. Path string `json:"path"`
  7813. }
  7814. }
  7815. // Status returns HTTPResponse.Status
  7816. func (r TuiControlNextResponse) Status() string {
  7817. if r.HTTPResponse != nil {
  7818. return r.HTTPResponse.Status
  7819. }
  7820. return http.StatusText(0)
  7821. }
  7822. // StatusCode returns HTTPResponse.StatusCode
  7823. func (r TuiControlNextResponse) StatusCode() int {
  7824. if r.HTTPResponse != nil {
  7825. return r.HTTPResponse.StatusCode
  7826. }
  7827. return 0
  7828. }
  7829. type TuiControlResponseResponse struct {
  7830. Body []byte
  7831. HTTPResponse *http.Response
  7832. JSON200 *bool
  7833. }
  7834. // Status returns HTTPResponse.Status
  7835. func (r TuiControlResponseResponse) Status() string {
  7836. if r.HTTPResponse != nil {
  7837. return r.HTTPResponse.Status
  7838. }
  7839. return http.StatusText(0)
  7840. }
  7841. // StatusCode returns HTTPResponse.StatusCode
  7842. func (r TuiControlResponseResponse) StatusCode() int {
  7843. if r.HTTPResponse != nil {
  7844. return r.HTTPResponse.StatusCode
  7845. }
  7846. return 0
  7847. }
  7848. type TuiExecuteCommandResponse struct {
  7849. Body []byte
  7850. HTTPResponse *http.Response
  7851. JSON200 *bool
  7852. JSON400 *BadRequestError
  7853. }
  7854. // Status returns HTTPResponse.Status
  7855. func (r TuiExecuteCommandResponse) Status() string {
  7856. if r.HTTPResponse != nil {
  7857. return r.HTTPResponse.Status
  7858. }
  7859. return http.StatusText(0)
  7860. }
  7861. // StatusCode returns HTTPResponse.StatusCode
  7862. func (r TuiExecuteCommandResponse) StatusCode() int {
  7863. if r.HTTPResponse != nil {
  7864. return r.HTTPResponse.StatusCode
  7865. }
  7866. return 0
  7867. }
  7868. type TuiOpenHelpResponse struct {
  7869. Body []byte
  7870. HTTPResponse *http.Response
  7871. JSON200 *bool
  7872. }
  7873. // Status returns HTTPResponse.Status
  7874. func (r TuiOpenHelpResponse) Status() string {
  7875. if r.HTTPResponse != nil {
  7876. return r.HTTPResponse.Status
  7877. }
  7878. return http.StatusText(0)
  7879. }
  7880. // StatusCode returns HTTPResponse.StatusCode
  7881. func (r TuiOpenHelpResponse) StatusCode() int {
  7882. if r.HTTPResponse != nil {
  7883. return r.HTTPResponse.StatusCode
  7884. }
  7885. return 0
  7886. }
  7887. type TuiOpenModelsResponse struct {
  7888. Body []byte
  7889. HTTPResponse *http.Response
  7890. JSON200 *bool
  7891. }
  7892. // Status returns HTTPResponse.Status
  7893. func (r TuiOpenModelsResponse) Status() string {
  7894. if r.HTTPResponse != nil {
  7895. return r.HTTPResponse.Status
  7896. }
  7897. return http.StatusText(0)
  7898. }
  7899. // StatusCode returns HTTPResponse.StatusCode
  7900. func (r TuiOpenModelsResponse) StatusCode() int {
  7901. if r.HTTPResponse != nil {
  7902. return r.HTTPResponse.StatusCode
  7903. }
  7904. return 0
  7905. }
  7906. type TuiOpenSessionsResponse struct {
  7907. Body []byte
  7908. HTTPResponse *http.Response
  7909. JSON200 *bool
  7910. }
  7911. // Status returns HTTPResponse.Status
  7912. func (r TuiOpenSessionsResponse) Status() string {
  7913. if r.HTTPResponse != nil {
  7914. return r.HTTPResponse.Status
  7915. }
  7916. return http.StatusText(0)
  7917. }
  7918. // StatusCode returns HTTPResponse.StatusCode
  7919. func (r TuiOpenSessionsResponse) StatusCode() int {
  7920. if r.HTTPResponse != nil {
  7921. return r.HTTPResponse.StatusCode
  7922. }
  7923. return 0
  7924. }
  7925. type TuiOpenThemesResponse struct {
  7926. Body []byte
  7927. HTTPResponse *http.Response
  7928. JSON200 *bool
  7929. }
  7930. // Status returns HTTPResponse.Status
  7931. func (r TuiOpenThemesResponse) Status() string {
  7932. if r.HTTPResponse != nil {
  7933. return r.HTTPResponse.Status
  7934. }
  7935. return http.StatusText(0)
  7936. }
  7937. // StatusCode returns HTTPResponse.StatusCode
  7938. func (r TuiOpenThemesResponse) StatusCode() int {
  7939. if r.HTTPResponse != nil {
  7940. return r.HTTPResponse.StatusCode
  7941. }
  7942. return 0
  7943. }
  7944. type TuiPublishResponse struct {
  7945. Body []byte
  7946. HTTPResponse *http.Response
  7947. JSON200 *bool
  7948. JSON400 *BadRequestError
  7949. }
  7950. // Status returns HTTPResponse.Status
  7951. func (r TuiPublishResponse) Status() string {
  7952. if r.HTTPResponse != nil {
  7953. return r.HTTPResponse.Status
  7954. }
  7955. return http.StatusText(0)
  7956. }
  7957. // StatusCode returns HTTPResponse.StatusCode
  7958. func (r TuiPublishResponse) StatusCode() int {
  7959. if r.HTTPResponse != nil {
  7960. return r.HTTPResponse.StatusCode
  7961. }
  7962. return 0
  7963. }
  7964. type TuiSelectSessionResponse struct {
  7965. Body []byte
  7966. HTTPResponse *http.Response
  7967. JSON200 *bool
  7968. JSON400 *BadRequestError
  7969. JSON404 *NotFoundError
  7970. }
  7971. // Status returns HTTPResponse.Status
  7972. func (r TuiSelectSessionResponse) Status() string {
  7973. if r.HTTPResponse != nil {
  7974. return r.HTTPResponse.Status
  7975. }
  7976. return http.StatusText(0)
  7977. }
  7978. // StatusCode returns HTTPResponse.StatusCode
  7979. func (r TuiSelectSessionResponse) StatusCode() int {
  7980. if r.HTTPResponse != nil {
  7981. return r.HTTPResponse.StatusCode
  7982. }
  7983. return 0
  7984. }
  7985. type TuiShowToastResponse struct {
  7986. Body []byte
  7987. HTTPResponse *http.Response
  7988. JSON200 *bool
  7989. }
  7990. // Status returns HTTPResponse.Status
  7991. func (r TuiShowToastResponse) Status() string {
  7992. if r.HTTPResponse != nil {
  7993. return r.HTTPResponse.Status
  7994. }
  7995. return http.StatusText(0)
  7996. }
  7997. // StatusCode returns HTTPResponse.StatusCode
  7998. func (r TuiShowToastResponse) StatusCode() int {
  7999. if r.HTTPResponse != nil {
  8000. return r.HTTPResponse.StatusCode
  8001. }
  8002. return 0
  8003. }
  8004. type TuiSubmitPromptResponse struct {
  8005. Body []byte
  8006. HTTPResponse *http.Response
  8007. JSON200 *bool
  8008. }
  8009. // Status returns HTTPResponse.Status
  8010. func (r TuiSubmitPromptResponse) Status() string {
  8011. if r.HTTPResponse != nil {
  8012. return r.HTTPResponse.Status
  8013. }
  8014. return http.StatusText(0)
  8015. }
  8016. // StatusCode returns HTTPResponse.StatusCode
  8017. func (r TuiSubmitPromptResponse) StatusCode() int {
  8018. if r.HTTPResponse != nil {
  8019. return r.HTTPResponse.StatusCode
  8020. }
  8021. return 0
  8022. }
  8023. type VcsGetResponse struct {
  8024. Body []byte
  8025. HTTPResponse *http.Response
  8026. JSON200 *VcsInfo
  8027. }
  8028. // Status returns HTTPResponse.Status
  8029. func (r VcsGetResponse) Status() string {
  8030. if r.HTTPResponse != nil {
  8031. return r.HTTPResponse.Status
  8032. }
  8033. return http.StatusText(0)
  8034. }
  8035. // StatusCode returns HTTPResponse.StatusCode
  8036. func (r VcsGetResponse) StatusCode() int {
  8037. if r.HTTPResponse != nil {
  8038. return r.HTTPResponse.StatusCode
  8039. }
  8040. return 0
  8041. }
  8042. // AppAgentsWithResponse request returning *AppAgentsResponse
  8043. func (c *ClientWithResponses) AppAgentsWithResponse(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*AppAgentsResponse, error) {
  8044. rsp, err := c.AppAgents(ctx, params, reqEditors...)
  8045. if err != nil {
  8046. return nil, err
  8047. }
  8048. return ParseAppAgentsResponse(rsp)
  8049. }
  8050. // AuthSetWithBodyWithResponse request with arbitrary body returning *AuthSetResponse
  8051. func (c *ClientWithResponses) AuthSetWithBodyWithResponse(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthSetResponse, error) {
  8052. rsp, err := c.AuthSetWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8053. if err != nil {
  8054. return nil, err
  8055. }
  8056. return ParseAuthSetResponse(rsp)
  8057. }
  8058. func (c *ClientWithResponses) AuthSetWithResponse(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthSetResponse, error) {
  8059. rsp, err := c.AuthSet(ctx, providerID, params, body, reqEditors...)
  8060. if err != nil {
  8061. return nil, err
  8062. }
  8063. return ParseAuthSetResponse(rsp)
  8064. }
  8065. // CommandListWithResponse request returning *CommandListResponse
  8066. func (c *ClientWithResponses) CommandListWithResponse(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*CommandListResponse, error) {
  8067. rsp, err := c.CommandList(ctx, params, reqEditors...)
  8068. if err != nil {
  8069. return nil, err
  8070. }
  8071. return ParseCommandListResponse(rsp)
  8072. }
  8073. // ConfigGetWithResponse request returning *ConfigGetResponse
  8074. func (c *ClientWithResponses) ConfigGetWithResponse(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*ConfigGetResponse, error) {
  8075. rsp, err := c.ConfigGet(ctx, params, reqEditors...)
  8076. if err != nil {
  8077. return nil, err
  8078. }
  8079. return ParseConfigGetResponse(rsp)
  8080. }
  8081. // ConfigUpdateWithBodyWithResponse request with arbitrary body returning *ConfigUpdateResponse
  8082. func (c *ClientWithResponses) ConfigUpdateWithBodyWithResponse(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error) {
  8083. rsp, err := c.ConfigUpdateWithBody(ctx, params, contentType, body, reqEditors...)
  8084. if err != nil {
  8085. return nil, err
  8086. }
  8087. return ParseConfigUpdateResponse(rsp)
  8088. }
  8089. func (c *ClientWithResponses) ConfigUpdateWithResponse(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error) {
  8090. rsp, err := c.ConfigUpdate(ctx, params, body, reqEditors...)
  8091. if err != nil {
  8092. return nil, err
  8093. }
  8094. return ParseConfigUpdateResponse(rsp)
  8095. }
  8096. // ConfigProvidersWithResponse request returning *ConfigProvidersResponse
  8097. func (c *ClientWithResponses) ConfigProvidersWithResponse(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*ConfigProvidersResponse, error) {
  8098. rsp, err := c.ConfigProviders(ctx, params, reqEditors...)
  8099. if err != nil {
  8100. return nil, err
  8101. }
  8102. return ParseConfigProvidersResponse(rsp)
  8103. }
  8104. // EventSubscribeWithResponse request returning *EventSubscribeResponse
  8105. func (c *ClientWithResponses) EventSubscribeWithResponse(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*EventSubscribeResponse, error) {
  8106. rsp, err := c.EventSubscribe(ctx, params, reqEditors...)
  8107. if err != nil {
  8108. return nil, err
  8109. }
  8110. return ParseEventSubscribeResponse(rsp)
  8111. }
  8112. // ExperimentalResourceListWithResponse request returning *ExperimentalResourceListResponse
  8113. func (c *ClientWithResponses) ExperimentalResourceListWithResponse(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*ExperimentalResourceListResponse, error) {
  8114. rsp, err := c.ExperimentalResourceList(ctx, params, reqEditors...)
  8115. if err != nil {
  8116. return nil, err
  8117. }
  8118. return ParseExperimentalResourceListResponse(rsp)
  8119. }
  8120. // ToolListWithResponse request returning *ToolListResponse
  8121. func (c *ClientWithResponses) ToolListWithResponse(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*ToolListResponse, error) {
  8122. rsp, err := c.ToolList(ctx, params, reqEditors...)
  8123. if err != nil {
  8124. return nil, err
  8125. }
  8126. return ParseToolListResponse(rsp)
  8127. }
  8128. // ToolIdsWithResponse request returning *ToolIdsResponse
  8129. func (c *ClientWithResponses) ToolIdsWithResponse(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*ToolIdsResponse, error) {
  8130. rsp, err := c.ToolIds(ctx, params, reqEditors...)
  8131. if err != nil {
  8132. return nil, err
  8133. }
  8134. return ParseToolIdsResponse(rsp)
  8135. }
  8136. // WorktreeListWithResponse request returning *WorktreeListResponse
  8137. func (c *ClientWithResponses) WorktreeListWithResponse(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*WorktreeListResponse, error) {
  8138. rsp, err := c.WorktreeList(ctx, params, reqEditors...)
  8139. if err != nil {
  8140. return nil, err
  8141. }
  8142. return ParseWorktreeListResponse(rsp)
  8143. }
  8144. // WorktreeCreateWithBodyWithResponse request with arbitrary body returning *WorktreeCreateResponse
  8145. func (c *ClientWithResponses) WorktreeCreateWithBodyWithResponse(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error) {
  8146. rsp, err := c.WorktreeCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8147. if err != nil {
  8148. return nil, err
  8149. }
  8150. return ParseWorktreeCreateResponse(rsp)
  8151. }
  8152. func (c *ClientWithResponses) WorktreeCreateWithResponse(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error) {
  8153. rsp, err := c.WorktreeCreate(ctx, params, body, reqEditors...)
  8154. if err != nil {
  8155. return nil, err
  8156. }
  8157. return ParseWorktreeCreateResponse(rsp)
  8158. }
  8159. // FileListWithResponse request returning *FileListResponse
  8160. func (c *ClientWithResponses) FileListWithResponse(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*FileListResponse, error) {
  8161. rsp, err := c.FileList(ctx, params, reqEditors...)
  8162. if err != nil {
  8163. return nil, err
  8164. }
  8165. return ParseFileListResponse(rsp)
  8166. }
  8167. // FileReadWithResponse request returning *FileReadResponse
  8168. func (c *ClientWithResponses) FileReadWithResponse(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*FileReadResponse, error) {
  8169. rsp, err := c.FileRead(ctx, params, reqEditors...)
  8170. if err != nil {
  8171. return nil, err
  8172. }
  8173. return ParseFileReadResponse(rsp)
  8174. }
  8175. // FileStatusWithResponse request returning *FileStatusResponse
  8176. func (c *ClientWithResponses) FileStatusWithResponse(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*FileStatusResponse, error) {
  8177. rsp, err := c.FileStatus(ctx, params, reqEditors...)
  8178. if err != nil {
  8179. return nil, err
  8180. }
  8181. return ParseFileStatusResponse(rsp)
  8182. }
  8183. // FindTextWithResponse request returning *FindTextResponse
  8184. func (c *ClientWithResponses) FindTextWithResponse(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*FindTextResponse, error) {
  8185. rsp, err := c.FindText(ctx, params, reqEditors...)
  8186. if err != nil {
  8187. return nil, err
  8188. }
  8189. return ParseFindTextResponse(rsp)
  8190. }
  8191. // FindFilesWithResponse request returning *FindFilesResponse
  8192. func (c *ClientWithResponses) FindFilesWithResponse(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*FindFilesResponse, error) {
  8193. rsp, err := c.FindFiles(ctx, params, reqEditors...)
  8194. if err != nil {
  8195. return nil, err
  8196. }
  8197. return ParseFindFilesResponse(rsp)
  8198. }
  8199. // FindSymbolsWithResponse request returning *FindSymbolsResponse
  8200. func (c *ClientWithResponses) FindSymbolsWithResponse(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*FindSymbolsResponse, error) {
  8201. rsp, err := c.FindSymbols(ctx, params, reqEditors...)
  8202. if err != nil {
  8203. return nil, err
  8204. }
  8205. return ParseFindSymbolsResponse(rsp)
  8206. }
  8207. // FormatterStatusWithResponse request returning *FormatterStatusResponse
  8208. func (c *ClientWithResponses) FormatterStatusWithResponse(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*FormatterStatusResponse, error) {
  8209. rsp, err := c.FormatterStatus(ctx, params, reqEditors...)
  8210. if err != nil {
  8211. return nil, err
  8212. }
  8213. return ParseFormatterStatusResponse(rsp)
  8214. }
  8215. // GlobalDisposeWithResponse request returning *GlobalDisposeResponse
  8216. func (c *ClientWithResponses) GlobalDisposeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalDisposeResponse, error) {
  8217. rsp, err := c.GlobalDispose(ctx, reqEditors...)
  8218. if err != nil {
  8219. return nil, err
  8220. }
  8221. return ParseGlobalDisposeResponse(rsp)
  8222. }
  8223. // GlobalEventWithResponse request returning *GlobalEventResponse
  8224. func (c *ClientWithResponses) GlobalEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalEventResponse, error) {
  8225. rsp, err := c.GlobalEvent(ctx, reqEditors...)
  8226. if err != nil {
  8227. return nil, err
  8228. }
  8229. return ParseGlobalEventResponse(rsp)
  8230. }
  8231. // GlobalHealthWithResponse request returning *GlobalHealthResponse
  8232. func (c *ClientWithResponses) GlobalHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalHealthResponse, error) {
  8233. rsp, err := c.GlobalHealth(ctx, reqEditors...)
  8234. if err != nil {
  8235. return nil, err
  8236. }
  8237. return ParseGlobalHealthResponse(rsp)
  8238. }
  8239. // InstanceDisposeWithResponse request returning *InstanceDisposeResponse
  8240. func (c *ClientWithResponses) InstanceDisposeWithResponse(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*InstanceDisposeResponse, error) {
  8241. rsp, err := c.InstanceDispose(ctx, params, reqEditors...)
  8242. if err != nil {
  8243. return nil, err
  8244. }
  8245. return ParseInstanceDisposeResponse(rsp)
  8246. }
  8247. // AppLogWithBodyWithResponse request with arbitrary body returning *AppLogResponse
  8248. func (c *ClientWithResponses) AppLogWithBodyWithResponse(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppLogResponse, error) {
  8249. rsp, err := c.AppLogWithBody(ctx, params, contentType, body, reqEditors...)
  8250. if err != nil {
  8251. return nil, err
  8252. }
  8253. return ParseAppLogResponse(rsp)
  8254. }
  8255. func (c *ClientWithResponses) AppLogWithResponse(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*AppLogResponse, error) {
  8256. rsp, err := c.AppLog(ctx, params, body, reqEditors...)
  8257. if err != nil {
  8258. return nil, err
  8259. }
  8260. return ParseAppLogResponse(rsp)
  8261. }
  8262. // LspStatusWithResponse request returning *LspStatusResponse
  8263. func (c *ClientWithResponses) LspStatusWithResponse(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*LspStatusResponse, error) {
  8264. rsp, err := c.LspStatus(ctx, params, reqEditors...)
  8265. if err != nil {
  8266. return nil, err
  8267. }
  8268. return ParseLspStatusResponse(rsp)
  8269. }
  8270. // McpStatusWithResponse request returning *McpStatusResponse
  8271. func (c *ClientWithResponses) McpStatusWithResponse(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*McpStatusResponse, error) {
  8272. rsp, err := c.McpStatus(ctx, params, reqEditors...)
  8273. if err != nil {
  8274. return nil, err
  8275. }
  8276. return ParseMcpStatusResponse(rsp)
  8277. }
  8278. // McpAddWithBodyWithResponse request with arbitrary body returning *McpAddResponse
  8279. func (c *ClientWithResponses) McpAddWithBodyWithResponse(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAddResponse, error) {
  8280. rsp, err := c.McpAddWithBody(ctx, params, contentType, body, reqEditors...)
  8281. if err != nil {
  8282. return nil, err
  8283. }
  8284. return ParseMcpAddResponse(rsp)
  8285. }
  8286. func (c *ClientWithResponses) McpAddWithResponse(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAddResponse, error) {
  8287. rsp, err := c.McpAdd(ctx, params, body, reqEditors...)
  8288. if err != nil {
  8289. return nil, err
  8290. }
  8291. return ParseMcpAddResponse(rsp)
  8292. }
  8293. // McpAuthRemoveWithResponse request returning *McpAuthRemoveResponse
  8294. func (c *ClientWithResponses) McpAuthRemoveWithResponse(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*McpAuthRemoveResponse, error) {
  8295. rsp, err := c.McpAuthRemove(ctx, name, params, reqEditors...)
  8296. if err != nil {
  8297. return nil, err
  8298. }
  8299. return ParseMcpAuthRemoveResponse(rsp)
  8300. }
  8301. // McpAuthStartWithResponse request returning *McpAuthStartResponse
  8302. func (c *ClientWithResponses) McpAuthStartWithResponse(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*McpAuthStartResponse, error) {
  8303. rsp, err := c.McpAuthStart(ctx, name, params, reqEditors...)
  8304. if err != nil {
  8305. return nil, err
  8306. }
  8307. return ParseMcpAuthStartResponse(rsp)
  8308. }
  8309. // McpAuthAuthenticateWithResponse request returning *McpAuthAuthenticateResponse
  8310. func (c *ClientWithResponses) McpAuthAuthenticateWithResponse(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*McpAuthAuthenticateResponse, error) {
  8311. rsp, err := c.McpAuthAuthenticate(ctx, name, params, reqEditors...)
  8312. if err != nil {
  8313. return nil, err
  8314. }
  8315. return ParseMcpAuthAuthenticateResponse(rsp)
  8316. }
  8317. // McpAuthCallbackWithBodyWithResponse request with arbitrary body returning *McpAuthCallbackResponse
  8318. func (c *ClientWithResponses) McpAuthCallbackWithBodyWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error) {
  8319. rsp, err := c.McpAuthCallbackWithBody(ctx, name, params, contentType, body, reqEditors...)
  8320. if err != nil {
  8321. return nil, err
  8322. }
  8323. return ParseMcpAuthCallbackResponse(rsp)
  8324. }
  8325. func (c *ClientWithResponses) McpAuthCallbackWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error) {
  8326. rsp, err := c.McpAuthCallback(ctx, name, params, body, reqEditors...)
  8327. if err != nil {
  8328. return nil, err
  8329. }
  8330. return ParseMcpAuthCallbackResponse(rsp)
  8331. }
  8332. // McpConnectWithResponse request returning *McpConnectResponse
  8333. func (c *ClientWithResponses) McpConnectWithResponse(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*McpConnectResponse, error) {
  8334. rsp, err := c.McpConnect(ctx, name, params, reqEditors...)
  8335. if err != nil {
  8336. return nil, err
  8337. }
  8338. return ParseMcpConnectResponse(rsp)
  8339. }
  8340. // McpDisconnectWithResponse request returning *McpDisconnectResponse
  8341. func (c *ClientWithResponses) McpDisconnectWithResponse(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*McpDisconnectResponse, error) {
  8342. rsp, err := c.McpDisconnect(ctx, name, params, reqEditors...)
  8343. if err != nil {
  8344. return nil, err
  8345. }
  8346. return ParseMcpDisconnectResponse(rsp)
  8347. }
  8348. // PathGetWithResponse request returning *PathGetResponse
  8349. func (c *ClientWithResponses) PathGetWithResponse(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*PathGetResponse, error) {
  8350. rsp, err := c.PathGet(ctx, params, reqEditors...)
  8351. if err != nil {
  8352. return nil, err
  8353. }
  8354. return ParsePathGetResponse(rsp)
  8355. }
  8356. // PermissionListWithResponse request returning *PermissionListResponse
  8357. func (c *ClientWithResponses) PermissionListWithResponse(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*PermissionListResponse, error) {
  8358. rsp, err := c.PermissionList(ctx, params, reqEditors...)
  8359. if err != nil {
  8360. return nil, err
  8361. }
  8362. return ParsePermissionListResponse(rsp)
  8363. }
  8364. // PermissionReplyWithBodyWithResponse request with arbitrary body returning *PermissionReplyResponse
  8365. func (c *ClientWithResponses) PermissionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error) {
  8366. rsp, err := c.PermissionReplyWithBody(ctx, requestID, params, contentType, body, reqEditors...)
  8367. if err != nil {
  8368. return nil, err
  8369. }
  8370. return ParsePermissionReplyResponse(rsp)
  8371. }
  8372. func (c *ClientWithResponses) PermissionReplyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error) {
  8373. rsp, err := c.PermissionReply(ctx, requestID, params, body, reqEditors...)
  8374. if err != nil {
  8375. return nil, err
  8376. }
  8377. return ParsePermissionReplyResponse(rsp)
  8378. }
  8379. // ProjectListWithResponse request returning *ProjectListResponse
  8380. func (c *ClientWithResponses) ProjectListWithResponse(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*ProjectListResponse, error) {
  8381. rsp, err := c.ProjectList(ctx, params, reqEditors...)
  8382. if err != nil {
  8383. return nil, err
  8384. }
  8385. return ParseProjectListResponse(rsp)
  8386. }
  8387. // ProjectCurrentWithResponse request returning *ProjectCurrentResponse
  8388. func (c *ClientWithResponses) ProjectCurrentWithResponse(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*ProjectCurrentResponse, error) {
  8389. rsp, err := c.ProjectCurrent(ctx, params, reqEditors...)
  8390. if err != nil {
  8391. return nil, err
  8392. }
  8393. return ParseProjectCurrentResponse(rsp)
  8394. }
  8395. // ProjectUpdateWithBodyWithResponse request with arbitrary body returning *ProjectUpdateResponse
  8396. func (c *ClientWithResponses) ProjectUpdateWithBodyWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error) {
  8397. rsp, err := c.ProjectUpdateWithBody(ctx, projectID, params, contentType, body, reqEditors...)
  8398. if err != nil {
  8399. return nil, err
  8400. }
  8401. return ParseProjectUpdateResponse(rsp)
  8402. }
  8403. func (c *ClientWithResponses) ProjectUpdateWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error) {
  8404. rsp, err := c.ProjectUpdate(ctx, projectID, params, body, reqEditors...)
  8405. if err != nil {
  8406. return nil, err
  8407. }
  8408. return ParseProjectUpdateResponse(rsp)
  8409. }
  8410. // ProviderListWithResponse request returning *ProviderListResponse
  8411. func (c *ClientWithResponses) ProviderListWithResponse(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*ProviderListResponse, error) {
  8412. rsp, err := c.ProviderList(ctx, params, reqEditors...)
  8413. if err != nil {
  8414. return nil, err
  8415. }
  8416. return ParseProviderListResponse(rsp)
  8417. }
  8418. // ProviderAuthWithResponse request returning *ProviderAuthResponse
  8419. func (c *ClientWithResponses) ProviderAuthWithResponse(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*ProviderAuthResponse, error) {
  8420. rsp, err := c.ProviderAuth(ctx, params, reqEditors...)
  8421. if err != nil {
  8422. return nil, err
  8423. }
  8424. return ParseProviderAuthResponse(rsp)
  8425. }
  8426. // ProviderOauthAuthorizeWithBodyWithResponse request with arbitrary body returning *ProviderOauthAuthorizeResponse
  8427. func (c *ClientWithResponses) ProviderOauthAuthorizeWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error) {
  8428. rsp, err := c.ProviderOauthAuthorizeWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8429. if err != nil {
  8430. return nil, err
  8431. }
  8432. return ParseProviderOauthAuthorizeResponse(rsp)
  8433. }
  8434. func (c *ClientWithResponses) ProviderOauthAuthorizeWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error) {
  8435. rsp, err := c.ProviderOauthAuthorize(ctx, providerID, params, body, reqEditors...)
  8436. if err != nil {
  8437. return nil, err
  8438. }
  8439. return ParseProviderOauthAuthorizeResponse(rsp)
  8440. }
  8441. // ProviderOauthCallbackWithBodyWithResponse request with arbitrary body returning *ProviderOauthCallbackResponse
  8442. func (c *ClientWithResponses) ProviderOauthCallbackWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error) {
  8443. rsp, err := c.ProviderOauthCallbackWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8444. if err != nil {
  8445. return nil, err
  8446. }
  8447. return ParseProviderOauthCallbackResponse(rsp)
  8448. }
  8449. func (c *ClientWithResponses) ProviderOauthCallbackWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error) {
  8450. rsp, err := c.ProviderOauthCallback(ctx, providerID, params, body, reqEditors...)
  8451. if err != nil {
  8452. return nil, err
  8453. }
  8454. return ParseProviderOauthCallbackResponse(rsp)
  8455. }
  8456. // PtyListWithResponse request returning *PtyListResponse
  8457. func (c *ClientWithResponses) PtyListWithResponse(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*PtyListResponse, error) {
  8458. rsp, err := c.PtyList(ctx, params, reqEditors...)
  8459. if err != nil {
  8460. return nil, err
  8461. }
  8462. return ParsePtyListResponse(rsp)
  8463. }
  8464. // PtyCreateWithBodyWithResponse request with arbitrary body returning *PtyCreateResponse
  8465. func (c *ClientWithResponses) PtyCreateWithBodyWithResponse(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error) {
  8466. rsp, err := c.PtyCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8467. if err != nil {
  8468. return nil, err
  8469. }
  8470. return ParsePtyCreateResponse(rsp)
  8471. }
  8472. func (c *ClientWithResponses) PtyCreateWithResponse(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error) {
  8473. rsp, err := c.PtyCreate(ctx, params, body, reqEditors...)
  8474. if err != nil {
  8475. return nil, err
  8476. }
  8477. return ParsePtyCreateResponse(rsp)
  8478. }
  8479. // PtyRemoveWithResponse request returning *PtyRemoveResponse
  8480. func (c *ClientWithResponses) PtyRemoveWithResponse(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*PtyRemoveResponse, error) {
  8481. rsp, err := c.PtyRemove(ctx, ptyID, params, reqEditors...)
  8482. if err != nil {
  8483. return nil, err
  8484. }
  8485. return ParsePtyRemoveResponse(rsp)
  8486. }
  8487. // PtyGetWithResponse request returning *PtyGetResponse
  8488. func (c *ClientWithResponses) PtyGetWithResponse(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*PtyGetResponse, error) {
  8489. rsp, err := c.PtyGet(ctx, ptyID, params, reqEditors...)
  8490. if err != nil {
  8491. return nil, err
  8492. }
  8493. return ParsePtyGetResponse(rsp)
  8494. }
  8495. // PtyUpdateWithBodyWithResponse request with arbitrary body returning *PtyUpdateResponse
  8496. func (c *ClientWithResponses) PtyUpdateWithBodyWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error) {
  8497. rsp, err := c.PtyUpdateWithBody(ctx, ptyID, params, contentType, body, reqEditors...)
  8498. if err != nil {
  8499. return nil, err
  8500. }
  8501. return ParsePtyUpdateResponse(rsp)
  8502. }
  8503. func (c *ClientWithResponses) PtyUpdateWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error) {
  8504. rsp, err := c.PtyUpdate(ctx, ptyID, params, body, reqEditors...)
  8505. if err != nil {
  8506. return nil, err
  8507. }
  8508. return ParsePtyUpdateResponse(rsp)
  8509. }
  8510. // PtyConnectWithResponse request returning *PtyConnectResponse
  8511. func (c *ClientWithResponses) PtyConnectWithResponse(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*PtyConnectResponse, error) {
  8512. rsp, err := c.PtyConnect(ctx, ptyID, params, reqEditors...)
  8513. if err != nil {
  8514. return nil, err
  8515. }
  8516. return ParsePtyConnectResponse(rsp)
  8517. }
  8518. // QuestionListWithResponse request returning *QuestionListResponse
  8519. func (c *ClientWithResponses) QuestionListWithResponse(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*QuestionListResponse, error) {
  8520. rsp, err := c.QuestionList(ctx, params, reqEditors...)
  8521. if err != nil {
  8522. return nil, err
  8523. }
  8524. return ParseQuestionListResponse(rsp)
  8525. }
  8526. // QuestionRejectWithResponse request returning *QuestionRejectResponse
  8527. func (c *ClientWithResponses) QuestionRejectWithResponse(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*QuestionRejectResponse, error) {
  8528. rsp, err := c.QuestionReject(ctx, requestID, params, reqEditors...)
  8529. if err != nil {
  8530. return nil, err
  8531. }
  8532. return ParseQuestionRejectResponse(rsp)
  8533. }
  8534. // QuestionReplyWithBodyWithResponse request with arbitrary body returning *QuestionReplyResponse
  8535. func (c *ClientWithResponses) QuestionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error) {
  8536. rsp, err := c.QuestionReplyWithBody(ctx, requestID, params, contentType, body, reqEditors...)
  8537. if err != nil {
  8538. return nil, err
  8539. }
  8540. return ParseQuestionReplyResponse(rsp)
  8541. }
  8542. func (c *ClientWithResponses) QuestionReplyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error) {
  8543. rsp, err := c.QuestionReply(ctx, requestID, params, body, reqEditors...)
  8544. if err != nil {
  8545. return nil, err
  8546. }
  8547. return ParseQuestionReplyResponse(rsp)
  8548. }
  8549. // SessionListWithResponse request returning *SessionListResponse
  8550. func (c *ClientWithResponses) SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error) {
  8551. rsp, err := c.SessionList(ctx, params, reqEditors...)
  8552. if err != nil {
  8553. return nil, err
  8554. }
  8555. return ParseSessionListResponse(rsp)
  8556. }
  8557. // SessionCreateWithBodyWithResponse request with arbitrary body returning *SessionCreateResponse
  8558. func (c *ClientWithResponses) SessionCreateWithBodyWithResponse(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error) {
  8559. rsp, err := c.SessionCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8560. if err != nil {
  8561. return nil, err
  8562. }
  8563. return ParseSessionCreateResponse(rsp)
  8564. }
  8565. func (c *ClientWithResponses) SessionCreateWithResponse(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error) {
  8566. rsp, err := c.SessionCreate(ctx, params, body, reqEditors...)
  8567. if err != nil {
  8568. return nil, err
  8569. }
  8570. return ParseSessionCreateResponse(rsp)
  8571. }
  8572. // SessionStatusWithResponse request returning *SessionStatusResponse
  8573. func (c *ClientWithResponses) SessionStatusWithResponse(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*SessionStatusResponse, error) {
  8574. rsp, err := c.SessionStatus(ctx, params, reqEditors...)
  8575. if err != nil {
  8576. return nil, err
  8577. }
  8578. return ParseSessionStatusResponse(rsp)
  8579. }
  8580. // SessionDeleteWithResponse request returning *SessionDeleteResponse
  8581. func (c *ClientWithResponses) SessionDeleteWithResponse(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*SessionDeleteResponse, error) {
  8582. rsp, err := c.SessionDelete(ctx, sessionID, params, reqEditors...)
  8583. if err != nil {
  8584. return nil, err
  8585. }
  8586. return ParseSessionDeleteResponse(rsp)
  8587. }
  8588. // SessionGetWithResponse request returning *SessionGetResponse
  8589. func (c *ClientWithResponses) SessionGetWithResponse(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*SessionGetResponse, error) {
  8590. rsp, err := c.SessionGet(ctx, sessionID, params, reqEditors...)
  8591. if err != nil {
  8592. return nil, err
  8593. }
  8594. return ParseSessionGetResponse(rsp)
  8595. }
  8596. // SessionUpdateWithBodyWithResponse request with arbitrary body returning *SessionUpdateResponse
  8597. func (c *ClientWithResponses) SessionUpdateWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error) {
  8598. rsp, err := c.SessionUpdateWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8599. if err != nil {
  8600. return nil, err
  8601. }
  8602. return ParseSessionUpdateResponse(rsp)
  8603. }
  8604. func (c *ClientWithResponses) SessionUpdateWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error) {
  8605. rsp, err := c.SessionUpdate(ctx, sessionID, params, body, reqEditors...)
  8606. if err != nil {
  8607. return nil, err
  8608. }
  8609. return ParseSessionUpdateResponse(rsp)
  8610. }
  8611. // SessionAbortWithResponse request returning *SessionAbortResponse
  8612. func (c *ClientWithResponses) SessionAbortWithResponse(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*SessionAbortResponse, error) {
  8613. rsp, err := c.SessionAbort(ctx, sessionID, params, reqEditors...)
  8614. if err != nil {
  8615. return nil, err
  8616. }
  8617. return ParseSessionAbortResponse(rsp)
  8618. }
  8619. // SessionChildrenWithResponse request returning *SessionChildrenResponse
  8620. func (c *ClientWithResponses) SessionChildrenWithResponse(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*SessionChildrenResponse, error) {
  8621. rsp, err := c.SessionChildren(ctx, sessionID, params, reqEditors...)
  8622. if err != nil {
  8623. return nil, err
  8624. }
  8625. return ParseSessionChildrenResponse(rsp)
  8626. }
  8627. // SessionCommandWithBodyWithResponse request with arbitrary body returning *SessionCommandResponse
  8628. func (c *ClientWithResponses) SessionCommandWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error) {
  8629. rsp, err := c.SessionCommandWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8630. if err != nil {
  8631. return nil, err
  8632. }
  8633. return ParseSessionCommandResponse(rsp)
  8634. }
  8635. func (c *ClientWithResponses) SessionCommandWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error) {
  8636. rsp, err := c.SessionCommand(ctx, sessionID, params, body, reqEditors...)
  8637. if err != nil {
  8638. return nil, err
  8639. }
  8640. return ParseSessionCommandResponse(rsp)
  8641. }
  8642. // SessionDiffWithResponse request returning *SessionDiffResponse
  8643. func (c *ClientWithResponses) SessionDiffWithResponse(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*SessionDiffResponse, error) {
  8644. rsp, err := c.SessionDiff(ctx, sessionID, params, reqEditors...)
  8645. if err != nil {
  8646. return nil, err
  8647. }
  8648. return ParseSessionDiffResponse(rsp)
  8649. }
  8650. // SessionForkWithBodyWithResponse request with arbitrary body returning *SessionForkResponse
  8651. func (c *ClientWithResponses) SessionForkWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionForkResponse, error) {
  8652. rsp, err := c.SessionForkWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8653. if err != nil {
  8654. return nil, err
  8655. }
  8656. return ParseSessionForkResponse(rsp)
  8657. }
  8658. func (c *ClientWithResponses) SessionForkWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionForkResponse, error) {
  8659. rsp, err := c.SessionFork(ctx, sessionID, params, body, reqEditors...)
  8660. if err != nil {
  8661. return nil, err
  8662. }
  8663. return ParseSessionForkResponse(rsp)
  8664. }
  8665. // SessionInitWithBodyWithResponse request with arbitrary body returning *SessionInitResponse
  8666. func (c *ClientWithResponses) SessionInitWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionInitResponse, error) {
  8667. rsp, err := c.SessionInitWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8668. if err != nil {
  8669. return nil, err
  8670. }
  8671. return ParseSessionInitResponse(rsp)
  8672. }
  8673. func (c *ClientWithResponses) SessionInitWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionInitResponse, error) {
  8674. rsp, err := c.SessionInit(ctx, sessionID, params, body, reqEditors...)
  8675. if err != nil {
  8676. return nil, err
  8677. }
  8678. return ParseSessionInitResponse(rsp)
  8679. }
  8680. // SessionMessagesWithResponse request returning *SessionMessagesResponse
  8681. func (c *ClientWithResponses) SessionMessagesWithResponse(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*SessionMessagesResponse, error) {
  8682. rsp, err := c.SessionMessages(ctx, sessionID, params, reqEditors...)
  8683. if err != nil {
  8684. return nil, err
  8685. }
  8686. return ParseSessionMessagesResponse(rsp)
  8687. }
  8688. // SessionPromptWithBodyWithResponse request with arbitrary body returning *SessionPromptResponse
  8689. func (c *ClientWithResponses) SessionPromptWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error) {
  8690. rsp, err := c.SessionPromptWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8691. if err != nil {
  8692. return nil, err
  8693. }
  8694. return ParseSessionPromptResponse(rsp)
  8695. }
  8696. func (c *ClientWithResponses) SessionPromptWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error) {
  8697. rsp, err := c.SessionPrompt(ctx, sessionID, params, body, reqEditors...)
  8698. if err != nil {
  8699. return nil, err
  8700. }
  8701. return ParseSessionPromptResponse(rsp)
  8702. }
  8703. // SessionMessageWithResponse request returning *SessionMessageResponse
  8704. func (c *ClientWithResponses) SessionMessageWithResponse(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*SessionMessageResponse, error) {
  8705. rsp, err := c.SessionMessage(ctx, sessionID, messageID, params, reqEditors...)
  8706. if err != nil {
  8707. return nil, err
  8708. }
  8709. return ParseSessionMessageResponse(rsp)
  8710. }
  8711. // PartDeleteWithResponse request returning *PartDeleteResponse
  8712. func (c *ClientWithResponses) PartDeleteWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*PartDeleteResponse, error) {
  8713. rsp, err := c.PartDelete(ctx, sessionID, messageID, partID, params, reqEditors...)
  8714. if err != nil {
  8715. return nil, err
  8716. }
  8717. return ParsePartDeleteResponse(rsp)
  8718. }
  8719. // PartUpdateWithBodyWithResponse request with arbitrary body returning *PartUpdateResponse
  8720. func (c *ClientWithResponses) PartUpdateWithBodyWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error) {
  8721. rsp, err := c.PartUpdateWithBody(ctx, sessionID, messageID, partID, params, contentType, body, reqEditors...)
  8722. if err != nil {
  8723. return nil, err
  8724. }
  8725. return ParsePartUpdateResponse(rsp)
  8726. }
  8727. func (c *ClientWithResponses) PartUpdateWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error) {
  8728. rsp, err := c.PartUpdate(ctx, sessionID, messageID, partID, params, body, reqEditors...)
  8729. if err != nil {
  8730. return nil, err
  8731. }
  8732. return ParsePartUpdateResponse(rsp)
  8733. }
  8734. // PermissionRespondWithBodyWithResponse request with arbitrary body returning *PermissionRespondResponse
  8735. func (c *ClientWithResponses) PermissionRespondWithBodyWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error) {
  8736. rsp, err := c.PermissionRespondWithBody(ctx, sessionID, permissionID, params, contentType, body, reqEditors...)
  8737. if err != nil {
  8738. return nil, err
  8739. }
  8740. return ParsePermissionRespondResponse(rsp)
  8741. }
  8742. func (c *ClientWithResponses) PermissionRespondWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error) {
  8743. rsp, err := c.PermissionRespond(ctx, sessionID, permissionID, params, body, reqEditors...)
  8744. if err != nil {
  8745. return nil, err
  8746. }
  8747. return ParsePermissionRespondResponse(rsp)
  8748. }
  8749. // SessionPromptAsyncWithBodyWithResponse request with arbitrary body returning *SessionPromptAsyncResponse
  8750. func (c *ClientWithResponses) SessionPromptAsyncWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error) {
  8751. rsp, err := c.SessionPromptAsyncWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8752. if err != nil {
  8753. return nil, err
  8754. }
  8755. return ParseSessionPromptAsyncResponse(rsp)
  8756. }
  8757. func (c *ClientWithResponses) SessionPromptAsyncWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error) {
  8758. rsp, err := c.SessionPromptAsync(ctx, sessionID, params, body, reqEditors...)
  8759. if err != nil {
  8760. return nil, err
  8761. }
  8762. return ParseSessionPromptAsyncResponse(rsp)
  8763. }
  8764. // SessionRevertWithBodyWithResponse request with arbitrary body returning *SessionRevertResponse
  8765. func (c *ClientWithResponses) SessionRevertWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error) {
  8766. rsp, err := c.SessionRevertWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8767. if err != nil {
  8768. return nil, err
  8769. }
  8770. return ParseSessionRevertResponse(rsp)
  8771. }
  8772. func (c *ClientWithResponses) SessionRevertWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error) {
  8773. rsp, err := c.SessionRevert(ctx, sessionID, params, body, reqEditors...)
  8774. if err != nil {
  8775. return nil, err
  8776. }
  8777. return ParseSessionRevertResponse(rsp)
  8778. }
  8779. // SessionUnshareWithResponse request returning *SessionUnshareResponse
  8780. func (c *ClientWithResponses) SessionUnshareWithResponse(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*SessionUnshareResponse, error) {
  8781. rsp, err := c.SessionUnshare(ctx, sessionID, params, reqEditors...)
  8782. if err != nil {
  8783. return nil, err
  8784. }
  8785. return ParseSessionUnshareResponse(rsp)
  8786. }
  8787. // SessionShareWithResponse request returning *SessionShareResponse
  8788. func (c *ClientWithResponses) SessionShareWithResponse(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*SessionShareResponse, error) {
  8789. rsp, err := c.SessionShare(ctx, sessionID, params, reqEditors...)
  8790. if err != nil {
  8791. return nil, err
  8792. }
  8793. return ParseSessionShareResponse(rsp)
  8794. }
  8795. // SessionShellWithBodyWithResponse request with arbitrary body returning *SessionShellResponse
  8796. func (c *ClientWithResponses) SessionShellWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionShellResponse, error) {
  8797. rsp, err := c.SessionShellWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8798. if err != nil {
  8799. return nil, err
  8800. }
  8801. return ParseSessionShellResponse(rsp)
  8802. }
  8803. func (c *ClientWithResponses) SessionShellWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionShellResponse, error) {
  8804. rsp, err := c.SessionShell(ctx, sessionID, params, body, reqEditors...)
  8805. if err != nil {
  8806. return nil, err
  8807. }
  8808. return ParseSessionShellResponse(rsp)
  8809. }
  8810. // SessionSummarizeWithBodyWithResponse request with arbitrary body returning *SessionSummarizeResponse
  8811. func (c *ClientWithResponses) SessionSummarizeWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error) {
  8812. rsp, err := c.SessionSummarizeWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8813. if err != nil {
  8814. return nil, err
  8815. }
  8816. return ParseSessionSummarizeResponse(rsp)
  8817. }
  8818. func (c *ClientWithResponses) SessionSummarizeWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error) {
  8819. rsp, err := c.SessionSummarize(ctx, sessionID, params, body, reqEditors...)
  8820. if err != nil {
  8821. return nil, err
  8822. }
  8823. return ParseSessionSummarizeResponse(rsp)
  8824. }
  8825. // SessionTodoWithResponse request returning *SessionTodoResponse
  8826. func (c *ClientWithResponses) SessionTodoWithResponse(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*SessionTodoResponse, error) {
  8827. rsp, err := c.SessionTodo(ctx, sessionID, params, reqEditors...)
  8828. if err != nil {
  8829. return nil, err
  8830. }
  8831. return ParseSessionTodoResponse(rsp)
  8832. }
  8833. // SessionUnrevertWithResponse request returning *SessionUnrevertResponse
  8834. func (c *ClientWithResponses) SessionUnrevertWithResponse(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*SessionUnrevertResponse, error) {
  8835. rsp, err := c.SessionUnrevert(ctx, sessionID, params, reqEditors...)
  8836. if err != nil {
  8837. return nil, err
  8838. }
  8839. return ParseSessionUnrevertResponse(rsp)
  8840. }
  8841. // TuiAppendPromptWithBodyWithResponse request with arbitrary body returning *TuiAppendPromptResponse
  8842. func (c *ClientWithResponses) TuiAppendPromptWithBodyWithResponse(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error) {
  8843. rsp, err := c.TuiAppendPromptWithBody(ctx, params, contentType, body, reqEditors...)
  8844. if err != nil {
  8845. return nil, err
  8846. }
  8847. return ParseTuiAppendPromptResponse(rsp)
  8848. }
  8849. func (c *ClientWithResponses) TuiAppendPromptWithResponse(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error) {
  8850. rsp, err := c.TuiAppendPrompt(ctx, params, body, reqEditors...)
  8851. if err != nil {
  8852. return nil, err
  8853. }
  8854. return ParseTuiAppendPromptResponse(rsp)
  8855. }
  8856. // TuiClearPromptWithResponse request returning *TuiClearPromptResponse
  8857. func (c *ClientWithResponses) TuiClearPromptWithResponse(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*TuiClearPromptResponse, error) {
  8858. rsp, err := c.TuiClearPrompt(ctx, params, reqEditors...)
  8859. if err != nil {
  8860. return nil, err
  8861. }
  8862. return ParseTuiClearPromptResponse(rsp)
  8863. }
  8864. // TuiControlNextWithResponse request returning *TuiControlNextResponse
  8865. func (c *ClientWithResponses) TuiControlNextWithResponse(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*TuiControlNextResponse, error) {
  8866. rsp, err := c.TuiControlNext(ctx, params, reqEditors...)
  8867. if err != nil {
  8868. return nil, err
  8869. }
  8870. return ParseTuiControlNextResponse(rsp)
  8871. }
  8872. // TuiControlResponseWithBodyWithResponse request with arbitrary body returning *TuiControlResponseResponse
  8873. func (c *ClientWithResponses) TuiControlResponseWithBodyWithResponse(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error) {
  8874. rsp, err := c.TuiControlResponseWithBody(ctx, params, contentType, body, reqEditors...)
  8875. if err != nil {
  8876. return nil, err
  8877. }
  8878. return ParseTuiControlResponseResponse(rsp)
  8879. }
  8880. func (c *ClientWithResponses) TuiControlResponseWithResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error) {
  8881. rsp, err := c.TuiControlResponse(ctx, params, body, reqEditors...)
  8882. if err != nil {
  8883. return nil, err
  8884. }
  8885. return ParseTuiControlResponseResponse(rsp)
  8886. }
  8887. // TuiExecuteCommandWithBodyWithResponse request with arbitrary body returning *TuiExecuteCommandResponse
  8888. func (c *ClientWithResponses) TuiExecuteCommandWithBodyWithResponse(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error) {
  8889. rsp, err := c.TuiExecuteCommandWithBody(ctx, params, contentType, body, reqEditors...)
  8890. if err != nil {
  8891. return nil, err
  8892. }
  8893. return ParseTuiExecuteCommandResponse(rsp)
  8894. }
  8895. func (c *ClientWithResponses) TuiExecuteCommandWithResponse(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error) {
  8896. rsp, err := c.TuiExecuteCommand(ctx, params, body, reqEditors...)
  8897. if err != nil {
  8898. return nil, err
  8899. }
  8900. return ParseTuiExecuteCommandResponse(rsp)
  8901. }
  8902. // TuiOpenHelpWithResponse request returning *TuiOpenHelpResponse
  8903. func (c *ClientWithResponses) TuiOpenHelpWithResponse(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*TuiOpenHelpResponse, error) {
  8904. rsp, err := c.TuiOpenHelp(ctx, params, reqEditors...)
  8905. if err != nil {
  8906. return nil, err
  8907. }
  8908. return ParseTuiOpenHelpResponse(rsp)
  8909. }
  8910. // TuiOpenModelsWithResponse request returning *TuiOpenModelsResponse
  8911. func (c *ClientWithResponses) TuiOpenModelsWithResponse(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*TuiOpenModelsResponse, error) {
  8912. rsp, err := c.TuiOpenModels(ctx, params, reqEditors...)
  8913. if err != nil {
  8914. return nil, err
  8915. }
  8916. return ParseTuiOpenModelsResponse(rsp)
  8917. }
  8918. // TuiOpenSessionsWithResponse request returning *TuiOpenSessionsResponse
  8919. func (c *ClientWithResponses) TuiOpenSessionsWithResponse(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*TuiOpenSessionsResponse, error) {
  8920. rsp, err := c.TuiOpenSessions(ctx, params, reqEditors...)
  8921. if err != nil {
  8922. return nil, err
  8923. }
  8924. return ParseTuiOpenSessionsResponse(rsp)
  8925. }
  8926. // TuiOpenThemesWithResponse request returning *TuiOpenThemesResponse
  8927. func (c *ClientWithResponses) TuiOpenThemesWithResponse(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*TuiOpenThemesResponse, error) {
  8928. rsp, err := c.TuiOpenThemes(ctx, params, reqEditors...)
  8929. if err != nil {
  8930. return nil, err
  8931. }
  8932. return ParseTuiOpenThemesResponse(rsp)
  8933. }
  8934. // TuiPublishWithBodyWithResponse request with arbitrary body returning *TuiPublishResponse
  8935. func (c *ClientWithResponses) TuiPublishWithBodyWithResponse(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error) {
  8936. rsp, err := c.TuiPublishWithBody(ctx, params, contentType, body, reqEditors...)
  8937. if err != nil {
  8938. return nil, err
  8939. }
  8940. return ParseTuiPublishResponse(rsp)
  8941. }
  8942. func (c *ClientWithResponses) TuiPublishWithResponse(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error) {
  8943. rsp, err := c.TuiPublish(ctx, params, body, reqEditors...)
  8944. if err != nil {
  8945. return nil, err
  8946. }
  8947. return ParseTuiPublishResponse(rsp)
  8948. }
  8949. // TuiSelectSessionWithBodyWithResponse request with arbitrary body returning *TuiSelectSessionResponse
  8950. func (c *ClientWithResponses) TuiSelectSessionWithBodyWithResponse(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error) {
  8951. rsp, err := c.TuiSelectSessionWithBody(ctx, params, contentType, body, reqEditors...)
  8952. if err != nil {
  8953. return nil, err
  8954. }
  8955. return ParseTuiSelectSessionResponse(rsp)
  8956. }
  8957. func (c *ClientWithResponses) TuiSelectSessionWithResponse(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error) {
  8958. rsp, err := c.TuiSelectSession(ctx, params, body, reqEditors...)
  8959. if err != nil {
  8960. return nil, err
  8961. }
  8962. return ParseTuiSelectSessionResponse(rsp)
  8963. }
  8964. // TuiShowToastWithBodyWithResponse request with arbitrary body returning *TuiShowToastResponse
  8965. func (c *ClientWithResponses) TuiShowToastWithBodyWithResponse(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error) {
  8966. rsp, err := c.TuiShowToastWithBody(ctx, params, contentType, body, reqEditors...)
  8967. if err != nil {
  8968. return nil, err
  8969. }
  8970. return ParseTuiShowToastResponse(rsp)
  8971. }
  8972. func (c *ClientWithResponses) TuiShowToastWithResponse(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error) {
  8973. rsp, err := c.TuiShowToast(ctx, params, body, reqEditors...)
  8974. if err != nil {
  8975. return nil, err
  8976. }
  8977. return ParseTuiShowToastResponse(rsp)
  8978. }
  8979. // TuiSubmitPromptWithResponse request returning *TuiSubmitPromptResponse
  8980. func (c *ClientWithResponses) TuiSubmitPromptWithResponse(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*TuiSubmitPromptResponse, error) {
  8981. rsp, err := c.TuiSubmitPrompt(ctx, params, reqEditors...)
  8982. if err != nil {
  8983. return nil, err
  8984. }
  8985. return ParseTuiSubmitPromptResponse(rsp)
  8986. }
  8987. // VcsGetWithResponse request returning *VcsGetResponse
  8988. func (c *ClientWithResponses) VcsGetWithResponse(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*VcsGetResponse, error) {
  8989. rsp, err := c.VcsGet(ctx, params, reqEditors...)
  8990. if err != nil {
  8991. return nil, err
  8992. }
  8993. return ParseVcsGetResponse(rsp)
  8994. }
  8995. // ParseAppAgentsResponse parses an HTTP response from a AppAgentsWithResponse call
  8996. func ParseAppAgentsResponse(rsp *http.Response) (*AppAgentsResponse, error) {
  8997. bodyBytes, err := io.ReadAll(rsp.Body)
  8998. defer func() { _ = rsp.Body.Close() }()
  8999. if err != nil {
  9000. return nil, err
  9001. }
  9002. response := &AppAgentsResponse{
  9003. Body: bodyBytes,
  9004. HTTPResponse: rsp,
  9005. }
  9006. switch {
  9007. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9008. var dest []Agent
  9009. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9010. return nil, err
  9011. }
  9012. response.JSON200 = &dest
  9013. }
  9014. return response, nil
  9015. }
  9016. // ParseAuthSetResponse parses an HTTP response from a AuthSetWithResponse call
  9017. func ParseAuthSetResponse(rsp *http.Response) (*AuthSetResponse, error) {
  9018. bodyBytes, err := io.ReadAll(rsp.Body)
  9019. defer func() { _ = rsp.Body.Close() }()
  9020. if err != nil {
  9021. return nil, err
  9022. }
  9023. response := &AuthSetResponse{
  9024. Body: bodyBytes,
  9025. HTTPResponse: rsp,
  9026. }
  9027. switch {
  9028. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9029. var dest bool
  9030. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9031. return nil, err
  9032. }
  9033. response.JSON200 = &dest
  9034. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9035. var dest BadRequestError
  9036. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9037. return nil, err
  9038. }
  9039. response.JSON400 = &dest
  9040. }
  9041. return response, nil
  9042. }
  9043. // ParseCommandListResponse parses an HTTP response from a CommandListWithResponse call
  9044. func ParseCommandListResponse(rsp *http.Response) (*CommandListResponse, error) {
  9045. bodyBytes, err := io.ReadAll(rsp.Body)
  9046. defer func() { _ = rsp.Body.Close() }()
  9047. if err != nil {
  9048. return nil, err
  9049. }
  9050. response := &CommandListResponse{
  9051. Body: bodyBytes,
  9052. HTTPResponse: rsp,
  9053. }
  9054. switch {
  9055. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9056. var dest []Command
  9057. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9058. return nil, err
  9059. }
  9060. response.JSON200 = &dest
  9061. }
  9062. return response, nil
  9063. }
  9064. // ParseConfigGetResponse parses an HTTP response from a ConfigGetWithResponse call
  9065. func ParseConfigGetResponse(rsp *http.Response) (*ConfigGetResponse, error) {
  9066. bodyBytes, err := io.ReadAll(rsp.Body)
  9067. defer func() { _ = rsp.Body.Close() }()
  9068. if err != nil {
  9069. return nil, err
  9070. }
  9071. response := &ConfigGetResponse{
  9072. Body: bodyBytes,
  9073. HTTPResponse: rsp,
  9074. }
  9075. switch {
  9076. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9077. var dest Config
  9078. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9079. return nil, err
  9080. }
  9081. response.JSON200 = &dest
  9082. }
  9083. return response, nil
  9084. }
  9085. // ParseConfigUpdateResponse parses an HTTP response from a ConfigUpdateWithResponse call
  9086. func ParseConfigUpdateResponse(rsp *http.Response) (*ConfigUpdateResponse, error) {
  9087. bodyBytes, err := io.ReadAll(rsp.Body)
  9088. defer func() { _ = rsp.Body.Close() }()
  9089. if err != nil {
  9090. return nil, err
  9091. }
  9092. response := &ConfigUpdateResponse{
  9093. Body: bodyBytes,
  9094. HTTPResponse: rsp,
  9095. }
  9096. switch {
  9097. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9098. var dest Config
  9099. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9100. return nil, err
  9101. }
  9102. response.JSON200 = &dest
  9103. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9104. var dest BadRequestError
  9105. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9106. return nil, err
  9107. }
  9108. response.JSON400 = &dest
  9109. }
  9110. return response, nil
  9111. }
  9112. // ParseConfigProvidersResponse parses an HTTP response from a ConfigProvidersWithResponse call
  9113. func ParseConfigProvidersResponse(rsp *http.Response) (*ConfigProvidersResponse, error) {
  9114. bodyBytes, err := io.ReadAll(rsp.Body)
  9115. defer func() { _ = rsp.Body.Close() }()
  9116. if err != nil {
  9117. return nil, err
  9118. }
  9119. response := &ConfigProvidersResponse{
  9120. Body: bodyBytes,
  9121. HTTPResponse: rsp,
  9122. }
  9123. switch {
  9124. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9125. var dest struct {
  9126. Default map[string]string `json:"default"`
  9127. Providers []Provider `json:"providers"`
  9128. }
  9129. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9130. return nil, err
  9131. }
  9132. response.JSON200 = &dest
  9133. }
  9134. return response, nil
  9135. }
  9136. // ParseEventSubscribeResponse parses an HTTP response from a EventSubscribeWithResponse call
  9137. func ParseEventSubscribeResponse(rsp *http.Response) (*EventSubscribeResponse, error) {
  9138. bodyBytes, err := io.ReadAll(rsp.Body)
  9139. defer func() { _ = rsp.Body.Close() }()
  9140. if err != nil {
  9141. return nil, err
  9142. }
  9143. response := &EventSubscribeResponse{
  9144. Body: bodyBytes,
  9145. HTTPResponse: rsp,
  9146. }
  9147. return response, nil
  9148. }
  9149. // ParseExperimentalResourceListResponse parses an HTTP response from a ExperimentalResourceListWithResponse call
  9150. func ParseExperimentalResourceListResponse(rsp *http.Response) (*ExperimentalResourceListResponse, error) {
  9151. bodyBytes, err := io.ReadAll(rsp.Body)
  9152. defer func() { _ = rsp.Body.Close() }()
  9153. if err != nil {
  9154. return nil, err
  9155. }
  9156. response := &ExperimentalResourceListResponse{
  9157. Body: bodyBytes,
  9158. HTTPResponse: rsp,
  9159. }
  9160. switch {
  9161. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9162. var dest map[string]McpResource
  9163. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9164. return nil, err
  9165. }
  9166. response.JSON200 = &dest
  9167. }
  9168. return response, nil
  9169. }
  9170. // ParseToolListResponse parses an HTTP response from a ToolListWithResponse call
  9171. func ParseToolListResponse(rsp *http.Response) (*ToolListResponse, error) {
  9172. bodyBytes, err := io.ReadAll(rsp.Body)
  9173. defer func() { _ = rsp.Body.Close() }()
  9174. if err != nil {
  9175. return nil, err
  9176. }
  9177. response := &ToolListResponse{
  9178. Body: bodyBytes,
  9179. HTTPResponse: rsp,
  9180. }
  9181. switch {
  9182. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9183. var dest ToolList
  9184. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9185. return nil, err
  9186. }
  9187. response.JSON200 = &dest
  9188. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9189. var dest BadRequestError
  9190. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9191. return nil, err
  9192. }
  9193. response.JSON400 = &dest
  9194. }
  9195. return response, nil
  9196. }
  9197. // ParseToolIdsResponse parses an HTTP response from a ToolIdsWithResponse call
  9198. func ParseToolIdsResponse(rsp *http.Response) (*ToolIdsResponse, error) {
  9199. bodyBytes, err := io.ReadAll(rsp.Body)
  9200. defer func() { _ = rsp.Body.Close() }()
  9201. if err != nil {
  9202. return nil, err
  9203. }
  9204. response := &ToolIdsResponse{
  9205. Body: bodyBytes,
  9206. HTTPResponse: rsp,
  9207. }
  9208. switch {
  9209. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9210. var dest ToolIDs
  9211. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9212. return nil, err
  9213. }
  9214. response.JSON200 = &dest
  9215. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9216. var dest BadRequestError
  9217. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9218. return nil, err
  9219. }
  9220. response.JSON400 = &dest
  9221. }
  9222. return response, nil
  9223. }
  9224. // ParseWorktreeListResponse parses an HTTP response from a WorktreeListWithResponse call
  9225. func ParseWorktreeListResponse(rsp *http.Response) (*WorktreeListResponse, error) {
  9226. bodyBytes, err := io.ReadAll(rsp.Body)
  9227. defer func() { _ = rsp.Body.Close() }()
  9228. if err != nil {
  9229. return nil, err
  9230. }
  9231. response := &WorktreeListResponse{
  9232. Body: bodyBytes,
  9233. HTTPResponse: rsp,
  9234. }
  9235. switch {
  9236. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9237. var dest []string
  9238. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9239. return nil, err
  9240. }
  9241. response.JSON200 = &dest
  9242. }
  9243. return response, nil
  9244. }
  9245. // ParseWorktreeCreateResponse parses an HTTP response from a WorktreeCreateWithResponse call
  9246. func ParseWorktreeCreateResponse(rsp *http.Response) (*WorktreeCreateResponse, error) {
  9247. bodyBytes, err := io.ReadAll(rsp.Body)
  9248. defer func() { _ = rsp.Body.Close() }()
  9249. if err != nil {
  9250. return nil, err
  9251. }
  9252. response := &WorktreeCreateResponse{
  9253. Body: bodyBytes,
  9254. HTTPResponse: rsp,
  9255. }
  9256. switch {
  9257. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9258. var dest Worktree
  9259. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9260. return nil, err
  9261. }
  9262. response.JSON200 = &dest
  9263. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9264. var dest BadRequestError
  9265. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9266. return nil, err
  9267. }
  9268. response.JSON400 = &dest
  9269. }
  9270. return response, nil
  9271. }
  9272. // ParseFileListResponse parses an HTTP response from a FileListWithResponse call
  9273. func ParseFileListResponse(rsp *http.Response) (*FileListResponse, error) {
  9274. bodyBytes, err := io.ReadAll(rsp.Body)
  9275. defer func() { _ = rsp.Body.Close() }()
  9276. if err != nil {
  9277. return nil, err
  9278. }
  9279. response := &FileListResponse{
  9280. Body: bodyBytes,
  9281. HTTPResponse: rsp,
  9282. }
  9283. switch {
  9284. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9285. var dest []FileNode
  9286. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9287. return nil, err
  9288. }
  9289. response.JSON200 = &dest
  9290. }
  9291. return response, nil
  9292. }
  9293. // ParseFileReadResponse parses an HTTP response from a FileReadWithResponse call
  9294. func ParseFileReadResponse(rsp *http.Response) (*FileReadResponse, error) {
  9295. bodyBytes, err := io.ReadAll(rsp.Body)
  9296. defer func() { _ = rsp.Body.Close() }()
  9297. if err != nil {
  9298. return nil, err
  9299. }
  9300. response := &FileReadResponse{
  9301. Body: bodyBytes,
  9302. HTTPResponse: rsp,
  9303. }
  9304. switch {
  9305. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9306. var dest FileContent
  9307. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9308. return nil, err
  9309. }
  9310. response.JSON200 = &dest
  9311. }
  9312. return response, nil
  9313. }
  9314. // ParseFileStatusResponse parses an HTTP response from a FileStatusWithResponse call
  9315. func ParseFileStatusResponse(rsp *http.Response) (*FileStatusResponse, error) {
  9316. bodyBytes, err := io.ReadAll(rsp.Body)
  9317. defer func() { _ = rsp.Body.Close() }()
  9318. if err != nil {
  9319. return nil, err
  9320. }
  9321. response := &FileStatusResponse{
  9322. Body: bodyBytes,
  9323. HTTPResponse: rsp,
  9324. }
  9325. switch {
  9326. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9327. var dest []File
  9328. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9329. return nil, err
  9330. }
  9331. response.JSON200 = &dest
  9332. }
  9333. return response, nil
  9334. }
  9335. // ParseFindTextResponse parses an HTTP response from a FindTextWithResponse call
  9336. func ParseFindTextResponse(rsp *http.Response) (*FindTextResponse, error) {
  9337. bodyBytes, err := io.ReadAll(rsp.Body)
  9338. defer func() { _ = rsp.Body.Close() }()
  9339. if err != nil {
  9340. return nil, err
  9341. }
  9342. response := &FindTextResponse{
  9343. Body: bodyBytes,
  9344. HTTPResponse: rsp,
  9345. }
  9346. switch {
  9347. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9348. var dest []struct {
  9349. AbsoluteOffset float32 `json:"absolute_offset"`
  9350. LineNumber float32 `json:"line_number"`
  9351. Lines struct {
  9352. Text string `json:"text"`
  9353. } `json:"lines"`
  9354. Path struct {
  9355. Text string `json:"text"`
  9356. } `json:"path"`
  9357. Submatches []struct {
  9358. End float32 `json:"end"`
  9359. Match struct {
  9360. Text string `json:"text"`
  9361. } `json:"match"`
  9362. Start float32 `json:"start"`
  9363. } `json:"submatches"`
  9364. }
  9365. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9366. return nil, err
  9367. }
  9368. response.JSON200 = &dest
  9369. }
  9370. return response, nil
  9371. }
  9372. // ParseFindFilesResponse parses an HTTP response from a FindFilesWithResponse call
  9373. func ParseFindFilesResponse(rsp *http.Response) (*FindFilesResponse, error) {
  9374. bodyBytes, err := io.ReadAll(rsp.Body)
  9375. defer func() { _ = rsp.Body.Close() }()
  9376. if err != nil {
  9377. return nil, err
  9378. }
  9379. response := &FindFilesResponse{
  9380. Body: bodyBytes,
  9381. HTTPResponse: rsp,
  9382. }
  9383. switch {
  9384. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9385. var dest []string
  9386. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9387. return nil, err
  9388. }
  9389. response.JSON200 = &dest
  9390. }
  9391. return response, nil
  9392. }
  9393. // ParseFindSymbolsResponse parses an HTTP response from a FindSymbolsWithResponse call
  9394. func ParseFindSymbolsResponse(rsp *http.Response) (*FindSymbolsResponse, error) {
  9395. bodyBytes, err := io.ReadAll(rsp.Body)
  9396. defer func() { _ = rsp.Body.Close() }()
  9397. if err != nil {
  9398. return nil, err
  9399. }
  9400. response := &FindSymbolsResponse{
  9401. Body: bodyBytes,
  9402. HTTPResponse: rsp,
  9403. }
  9404. switch {
  9405. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9406. var dest []Symbol
  9407. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9408. return nil, err
  9409. }
  9410. response.JSON200 = &dest
  9411. }
  9412. return response, nil
  9413. }
  9414. // ParseFormatterStatusResponse parses an HTTP response from a FormatterStatusWithResponse call
  9415. func ParseFormatterStatusResponse(rsp *http.Response) (*FormatterStatusResponse, error) {
  9416. bodyBytes, err := io.ReadAll(rsp.Body)
  9417. defer func() { _ = rsp.Body.Close() }()
  9418. if err != nil {
  9419. return nil, err
  9420. }
  9421. response := &FormatterStatusResponse{
  9422. Body: bodyBytes,
  9423. HTTPResponse: rsp,
  9424. }
  9425. switch {
  9426. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9427. var dest []FormatterStatus
  9428. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9429. return nil, err
  9430. }
  9431. response.JSON200 = &dest
  9432. }
  9433. return response, nil
  9434. }
  9435. // ParseGlobalDisposeResponse parses an HTTP response from a GlobalDisposeWithResponse call
  9436. func ParseGlobalDisposeResponse(rsp *http.Response) (*GlobalDisposeResponse, error) {
  9437. bodyBytes, err := io.ReadAll(rsp.Body)
  9438. defer func() { _ = rsp.Body.Close() }()
  9439. if err != nil {
  9440. return nil, err
  9441. }
  9442. response := &GlobalDisposeResponse{
  9443. Body: bodyBytes,
  9444. HTTPResponse: rsp,
  9445. }
  9446. switch {
  9447. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9448. var dest bool
  9449. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9450. return nil, err
  9451. }
  9452. response.JSON200 = &dest
  9453. }
  9454. return response, nil
  9455. }
  9456. // ParseGlobalEventResponse parses an HTTP response from a GlobalEventWithResponse call
  9457. func ParseGlobalEventResponse(rsp *http.Response) (*GlobalEventResponse, error) {
  9458. bodyBytes, err := io.ReadAll(rsp.Body)
  9459. defer func() { _ = rsp.Body.Close() }()
  9460. if err != nil {
  9461. return nil, err
  9462. }
  9463. response := &GlobalEventResponse{
  9464. Body: bodyBytes,
  9465. HTTPResponse: rsp,
  9466. }
  9467. return response, nil
  9468. }
  9469. // ParseGlobalHealthResponse parses an HTTP response from a GlobalHealthWithResponse call
  9470. func ParseGlobalHealthResponse(rsp *http.Response) (*GlobalHealthResponse, error) {
  9471. bodyBytes, err := io.ReadAll(rsp.Body)
  9472. defer func() { _ = rsp.Body.Close() }()
  9473. if err != nil {
  9474. return nil, err
  9475. }
  9476. response := &GlobalHealthResponse{
  9477. Body: bodyBytes,
  9478. HTTPResponse: rsp,
  9479. }
  9480. switch {
  9481. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9482. var dest struct {
  9483. Healthy bool `json:"healthy"`
  9484. Version string `json:"version"`
  9485. }
  9486. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9487. return nil, err
  9488. }
  9489. response.JSON200 = &dest
  9490. }
  9491. return response, nil
  9492. }
  9493. // ParseInstanceDisposeResponse parses an HTTP response from a InstanceDisposeWithResponse call
  9494. func ParseInstanceDisposeResponse(rsp *http.Response) (*InstanceDisposeResponse, error) {
  9495. bodyBytes, err := io.ReadAll(rsp.Body)
  9496. defer func() { _ = rsp.Body.Close() }()
  9497. if err != nil {
  9498. return nil, err
  9499. }
  9500. response := &InstanceDisposeResponse{
  9501. Body: bodyBytes,
  9502. HTTPResponse: rsp,
  9503. }
  9504. switch {
  9505. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9506. var dest bool
  9507. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9508. return nil, err
  9509. }
  9510. response.JSON200 = &dest
  9511. }
  9512. return response, nil
  9513. }
  9514. // ParseAppLogResponse parses an HTTP response from a AppLogWithResponse call
  9515. func ParseAppLogResponse(rsp *http.Response) (*AppLogResponse, error) {
  9516. bodyBytes, err := io.ReadAll(rsp.Body)
  9517. defer func() { _ = rsp.Body.Close() }()
  9518. if err != nil {
  9519. return nil, err
  9520. }
  9521. response := &AppLogResponse{
  9522. Body: bodyBytes,
  9523. HTTPResponse: rsp,
  9524. }
  9525. switch {
  9526. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9527. var dest bool
  9528. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9529. return nil, err
  9530. }
  9531. response.JSON200 = &dest
  9532. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9533. var dest BadRequestError
  9534. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9535. return nil, err
  9536. }
  9537. response.JSON400 = &dest
  9538. }
  9539. return response, nil
  9540. }
  9541. // ParseLspStatusResponse parses an HTTP response from a LspStatusWithResponse call
  9542. func ParseLspStatusResponse(rsp *http.Response) (*LspStatusResponse, error) {
  9543. bodyBytes, err := io.ReadAll(rsp.Body)
  9544. defer func() { _ = rsp.Body.Close() }()
  9545. if err != nil {
  9546. return nil, err
  9547. }
  9548. response := &LspStatusResponse{
  9549. Body: bodyBytes,
  9550. HTTPResponse: rsp,
  9551. }
  9552. switch {
  9553. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9554. var dest []LSPStatus
  9555. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9556. return nil, err
  9557. }
  9558. response.JSON200 = &dest
  9559. }
  9560. return response, nil
  9561. }
  9562. // ParseMcpStatusResponse parses an HTTP response from a McpStatusWithResponse call
  9563. func ParseMcpStatusResponse(rsp *http.Response) (*McpStatusResponse, error) {
  9564. bodyBytes, err := io.ReadAll(rsp.Body)
  9565. defer func() { _ = rsp.Body.Close() }()
  9566. if err != nil {
  9567. return nil, err
  9568. }
  9569. response := &McpStatusResponse{
  9570. Body: bodyBytes,
  9571. HTTPResponse: rsp,
  9572. }
  9573. switch {
  9574. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9575. var dest map[string]MCPStatus
  9576. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9577. return nil, err
  9578. }
  9579. response.JSON200 = &dest
  9580. }
  9581. return response, nil
  9582. }
  9583. // ParseMcpAddResponse parses an HTTP response from a McpAddWithResponse call
  9584. func ParseMcpAddResponse(rsp *http.Response) (*McpAddResponse, error) {
  9585. bodyBytes, err := io.ReadAll(rsp.Body)
  9586. defer func() { _ = rsp.Body.Close() }()
  9587. if err != nil {
  9588. return nil, err
  9589. }
  9590. response := &McpAddResponse{
  9591. Body: bodyBytes,
  9592. HTTPResponse: rsp,
  9593. }
  9594. switch {
  9595. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9596. var dest map[string]MCPStatus
  9597. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9598. return nil, err
  9599. }
  9600. response.JSON200 = &dest
  9601. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9602. var dest BadRequestError
  9603. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9604. return nil, err
  9605. }
  9606. response.JSON400 = &dest
  9607. }
  9608. return response, nil
  9609. }
  9610. // ParseMcpAuthRemoveResponse parses an HTTP response from a McpAuthRemoveWithResponse call
  9611. func ParseMcpAuthRemoveResponse(rsp *http.Response) (*McpAuthRemoveResponse, error) {
  9612. bodyBytes, err := io.ReadAll(rsp.Body)
  9613. defer func() { _ = rsp.Body.Close() }()
  9614. if err != nil {
  9615. return nil, err
  9616. }
  9617. response := &McpAuthRemoveResponse{
  9618. Body: bodyBytes,
  9619. HTTPResponse: rsp,
  9620. }
  9621. switch {
  9622. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9623. var dest struct {
  9624. Success bool `json:"success"`
  9625. }
  9626. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9627. return nil, err
  9628. }
  9629. response.JSON200 = &dest
  9630. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9631. var dest NotFoundError
  9632. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9633. return nil, err
  9634. }
  9635. response.JSON404 = &dest
  9636. }
  9637. return response, nil
  9638. }
  9639. // ParseMcpAuthStartResponse parses an HTTP response from a McpAuthStartWithResponse call
  9640. func ParseMcpAuthStartResponse(rsp *http.Response) (*McpAuthStartResponse, error) {
  9641. bodyBytes, err := io.ReadAll(rsp.Body)
  9642. defer func() { _ = rsp.Body.Close() }()
  9643. if err != nil {
  9644. return nil, err
  9645. }
  9646. response := &McpAuthStartResponse{
  9647. Body: bodyBytes,
  9648. HTTPResponse: rsp,
  9649. }
  9650. switch {
  9651. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9652. var dest struct {
  9653. // AuthorizationUrl URL to open in browser for authorization
  9654. AuthorizationUrl string `json:"authorizationUrl"`
  9655. }
  9656. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9657. return nil, err
  9658. }
  9659. response.JSON200 = &dest
  9660. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9661. var dest BadRequestError
  9662. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9663. return nil, err
  9664. }
  9665. response.JSON400 = &dest
  9666. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9667. var dest NotFoundError
  9668. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9669. return nil, err
  9670. }
  9671. response.JSON404 = &dest
  9672. }
  9673. return response, nil
  9674. }
  9675. // ParseMcpAuthAuthenticateResponse parses an HTTP response from a McpAuthAuthenticateWithResponse call
  9676. func ParseMcpAuthAuthenticateResponse(rsp *http.Response) (*McpAuthAuthenticateResponse, error) {
  9677. bodyBytes, err := io.ReadAll(rsp.Body)
  9678. defer func() { _ = rsp.Body.Close() }()
  9679. if err != nil {
  9680. return nil, err
  9681. }
  9682. response := &McpAuthAuthenticateResponse{
  9683. Body: bodyBytes,
  9684. HTTPResponse: rsp,
  9685. }
  9686. switch {
  9687. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9688. var dest MCPStatus
  9689. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9690. return nil, err
  9691. }
  9692. response.JSON200 = &dest
  9693. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9694. var dest BadRequestError
  9695. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9696. return nil, err
  9697. }
  9698. response.JSON400 = &dest
  9699. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9700. var dest NotFoundError
  9701. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9702. return nil, err
  9703. }
  9704. response.JSON404 = &dest
  9705. }
  9706. return response, nil
  9707. }
  9708. // ParseMcpAuthCallbackResponse parses an HTTP response from a McpAuthCallbackWithResponse call
  9709. func ParseMcpAuthCallbackResponse(rsp *http.Response) (*McpAuthCallbackResponse, error) {
  9710. bodyBytes, err := io.ReadAll(rsp.Body)
  9711. defer func() { _ = rsp.Body.Close() }()
  9712. if err != nil {
  9713. return nil, err
  9714. }
  9715. response := &McpAuthCallbackResponse{
  9716. Body: bodyBytes,
  9717. HTTPResponse: rsp,
  9718. }
  9719. switch {
  9720. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9721. var dest MCPStatus
  9722. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9723. return nil, err
  9724. }
  9725. response.JSON200 = &dest
  9726. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9727. var dest BadRequestError
  9728. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9729. return nil, err
  9730. }
  9731. response.JSON400 = &dest
  9732. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9733. var dest NotFoundError
  9734. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9735. return nil, err
  9736. }
  9737. response.JSON404 = &dest
  9738. }
  9739. return response, nil
  9740. }
  9741. // ParseMcpConnectResponse parses an HTTP response from a McpConnectWithResponse call
  9742. func ParseMcpConnectResponse(rsp *http.Response) (*McpConnectResponse, error) {
  9743. bodyBytes, err := io.ReadAll(rsp.Body)
  9744. defer func() { _ = rsp.Body.Close() }()
  9745. if err != nil {
  9746. return nil, err
  9747. }
  9748. response := &McpConnectResponse{
  9749. Body: bodyBytes,
  9750. HTTPResponse: rsp,
  9751. }
  9752. switch {
  9753. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9754. var dest bool
  9755. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9756. return nil, err
  9757. }
  9758. response.JSON200 = &dest
  9759. }
  9760. return response, nil
  9761. }
  9762. // ParseMcpDisconnectResponse parses an HTTP response from a McpDisconnectWithResponse call
  9763. func ParseMcpDisconnectResponse(rsp *http.Response) (*McpDisconnectResponse, error) {
  9764. bodyBytes, err := io.ReadAll(rsp.Body)
  9765. defer func() { _ = rsp.Body.Close() }()
  9766. if err != nil {
  9767. return nil, err
  9768. }
  9769. response := &McpDisconnectResponse{
  9770. Body: bodyBytes,
  9771. HTTPResponse: rsp,
  9772. }
  9773. switch {
  9774. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9775. var dest bool
  9776. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9777. return nil, err
  9778. }
  9779. response.JSON200 = &dest
  9780. }
  9781. return response, nil
  9782. }
  9783. // ParsePathGetResponse parses an HTTP response from a PathGetWithResponse call
  9784. func ParsePathGetResponse(rsp *http.Response) (*PathGetResponse, error) {
  9785. bodyBytes, err := io.ReadAll(rsp.Body)
  9786. defer func() { _ = rsp.Body.Close() }()
  9787. if err != nil {
  9788. return nil, err
  9789. }
  9790. response := &PathGetResponse{
  9791. Body: bodyBytes,
  9792. HTTPResponse: rsp,
  9793. }
  9794. switch {
  9795. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9796. var dest Path
  9797. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9798. return nil, err
  9799. }
  9800. response.JSON200 = &dest
  9801. }
  9802. return response, nil
  9803. }
  9804. // ParsePermissionListResponse parses an HTTP response from a PermissionListWithResponse call
  9805. func ParsePermissionListResponse(rsp *http.Response) (*PermissionListResponse, error) {
  9806. bodyBytes, err := io.ReadAll(rsp.Body)
  9807. defer func() { _ = rsp.Body.Close() }()
  9808. if err != nil {
  9809. return nil, err
  9810. }
  9811. response := &PermissionListResponse{
  9812. Body: bodyBytes,
  9813. HTTPResponse: rsp,
  9814. }
  9815. switch {
  9816. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9817. var dest []PermissionRequest
  9818. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9819. return nil, err
  9820. }
  9821. response.JSON200 = &dest
  9822. }
  9823. return response, nil
  9824. }
  9825. // ParsePermissionReplyResponse parses an HTTP response from a PermissionReplyWithResponse call
  9826. func ParsePermissionReplyResponse(rsp *http.Response) (*PermissionReplyResponse, error) {
  9827. bodyBytes, err := io.ReadAll(rsp.Body)
  9828. defer func() { _ = rsp.Body.Close() }()
  9829. if err != nil {
  9830. return nil, err
  9831. }
  9832. response := &PermissionReplyResponse{
  9833. Body: bodyBytes,
  9834. HTTPResponse: rsp,
  9835. }
  9836. switch {
  9837. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9838. var dest bool
  9839. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9840. return nil, err
  9841. }
  9842. response.JSON200 = &dest
  9843. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9844. var dest BadRequestError
  9845. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9846. return nil, err
  9847. }
  9848. response.JSON400 = &dest
  9849. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9850. var dest NotFoundError
  9851. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9852. return nil, err
  9853. }
  9854. response.JSON404 = &dest
  9855. }
  9856. return response, nil
  9857. }
  9858. // ParseProjectListResponse parses an HTTP response from a ProjectListWithResponse call
  9859. func ParseProjectListResponse(rsp *http.Response) (*ProjectListResponse, error) {
  9860. bodyBytes, err := io.ReadAll(rsp.Body)
  9861. defer func() { _ = rsp.Body.Close() }()
  9862. if err != nil {
  9863. return nil, err
  9864. }
  9865. response := &ProjectListResponse{
  9866. Body: bodyBytes,
  9867. HTTPResponse: rsp,
  9868. }
  9869. switch {
  9870. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9871. var dest []Project
  9872. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9873. return nil, err
  9874. }
  9875. response.JSON200 = &dest
  9876. }
  9877. return response, nil
  9878. }
  9879. // ParseProjectCurrentResponse parses an HTTP response from a ProjectCurrentWithResponse call
  9880. func ParseProjectCurrentResponse(rsp *http.Response) (*ProjectCurrentResponse, error) {
  9881. bodyBytes, err := io.ReadAll(rsp.Body)
  9882. defer func() { _ = rsp.Body.Close() }()
  9883. if err != nil {
  9884. return nil, err
  9885. }
  9886. response := &ProjectCurrentResponse{
  9887. Body: bodyBytes,
  9888. HTTPResponse: rsp,
  9889. }
  9890. switch {
  9891. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9892. var dest Project
  9893. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9894. return nil, err
  9895. }
  9896. response.JSON200 = &dest
  9897. }
  9898. return response, nil
  9899. }
  9900. // ParseProjectUpdateResponse parses an HTTP response from a ProjectUpdateWithResponse call
  9901. func ParseProjectUpdateResponse(rsp *http.Response) (*ProjectUpdateResponse, error) {
  9902. bodyBytes, err := io.ReadAll(rsp.Body)
  9903. defer func() { _ = rsp.Body.Close() }()
  9904. if err != nil {
  9905. return nil, err
  9906. }
  9907. response := &ProjectUpdateResponse{
  9908. Body: bodyBytes,
  9909. HTTPResponse: rsp,
  9910. }
  9911. switch {
  9912. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9913. var dest Project
  9914. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9915. return nil, err
  9916. }
  9917. response.JSON200 = &dest
  9918. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9919. var dest BadRequestError
  9920. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9921. return nil, err
  9922. }
  9923. response.JSON400 = &dest
  9924. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9925. var dest NotFoundError
  9926. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9927. return nil, err
  9928. }
  9929. response.JSON404 = &dest
  9930. }
  9931. return response, nil
  9932. }
  9933. // ParseProviderListResponse parses an HTTP response from a ProviderListWithResponse call
  9934. func ParseProviderListResponse(rsp *http.Response) (*ProviderListResponse, error) {
  9935. bodyBytes, err := io.ReadAll(rsp.Body)
  9936. defer func() { _ = rsp.Body.Close() }()
  9937. if err != nil {
  9938. return nil, err
  9939. }
  9940. response := &ProviderListResponse{
  9941. Body: bodyBytes,
  9942. HTTPResponse: rsp,
  9943. }
  9944. switch {
  9945. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9946. var dest struct {
  9947. All []struct {
  9948. Api *string `json:"api,omitempty"`
  9949. Env []string `json:"env"`
  9950. Id string `json:"id"`
  9951. Models map[string]struct {
  9952. Attachment bool `json:"attachment"`
  9953. Cost *struct {
  9954. CacheRead *float32 `json:"cache_read,omitempty"`
  9955. CacheWrite *float32 `json:"cache_write,omitempty"`
  9956. ContextOver200k *struct {
  9957. CacheRead *float32 `json:"cache_read,omitempty"`
  9958. CacheWrite *float32 `json:"cache_write,omitempty"`
  9959. Input float32 `json:"input"`
  9960. Output float32 `json:"output"`
  9961. } `json:"context_over_200k,omitempty"`
  9962. Input float32 `json:"input"`
  9963. Output float32 `json:"output"`
  9964. } `json:"cost,omitempty"`
  9965. Experimental *bool `json:"experimental,omitempty"`
  9966. Family *string `json:"family,omitempty"`
  9967. Headers *map[string]string `json:"headers,omitempty"`
  9968. Id string `json:"id"`
  9969. Interleaved *ProviderList_200_All_Models_Interleaved `json:"interleaved,omitempty"`
  9970. Limit struct {
  9971. Context float32 `json:"context"`
  9972. Input *float32 `json:"input,omitempty"`
  9973. Output float32 `json:"output"`
  9974. } `json:"limit"`
  9975. Modalities *struct {
  9976. Input []ProviderList200AllModelsModalitiesInput `json:"input"`
  9977. Output []ProviderList200AllModelsModalitiesOutput `json:"output"`
  9978. } `json:"modalities,omitempty"`
  9979. Name string `json:"name"`
  9980. Options map[string]interface{} `json:"options"`
  9981. Provider *struct {
  9982. Npm string `json:"npm"`
  9983. } `json:"provider,omitempty"`
  9984. Reasoning bool `json:"reasoning"`
  9985. ReleaseDate string `json:"release_date"`
  9986. Status *ProviderList200AllModelsStatus `json:"status,omitempty"`
  9987. Temperature bool `json:"temperature"`
  9988. ToolCall bool `json:"tool_call"`
  9989. Variants *map[string]map[string]interface{} `json:"variants,omitempty"`
  9990. } `json:"models"`
  9991. Name string `json:"name"`
  9992. Npm *string `json:"npm,omitempty"`
  9993. } `json:"all"`
  9994. Connected []string `json:"connected"`
  9995. Default map[string]string `json:"default"`
  9996. }
  9997. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9998. return nil, err
  9999. }
  10000. response.JSON200 = &dest
  10001. }
  10002. return response, nil
  10003. }
  10004. // ParseProviderAuthResponse parses an HTTP response from a ProviderAuthWithResponse call
  10005. func ParseProviderAuthResponse(rsp *http.Response) (*ProviderAuthResponse, error) {
  10006. bodyBytes, err := io.ReadAll(rsp.Body)
  10007. defer func() { _ = rsp.Body.Close() }()
  10008. if err != nil {
  10009. return nil, err
  10010. }
  10011. response := &ProviderAuthResponse{
  10012. Body: bodyBytes,
  10013. HTTPResponse: rsp,
  10014. }
  10015. switch {
  10016. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10017. var dest map[string][]ProviderAuthMethod
  10018. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10019. return nil, err
  10020. }
  10021. response.JSON200 = &dest
  10022. }
  10023. return response, nil
  10024. }
  10025. // ParseProviderOauthAuthorizeResponse parses an HTTP response from a ProviderOauthAuthorizeWithResponse call
  10026. func ParseProviderOauthAuthorizeResponse(rsp *http.Response) (*ProviderOauthAuthorizeResponse, error) {
  10027. bodyBytes, err := io.ReadAll(rsp.Body)
  10028. defer func() { _ = rsp.Body.Close() }()
  10029. if err != nil {
  10030. return nil, err
  10031. }
  10032. response := &ProviderOauthAuthorizeResponse{
  10033. Body: bodyBytes,
  10034. HTTPResponse: rsp,
  10035. }
  10036. switch {
  10037. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10038. var dest ProviderAuthAuthorization
  10039. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10040. return nil, err
  10041. }
  10042. response.JSON200 = &dest
  10043. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10044. var dest BadRequestError
  10045. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10046. return nil, err
  10047. }
  10048. response.JSON400 = &dest
  10049. }
  10050. return response, nil
  10051. }
  10052. // ParseProviderOauthCallbackResponse parses an HTTP response from a ProviderOauthCallbackWithResponse call
  10053. func ParseProviderOauthCallbackResponse(rsp *http.Response) (*ProviderOauthCallbackResponse, error) {
  10054. bodyBytes, err := io.ReadAll(rsp.Body)
  10055. defer func() { _ = rsp.Body.Close() }()
  10056. if err != nil {
  10057. return nil, err
  10058. }
  10059. response := &ProviderOauthCallbackResponse{
  10060. Body: bodyBytes,
  10061. HTTPResponse: rsp,
  10062. }
  10063. switch {
  10064. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10065. var dest bool
  10066. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10067. return nil, err
  10068. }
  10069. response.JSON200 = &dest
  10070. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10071. var dest BadRequestError
  10072. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10073. return nil, err
  10074. }
  10075. response.JSON400 = &dest
  10076. }
  10077. return response, nil
  10078. }
  10079. // ParsePtyListResponse parses an HTTP response from a PtyListWithResponse call
  10080. func ParsePtyListResponse(rsp *http.Response) (*PtyListResponse, error) {
  10081. bodyBytes, err := io.ReadAll(rsp.Body)
  10082. defer func() { _ = rsp.Body.Close() }()
  10083. if err != nil {
  10084. return nil, err
  10085. }
  10086. response := &PtyListResponse{
  10087. Body: bodyBytes,
  10088. HTTPResponse: rsp,
  10089. }
  10090. switch {
  10091. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10092. var dest []Pty
  10093. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10094. return nil, err
  10095. }
  10096. response.JSON200 = &dest
  10097. }
  10098. return response, nil
  10099. }
  10100. // ParsePtyCreateResponse parses an HTTP response from a PtyCreateWithResponse call
  10101. func ParsePtyCreateResponse(rsp *http.Response) (*PtyCreateResponse, error) {
  10102. bodyBytes, err := io.ReadAll(rsp.Body)
  10103. defer func() { _ = rsp.Body.Close() }()
  10104. if err != nil {
  10105. return nil, err
  10106. }
  10107. response := &PtyCreateResponse{
  10108. Body: bodyBytes,
  10109. HTTPResponse: rsp,
  10110. }
  10111. switch {
  10112. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10113. var dest Pty
  10114. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10115. return nil, err
  10116. }
  10117. response.JSON200 = &dest
  10118. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10119. var dest BadRequestError
  10120. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10121. return nil, err
  10122. }
  10123. response.JSON400 = &dest
  10124. }
  10125. return response, nil
  10126. }
  10127. // ParsePtyRemoveResponse parses an HTTP response from a PtyRemoveWithResponse call
  10128. func ParsePtyRemoveResponse(rsp *http.Response) (*PtyRemoveResponse, error) {
  10129. bodyBytes, err := io.ReadAll(rsp.Body)
  10130. defer func() { _ = rsp.Body.Close() }()
  10131. if err != nil {
  10132. return nil, err
  10133. }
  10134. response := &PtyRemoveResponse{
  10135. Body: bodyBytes,
  10136. HTTPResponse: rsp,
  10137. }
  10138. switch {
  10139. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10140. var dest bool
  10141. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10142. return nil, err
  10143. }
  10144. response.JSON200 = &dest
  10145. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10146. var dest NotFoundError
  10147. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10148. return nil, err
  10149. }
  10150. response.JSON404 = &dest
  10151. }
  10152. return response, nil
  10153. }
  10154. // ParsePtyGetResponse parses an HTTP response from a PtyGetWithResponse call
  10155. func ParsePtyGetResponse(rsp *http.Response) (*PtyGetResponse, error) {
  10156. bodyBytes, err := io.ReadAll(rsp.Body)
  10157. defer func() { _ = rsp.Body.Close() }()
  10158. if err != nil {
  10159. return nil, err
  10160. }
  10161. response := &PtyGetResponse{
  10162. Body: bodyBytes,
  10163. HTTPResponse: rsp,
  10164. }
  10165. switch {
  10166. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10167. var dest Pty
  10168. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10169. return nil, err
  10170. }
  10171. response.JSON200 = &dest
  10172. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10173. var dest NotFoundError
  10174. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10175. return nil, err
  10176. }
  10177. response.JSON404 = &dest
  10178. }
  10179. return response, nil
  10180. }
  10181. // ParsePtyUpdateResponse parses an HTTP response from a PtyUpdateWithResponse call
  10182. func ParsePtyUpdateResponse(rsp *http.Response) (*PtyUpdateResponse, error) {
  10183. bodyBytes, err := io.ReadAll(rsp.Body)
  10184. defer func() { _ = rsp.Body.Close() }()
  10185. if err != nil {
  10186. return nil, err
  10187. }
  10188. response := &PtyUpdateResponse{
  10189. Body: bodyBytes,
  10190. HTTPResponse: rsp,
  10191. }
  10192. switch {
  10193. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10194. var dest Pty
  10195. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10196. return nil, err
  10197. }
  10198. response.JSON200 = &dest
  10199. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10200. var dest BadRequestError
  10201. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10202. return nil, err
  10203. }
  10204. response.JSON400 = &dest
  10205. }
  10206. return response, nil
  10207. }
  10208. // ParsePtyConnectResponse parses an HTTP response from a PtyConnectWithResponse call
  10209. func ParsePtyConnectResponse(rsp *http.Response) (*PtyConnectResponse, error) {
  10210. bodyBytes, err := io.ReadAll(rsp.Body)
  10211. defer func() { _ = rsp.Body.Close() }()
  10212. if err != nil {
  10213. return nil, err
  10214. }
  10215. response := &PtyConnectResponse{
  10216. Body: bodyBytes,
  10217. HTTPResponse: rsp,
  10218. }
  10219. switch {
  10220. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10221. var dest bool
  10222. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10223. return nil, err
  10224. }
  10225. response.JSON200 = &dest
  10226. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10227. var dest NotFoundError
  10228. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10229. return nil, err
  10230. }
  10231. response.JSON404 = &dest
  10232. }
  10233. return response, nil
  10234. }
  10235. // ParseQuestionListResponse parses an HTTP response from a QuestionListWithResponse call
  10236. func ParseQuestionListResponse(rsp *http.Response) (*QuestionListResponse, error) {
  10237. bodyBytes, err := io.ReadAll(rsp.Body)
  10238. defer func() { _ = rsp.Body.Close() }()
  10239. if err != nil {
  10240. return nil, err
  10241. }
  10242. response := &QuestionListResponse{
  10243. Body: bodyBytes,
  10244. HTTPResponse: rsp,
  10245. }
  10246. switch {
  10247. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10248. var dest []QuestionRequest
  10249. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10250. return nil, err
  10251. }
  10252. response.JSON200 = &dest
  10253. }
  10254. return response, nil
  10255. }
  10256. // ParseQuestionRejectResponse parses an HTTP response from a QuestionRejectWithResponse call
  10257. func ParseQuestionRejectResponse(rsp *http.Response) (*QuestionRejectResponse, error) {
  10258. bodyBytes, err := io.ReadAll(rsp.Body)
  10259. defer func() { _ = rsp.Body.Close() }()
  10260. if err != nil {
  10261. return nil, err
  10262. }
  10263. response := &QuestionRejectResponse{
  10264. Body: bodyBytes,
  10265. HTTPResponse: rsp,
  10266. }
  10267. switch {
  10268. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10269. var dest bool
  10270. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10271. return nil, err
  10272. }
  10273. response.JSON200 = &dest
  10274. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10275. var dest BadRequestError
  10276. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10277. return nil, err
  10278. }
  10279. response.JSON400 = &dest
  10280. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10281. var dest NotFoundError
  10282. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10283. return nil, err
  10284. }
  10285. response.JSON404 = &dest
  10286. }
  10287. return response, nil
  10288. }
  10289. // ParseQuestionReplyResponse parses an HTTP response from a QuestionReplyWithResponse call
  10290. func ParseQuestionReplyResponse(rsp *http.Response) (*QuestionReplyResponse, error) {
  10291. bodyBytes, err := io.ReadAll(rsp.Body)
  10292. defer func() { _ = rsp.Body.Close() }()
  10293. if err != nil {
  10294. return nil, err
  10295. }
  10296. response := &QuestionReplyResponse{
  10297. Body: bodyBytes,
  10298. HTTPResponse: rsp,
  10299. }
  10300. switch {
  10301. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10302. var dest bool
  10303. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10304. return nil, err
  10305. }
  10306. response.JSON200 = &dest
  10307. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10308. var dest BadRequestError
  10309. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10310. return nil, err
  10311. }
  10312. response.JSON400 = &dest
  10313. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10314. var dest NotFoundError
  10315. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10316. return nil, err
  10317. }
  10318. response.JSON404 = &dest
  10319. }
  10320. return response, nil
  10321. }
  10322. // ParseSessionListResponse parses an HTTP response from a SessionListWithResponse call
  10323. func ParseSessionListResponse(rsp *http.Response) (*SessionListResponse, error) {
  10324. bodyBytes, err := io.ReadAll(rsp.Body)
  10325. defer func() { _ = rsp.Body.Close() }()
  10326. if err != nil {
  10327. return nil, err
  10328. }
  10329. response := &SessionListResponse{
  10330. Body: bodyBytes,
  10331. HTTPResponse: rsp,
  10332. }
  10333. switch {
  10334. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10335. var dest []Session
  10336. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10337. return nil, err
  10338. }
  10339. response.JSON200 = &dest
  10340. }
  10341. return response, nil
  10342. }
  10343. // ParseSessionCreateResponse parses an HTTP response from a SessionCreateWithResponse call
  10344. func ParseSessionCreateResponse(rsp *http.Response) (*SessionCreateResponse, error) {
  10345. bodyBytes, err := io.ReadAll(rsp.Body)
  10346. defer func() { _ = rsp.Body.Close() }()
  10347. if err != nil {
  10348. return nil, err
  10349. }
  10350. response := &SessionCreateResponse{
  10351. Body: bodyBytes,
  10352. HTTPResponse: rsp,
  10353. }
  10354. switch {
  10355. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10356. var dest Session
  10357. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10358. return nil, err
  10359. }
  10360. response.JSON200 = &dest
  10361. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10362. var dest BadRequestError
  10363. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10364. return nil, err
  10365. }
  10366. response.JSON400 = &dest
  10367. }
  10368. return response, nil
  10369. }
  10370. // ParseSessionStatusResponse parses an HTTP response from a SessionStatusWithResponse call
  10371. func ParseSessionStatusResponse(rsp *http.Response) (*SessionStatusResponse, error) {
  10372. bodyBytes, err := io.ReadAll(rsp.Body)
  10373. defer func() { _ = rsp.Body.Close() }()
  10374. if err != nil {
  10375. return nil, err
  10376. }
  10377. response := &SessionStatusResponse{
  10378. Body: bodyBytes,
  10379. HTTPResponse: rsp,
  10380. }
  10381. switch {
  10382. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10383. var dest map[string]SessionStatus
  10384. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10385. return nil, err
  10386. }
  10387. response.JSON200 = &dest
  10388. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10389. var dest BadRequestError
  10390. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10391. return nil, err
  10392. }
  10393. response.JSON400 = &dest
  10394. }
  10395. return response, nil
  10396. }
  10397. // ParseSessionDeleteResponse parses an HTTP response from a SessionDeleteWithResponse call
  10398. func ParseSessionDeleteResponse(rsp *http.Response) (*SessionDeleteResponse, error) {
  10399. bodyBytes, err := io.ReadAll(rsp.Body)
  10400. defer func() { _ = rsp.Body.Close() }()
  10401. if err != nil {
  10402. return nil, err
  10403. }
  10404. response := &SessionDeleteResponse{
  10405. Body: bodyBytes,
  10406. HTTPResponse: rsp,
  10407. }
  10408. switch {
  10409. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10410. var dest bool
  10411. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10412. return nil, err
  10413. }
  10414. response.JSON200 = &dest
  10415. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10416. var dest BadRequestError
  10417. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10418. return nil, err
  10419. }
  10420. response.JSON400 = &dest
  10421. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10422. var dest NotFoundError
  10423. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10424. return nil, err
  10425. }
  10426. response.JSON404 = &dest
  10427. }
  10428. return response, nil
  10429. }
  10430. // ParseSessionGetResponse parses an HTTP response from a SessionGetWithResponse call
  10431. func ParseSessionGetResponse(rsp *http.Response) (*SessionGetResponse, error) {
  10432. bodyBytes, err := io.ReadAll(rsp.Body)
  10433. defer func() { _ = rsp.Body.Close() }()
  10434. if err != nil {
  10435. return nil, err
  10436. }
  10437. response := &SessionGetResponse{
  10438. Body: bodyBytes,
  10439. HTTPResponse: rsp,
  10440. }
  10441. switch {
  10442. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10443. var dest Session
  10444. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10445. return nil, err
  10446. }
  10447. response.JSON200 = &dest
  10448. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10449. var dest BadRequestError
  10450. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10451. return nil, err
  10452. }
  10453. response.JSON400 = &dest
  10454. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10455. var dest NotFoundError
  10456. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10457. return nil, err
  10458. }
  10459. response.JSON404 = &dest
  10460. }
  10461. return response, nil
  10462. }
  10463. // ParseSessionUpdateResponse parses an HTTP response from a SessionUpdateWithResponse call
  10464. func ParseSessionUpdateResponse(rsp *http.Response) (*SessionUpdateResponse, error) {
  10465. bodyBytes, err := io.ReadAll(rsp.Body)
  10466. defer func() { _ = rsp.Body.Close() }()
  10467. if err != nil {
  10468. return nil, err
  10469. }
  10470. response := &SessionUpdateResponse{
  10471. Body: bodyBytes,
  10472. HTTPResponse: rsp,
  10473. }
  10474. switch {
  10475. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10476. var dest Session
  10477. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10478. return nil, err
  10479. }
  10480. response.JSON200 = &dest
  10481. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10482. var dest BadRequestError
  10483. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10484. return nil, err
  10485. }
  10486. response.JSON400 = &dest
  10487. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10488. var dest NotFoundError
  10489. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10490. return nil, err
  10491. }
  10492. response.JSON404 = &dest
  10493. }
  10494. return response, nil
  10495. }
  10496. // ParseSessionAbortResponse parses an HTTP response from a SessionAbortWithResponse call
  10497. func ParseSessionAbortResponse(rsp *http.Response) (*SessionAbortResponse, error) {
  10498. bodyBytes, err := io.ReadAll(rsp.Body)
  10499. defer func() { _ = rsp.Body.Close() }()
  10500. if err != nil {
  10501. return nil, err
  10502. }
  10503. response := &SessionAbortResponse{
  10504. Body: bodyBytes,
  10505. HTTPResponse: rsp,
  10506. }
  10507. switch {
  10508. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10509. var dest bool
  10510. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10511. return nil, err
  10512. }
  10513. response.JSON200 = &dest
  10514. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10515. var dest BadRequestError
  10516. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10517. return nil, err
  10518. }
  10519. response.JSON400 = &dest
  10520. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10521. var dest NotFoundError
  10522. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10523. return nil, err
  10524. }
  10525. response.JSON404 = &dest
  10526. }
  10527. return response, nil
  10528. }
  10529. // ParseSessionChildrenResponse parses an HTTP response from a SessionChildrenWithResponse call
  10530. func ParseSessionChildrenResponse(rsp *http.Response) (*SessionChildrenResponse, error) {
  10531. bodyBytes, err := io.ReadAll(rsp.Body)
  10532. defer func() { _ = rsp.Body.Close() }()
  10533. if err != nil {
  10534. return nil, err
  10535. }
  10536. response := &SessionChildrenResponse{
  10537. Body: bodyBytes,
  10538. HTTPResponse: rsp,
  10539. }
  10540. switch {
  10541. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10542. var dest []Session
  10543. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10544. return nil, err
  10545. }
  10546. response.JSON200 = &dest
  10547. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10548. var dest BadRequestError
  10549. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10550. return nil, err
  10551. }
  10552. response.JSON400 = &dest
  10553. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10554. var dest NotFoundError
  10555. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10556. return nil, err
  10557. }
  10558. response.JSON404 = &dest
  10559. }
  10560. return response, nil
  10561. }
  10562. // ParseSessionCommandResponse parses an HTTP response from a SessionCommandWithResponse call
  10563. func ParseSessionCommandResponse(rsp *http.Response) (*SessionCommandResponse, error) {
  10564. bodyBytes, err := io.ReadAll(rsp.Body)
  10565. defer func() { _ = rsp.Body.Close() }()
  10566. if err != nil {
  10567. return nil, err
  10568. }
  10569. response := &SessionCommandResponse{
  10570. Body: bodyBytes,
  10571. HTTPResponse: rsp,
  10572. }
  10573. switch {
  10574. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10575. var dest struct {
  10576. Info AssistantMessage `json:"info"`
  10577. Parts []Part `json:"parts"`
  10578. }
  10579. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10580. return nil, err
  10581. }
  10582. response.JSON200 = &dest
  10583. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10584. var dest BadRequestError
  10585. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10586. return nil, err
  10587. }
  10588. response.JSON400 = &dest
  10589. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10590. var dest NotFoundError
  10591. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10592. return nil, err
  10593. }
  10594. response.JSON404 = &dest
  10595. }
  10596. return response, nil
  10597. }
  10598. // ParseSessionDiffResponse parses an HTTP response from a SessionDiffWithResponse call
  10599. func ParseSessionDiffResponse(rsp *http.Response) (*SessionDiffResponse, error) {
  10600. bodyBytes, err := io.ReadAll(rsp.Body)
  10601. defer func() { _ = rsp.Body.Close() }()
  10602. if err != nil {
  10603. return nil, err
  10604. }
  10605. response := &SessionDiffResponse{
  10606. Body: bodyBytes,
  10607. HTTPResponse: rsp,
  10608. }
  10609. switch {
  10610. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10611. var dest []FileDiff
  10612. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10613. return nil, err
  10614. }
  10615. response.JSON200 = &dest
  10616. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10617. var dest BadRequestError
  10618. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10619. return nil, err
  10620. }
  10621. response.JSON400 = &dest
  10622. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10623. var dest NotFoundError
  10624. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10625. return nil, err
  10626. }
  10627. response.JSON404 = &dest
  10628. }
  10629. return response, nil
  10630. }
  10631. // ParseSessionForkResponse parses an HTTP response from a SessionForkWithResponse call
  10632. func ParseSessionForkResponse(rsp *http.Response) (*SessionForkResponse, error) {
  10633. bodyBytes, err := io.ReadAll(rsp.Body)
  10634. defer func() { _ = rsp.Body.Close() }()
  10635. if err != nil {
  10636. return nil, err
  10637. }
  10638. response := &SessionForkResponse{
  10639. Body: bodyBytes,
  10640. HTTPResponse: rsp,
  10641. }
  10642. switch {
  10643. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10644. var dest Session
  10645. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10646. return nil, err
  10647. }
  10648. response.JSON200 = &dest
  10649. }
  10650. return response, nil
  10651. }
  10652. // ParseSessionInitResponse parses an HTTP response from a SessionInitWithResponse call
  10653. func ParseSessionInitResponse(rsp *http.Response) (*SessionInitResponse, error) {
  10654. bodyBytes, err := io.ReadAll(rsp.Body)
  10655. defer func() { _ = rsp.Body.Close() }()
  10656. if err != nil {
  10657. return nil, err
  10658. }
  10659. response := &SessionInitResponse{
  10660. Body: bodyBytes,
  10661. HTTPResponse: rsp,
  10662. }
  10663. switch {
  10664. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10665. var dest bool
  10666. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10667. return nil, err
  10668. }
  10669. response.JSON200 = &dest
  10670. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10671. var dest BadRequestError
  10672. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10673. return nil, err
  10674. }
  10675. response.JSON400 = &dest
  10676. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10677. var dest NotFoundError
  10678. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10679. return nil, err
  10680. }
  10681. response.JSON404 = &dest
  10682. }
  10683. return response, nil
  10684. }
  10685. // ParseSessionMessagesResponse parses an HTTP response from a SessionMessagesWithResponse call
  10686. func ParseSessionMessagesResponse(rsp *http.Response) (*SessionMessagesResponse, error) {
  10687. bodyBytes, err := io.ReadAll(rsp.Body)
  10688. defer func() { _ = rsp.Body.Close() }()
  10689. if err != nil {
  10690. return nil, err
  10691. }
  10692. response := &SessionMessagesResponse{
  10693. Body: bodyBytes,
  10694. HTTPResponse: rsp,
  10695. }
  10696. switch {
  10697. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10698. var dest []struct {
  10699. Info Message `json:"info"`
  10700. Parts []Part `json:"parts"`
  10701. }
  10702. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10703. return nil, err
  10704. }
  10705. response.JSON200 = &dest
  10706. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10707. var dest BadRequestError
  10708. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10709. return nil, err
  10710. }
  10711. response.JSON400 = &dest
  10712. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10713. var dest NotFoundError
  10714. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10715. return nil, err
  10716. }
  10717. response.JSON404 = &dest
  10718. }
  10719. return response, nil
  10720. }
  10721. // ParseSessionPromptResponse parses an HTTP response from a SessionPromptWithResponse call
  10722. func ParseSessionPromptResponse(rsp *http.Response) (*SessionPromptResponse, error) {
  10723. bodyBytes, err := io.ReadAll(rsp.Body)
  10724. defer func() { _ = rsp.Body.Close() }()
  10725. if err != nil {
  10726. return nil, err
  10727. }
  10728. response := &SessionPromptResponse{
  10729. Body: bodyBytes,
  10730. HTTPResponse: rsp,
  10731. }
  10732. switch {
  10733. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10734. var dest struct {
  10735. Info AssistantMessage `json:"info"`
  10736. Parts []Part `json:"parts"`
  10737. }
  10738. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10739. return nil, err
  10740. }
  10741. response.JSON200 = &dest
  10742. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10743. var dest BadRequestError
  10744. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10745. return nil, err
  10746. }
  10747. response.JSON400 = &dest
  10748. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10749. var dest NotFoundError
  10750. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10751. return nil, err
  10752. }
  10753. response.JSON404 = &dest
  10754. }
  10755. return response, nil
  10756. }
  10757. // ParseSessionMessageResponse parses an HTTP response from a SessionMessageWithResponse call
  10758. func ParseSessionMessageResponse(rsp *http.Response) (*SessionMessageResponse, error) {
  10759. bodyBytes, err := io.ReadAll(rsp.Body)
  10760. defer func() { _ = rsp.Body.Close() }()
  10761. if err != nil {
  10762. return nil, err
  10763. }
  10764. response := &SessionMessageResponse{
  10765. Body: bodyBytes,
  10766. HTTPResponse: rsp,
  10767. }
  10768. switch {
  10769. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10770. var dest struct {
  10771. Info Message `json:"info"`
  10772. Parts []Part `json:"parts"`
  10773. }
  10774. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10775. return nil, err
  10776. }
  10777. response.JSON200 = &dest
  10778. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10779. var dest BadRequestError
  10780. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10781. return nil, err
  10782. }
  10783. response.JSON400 = &dest
  10784. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10785. var dest NotFoundError
  10786. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10787. return nil, err
  10788. }
  10789. response.JSON404 = &dest
  10790. }
  10791. return response, nil
  10792. }
  10793. // ParsePartDeleteResponse parses an HTTP response from a PartDeleteWithResponse call
  10794. func ParsePartDeleteResponse(rsp *http.Response) (*PartDeleteResponse, error) {
  10795. bodyBytes, err := io.ReadAll(rsp.Body)
  10796. defer func() { _ = rsp.Body.Close() }()
  10797. if err != nil {
  10798. return nil, err
  10799. }
  10800. response := &PartDeleteResponse{
  10801. Body: bodyBytes,
  10802. HTTPResponse: rsp,
  10803. }
  10804. switch {
  10805. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10806. var dest bool
  10807. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10808. return nil, err
  10809. }
  10810. response.JSON200 = &dest
  10811. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10812. var dest BadRequestError
  10813. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10814. return nil, err
  10815. }
  10816. response.JSON400 = &dest
  10817. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10818. var dest NotFoundError
  10819. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10820. return nil, err
  10821. }
  10822. response.JSON404 = &dest
  10823. }
  10824. return response, nil
  10825. }
  10826. // ParsePartUpdateResponse parses an HTTP response from a PartUpdateWithResponse call
  10827. func ParsePartUpdateResponse(rsp *http.Response) (*PartUpdateResponse, error) {
  10828. bodyBytes, err := io.ReadAll(rsp.Body)
  10829. defer func() { _ = rsp.Body.Close() }()
  10830. if err != nil {
  10831. return nil, err
  10832. }
  10833. response := &PartUpdateResponse{
  10834. Body: bodyBytes,
  10835. HTTPResponse: rsp,
  10836. }
  10837. switch {
  10838. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10839. var dest Part
  10840. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10841. return nil, err
  10842. }
  10843. response.JSON200 = &dest
  10844. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10845. var dest BadRequestError
  10846. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10847. return nil, err
  10848. }
  10849. response.JSON400 = &dest
  10850. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10851. var dest NotFoundError
  10852. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10853. return nil, err
  10854. }
  10855. response.JSON404 = &dest
  10856. }
  10857. return response, nil
  10858. }
  10859. // ParsePermissionRespondResponse parses an HTTP response from a PermissionRespondWithResponse call
  10860. func ParsePermissionRespondResponse(rsp *http.Response) (*PermissionRespondResponse, error) {
  10861. bodyBytes, err := io.ReadAll(rsp.Body)
  10862. defer func() { _ = rsp.Body.Close() }()
  10863. if err != nil {
  10864. return nil, err
  10865. }
  10866. response := &PermissionRespondResponse{
  10867. Body: bodyBytes,
  10868. HTTPResponse: rsp,
  10869. }
  10870. switch {
  10871. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10872. var dest bool
  10873. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10874. return nil, err
  10875. }
  10876. response.JSON200 = &dest
  10877. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10878. var dest BadRequestError
  10879. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10880. return nil, err
  10881. }
  10882. response.JSON400 = &dest
  10883. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10884. var dest NotFoundError
  10885. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10886. return nil, err
  10887. }
  10888. response.JSON404 = &dest
  10889. }
  10890. return response, nil
  10891. }
  10892. // ParseSessionPromptAsyncResponse parses an HTTP response from a SessionPromptAsyncWithResponse call
  10893. func ParseSessionPromptAsyncResponse(rsp *http.Response) (*SessionPromptAsyncResponse, error) {
  10894. bodyBytes, err := io.ReadAll(rsp.Body)
  10895. defer func() { _ = rsp.Body.Close() }()
  10896. if err != nil {
  10897. return nil, err
  10898. }
  10899. response := &SessionPromptAsyncResponse{
  10900. Body: bodyBytes,
  10901. HTTPResponse: rsp,
  10902. }
  10903. switch {
  10904. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10905. var dest BadRequestError
  10906. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10907. return nil, err
  10908. }
  10909. response.JSON400 = &dest
  10910. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10911. var dest NotFoundError
  10912. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10913. return nil, err
  10914. }
  10915. response.JSON404 = &dest
  10916. }
  10917. return response, nil
  10918. }
  10919. // ParseSessionRevertResponse parses an HTTP response from a SessionRevertWithResponse call
  10920. func ParseSessionRevertResponse(rsp *http.Response) (*SessionRevertResponse, error) {
  10921. bodyBytes, err := io.ReadAll(rsp.Body)
  10922. defer func() { _ = rsp.Body.Close() }()
  10923. if err != nil {
  10924. return nil, err
  10925. }
  10926. response := &SessionRevertResponse{
  10927. Body: bodyBytes,
  10928. HTTPResponse: rsp,
  10929. }
  10930. switch {
  10931. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10932. var dest Session
  10933. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10934. return nil, err
  10935. }
  10936. response.JSON200 = &dest
  10937. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10938. var dest BadRequestError
  10939. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10940. return nil, err
  10941. }
  10942. response.JSON400 = &dest
  10943. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10944. var dest NotFoundError
  10945. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10946. return nil, err
  10947. }
  10948. response.JSON404 = &dest
  10949. }
  10950. return response, nil
  10951. }
  10952. // ParseSessionUnshareResponse parses an HTTP response from a SessionUnshareWithResponse call
  10953. func ParseSessionUnshareResponse(rsp *http.Response) (*SessionUnshareResponse, error) {
  10954. bodyBytes, err := io.ReadAll(rsp.Body)
  10955. defer func() { _ = rsp.Body.Close() }()
  10956. if err != nil {
  10957. return nil, err
  10958. }
  10959. response := &SessionUnshareResponse{
  10960. Body: bodyBytes,
  10961. HTTPResponse: rsp,
  10962. }
  10963. switch {
  10964. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10965. var dest Session
  10966. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10967. return nil, err
  10968. }
  10969. response.JSON200 = &dest
  10970. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10971. var dest BadRequestError
  10972. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10973. return nil, err
  10974. }
  10975. response.JSON400 = &dest
  10976. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10977. var dest NotFoundError
  10978. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10979. return nil, err
  10980. }
  10981. response.JSON404 = &dest
  10982. }
  10983. return response, nil
  10984. }
  10985. // ParseSessionShareResponse parses an HTTP response from a SessionShareWithResponse call
  10986. func ParseSessionShareResponse(rsp *http.Response) (*SessionShareResponse, error) {
  10987. bodyBytes, err := io.ReadAll(rsp.Body)
  10988. defer func() { _ = rsp.Body.Close() }()
  10989. if err != nil {
  10990. return nil, err
  10991. }
  10992. response := &SessionShareResponse{
  10993. Body: bodyBytes,
  10994. HTTPResponse: rsp,
  10995. }
  10996. switch {
  10997. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10998. var dest Session
  10999. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11000. return nil, err
  11001. }
  11002. response.JSON200 = &dest
  11003. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11004. var dest BadRequestError
  11005. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11006. return nil, err
  11007. }
  11008. response.JSON400 = &dest
  11009. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11010. var dest NotFoundError
  11011. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11012. return nil, err
  11013. }
  11014. response.JSON404 = &dest
  11015. }
  11016. return response, nil
  11017. }
  11018. // ParseSessionShellResponse parses an HTTP response from a SessionShellWithResponse call
  11019. func ParseSessionShellResponse(rsp *http.Response) (*SessionShellResponse, error) {
  11020. bodyBytes, err := io.ReadAll(rsp.Body)
  11021. defer func() { _ = rsp.Body.Close() }()
  11022. if err != nil {
  11023. return nil, err
  11024. }
  11025. response := &SessionShellResponse{
  11026. Body: bodyBytes,
  11027. HTTPResponse: rsp,
  11028. }
  11029. switch {
  11030. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11031. var dest AssistantMessage
  11032. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11033. return nil, err
  11034. }
  11035. response.JSON200 = &dest
  11036. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11037. var dest BadRequestError
  11038. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11039. return nil, err
  11040. }
  11041. response.JSON400 = &dest
  11042. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11043. var dest NotFoundError
  11044. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11045. return nil, err
  11046. }
  11047. response.JSON404 = &dest
  11048. }
  11049. return response, nil
  11050. }
  11051. // ParseSessionSummarizeResponse parses an HTTP response from a SessionSummarizeWithResponse call
  11052. func ParseSessionSummarizeResponse(rsp *http.Response) (*SessionSummarizeResponse, error) {
  11053. bodyBytes, err := io.ReadAll(rsp.Body)
  11054. defer func() { _ = rsp.Body.Close() }()
  11055. if err != nil {
  11056. return nil, err
  11057. }
  11058. response := &SessionSummarizeResponse{
  11059. Body: bodyBytes,
  11060. HTTPResponse: rsp,
  11061. }
  11062. switch {
  11063. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11064. var dest bool
  11065. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11066. return nil, err
  11067. }
  11068. response.JSON200 = &dest
  11069. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11070. var dest BadRequestError
  11071. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11072. return nil, err
  11073. }
  11074. response.JSON400 = &dest
  11075. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11076. var dest NotFoundError
  11077. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11078. return nil, err
  11079. }
  11080. response.JSON404 = &dest
  11081. }
  11082. return response, nil
  11083. }
  11084. // ParseSessionTodoResponse parses an HTTP response from a SessionTodoWithResponse call
  11085. func ParseSessionTodoResponse(rsp *http.Response) (*SessionTodoResponse, error) {
  11086. bodyBytes, err := io.ReadAll(rsp.Body)
  11087. defer func() { _ = rsp.Body.Close() }()
  11088. if err != nil {
  11089. return nil, err
  11090. }
  11091. response := &SessionTodoResponse{
  11092. Body: bodyBytes,
  11093. HTTPResponse: rsp,
  11094. }
  11095. switch {
  11096. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11097. var dest []Todo
  11098. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11099. return nil, err
  11100. }
  11101. response.JSON200 = &dest
  11102. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11103. var dest BadRequestError
  11104. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11105. return nil, err
  11106. }
  11107. response.JSON400 = &dest
  11108. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11109. var dest NotFoundError
  11110. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11111. return nil, err
  11112. }
  11113. response.JSON404 = &dest
  11114. }
  11115. return response, nil
  11116. }
  11117. // ParseSessionUnrevertResponse parses an HTTP response from a SessionUnrevertWithResponse call
  11118. func ParseSessionUnrevertResponse(rsp *http.Response) (*SessionUnrevertResponse, error) {
  11119. bodyBytes, err := io.ReadAll(rsp.Body)
  11120. defer func() { _ = rsp.Body.Close() }()
  11121. if err != nil {
  11122. return nil, err
  11123. }
  11124. response := &SessionUnrevertResponse{
  11125. Body: bodyBytes,
  11126. HTTPResponse: rsp,
  11127. }
  11128. switch {
  11129. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11130. var dest Session
  11131. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11132. return nil, err
  11133. }
  11134. response.JSON200 = &dest
  11135. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11136. var dest BadRequestError
  11137. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11138. return nil, err
  11139. }
  11140. response.JSON400 = &dest
  11141. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11142. var dest NotFoundError
  11143. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11144. return nil, err
  11145. }
  11146. response.JSON404 = &dest
  11147. }
  11148. return response, nil
  11149. }
  11150. // ParseTuiAppendPromptResponse parses an HTTP response from a TuiAppendPromptWithResponse call
  11151. func ParseTuiAppendPromptResponse(rsp *http.Response) (*TuiAppendPromptResponse, error) {
  11152. bodyBytes, err := io.ReadAll(rsp.Body)
  11153. defer func() { _ = rsp.Body.Close() }()
  11154. if err != nil {
  11155. return nil, err
  11156. }
  11157. response := &TuiAppendPromptResponse{
  11158. Body: bodyBytes,
  11159. HTTPResponse: rsp,
  11160. }
  11161. switch {
  11162. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11163. var dest bool
  11164. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11165. return nil, err
  11166. }
  11167. response.JSON200 = &dest
  11168. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11169. var dest BadRequestError
  11170. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11171. return nil, err
  11172. }
  11173. response.JSON400 = &dest
  11174. }
  11175. return response, nil
  11176. }
  11177. // ParseTuiClearPromptResponse parses an HTTP response from a TuiClearPromptWithResponse call
  11178. func ParseTuiClearPromptResponse(rsp *http.Response) (*TuiClearPromptResponse, error) {
  11179. bodyBytes, err := io.ReadAll(rsp.Body)
  11180. defer func() { _ = rsp.Body.Close() }()
  11181. if err != nil {
  11182. return nil, err
  11183. }
  11184. response := &TuiClearPromptResponse{
  11185. Body: bodyBytes,
  11186. HTTPResponse: rsp,
  11187. }
  11188. switch {
  11189. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11190. var dest bool
  11191. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11192. return nil, err
  11193. }
  11194. response.JSON200 = &dest
  11195. }
  11196. return response, nil
  11197. }
  11198. // ParseTuiControlNextResponse parses an HTTP response from a TuiControlNextWithResponse call
  11199. func ParseTuiControlNextResponse(rsp *http.Response) (*TuiControlNextResponse, error) {
  11200. bodyBytes, err := io.ReadAll(rsp.Body)
  11201. defer func() { _ = rsp.Body.Close() }()
  11202. if err != nil {
  11203. return nil, err
  11204. }
  11205. response := &TuiControlNextResponse{
  11206. Body: bodyBytes,
  11207. HTTPResponse: rsp,
  11208. }
  11209. switch {
  11210. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11211. var dest struct {
  11212. Body interface{} `json:"body"`
  11213. Path string `json:"path"`
  11214. }
  11215. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11216. return nil, err
  11217. }
  11218. response.JSON200 = &dest
  11219. }
  11220. return response, nil
  11221. }
  11222. // ParseTuiControlResponseResponse parses an HTTP response from a TuiControlResponseWithResponse call
  11223. func ParseTuiControlResponseResponse(rsp *http.Response) (*TuiControlResponseResponse, error) {
  11224. bodyBytes, err := io.ReadAll(rsp.Body)
  11225. defer func() { _ = rsp.Body.Close() }()
  11226. if err != nil {
  11227. return nil, err
  11228. }
  11229. response := &TuiControlResponseResponse{
  11230. Body: bodyBytes,
  11231. HTTPResponse: rsp,
  11232. }
  11233. switch {
  11234. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11235. var dest bool
  11236. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11237. return nil, err
  11238. }
  11239. response.JSON200 = &dest
  11240. }
  11241. return response, nil
  11242. }
  11243. // ParseTuiExecuteCommandResponse parses an HTTP response from a TuiExecuteCommandWithResponse call
  11244. func ParseTuiExecuteCommandResponse(rsp *http.Response) (*TuiExecuteCommandResponse, error) {
  11245. bodyBytes, err := io.ReadAll(rsp.Body)
  11246. defer func() { _ = rsp.Body.Close() }()
  11247. if err != nil {
  11248. return nil, err
  11249. }
  11250. response := &TuiExecuteCommandResponse{
  11251. Body: bodyBytes,
  11252. HTTPResponse: rsp,
  11253. }
  11254. switch {
  11255. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11256. var dest bool
  11257. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11258. return nil, err
  11259. }
  11260. response.JSON200 = &dest
  11261. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11262. var dest BadRequestError
  11263. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11264. return nil, err
  11265. }
  11266. response.JSON400 = &dest
  11267. }
  11268. return response, nil
  11269. }
  11270. // ParseTuiOpenHelpResponse parses an HTTP response from a TuiOpenHelpWithResponse call
  11271. func ParseTuiOpenHelpResponse(rsp *http.Response) (*TuiOpenHelpResponse, error) {
  11272. bodyBytes, err := io.ReadAll(rsp.Body)
  11273. defer func() { _ = rsp.Body.Close() }()
  11274. if err != nil {
  11275. return nil, err
  11276. }
  11277. response := &TuiOpenHelpResponse{
  11278. Body: bodyBytes,
  11279. HTTPResponse: rsp,
  11280. }
  11281. switch {
  11282. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11283. var dest bool
  11284. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11285. return nil, err
  11286. }
  11287. response.JSON200 = &dest
  11288. }
  11289. return response, nil
  11290. }
  11291. // ParseTuiOpenModelsResponse parses an HTTP response from a TuiOpenModelsWithResponse call
  11292. func ParseTuiOpenModelsResponse(rsp *http.Response) (*TuiOpenModelsResponse, error) {
  11293. bodyBytes, err := io.ReadAll(rsp.Body)
  11294. defer func() { _ = rsp.Body.Close() }()
  11295. if err != nil {
  11296. return nil, err
  11297. }
  11298. response := &TuiOpenModelsResponse{
  11299. Body: bodyBytes,
  11300. HTTPResponse: rsp,
  11301. }
  11302. switch {
  11303. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11304. var dest bool
  11305. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11306. return nil, err
  11307. }
  11308. response.JSON200 = &dest
  11309. }
  11310. return response, nil
  11311. }
  11312. // ParseTuiOpenSessionsResponse parses an HTTP response from a TuiOpenSessionsWithResponse call
  11313. func ParseTuiOpenSessionsResponse(rsp *http.Response) (*TuiOpenSessionsResponse, error) {
  11314. bodyBytes, err := io.ReadAll(rsp.Body)
  11315. defer func() { _ = rsp.Body.Close() }()
  11316. if err != nil {
  11317. return nil, err
  11318. }
  11319. response := &TuiOpenSessionsResponse{
  11320. Body: bodyBytes,
  11321. HTTPResponse: rsp,
  11322. }
  11323. switch {
  11324. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11325. var dest bool
  11326. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11327. return nil, err
  11328. }
  11329. response.JSON200 = &dest
  11330. }
  11331. return response, nil
  11332. }
  11333. // ParseTuiOpenThemesResponse parses an HTTP response from a TuiOpenThemesWithResponse call
  11334. func ParseTuiOpenThemesResponse(rsp *http.Response) (*TuiOpenThemesResponse, error) {
  11335. bodyBytes, err := io.ReadAll(rsp.Body)
  11336. defer func() { _ = rsp.Body.Close() }()
  11337. if err != nil {
  11338. return nil, err
  11339. }
  11340. response := &TuiOpenThemesResponse{
  11341. Body: bodyBytes,
  11342. HTTPResponse: rsp,
  11343. }
  11344. switch {
  11345. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11346. var dest bool
  11347. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11348. return nil, err
  11349. }
  11350. response.JSON200 = &dest
  11351. }
  11352. return response, nil
  11353. }
  11354. // ParseTuiPublishResponse parses an HTTP response from a TuiPublishWithResponse call
  11355. func ParseTuiPublishResponse(rsp *http.Response) (*TuiPublishResponse, error) {
  11356. bodyBytes, err := io.ReadAll(rsp.Body)
  11357. defer func() { _ = rsp.Body.Close() }()
  11358. if err != nil {
  11359. return nil, err
  11360. }
  11361. response := &TuiPublishResponse{
  11362. Body: bodyBytes,
  11363. HTTPResponse: rsp,
  11364. }
  11365. switch {
  11366. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11367. var dest bool
  11368. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11369. return nil, err
  11370. }
  11371. response.JSON200 = &dest
  11372. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11373. var dest BadRequestError
  11374. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11375. return nil, err
  11376. }
  11377. response.JSON400 = &dest
  11378. }
  11379. return response, nil
  11380. }
  11381. // ParseTuiSelectSessionResponse parses an HTTP response from a TuiSelectSessionWithResponse call
  11382. func ParseTuiSelectSessionResponse(rsp *http.Response) (*TuiSelectSessionResponse, error) {
  11383. bodyBytes, err := io.ReadAll(rsp.Body)
  11384. defer func() { _ = rsp.Body.Close() }()
  11385. if err != nil {
  11386. return nil, err
  11387. }
  11388. response := &TuiSelectSessionResponse{
  11389. Body: bodyBytes,
  11390. HTTPResponse: rsp,
  11391. }
  11392. switch {
  11393. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11394. var dest bool
  11395. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11396. return nil, err
  11397. }
  11398. response.JSON200 = &dest
  11399. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11400. var dest BadRequestError
  11401. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11402. return nil, err
  11403. }
  11404. response.JSON400 = &dest
  11405. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11406. var dest NotFoundError
  11407. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11408. return nil, err
  11409. }
  11410. response.JSON404 = &dest
  11411. }
  11412. return response, nil
  11413. }
  11414. // ParseTuiShowToastResponse parses an HTTP response from a TuiShowToastWithResponse call
  11415. func ParseTuiShowToastResponse(rsp *http.Response) (*TuiShowToastResponse, error) {
  11416. bodyBytes, err := io.ReadAll(rsp.Body)
  11417. defer func() { _ = rsp.Body.Close() }()
  11418. if err != nil {
  11419. return nil, err
  11420. }
  11421. response := &TuiShowToastResponse{
  11422. Body: bodyBytes,
  11423. HTTPResponse: rsp,
  11424. }
  11425. switch {
  11426. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11427. var dest bool
  11428. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11429. return nil, err
  11430. }
  11431. response.JSON200 = &dest
  11432. }
  11433. return response, nil
  11434. }
  11435. // ParseTuiSubmitPromptResponse parses an HTTP response from a TuiSubmitPromptWithResponse call
  11436. func ParseTuiSubmitPromptResponse(rsp *http.Response) (*TuiSubmitPromptResponse, error) {
  11437. bodyBytes, err := io.ReadAll(rsp.Body)
  11438. defer func() { _ = rsp.Body.Close() }()
  11439. if err != nil {
  11440. return nil, err
  11441. }
  11442. response := &TuiSubmitPromptResponse{
  11443. Body: bodyBytes,
  11444. HTTPResponse: rsp,
  11445. }
  11446. switch {
  11447. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11448. var dest bool
  11449. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11450. return nil, err
  11451. }
  11452. response.JSON200 = &dest
  11453. }
  11454. return response, nil
  11455. }
  11456. // ParseVcsGetResponse parses an HTTP response from a VcsGetWithResponse call
  11457. func ParseVcsGetResponse(rsp *http.Response) (*VcsGetResponse, error) {
  11458. bodyBytes, err := io.ReadAll(rsp.Body)
  11459. defer func() { _ = rsp.Body.Close() }()
  11460. if err != nil {
  11461. return nil, err
  11462. }
  11463. response := &VcsGetResponse{
  11464. Body: bodyBytes,
  11465. HTTPResponse: rsp,
  11466. }
  11467. switch {
  11468. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11469. var dest VcsInfo
  11470. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11471. return nil, err
  11472. }
  11473. response.JSON200 = &dest
  11474. }
  11475. return response, nil
  11476. }