Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

opencode_api_client.gen.go 402KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977
  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. // RequestEditorFn is the function signature for the RequestEditor callback function
  15. type RequestEditorFn func(ctx context.Context, req *http.Request) error
  16. // Doer performs HTTP requests.
  17. //
  18. // The standard http.Client implements this interface.
  19. type HttpRequestDoer interface {
  20. Do(req *http.Request) (*http.Response, error)
  21. }
  22. // Client which conforms to the OpenAPI3 specification for this service.
  23. type Client struct {
  24. // The endpoint of the server conforming to this interface, with scheme,
  25. // https://api.deepmap.com for example. This can contain a path relative
  26. // to the server, such as https://api.deepmap.com/dev-test, and all the
  27. // paths in the swagger spec will be appended to the server.
  28. Server string
  29. // Doer for performing requests, typically a *http.Client with any
  30. // customized settings, such as certificate chains.
  31. Client HttpRequestDoer
  32. // A list of callbacks for modifying requests which are generated before sending over
  33. // the network.
  34. RequestEditors []RequestEditorFn
  35. }
  36. // ClientOption allows setting custom parameters during construction
  37. type ClientOption func(*Client) error
  38. // Creates a new Client, with reasonable defaults
  39. func NewClient(server string, opts ...ClientOption) (*Client, error) {
  40. // create a client with sane default values
  41. client := Client{
  42. Server: server,
  43. }
  44. // mutate client and add all optional params
  45. for _, o := range opts {
  46. if err := o(&client); err != nil {
  47. return nil, err
  48. }
  49. }
  50. // ensure the server URL always has a trailing slash
  51. if !strings.HasSuffix(client.Server, "/") {
  52. client.Server += "/"
  53. }
  54. // create httpClient, if not already present
  55. if client.Client == nil {
  56. client.Client = &http.Client{}
  57. }
  58. return &client, nil
  59. }
  60. // WithHTTPClient allows overriding the default Doer, which is
  61. // automatically created using http.Client. This is useful for tests.
  62. func WithHTTPClient(doer HttpRequestDoer) ClientOption {
  63. return func(c *Client) error {
  64. c.Client = doer
  65. return nil
  66. }
  67. }
  68. // WithRequestEditorFn allows setting up a callback function, which will be
  69. // called right before sending the request. This can be used to mutate the request.
  70. func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
  71. return func(c *Client) error {
  72. c.RequestEditors = append(c.RequestEditors, fn)
  73. return nil
  74. }
  75. }
  76. // The interface specification for the client above.
  77. type ClientInterface interface {
  78. // AppAgents request
  79. AppAgents(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  80. // AuthSetWithBody request with any body
  81. AuthSetWithBody(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  82. AuthSet(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  83. // CommandList request
  84. CommandList(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  85. // ConfigGet request
  86. ConfigGet(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  87. // ConfigUpdateWithBody request with any body
  88. ConfigUpdateWithBody(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  89. ConfigUpdate(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  90. // ConfigProviders request
  91. ConfigProviders(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  92. // EventSubscribe request
  93. EventSubscribe(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  94. // ExperimentalResourceList request
  95. ExperimentalResourceList(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  96. // ToolList request
  97. ToolList(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  98. // ToolIds request
  99. ToolIds(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  100. // WorktreeList request
  101. WorktreeList(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  102. // WorktreeCreateWithBody request with any body
  103. WorktreeCreateWithBody(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  104. WorktreeCreate(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  105. // FileList request
  106. FileList(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  107. // FileRead request
  108. FileRead(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  109. // FileStatus request
  110. FileStatus(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  111. // FindText request
  112. FindText(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  113. // FindFiles request
  114. FindFiles(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  115. // FindSymbols request
  116. FindSymbols(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  117. // FormatterStatus request
  118. FormatterStatus(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  119. // GlobalDispose request
  120. GlobalDispose(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  121. // GlobalEvent request
  122. GlobalEvent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  123. // GlobalHealth request
  124. GlobalHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
  125. // InstanceDispose request
  126. InstanceDispose(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  127. // AppLogWithBody request with any body
  128. AppLogWithBody(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  129. AppLog(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  130. // LspStatus request
  131. LspStatus(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  132. // McpStatus request
  133. McpStatus(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  134. // McpAddWithBody request with any body
  135. McpAddWithBody(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  136. McpAdd(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  137. // McpAuthRemove request
  138. McpAuthRemove(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  139. // McpAuthStart request
  140. McpAuthStart(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  141. // McpAuthAuthenticate request
  142. McpAuthAuthenticate(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  143. // McpAuthCallbackWithBody request with any body
  144. McpAuthCallbackWithBody(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  145. McpAuthCallback(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  146. // McpConnect request
  147. McpConnect(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  148. // McpDisconnect request
  149. McpDisconnect(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  150. // PathGet request
  151. PathGet(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  152. // PermissionList request
  153. PermissionList(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  154. // PermissionReplyWithBody request with any body
  155. PermissionReplyWithBody(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  156. PermissionReply(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  157. // ProjectList request
  158. ProjectList(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  159. // ProjectCurrent request
  160. ProjectCurrent(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  161. // ProjectUpdateWithBody request with any body
  162. ProjectUpdateWithBody(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  163. ProjectUpdate(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  164. // ProviderList request
  165. ProviderList(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  166. // ProviderAuth request
  167. ProviderAuth(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  168. // ProviderOauthAuthorizeWithBody request with any body
  169. ProviderOauthAuthorizeWithBody(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  170. ProviderOauthAuthorize(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  171. // ProviderOauthCallbackWithBody request with any body
  172. ProviderOauthCallbackWithBody(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  173. ProviderOauthCallback(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  174. // PtyList request
  175. PtyList(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  176. // PtyCreateWithBody request with any body
  177. PtyCreateWithBody(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  178. PtyCreate(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  179. // PtyRemove request
  180. PtyRemove(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  181. // PtyGet request
  182. PtyGet(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  183. // PtyUpdateWithBody request with any body
  184. PtyUpdateWithBody(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  185. PtyUpdate(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  186. // PtyConnect request
  187. PtyConnect(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  188. // QuestionList request
  189. QuestionList(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  190. // QuestionReject request
  191. QuestionReject(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  192. // QuestionReplyWithBody request with any body
  193. QuestionReplyWithBody(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  194. QuestionReply(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  195. // SessionList request
  196. SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  197. // SessionCreateWithBody request with any body
  198. SessionCreateWithBody(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  199. SessionCreate(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  200. // SessionStatus request
  201. SessionStatus(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  202. // SessionDelete request
  203. SessionDelete(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  204. // SessionGet request
  205. SessionGet(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  206. // SessionUpdateWithBody request with any body
  207. SessionUpdateWithBody(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  208. SessionUpdate(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  209. // SessionAbort request
  210. SessionAbort(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  211. // SessionChildren request
  212. SessionChildren(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  213. // SessionCommandWithBody request with any body
  214. SessionCommandWithBody(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  215. SessionCommand(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  216. // SessionDiff request
  217. SessionDiff(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  218. // SessionForkWithBody request with any body
  219. SessionForkWithBody(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  220. SessionFork(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  221. // SessionInitWithBody request with any body
  222. SessionInitWithBody(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  223. SessionInit(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  224. // SessionMessages request
  225. SessionMessages(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  226. // SessionPromptWithBody request with any body
  227. SessionPromptWithBody(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  228. SessionPrompt(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  229. // SessionMessage request
  230. SessionMessage(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  231. // PartDelete request
  232. PartDelete(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  233. // PartUpdateWithBody request with any body
  234. PartUpdateWithBody(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  235. PartUpdate(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  236. // PermissionRespondWithBody request with any body
  237. PermissionRespondWithBody(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  238. PermissionRespond(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  239. // SessionPromptAsyncWithBody request with any body
  240. SessionPromptAsyncWithBody(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  241. SessionPromptAsync(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  242. // SessionRevertWithBody request with any body
  243. SessionRevertWithBody(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  244. SessionRevert(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  245. // SessionUnshare request
  246. SessionUnshare(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  247. // SessionShare request
  248. SessionShare(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  249. // SessionShellWithBody request with any body
  250. SessionShellWithBody(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  251. SessionShell(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  252. // SessionSummarizeWithBody request with any body
  253. SessionSummarizeWithBody(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  254. SessionSummarize(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  255. // SessionTodo request
  256. SessionTodo(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  257. // SessionUnrevert request
  258. SessionUnrevert(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  259. // TuiAppendPromptWithBody request with any body
  260. TuiAppendPromptWithBody(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  261. TuiAppendPrompt(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  262. // TuiClearPrompt request
  263. TuiClearPrompt(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  264. // TuiControlNext request
  265. TuiControlNext(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  266. // TuiControlResponseWithBody request with any body
  267. TuiControlResponseWithBody(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  268. TuiControlResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  269. // TuiExecuteCommandWithBody request with any body
  270. TuiExecuteCommandWithBody(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  271. TuiExecuteCommand(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  272. // TuiOpenHelp request
  273. TuiOpenHelp(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  274. // TuiOpenModels request
  275. TuiOpenModels(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  276. // TuiOpenSessions request
  277. TuiOpenSessions(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  278. // TuiOpenThemes request
  279. TuiOpenThemes(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  280. // TuiPublishWithBody request with any body
  281. TuiPublishWithBody(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  282. TuiPublish(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  283. // TuiSelectSessionWithBody request with any body
  284. TuiSelectSessionWithBody(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  285. TuiSelectSession(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  286. // TuiShowToastWithBody request with any body
  287. TuiShowToastWithBody(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
  288. TuiShowToast(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
  289. // TuiSubmitPrompt request
  290. TuiSubmitPrompt(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  291. // VcsGet request
  292. VcsGet(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
  293. }
  294. func (c *Client) AppAgents(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  295. req, err := NewAppAgentsRequest(c.Server, params)
  296. if err != nil {
  297. return nil, err
  298. }
  299. req = req.WithContext(ctx)
  300. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  301. return nil, err
  302. }
  303. return c.Client.Do(req)
  304. }
  305. func (c *Client) AuthSetWithBody(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  306. req, err := NewAuthSetRequestWithBody(c.Server, providerID, params, contentType, body)
  307. if err != nil {
  308. return nil, err
  309. }
  310. req = req.WithContext(ctx)
  311. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  312. return nil, err
  313. }
  314. return c.Client.Do(req)
  315. }
  316. func (c *Client) AuthSet(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  317. req, err := NewAuthSetRequest(c.Server, providerID, params, body)
  318. if err != nil {
  319. return nil, err
  320. }
  321. req = req.WithContext(ctx)
  322. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  323. return nil, err
  324. }
  325. return c.Client.Do(req)
  326. }
  327. func (c *Client) CommandList(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  328. req, err := NewCommandListRequest(c.Server, params)
  329. if err != nil {
  330. return nil, err
  331. }
  332. req = req.WithContext(ctx)
  333. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  334. return nil, err
  335. }
  336. return c.Client.Do(req)
  337. }
  338. func (c *Client) ConfigGet(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  339. req, err := NewConfigGetRequest(c.Server, params)
  340. if err != nil {
  341. return nil, err
  342. }
  343. req = req.WithContext(ctx)
  344. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  345. return nil, err
  346. }
  347. return c.Client.Do(req)
  348. }
  349. func (c *Client) ConfigUpdateWithBody(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  350. req, err := NewConfigUpdateRequestWithBody(c.Server, params, contentType, body)
  351. if err != nil {
  352. return nil, err
  353. }
  354. req = req.WithContext(ctx)
  355. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  356. return nil, err
  357. }
  358. return c.Client.Do(req)
  359. }
  360. func (c *Client) ConfigUpdate(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  361. req, err := NewConfigUpdateRequest(c.Server, params, body)
  362. if err != nil {
  363. return nil, err
  364. }
  365. req = req.WithContext(ctx)
  366. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  367. return nil, err
  368. }
  369. return c.Client.Do(req)
  370. }
  371. func (c *Client) ConfigProviders(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  372. req, err := NewConfigProvidersRequest(c.Server, params)
  373. if err != nil {
  374. return nil, err
  375. }
  376. req = req.WithContext(ctx)
  377. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  378. return nil, err
  379. }
  380. return c.Client.Do(req)
  381. }
  382. func (c *Client) EventSubscribe(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  383. req, err := NewEventSubscribeRequest(c.Server, params)
  384. if err != nil {
  385. return nil, err
  386. }
  387. req = req.WithContext(ctx)
  388. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  389. return nil, err
  390. }
  391. return c.Client.Do(req)
  392. }
  393. func (c *Client) ExperimentalResourceList(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  394. req, err := NewExperimentalResourceListRequest(c.Server, params)
  395. if err != nil {
  396. return nil, err
  397. }
  398. req = req.WithContext(ctx)
  399. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  400. return nil, err
  401. }
  402. return c.Client.Do(req)
  403. }
  404. func (c *Client) ToolList(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  405. req, err := NewToolListRequest(c.Server, params)
  406. if err != nil {
  407. return nil, err
  408. }
  409. req = req.WithContext(ctx)
  410. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  411. return nil, err
  412. }
  413. return c.Client.Do(req)
  414. }
  415. func (c *Client) ToolIds(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  416. req, err := NewToolIdsRequest(c.Server, params)
  417. if err != nil {
  418. return nil, err
  419. }
  420. req = req.WithContext(ctx)
  421. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  422. return nil, err
  423. }
  424. return c.Client.Do(req)
  425. }
  426. func (c *Client) WorktreeList(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  427. req, err := NewWorktreeListRequest(c.Server, params)
  428. if err != nil {
  429. return nil, err
  430. }
  431. req = req.WithContext(ctx)
  432. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  433. return nil, err
  434. }
  435. return c.Client.Do(req)
  436. }
  437. func (c *Client) WorktreeCreateWithBody(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  438. req, err := NewWorktreeCreateRequestWithBody(c.Server, params, contentType, body)
  439. if err != nil {
  440. return nil, err
  441. }
  442. req = req.WithContext(ctx)
  443. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  444. return nil, err
  445. }
  446. return c.Client.Do(req)
  447. }
  448. func (c *Client) WorktreeCreate(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  449. req, err := NewWorktreeCreateRequest(c.Server, params, body)
  450. if err != nil {
  451. return nil, err
  452. }
  453. req = req.WithContext(ctx)
  454. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  455. return nil, err
  456. }
  457. return c.Client.Do(req)
  458. }
  459. func (c *Client) FileList(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  460. req, err := NewFileListRequest(c.Server, params)
  461. if err != nil {
  462. return nil, err
  463. }
  464. req = req.WithContext(ctx)
  465. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  466. return nil, err
  467. }
  468. return c.Client.Do(req)
  469. }
  470. func (c *Client) FileRead(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  471. req, err := NewFileReadRequest(c.Server, params)
  472. if err != nil {
  473. return nil, err
  474. }
  475. req = req.WithContext(ctx)
  476. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  477. return nil, err
  478. }
  479. return c.Client.Do(req)
  480. }
  481. func (c *Client) FileStatus(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  482. req, err := NewFileStatusRequest(c.Server, params)
  483. if err != nil {
  484. return nil, err
  485. }
  486. req = req.WithContext(ctx)
  487. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  488. return nil, err
  489. }
  490. return c.Client.Do(req)
  491. }
  492. func (c *Client) FindText(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  493. req, err := NewFindTextRequest(c.Server, params)
  494. if err != nil {
  495. return nil, err
  496. }
  497. req = req.WithContext(ctx)
  498. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  499. return nil, err
  500. }
  501. return c.Client.Do(req)
  502. }
  503. func (c *Client) FindFiles(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  504. req, err := NewFindFilesRequest(c.Server, params)
  505. if err != nil {
  506. return nil, err
  507. }
  508. req = req.WithContext(ctx)
  509. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  510. return nil, err
  511. }
  512. return c.Client.Do(req)
  513. }
  514. func (c *Client) FindSymbols(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  515. req, err := NewFindSymbolsRequest(c.Server, params)
  516. if err != nil {
  517. return nil, err
  518. }
  519. req = req.WithContext(ctx)
  520. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  521. return nil, err
  522. }
  523. return c.Client.Do(req)
  524. }
  525. func (c *Client) FormatterStatus(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  526. req, err := NewFormatterStatusRequest(c.Server, params)
  527. if err != nil {
  528. return nil, err
  529. }
  530. req = req.WithContext(ctx)
  531. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  532. return nil, err
  533. }
  534. return c.Client.Do(req)
  535. }
  536. func (c *Client) GlobalDispose(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  537. req, err := NewGlobalDisposeRequest(c.Server)
  538. if err != nil {
  539. return nil, err
  540. }
  541. req = req.WithContext(ctx)
  542. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  543. return nil, err
  544. }
  545. return c.Client.Do(req)
  546. }
  547. func (c *Client) GlobalEvent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  548. req, err := NewGlobalEventRequest(c.Server)
  549. if err != nil {
  550. return nil, err
  551. }
  552. req = req.WithContext(ctx)
  553. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  554. return nil, err
  555. }
  556. return c.Client.Do(req)
  557. }
  558. func (c *Client) GlobalHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
  559. req, err := NewGlobalHealthRequest(c.Server)
  560. if err != nil {
  561. return nil, err
  562. }
  563. req = req.WithContext(ctx)
  564. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  565. return nil, err
  566. }
  567. return c.Client.Do(req)
  568. }
  569. func (c *Client) InstanceDispose(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  570. req, err := NewInstanceDisposeRequest(c.Server, params)
  571. if err != nil {
  572. return nil, err
  573. }
  574. req = req.WithContext(ctx)
  575. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  576. return nil, err
  577. }
  578. return c.Client.Do(req)
  579. }
  580. func (c *Client) AppLogWithBody(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  581. req, err := NewAppLogRequestWithBody(c.Server, params, contentType, body)
  582. if err != nil {
  583. return nil, err
  584. }
  585. req = req.WithContext(ctx)
  586. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  587. return nil, err
  588. }
  589. return c.Client.Do(req)
  590. }
  591. func (c *Client) AppLog(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  592. req, err := NewAppLogRequest(c.Server, params, body)
  593. if err != nil {
  594. return nil, err
  595. }
  596. req = req.WithContext(ctx)
  597. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  598. return nil, err
  599. }
  600. return c.Client.Do(req)
  601. }
  602. func (c *Client) LspStatus(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  603. req, err := NewLspStatusRequest(c.Server, params)
  604. if err != nil {
  605. return nil, err
  606. }
  607. req = req.WithContext(ctx)
  608. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  609. return nil, err
  610. }
  611. return c.Client.Do(req)
  612. }
  613. func (c *Client) McpStatus(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  614. req, err := NewMcpStatusRequest(c.Server, params)
  615. if err != nil {
  616. return nil, err
  617. }
  618. req = req.WithContext(ctx)
  619. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  620. return nil, err
  621. }
  622. return c.Client.Do(req)
  623. }
  624. func (c *Client) McpAddWithBody(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  625. req, err := NewMcpAddRequestWithBody(c.Server, params, contentType, body)
  626. if err != nil {
  627. return nil, err
  628. }
  629. req = req.WithContext(ctx)
  630. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  631. return nil, err
  632. }
  633. return c.Client.Do(req)
  634. }
  635. func (c *Client) McpAdd(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  636. req, err := NewMcpAddRequest(c.Server, params, body)
  637. if err != nil {
  638. return nil, err
  639. }
  640. req = req.WithContext(ctx)
  641. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  642. return nil, err
  643. }
  644. return c.Client.Do(req)
  645. }
  646. func (c *Client) McpAuthRemove(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  647. req, err := NewMcpAuthRemoveRequest(c.Server, name, params)
  648. if err != nil {
  649. return nil, err
  650. }
  651. req = req.WithContext(ctx)
  652. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  653. return nil, err
  654. }
  655. return c.Client.Do(req)
  656. }
  657. func (c *Client) McpAuthStart(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  658. req, err := NewMcpAuthStartRequest(c.Server, name, params)
  659. if err != nil {
  660. return nil, err
  661. }
  662. req = req.WithContext(ctx)
  663. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  664. return nil, err
  665. }
  666. return c.Client.Do(req)
  667. }
  668. func (c *Client) McpAuthAuthenticate(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  669. req, err := NewMcpAuthAuthenticateRequest(c.Server, name, params)
  670. if err != nil {
  671. return nil, err
  672. }
  673. req = req.WithContext(ctx)
  674. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  675. return nil, err
  676. }
  677. return c.Client.Do(req)
  678. }
  679. func (c *Client) McpAuthCallbackWithBody(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  680. req, err := NewMcpAuthCallbackRequestWithBody(c.Server, name, params, contentType, body)
  681. if err != nil {
  682. return nil, err
  683. }
  684. req = req.WithContext(ctx)
  685. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  686. return nil, err
  687. }
  688. return c.Client.Do(req)
  689. }
  690. func (c *Client) McpAuthCallback(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  691. req, err := NewMcpAuthCallbackRequest(c.Server, name, params, body)
  692. if err != nil {
  693. return nil, err
  694. }
  695. req = req.WithContext(ctx)
  696. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  697. return nil, err
  698. }
  699. return c.Client.Do(req)
  700. }
  701. func (c *Client) McpConnect(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  702. req, err := NewMcpConnectRequest(c.Server, name, params)
  703. if err != nil {
  704. return nil, err
  705. }
  706. req = req.WithContext(ctx)
  707. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  708. return nil, err
  709. }
  710. return c.Client.Do(req)
  711. }
  712. func (c *Client) McpDisconnect(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  713. req, err := NewMcpDisconnectRequest(c.Server, name, params)
  714. if err != nil {
  715. return nil, err
  716. }
  717. req = req.WithContext(ctx)
  718. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  719. return nil, err
  720. }
  721. return c.Client.Do(req)
  722. }
  723. func (c *Client) PathGet(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  724. req, err := NewPathGetRequest(c.Server, params)
  725. if err != nil {
  726. return nil, err
  727. }
  728. req = req.WithContext(ctx)
  729. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  730. return nil, err
  731. }
  732. return c.Client.Do(req)
  733. }
  734. func (c *Client) PermissionList(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  735. req, err := NewPermissionListRequest(c.Server, params)
  736. if err != nil {
  737. return nil, err
  738. }
  739. req = req.WithContext(ctx)
  740. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  741. return nil, err
  742. }
  743. return c.Client.Do(req)
  744. }
  745. func (c *Client) PermissionReplyWithBody(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  746. req, err := NewPermissionReplyRequestWithBody(c.Server, requestID, params, contentType, body)
  747. if err != nil {
  748. return nil, err
  749. }
  750. req = req.WithContext(ctx)
  751. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  752. return nil, err
  753. }
  754. return c.Client.Do(req)
  755. }
  756. func (c *Client) PermissionReply(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  757. req, err := NewPermissionReplyRequest(c.Server, requestID, params, body)
  758. if err != nil {
  759. return nil, err
  760. }
  761. req = req.WithContext(ctx)
  762. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  763. return nil, err
  764. }
  765. return c.Client.Do(req)
  766. }
  767. func (c *Client) ProjectList(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  768. req, err := NewProjectListRequest(c.Server, params)
  769. if err != nil {
  770. return nil, err
  771. }
  772. req = req.WithContext(ctx)
  773. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  774. return nil, err
  775. }
  776. return c.Client.Do(req)
  777. }
  778. func (c *Client) ProjectCurrent(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  779. req, err := NewProjectCurrentRequest(c.Server, params)
  780. if err != nil {
  781. return nil, err
  782. }
  783. req = req.WithContext(ctx)
  784. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  785. return nil, err
  786. }
  787. return c.Client.Do(req)
  788. }
  789. func (c *Client) ProjectUpdateWithBody(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  790. req, err := NewProjectUpdateRequestWithBody(c.Server, projectID, params, contentType, body)
  791. if err != nil {
  792. return nil, err
  793. }
  794. req = req.WithContext(ctx)
  795. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  796. return nil, err
  797. }
  798. return c.Client.Do(req)
  799. }
  800. func (c *Client) ProjectUpdate(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  801. req, err := NewProjectUpdateRequest(c.Server, projectID, params, body)
  802. if err != nil {
  803. return nil, err
  804. }
  805. req = req.WithContext(ctx)
  806. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  807. return nil, err
  808. }
  809. return c.Client.Do(req)
  810. }
  811. func (c *Client) ProviderList(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  812. req, err := NewProviderListRequest(c.Server, params)
  813. if err != nil {
  814. return nil, err
  815. }
  816. req = req.WithContext(ctx)
  817. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  818. return nil, err
  819. }
  820. return c.Client.Do(req)
  821. }
  822. func (c *Client) ProviderAuth(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  823. req, err := NewProviderAuthRequest(c.Server, params)
  824. if err != nil {
  825. return nil, err
  826. }
  827. req = req.WithContext(ctx)
  828. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  829. return nil, err
  830. }
  831. return c.Client.Do(req)
  832. }
  833. func (c *Client) ProviderOauthAuthorizeWithBody(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  834. req, err := NewProviderOauthAuthorizeRequestWithBody(c.Server, providerID, params, contentType, body)
  835. if err != nil {
  836. return nil, err
  837. }
  838. req = req.WithContext(ctx)
  839. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  840. return nil, err
  841. }
  842. return c.Client.Do(req)
  843. }
  844. func (c *Client) ProviderOauthAuthorize(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  845. req, err := NewProviderOauthAuthorizeRequest(c.Server, providerID, params, body)
  846. if err != nil {
  847. return nil, err
  848. }
  849. req = req.WithContext(ctx)
  850. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  851. return nil, err
  852. }
  853. return c.Client.Do(req)
  854. }
  855. func (c *Client) ProviderOauthCallbackWithBody(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  856. req, err := NewProviderOauthCallbackRequestWithBody(c.Server, providerID, params, contentType, body)
  857. if err != nil {
  858. return nil, err
  859. }
  860. req = req.WithContext(ctx)
  861. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  862. return nil, err
  863. }
  864. return c.Client.Do(req)
  865. }
  866. func (c *Client) ProviderOauthCallback(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  867. req, err := NewProviderOauthCallbackRequest(c.Server, providerID, params, body)
  868. if err != nil {
  869. return nil, err
  870. }
  871. req = req.WithContext(ctx)
  872. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  873. return nil, err
  874. }
  875. return c.Client.Do(req)
  876. }
  877. func (c *Client) PtyList(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  878. req, err := NewPtyListRequest(c.Server, params)
  879. if err != nil {
  880. return nil, err
  881. }
  882. req = req.WithContext(ctx)
  883. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  884. return nil, err
  885. }
  886. return c.Client.Do(req)
  887. }
  888. func (c *Client) PtyCreateWithBody(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  889. req, err := NewPtyCreateRequestWithBody(c.Server, params, contentType, body)
  890. if err != nil {
  891. return nil, err
  892. }
  893. req = req.WithContext(ctx)
  894. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  895. return nil, err
  896. }
  897. return c.Client.Do(req)
  898. }
  899. func (c *Client) PtyCreate(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  900. req, err := NewPtyCreateRequest(c.Server, params, body)
  901. if err != nil {
  902. return nil, err
  903. }
  904. req = req.WithContext(ctx)
  905. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  906. return nil, err
  907. }
  908. return c.Client.Do(req)
  909. }
  910. func (c *Client) PtyRemove(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  911. req, err := NewPtyRemoveRequest(c.Server, ptyID, params)
  912. if err != nil {
  913. return nil, err
  914. }
  915. req = req.WithContext(ctx)
  916. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  917. return nil, err
  918. }
  919. return c.Client.Do(req)
  920. }
  921. func (c *Client) PtyGet(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  922. req, err := NewPtyGetRequest(c.Server, ptyID, params)
  923. if err != nil {
  924. return nil, err
  925. }
  926. req = req.WithContext(ctx)
  927. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  928. return nil, err
  929. }
  930. return c.Client.Do(req)
  931. }
  932. func (c *Client) PtyUpdateWithBody(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  933. req, err := NewPtyUpdateRequestWithBody(c.Server, ptyID, params, contentType, body)
  934. if err != nil {
  935. return nil, err
  936. }
  937. req = req.WithContext(ctx)
  938. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  939. return nil, err
  940. }
  941. return c.Client.Do(req)
  942. }
  943. func (c *Client) PtyUpdate(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  944. req, err := NewPtyUpdateRequest(c.Server, ptyID, params, body)
  945. if err != nil {
  946. return nil, err
  947. }
  948. req = req.WithContext(ctx)
  949. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  950. return nil, err
  951. }
  952. return c.Client.Do(req)
  953. }
  954. func (c *Client) PtyConnect(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  955. req, err := NewPtyConnectRequest(c.Server, ptyID, params)
  956. if err != nil {
  957. return nil, err
  958. }
  959. req = req.WithContext(ctx)
  960. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  961. return nil, err
  962. }
  963. return c.Client.Do(req)
  964. }
  965. func (c *Client) QuestionList(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  966. req, err := NewQuestionListRequest(c.Server, params)
  967. if err != nil {
  968. return nil, err
  969. }
  970. req = req.WithContext(ctx)
  971. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  972. return nil, err
  973. }
  974. return c.Client.Do(req)
  975. }
  976. func (c *Client) QuestionReject(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  977. req, err := NewQuestionRejectRequest(c.Server, requestID, params)
  978. if err != nil {
  979. return nil, err
  980. }
  981. req = req.WithContext(ctx)
  982. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  983. return nil, err
  984. }
  985. return c.Client.Do(req)
  986. }
  987. func (c *Client) QuestionReplyWithBody(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  988. req, err := NewQuestionReplyRequestWithBody(c.Server, requestID, params, contentType, body)
  989. if err != nil {
  990. return nil, err
  991. }
  992. req = req.WithContext(ctx)
  993. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  994. return nil, err
  995. }
  996. return c.Client.Do(req)
  997. }
  998. func (c *Client) QuestionReply(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  999. req, err := NewQuestionReplyRequest(c.Server, requestID, params, body)
  1000. if err != nil {
  1001. return nil, err
  1002. }
  1003. req = req.WithContext(ctx)
  1004. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1005. return nil, err
  1006. }
  1007. return c.Client.Do(req)
  1008. }
  1009. func (c *Client) SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1010. req, err := NewSessionListRequest(c.Server, params)
  1011. if err != nil {
  1012. return nil, err
  1013. }
  1014. req = req.WithContext(ctx)
  1015. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1016. return nil, err
  1017. }
  1018. return c.Client.Do(req)
  1019. }
  1020. func (c *Client) SessionCreateWithBody(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1021. req, err := NewSessionCreateRequestWithBody(c.Server, params, contentType, body)
  1022. if err != nil {
  1023. return nil, err
  1024. }
  1025. req = req.WithContext(ctx)
  1026. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1027. return nil, err
  1028. }
  1029. return c.Client.Do(req)
  1030. }
  1031. func (c *Client) SessionCreate(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1032. req, err := NewSessionCreateRequest(c.Server, params, body)
  1033. if err != nil {
  1034. return nil, err
  1035. }
  1036. req = req.WithContext(ctx)
  1037. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1038. return nil, err
  1039. }
  1040. return c.Client.Do(req)
  1041. }
  1042. func (c *Client) SessionStatus(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1043. req, err := NewSessionStatusRequest(c.Server, params)
  1044. if err != nil {
  1045. return nil, err
  1046. }
  1047. req = req.WithContext(ctx)
  1048. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1049. return nil, err
  1050. }
  1051. return c.Client.Do(req)
  1052. }
  1053. func (c *Client) SessionDelete(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1054. req, err := NewSessionDeleteRequest(c.Server, sessionID, params)
  1055. if err != nil {
  1056. return nil, err
  1057. }
  1058. req = req.WithContext(ctx)
  1059. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1060. return nil, err
  1061. }
  1062. return c.Client.Do(req)
  1063. }
  1064. func (c *Client) SessionGet(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1065. req, err := NewSessionGetRequest(c.Server, sessionID, params)
  1066. if err != nil {
  1067. return nil, err
  1068. }
  1069. req = req.WithContext(ctx)
  1070. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1071. return nil, err
  1072. }
  1073. return c.Client.Do(req)
  1074. }
  1075. func (c *Client) SessionUpdateWithBody(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1076. req, err := NewSessionUpdateRequestWithBody(c.Server, sessionID, params, contentType, body)
  1077. if err != nil {
  1078. return nil, err
  1079. }
  1080. req = req.WithContext(ctx)
  1081. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1082. return nil, err
  1083. }
  1084. return c.Client.Do(req)
  1085. }
  1086. func (c *Client) SessionUpdate(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1087. req, err := NewSessionUpdateRequest(c.Server, sessionID, params, body)
  1088. if err != nil {
  1089. return nil, err
  1090. }
  1091. req = req.WithContext(ctx)
  1092. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1093. return nil, err
  1094. }
  1095. return c.Client.Do(req)
  1096. }
  1097. func (c *Client) SessionAbort(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1098. req, err := NewSessionAbortRequest(c.Server, sessionID, params)
  1099. if err != nil {
  1100. return nil, err
  1101. }
  1102. req = req.WithContext(ctx)
  1103. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1104. return nil, err
  1105. }
  1106. return c.Client.Do(req)
  1107. }
  1108. func (c *Client) SessionChildren(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1109. req, err := NewSessionChildrenRequest(c.Server, sessionID, params)
  1110. if err != nil {
  1111. return nil, err
  1112. }
  1113. req = req.WithContext(ctx)
  1114. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1115. return nil, err
  1116. }
  1117. return c.Client.Do(req)
  1118. }
  1119. func (c *Client) SessionCommandWithBody(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1120. req, err := NewSessionCommandRequestWithBody(c.Server, sessionID, params, contentType, body)
  1121. if err != nil {
  1122. return nil, err
  1123. }
  1124. req = req.WithContext(ctx)
  1125. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1126. return nil, err
  1127. }
  1128. return c.Client.Do(req)
  1129. }
  1130. func (c *Client) SessionCommand(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1131. req, err := NewSessionCommandRequest(c.Server, sessionID, params, body)
  1132. if err != nil {
  1133. return nil, err
  1134. }
  1135. req = req.WithContext(ctx)
  1136. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1137. return nil, err
  1138. }
  1139. return c.Client.Do(req)
  1140. }
  1141. func (c *Client) SessionDiff(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1142. req, err := NewSessionDiffRequest(c.Server, sessionID, params)
  1143. if err != nil {
  1144. return nil, err
  1145. }
  1146. req = req.WithContext(ctx)
  1147. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1148. return nil, err
  1149. }
  1150. return c.Client.Do(req)
  1151. }
  1152. func (c *Client) SessionForkWithBody(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1153. req, err := NewSessionForkRequestWithBody(c.Server, sessionID, params, contentType, body)
  1154. if err != nil {
  1155. return nil, err
  1156. }
  1157. req = req.WithContext(ctx)
  1158. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1159. return nil, err
  1160. }
  1161. return c.Client.Do(req)
  1162. }
  1163. func (c *Client) SessionFork(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1164. req, err := NewSessionForkRequest(c.Server, sessionID, params, body)
  1165. if err != nil {
  1166. return nil, err
  1167. }
  1168. req = req.WithContext(ctx)
  1169. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1170. return nil, err
  1171. }
  1172. return c.Client.Do(req)
  1173. }
  1174. func (c *Client) SessionInitWithBody(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1175. req, err := NewSessionInitRequestWithBody(c.Server, sessionID, params, contentType, body)
  1176. if err != nil {
  1177. return nil, err
  1178. }
  1179. req = req.WithContext(ctx)
  1180. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1181. return nil, err
  1182. }
  1183. return c.Client.Do(req)
  1184. }
  1185. func (c *Client) SessionInit(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1186. req, err := NewSessionInitRequest(c.Server, sessionID, params, body)
  1187. if err != nil {
  1188. return nil, err
  1189. }
  1190. req = req.WithContext(ctx)
  1191. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1192. return nil, err
  1193. }
  1194. return c.Client.Do(req)
  1195. }
  1196. func (c *Client) SessionMessages(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1197. req, err := NewSessionMessagesRequest(c.Server, sessionID, params)
  1198. if err != nil {
  1199. return nil, err
  1200. }
  1201. req = req.WithContext(ctx)
  1202. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1203. return nil, err
  1204. }
  1205. return c.Client.Do(req)
  1206. }
  1207. func (c *Client) SessionPromptWithBody(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1208. req, err := NewSessionPromptRequestWithBody(c.Server, sessionID, params, contentType, body)
  1209. if err != nil {
  1210. return nil, err
  1211. }
  1212. req = req.WithContext(ctx)
  1213. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1214. return nil, err
  1215. }
  1216. return c.Client.Do(req)
  1217. }
  1218. func (c *Client) SessionPrompt(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1219. req, err := NewSessionPromptRequest(c.Server, sessionID, params, body)
  1220. if err != nil {
  1221. return nil, err
  1222. }
  1223. req = req.WithContext(ctx)
  1224. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1225. return nil, err
  1226. }
  1227. return c.Client.Do(req)
  1228. }
  1229. func (c *Client) SessionMessage(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1230. req, err := NewSessionMessageRequest(c.Server, sessionID, messageID, params)
  1231. if err != nil {
  1232. return nil, err
  1233. }
  1234. req = req.WithContext(ctx)
  1235. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1236. return nil, err
  1237. }
  1238. return c.Client.Do(req)
  1239. }
  1240. func (c *Client) PartDelete(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1241. req, err := NewPartDeleteRequest(c.Server, sessionID, messageID, partID, params)
  1242. if err != nil {
  1243. return nil, err
  1244. }
  1245. req = req.WithContext(ctx)
  1246. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1247. return nil, err
  1248. }
  1249. return c.Client.Do(req)
  1250. }
  1251. 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) {
  1252. req, err := NewPartUpdateRequestWithBody(c.Server, sessionID, messageID, partID, params, contentType, body)
  1253. if err != nil {
  1254. return nil, err
  1255. }
  1256. req = req.WithContext(ctx)
  1257. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1258. return nil, err
  1259. }
  1260. return c.Client.Do(req)
  1261. }
  1262. func (c *Client) PartUpdate(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1263. req, err := NewPartUpdateRequest(c.Server, sessionID, messageID, partID, params, body)
  1264. if err != nil {
  1265. return nil, err
  1266. }
  1267. req = req.WithContext(ctx)
  1268. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1269. return nil, err
  1270. }
  1271. return c.Client.Do(req)
  1272. }
  1273. func (c *Client) PermissionRespondWithBody(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1274. req, err := NewPermissionRespondRequestWithBody(c.Server, sessionID, permissionID, params, contentType, body)
  1275. if err != nil {
  1276. return nil, err
  1277. }
  1278. req = req.WithContext(ctx)
  1279. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1280. return nil, err
  1281. }
  1282. return c.Client.Do(req)
  1283. }
  1284. func (c *Client) PermissionRespond(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1285. req, err := NewPermissionRespondRequest(c.Server, sessionID, permissionID, params, body)
  1286. if err != nil {
  1287. return nil, err
  1288. }
  1289. req = req.WithContext(ctx)
  1290. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1291. return nil, err
  1292. }
  1293. return c.Client.Do(req)
  1294. }
  1295. func (c *Client) SessionPromptAsyncWithBody(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1296. req, err := NewSessionPromptAsyncRequestWithBody(c.Server, sessionID, params, contentType, body)
  1297. if err != nil {
  1298. return nil, err
  1299. }
  1300. req = req.WithContext(ctx)
  1301. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1302. return nil, err
  1303. }
  1304. return c.Client.Do(req)
  1305. }
  1306. func (c *Client) SessionPromptAsync(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1307. req, err := NewSessionPromptAsyncRequest(c.Server, sessionID, params, body)
  1308. if err != nil {
  1309. return nil, err
  1310. }
  1311. req = req.WithContext(ctx)
  1312. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1313. return nil, err
  1314. }
  1315. return c.Client.Do(req)
  1316. }
  1317. func (c *Client) SessionRevertWithBody(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1318. req, err := NewSessionRevertRequestWithBody(c.Server, sessionID, params, contentType, body)
  1319. if err != nil {
  1320. return nil, err
  1321. }
  1322. req = req.WithContext(ctx)
  1323. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1324. return nil, err
  1325. }
  1326. return c.Client.Do(req)
  1327. }
  1328. func (c *Client) SessionRevert(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1329. req, err := NewSessionRevertRequest(c.Server, sessionID, params, body)
  1330. if err != nil {
  1331. return nil, err
  1332. }
  1333. req = req.WithContext(ctx)
  1334. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1335. return nil, err
  1336. }
  1337. return c.Client.Do(req)
  1338. }
  1339. func (c *Client) SessionUnshare(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1340. req, err := NewSessionUnshareRequest(c.Server, sessionID, params)
  1341. if err != nil {
  1342. return nil, err
  1343. }
  1344. req = req.WithContext(ctx)
  1345. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1346. return nil, err
  1347. }
  1348. return c.Client.Do(req)
  1349. }
  1350. func (c *Client) SessionShare(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1351. req, err := NewSessionShareRequest(c.Server, sessionID, params)
  1352. if err != nil {
  1353. return nil, err
  1354. }
  1355. req = req.WithContext(ctx)
  1356. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1357. return nil, err
  1358. }
  1359. return c.Client.Do(req)
  1360. }
  1361. func (c *Client) SessionShellWithBody(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1362. req, err := NewSessionShellRequestWithBody(c.Server, sessionID, params, contentType, body)
  1363. if err != nil {
  1364. return nil, err
  1365. }
  1366. req = req.WithContext(ctx)
  1367. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1368. return nil, err
  1369. }
  1370. return c.Client.Do(req)
  1371. }
  1372. func (c *Client) SessionShell(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1373. req, err := NewSessionShellRequest(c.Server, sessionID, params, body)
  1374. if err != nil {
  1375. return nil, err
  1376. }
  1377. req = req.WithContext(ctx)
  1378. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1379. return nil, err
  1380. }
  1381. return c.Client.Do(req)
  1382. }
  1383. func (c *Client) SessionSummarizeWithBody(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1384. req, err := NewSessionSummarizeRequestWithBody(c.Server, sessionID, params, contentType, body)
  1385. if err != nil {
  1386. return nil, err
  1387. }
  1388. req = req.WithContext(ctx)
  1389. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1390. return nil, err
  1391. }
  1392. return c.Client.Do(req)
  1393. }
  1394. func (c *Client) SessionSummarize(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1395. req, err := NewSessionSummarizeRequest(c.Server, sessionID, params, body)
  1396. if err != nil {
  1397. return nil, err
  1398. }
  1399. req = req.WithContext(ctx)
  1400. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1401. return nil, err
  1402. }
  1403. return c.Client.Do(req)
  1404. }
  1405. func (c *Client) SessionTodo(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1406. req, err := NewSessionTodoRequest(c.Server, sessionID, params)
  1407. if err != nil {
  1408. return nil, err
  1409. }
  1410. req = req.WithContext(ctx)
  1411. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1412. return nil, err
  1413. }
  1414. return c.Client.Do(req)
  1415. }
  1416. func (c *Client) SessionUnrevert(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1417. req, err := NewSessionUnrevertRequest(c.Server, sessionID, params)
  1418. if err != nil {
  1419. return nil, err
  1420. }
  1421. req = req.WithContext(ctx)
  1422. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1423. return nil, err
  1424. }
  1425. return c.Client.Do(req)
  1426. }
  1427. func (c *Client) TuiAppendPromptWithBody(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1428. req, err := NewTuiAppendPromptRequestWithBody(c.Server, params, contentType, body)
  1429. if err != nil {
  1430. return nil, err
  1431. }
  1432. req = req.WithContext(ctx)
  1433. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1434. return nil, err
  1435. }
  1436. return c.Client.Do(req)
  1437. }
  1438. func (c *Client) TuiAppendPrompt(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1439. req, err := NewTuiAppendPromptRequest(c.Server, params, body)
  1440. if err != nil {
  1441. return nil, err
  1442. }
  1443. req = req.WithContext(ctx)
  1444. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1445. return nil, err
  1446. }
  1447. return c.Client.Do(req)
  1448. }
  1449. func (c *Client) TuiClearPrompt(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1450. req, err := NewTuiClearPromptRequest(c.Server, params)
  1451. if err != nil {
  1452. return nil, err
  1453. }
  1454. req = req.WithContext(ctx)
  1455. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1456. return nil, err
  1457. }
  1458. return c.Client.Do(req)
  1459. }
  1460. func (c *Client) TuiControlNext(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1461. req, err := NewTuiControlNextRequest(c.Server, params)
  1462. if err != nil {
  1463. return nil, err
  1464. }
  1465. req = req.WithContext(ctx)
  1466. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1467. return nil, err
  1468. }
  1469. return c.Client.Do(req)
  1470. }
  1471. func (c *Client) TuiControlResponseWithBody(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1472. req, err := NewTuiControlResponseRequestWithBody(c.Server, params, contentType, body)
  1473. if err != nil {
  1474. return nil, err
  1475. }
  1476. req = req.WithContext(ctx)
  1477. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1478. return nil, err
  1479. }
  1480. return c.Client.Do(req)
  1481. }
  1482. func (c *Client) TuiControlResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1483. req, err := NewTuiControlResponseRequest(c.Server, params, body)
  1484. if err != nil {
  1485. return nil, err
  1486. }
  1487. req = req.WithContext(ctx)
  1488. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1489. return nil, err
  1490. }
  1491. return c.Client.Do(req)
  1492. }
  1493. func (c *Client) TuiExecuteCommandWithBody(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1494. req, err := NewTuiExecuteCommandRequestWithBody(c.Server, params, contentType, body)
  1495. if err != nil {
  1496. return nil, err
  1497. }
  1498. req = req.WithContext(ctx)
  1499. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1500. return nil, err
  1501. }
  1502. return c.Client.Do(req)
  1503. }
  1504. func (c *Client) TuiExecuteCommand(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1505. req, err := NewTuiExecuteCommandRequest(c.Server, params, body)
  1506. if err != nil {
  1507. return nil, err
  1508. }
  1509. req = req.WithContext(ctx)
  1510. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1511. return nil, err
  1512. }
  1513. return c.Client.Do(req)
  1514. }
  1515. func (c *Client) TuiOpenHelp(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1516. req, err := NewTuiOpenHelpRequest(c.Server, params)
  1517. if err != nil {
  1518. return nil, err
  1519. }
  1520. req = req.WithContext(ctx)
  1521. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1522. return nil, err
  1523. }
  1524. return c.Client.Do(req)
  1525. }
  1526. func (c *Client) TuiOpenModels(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1527. req, err := NewTuiOpenModelsRequest(c.Server, params)
  1528. if err != nil {
  1529. return nil, err
  1530. }
  1531. req = req.WithContext(ctx)
  1532. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1533. return nil, err
  1534. }
  1535. return c.Client.Do(req)
  1536. }
  1537. func (c *Client) TuiOpenSessions(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1538. req, err := NewTuiOpenSessionsRequest(c.Server, params)
  1539. if err != nil {
  1540. return nil, err
  1541. }
  1542. req = req.WithContext(ctx)
  1543. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1544. return nil, err
  1545. }
  1546. return c.Client.Do(req)
  1547. }
  1548. func (c *Client) TuiOpenThemes(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1549. req, err := NewTuiOpenThemesRequest(c.Server, params)
  1550. if err != nil {
  1551. return nil, err
  1552. }
  1553. req = req.WithContext(ctx)
  1554. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1555. return nil, err
  1556. }
  1557. return c.Client.Do(req)
  1558. }
  1559. func (c *Client) TuiPublishWithBody(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1560. req, err := NewTuiPublishRequestWithBody(c.Server, params, contentType, body)
  1561. if err != nil {
  1562. return nil, err
  1563. }
  1564. req = req.WithContext(ctx)
  1565. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1566. return nil, err
  1567. }
  1568. return c.Client.Do(req)
  1569. }
  1570. func (c *Client) TuiPublish(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1571. req, err := NewTuiPublishRequest(c.Server, params, body)
  1572. if err != nil {
  1573. return nil, err
  1574. }
  1575. req = req.WithContext(ctx)
  1576. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1577. return nil, err
  1578. }
  1579. return c.Client.Do(req)
  1580. }
  1581. func (c *Client) TuiSelectSessionWithBody(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1582. req, err := NewTuiSelectSessionRequestWithBody(c.Server, params, contentType, body)
  1583. if err != nil {
  1584. return nil, err
  1585. }
  1586. req = req.WithContext(ctx)
  1587. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1588. return nil, err
  1589. }
  1590. return c.Client.Do(req)
  1591. }
  1592. func (c *Client) TuiSelectSession(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1593. req, err := NewTuiSelectSessionRequest(c.Server, params, body)
  1594. if err != nil {
  1595. return nil, err
  1596. }
  1597. req = req.WithContext(ctx)
  1598. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1599. return nil, err
  1600. }
  1601. return c.Client.Do(req)
  1602. }
  1603. func (c *Client) TuiShowToastWithBody(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1604. req, err := NewTuiShowToastRequestWithBody(c.Server, params, contentType, body)
  1605. if err != nil {
  1606. return nil, err
  1607. }
  1608. req = req.WithContext(ctx)
  1609. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1610. return nil, err
  1611. }
  1612. return c.Client.Do(req)
  1613. }
  1614. func (c *Client) TuiShowToast(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1615. req, err := NewTuiShowToastRequest(c.Server, params, body)
  1616. if err != nil {
  1617. return nil, err
  1618. }
  1619. req = req.WithContext(ctx)
  1620. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1621. return nil, err
  1622. }
  1623. return c.Client.Do(req)
  1624. }
  1625. func (c *Client) TuiSubmitPrompt(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1626. req, err := NewTuiSubmitPromptRequest(c.Server, params)
  1627. if err != nil {
  1628. return nil, err
  1629. }
  1630. req = req.WithContext(ctx)
  1631. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1632. return nil, err
  1633. }
  1634. return c.Client.Do(req)
  1635. }
  1636. func (c *Client) VcsGet(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
  1637. req, err := NewVcsGetRequest(c.Server, params)
  1638. if err != nil {
  1639. return nil, err
  1640. }
  1641. req = req.WithContext(ctx)
  1642. if err := c.applyEditors(ctx, req, reqEditors); err != nil {
  1643. return nil, err
  1644. }
  1645. return c.Client.Do(req)
  1646. }
  1647. // NewAppAgentsRequest generates requests for AppAgents
  1648. func NewAppAgentsRequest(server string, params *AppAgentsParams) (*http.Request, error) {
  1649. var err error
  1650. serverURL, err := url.Parse(server)
  1651. if err != nil {
  1652. return nil, err
  1653. }
  1654. operationPath := fmt.Sprintf("/agent")
  1655. if operationPath[0] == '/' {
  1656. operationPath = "." + operationPath
  1657. }
  1658. queryURL, err := serverURL.Parse(operationPath)
  1659. if err != nil {
  1660. return nil, err
  1661. }
  1662. if params != nil {
  1663. queryValues := queryURL.Query()
  1664. if params.Directory != nil {
  1665. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1666. return nil, err
  1667. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1668. return nil, err
  1669. } else {
  1670. for k, v := range parsed {
  1671. for _, v2 := range v {
  1672. queryValues.Add(k, v2)
  1673. }
  1674. }
  1675. }
  1676. }
  1677. queryURL.RawQuery = queryValues.Encode()
  1678. }
  1679. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1680. if err != nil {
  1681. return nil, err
  1682. }
  1683. return req, nil
  1684. }
  1685. // NewAuthSetRequest calls the generic AuthSet builder with application/json body
  1686. func NewAuthSetRequest(server string, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody) (*http.Request, error) {
  1687. var bodyReader io.Reader
  1688. buf, err := json.Marshal(body)
  1689. if err != nil {
  1690. return nil, err
  1691. }
  1692. bodyReader = bytes.NewReader(buf)
  1693. return NewAuthSetRequestWithBody(server, providerID, params, "application/json", bodyReader)
  1694. }
  1695. // NewAuthSetRequestWithBody generates requests for AuthSet with any type of body
  1696. func NewAuthSetRequestWithBody(server string, providerID string, params *AuthSetParams, contentType string, body io.Reader) (*http.Request, error) {
  1697. var err error
  1698. var pathParam0 string
  1699. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  1700. if err != nil {
  1701. return nil, err
  1702. }
  1703. serverURL, err := url.Parse(server)
  1704. if err != nil {
  1705. return nil, err
  1706. }
  1707. operationPath := fmt.Sprintf("/auth/%s", pathParam0)
  1708. if operationPath[0] == '/' {
  1709. operationPath = "." + operationPath
  1710. }
  1711. queryURL, err := serverURL.Parse(operationPath)
  1712. if err != nil {
  1713. return nil, err
  1714. }
  1715. if params != nil {
  1716. queryValues := queryURL.Query()
  1717. if params.Directory != nil {
  1718. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1719. return nil, err
  1720. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1721. return nil, err
  1722. } else {
  1723. for k, v := range parsed {
  1724. for _, v2 := range v {
  1725. queryValues.Add(k, v2)
  1726. }
  1727. }
  1728. }
  1729. }
  1730. queryURL.RawQuery = queryValues.Encode()
  1731. }
  1732. req, err := http.NewRequest("PUT", queryURL.String(), body)
  1733. if err != nil {
  1734. return nil, err
  1735. }
  1736. req.Header.Add("Content-Type", contentType)
  1737. return req, nil
  1738. }
  1739. // NewCommandListRequest generates requests for CommandList
  1740. func NewCommandListRequest(server string, params *CommandListParams) (*http.Request, error) {
  1741. var err error
  1742. serverURL, err := url.Parse(server)
  1743. if err != nil {
  1744. return nil, err
  1745. }
  1746. operationPath := fmt.Sprintf("/command")
  1747. if operationPath[0] == '/' {
  1748. operationPath = "." + operationPath
  1749. }
  1750. queryURL, err := serverURL.Parse(operationPath)
  1751. if err != nil {
  1752. return nil, err
  1753. }
  1754. if params != nil {
  1755. queryValues := queryURL.Query()
  1756. if params.Directory != nil {
  1757. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1758. return nil, err
  1759. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1760. return nil, err
  1761. } else {
  1762. for k, v := range parsed {
  1763. for _, v2 := range v {
  1764. queryValues.Add(k, v2)
  1765. }
  1766. }
  1767. }
  1768. }
  1769. queryURL.RawQuery = queryValues.Encode()
  1770. }
  1771. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1772. if err != nil {
  1773. return nil, err
  1774. }
  1775. return req, nil
  1776. }
  1777. // NewConfigGetRequest generates requests for ConfigGet
  1778. func NewConfigGetRequest(server string, params *ConfigGetParams) (*http.Request, error) {
  1779. var err error
  1780. serverURL, err := url.Parse(server)
  1781. if err != nil {
  1782. return nil, err
  1783. }
  1784. operationPath := fmt.Sprintf("/config")
  1785. if operationPath[0] == '/' {
  1786. operationPath = "." + operationPath
  1787. }
  1788. queryURL, err := serverURL.Parse(operationPath)
  1789. if err != nil {
  1790. return nil, err
  1791. }
  1792. if params != nil {
  1793. queryValues := queryURL.Query()
  1794. if params.Directory != nil {
  1795. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1796. return nil, err
  1797. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1798. return nil, err
  1799. } else {
  1800. for k, v := range parsed {
  1801. for _, v2 := range v {
  1802. queryValues.Add(k, v2)
  1803. }
  1804. }
  1805. }
  1806. }
  1807. queryURL.RawQuery = queryValues.Encode()
  1808. }
  1809. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1810. if err != nil {
  1811. return nil, err
  1812. }
  1813. return req, nil
  1814. }
  1815. // NewConfigUpdateRequest calls the generic ConfigUpdate builder with application/json body
  1816. func NewConfigUpdateRequest(server string, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody) (*http.Request, error) {
  1817. var bodyReader io.Reader
  1818. buf, err := json.Marshal(body)
  1819. if err != nil {
  1820. return nil, err
  1821. }
  1822. bodyReader = bytes.NewReader(buf)
  1823. return NewConfigUpdateRequestWithBody(server, params, "application/json", bodyReader)
  1824. }
  1825. // NewConfigUpdateRequestWithBody generates requests for ConfigUpdate with any type of body
  1826. func NewConfigUpdateRequestWithBody(server string, params *ConfigUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  1827. var err error
  1828. serverURL, err := url.Parse(server)
  1829. if err != nil {
  1830. return nil, err
  1831. }
  1832. operationPath := fmt.Sprintf("/config")
  1833. if operationPath[0] == '/' {
  1834. operationPath = "." + operationPath
  1835. }
  1836. queryURL, err := serverURL.Parse(operationPath)
  1837. if err != nil {
  1838. return nil, err
  1839. }
  1840. if params != nil {
  1841. queryValues := queryURL.Query()
  1842. if params.Directory != nil {
  1843. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1844. return nil, err
  1845. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1846. return nil, err
  1847. } else {
  1848. for k, v := range parsed {
  1849. for _, v2 := range v {
  1850. queryValues.Add(k, v2)
  1851. }
  1852. }
  1853. }
  1854. }
  1855. queryURL.RawQuery = queryValues.Encode()
  1856. }
  1857. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  1858. if err != nil {
  1859. return nil, err
  1860. }
  1861. req.Header.Add("Content-Type", contentType)
  1862. return req, nil
  1863. }
  1864. // NewConfigProvidersRequest generates requests for ConfigProviders
  1865. func NewConfigProvidersRequest(server string, params *ConfigProvidersParams) (*http.Request, error) {
  1866. var err error
  1867. serverURL, err := url.Parse(server)
  1868. if err != nil {
  1869. return nil, err
  1870. }
  1871. operationPath := fmt.Sprintf("/config/providers")
  1872. if operationPath[0] == '/' {
  1873. operationPath = "." + operationPath
  1874. }
  1875. queryURL, err := serverURL.Parse(operationPath)
  1876. if err != nil {
  1877. return nil, err
  1878. }
  1879. if params != nil {
  1880. queryValues := queryURL.Query()
  1881. if params.Directory != nil {
  1882. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1883. return nil, err
  1884. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1885. return nil, err
  1886. } else {
  1887. for k, v := range parsed {
  1888. for _, v2 := range v {
  1889. queryValues.Add(k, v2)
  1890. }
  1891. }
  1892. }
  1893. }
  1894. queryURL.RawQuery = queryValues.Encode()
  1895. }
  1896. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1897. if err != nil {
  1898. return nil, err
  1899. }
  1900. return req, nil
  1901. }
  1902. // NewEventSubscribeRequest generates requests for EventSubscribe
  1903. func NewEventSubscribeRequest(server string, params *EventSubscribeParams) (*http.Request, error) {
  1904. var err error
  1905. serverURL, err := url.Parse(server)
  1906. if err != nil {
  1907. return nil, err
  1908. }
  1909. operationPath := fmt.Sprintf("/event")
  1910. if operationPath[0] == '/' {
  1911. operationPath = "." + operationPath
  1912. }
  1913. queryURL, err := serverURL.Parse(operationPath)
  1914. if err != nil {
  1915. return nil, err
  1916. }
  1917. if params != nil {
  1918. queryValues := queryURL.Query()
  1919. if params.Directory != nil {
  1920. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1921. return nil, err
  1922. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1923. return nil, err
  1924. } else {
  1925. for k, v := range parsed {
  1926. for _, v2 := range v {
  1927. queryValues.Add(k, v2)
  1928. }
  1929. }
  1930. }
  1931. }
  1932. queryURL.RawQuery = queryValues.Encode()
  1933. }
  1934. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1935. if err != nil {
  1936. return nil, err
  1937. }
  1938. return req, nil
  1939. }
  1940. // NewExperimentalResourceListRequest generates requests for ExperimentalResourceList
  1941. func NewExperimentalResourceListRequest(server string, params *ExperimentalResourceListParams) (*http.Request, error) {
  1942. var err error
  1943. serverURL, err := url.Parse(server)
  1944. if err != nil {
  1945. return nil, err
  1946. }
  1947. operationPath := fmt.Sprintf("/experimental/resource")
  1948. if operationPath[0] == '/' {
  1949. operationPath = "." + operationPath
  1950. }
  1951. queryURL, err := serverURL.Parse(operationPath)
  1952. if err != nil {
  1953. return nil, err
  1954. }
  1955. if params != nil {
  1956. queryValues := queryURL.Query()
  1957. if params.Directory != nil {
  1958. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1959. return nil, err
  1960. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1961. return nil, err
  1962. } else {
  1963. for k, v := range parsed {
  1964. for _, v2 := range v {
  1965. queryValues.Add(k, v2)
  1966. }
  1967. }
  1968. }
  1969. }
  1970. queryURL.RawQuery = queryValues.Encode()
  1971. }
  1972. req, err := http.NewRequest("GET", queryURL.String(), nil)
  1973. if err != nil {
  1974. return nil, err
  1975. }
  1976. return req, nil
  1977. }
  1978. // NewToolListRequest generates requests for ToolList
  1979. func NewToolListRequest(server string, params *ToolListParams) (*http.Request, error) {
  1980. var err error
  1981. serverURL, err := url.Parse(server)
  1982. if err != nil {
  1983. return nil, err
  1984. }
  1985. operationPath := fmt.Sprintf("/experimental/tool")
  1986. if operationPath[0] == '/' {
  1987. operationPath = "." + operationPath
  1988. }
  1989. queryURL, err := serverURL.Parse(operationPath)
  1990. if err != nil {
  1991. return nil, err
  1992. }
  1993. if params != nil {
  1994. queryValues := queryURL.Query()
  1995. if params.Directory != nil {
  1996. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  1997. return nil, err
  1998. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  1999. return nil, err
  2000. } else {
  2001. for k, v := range parsed {
  2002. for _, v2 := range v {
  2003. queryValues.Add(k, v2)
  2004. }
  2005. }
  2006. }
  2007. }
  2008. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider", runtime.ParamLocationQuery, params.Provider); err != nil {
  2009. return nil, err
  2010. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2011. return nil, err
  2012. } else {
  2013. for k, v := range parsed {
  2014. for _, v2 := range v {
  2015. queryValues.Add(k, v2)
  2016. }
  2017. }
  2018. }
  2019. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "model", runtime.ParamLocationQuery, params.Model); err != nil {
  2020. return nil, err
  2021. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2022. return nil, err
  2023. } else {
  2024. for k, v := range parsed {
  2025. for _, v2 := range v {
  2026. queryValues.Add(k, v2)
  2027. }
  2028. }
  2029. }
  2030. queryURL.RawQuery = queryValues.Encode()
  2031. }
  2032. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2033. if err != nil {
  2034. return nil, err
  2035. }
  2036. return req, nil
  2037. }
  2038. // NewToolIdsRequest generates requests for ToolIds
  2039. func NewToolIdsRequest(server string, params *ToolIdsParams) (*http.Request, error) {
  2040. var err error
  2041. serverURL, err := url.Parse(server)
  2042. if err != nil {
  2043. return nil, err
  2044. }
  2045. operationPath := fmt.Sprintf("/experimental/tool/ids")
  2046. if operationPath[0] == '/' {
  2047. operationPath = "." + operationPath
  2048. }
  2049. queryURL, err := serverURL.Parse(operationPath)
  2050. if err != nil {
  2051. return nil, err
  2052. }
  2053. if params != nil {
  2054. queryValues := queryURL.Query()
  2055. if params.Directory != nil {
  2056. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2057. return nil, err
  2058. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2059. return nil, err
  2060. } else {
  2061. for k, v := range parsed {
  2062. for _, v2 := range v {
  2063. queryValues.Add(k, v2)
  2064. }
  2065. }
  2066. }
  2067. }
  2068. queryURL.RawQuery = queryValues.Encode()
  2069. }
  2070. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2071. if err != nil {
  2072. return nil, err
  2073. }
  2074. return req, nil
  2075. }
  2076. // NewWorktreeListRequest generates requests for WorktreeList
  2077. func NewWorktreeListRequest(server string, params *WorktreeListParams) (*http.Request, error) {
  2078. var err error
  2079. serverURL, err := url.Parse(server)
  2080. if err != nil {
  2081. return nil, err
  2082. }
  2083. operationPath := fmt.Sprintf("/experimental/worktree")
  2084. if operationPath[0] == '/' {
  2085. operationPath = "." + operationPath
  2086. }
  2087. queryURL, err := serverURL.Parse(operationPath)
  2088. if err != nil {
  2089. return nil, err
  2090. }
  2091. if params != nil {
  2092. queryValues := queryURL.Query()
  2093. if params.Directory != nil {
  2094. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2095. return nil, err
  2096. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2097. return nil, err
  2098. } else {
  2099. for k, v := range parsed {
  2100. for _, v2 := range v {
  2101. queryValues.Add(k, v2)
  2102. }
  2103. }
  2104. }
  2105. }
  2106. queryURL.RawQuery = queryValues.Encode()
  2107. }
  2108. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2109. if err != nil {
  2110. return nil, err
  2111. }
  2112. return req, nil
  2113. }
  2114. // NewWorktreeCreateRequest calls the generic WorktreeCreate builder with application/json body
  2115. func NewWorktreeCreateRequest(server string, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody) (*http.Request, error) {
  2116. var bodyReader io.Reader
  2117. buf, err := json.Marshal(body)
  2118. if err != nil {
  2119. return nil, err
  2120. }
  2121. bodyReader = bytes.NewReader(buf)
  2122. return NewWorktreeCreateRequestWithBody(server, params, "application/json", bodyReader)
  2123. }
  2124. // NewWorktreeCreateRequestWithBody generates requests for WorktreeCreate with any type of body
  2125. func NewWorktreeCreateRequestWithBody(server string, params *WorktreeCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  2126. var err error
  2127. serverURL, err := url.Parse(server)
  2128. if err != nil {
  2129. return nil, err
  2130. }
  2131. operationPath := fmt.Sprintf("/experimental/worktree")
  2132. if operationPath[0] == '/' {
  2133. operationPath = "." + operationPath
  2134. }
  2135. queryURL, err := serverURL.Parse(operationPath)
  2136. if err != nil {
  2137. return nil, err
  2138. }
  2139. if params != nil {
  2140. queryValues := queryURL.Query()
  2141. if params.Directory != nil {
  2142. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2143. return nil, err
  2144. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2145. return nil, err
  2146. } else {
  2147. for k, v := range parsed {
  2148. for _, v2 := range v {
  2149. queryValues.Add(k, v2)
  2150. }
  2151. }
  2152. }
  2153. }
  2154. queryURL.RawQuery = queryValues.Encode()
  2155. }
  2156. req, err := http.NewRequest("POST", queryURL.String(), body)
  2157. if err != nil {
  2158. return nil, err
  2159. }
  2160. req.Header.Add("Content-Type", contentType)
  2161. return req, nil
  2162. }
  2163. // NewFileListRequest generates requests for FileList
  2164. func NewFileListRequest(server string, params *FileListParams) (*http.Request, error) {
  2165. var err error
  2166. serverURL, err := url.Parse(server)
  2167. if err != nil {
  2168. return nil, err
  2169. }
  2170. operationPath := fmt.Sprintf("/file")
  2171. if operationPath[0] == '/' {
  2172. operationPath = "." + operationPath
  2173. }
  2174. queryURL, err := serverURL.Parse(operationPath)
  2175. if err != nil {
  2176. return nil, err
  2177. }
  2178. if params != nil {
  2179. queryValues := queryURL.Query()
  2180. if params.Directory != nil {
  2181. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2182. return nil, err
  2183. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2184. return nil, err
  2185. } else {
  2186. for k, v := range parsed {
  2187. for _, v2 := range v {
  2188. queryValues.Add(k, v2)
  2189. }
  2190. }
  2191. }
  2192. }
  2193. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "path", runtime.ParamLocationQuery, params.Path); err != nil {
  2194. return nil, err
  2195. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2196. return nil, err
  2197. } else {
  2198. for k, v := range parsed {
  2199. for _, v2 := range v {
  2200. queryValues.Add(k, v2)
  2201. }
  2202. }
  2203. }
  2204. queryURL.RawQuery = queryValues.Encode()
  2205. }
  2206. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2207. if err != nil {
  2208. return nil, err
  2209. }
  2210. return req, nil
  2211. }
  2212. // NewFileReadRequest generates requests for FileRead
  2213. func NewFileReadRequest(server string, params *FileReadParams) (*http.Request, error) {
  2214. var err error
  2215. serverURL, err := url.Parse(server)
  2216. if err != nil {
  2217. return nil, err
  2218. }
  2219. operationPath := fmt.Sprintf("/file/content")
  2220. if operationPath[0] == '/' {
  2221. operationPath = "." + operationPath
  2222. }
  2223. queryURL, err := serverURL.Parse(operationPath)
  2224. if err != nil {
  2225. return nil, err
  2226. }
  2227. if params != nil {
  2228. queryValues := queryURL.Query()
  2229. if params.Directory != nil {
  2230. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2231. return nil, err
  2232. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2233. return nil, err
  2234. } else {
  2235. for k, v := range parsed {
  2236. for _, v2 := range v {
  2237. queryValues.Add(k, v2)
  2238. }
  2239. }
  2240. }
  2241. }
  2242. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "path", runtime.ParamLocationQuery, params.Path); err != nil {
  2243. return nil, err
  2244. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2245. return nil, err
  2246. } else {
  2247. for k, v := range parsed {
  2248. for _, v2 := range v {
  2249. queryValues.Add(k, v2)
  2250. }
  2251. }
  2252. }
  2253. queryURL.RawQuery = queryValues.Encode()
  2254. }
  2255. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2256. if err != nil {
  2257. return nil, err
  2258. }
  2259. return req, nil
  2260. }
  2261. // NewFileStatusRequest generates requests for FileStatus
  2262. func NewFileStatusRequest(server string, params *FileStatusParams) (*http.Request, error) {
  2263. var err error
  2264. serverURL, err := url.Parse(server)
  2265. if err != nil {
  2266. return nil, err
  2267. }
  2268. operationPath := fmt.Sprintf("/file/status")
  2269. if operationPath[0] == '/' {
  2270. operationPath = "." + operationPath
  2271. }
  2272. queryURL, err := serverURL.Parse(operationPath)
  2273. if err != nil {
  2274. return nil, err
  2275. }
  2276. if params != nil {
  2277. queryValues := queryURL.Query()
  2278. if params.Directory != nil {
  2279. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2280. return nil, err
  2281. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2282. return nil, err
  2283. } else {
  2284. for k, v := range parsed {
  2285. for _, v2 := range v {
  2286. queryValues.Add(k, v2)
  2287. }
  2288. }
  2289. }
  2290. }
  2291. queryURL.RawQuery = queryValues.Encode()
  2292. }
  2293. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2294. if err != nil {
  2295. return nil, err
  2296. }
  2297. return req, nil
  2298. }
  2299. // NewFindTextRequest generates requests for FindText
  2300. func NewFindTextRequest(server string, params *FindTextParams) (*http.Request, error) {
  2301. var err error
  2302. serverURL, err := url.Parse(server)
  2303. if err != nil {
  2304. return nil, err
  2305. }
  2306. operationPath := fmt.Sprintf("/find")
  2307. if operationPath[0] == '/' {
  2308. operationPath = "." + operationPath
  2309. }
  2310. queryURL, err := serverURL.Parse(operationPath)
  2311. if err != nil {
  2312. return nil, err
  2313. }
  2314. if params != nil {
  2315. queryValues := queryURL.Query()
  2316. if params.Directory != nil {
  2317. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2318. return nil, err
  2319. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2320. return nil, err
  2321. } else {
  2322. for k, v := range parsed {
  2323. for _, v2 := range v {
  2324. queryValues.Add(k, v2)
  2325. }
  2326. }
  2327. }
  2328. }
  2329. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pattern", runtime.ParamLocationQuery, params.Pattern); err != nil {
  2330. return nil, err
  2331. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2332. return nil, err
  2333. } else {
  2334. for k, v := range parsed {
  2335. for _, v2 := range v {
  2336. queryValues.Add(k, v2)
  2337. }
  2338. }
  2339. }
  2340. queryURL.RawQuery = queryValues.Encode()
  2341. }
  2342. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2343. if err != nil {
  2344. return nil, err
  2345. }
  2346. return req, nil
  2347. }
  2348. // NewFindFilesRequest generates requests for FindFiles
  2349. func NewFindFilesRequest(server string, params *FindFilesParams) (*http.Request, error) {
  2350. var err error
  2351. serverURL, err := url.Parse(server)
  2352. if err != nil {
  2353. return nil, err
  2354. }
  2355. operationPath := fmt.Sprintf("/find/file")
  2356. if operationPath[0] == '/' {
  2357. operationPath = "." + operationPath
  2358. }
  2359. queryURL, err := serverURL.Parse(operationPath)
  2360. if err != nil {
  2361. return nil, err
  2362. }
  2363. if params != nil {
  2364. queryValues := queryURL.Query()
  2365. if params.Directory != nil {
  2366. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2367. return nil, err
  2368. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2369. return nil, err
  2370. } else {
  2371. for k, v := range parsed {
  2372. for _, v2 := range v {
  2373. queryValues.Add(k, v2)
  2374. }
  2375. }
  2376. }
  2377. }
  2378. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "query", runtime.ParamLocationQuery, params.Query); err != nil {
  2379. return nil, err
  2380. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2381. return nil, err
  2382. } else {
  2383. for k, v := range parsed {
  2384. for _, v2 := range v {
  2385. queryValues.Add(k, v2)
  2386. }
  2387. }
  2388. }
  2389. if params.Dirs != nil {
  2390. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dirs", runtime.ParamLocationQuery, *params.Dirs); err != nil {
  2391. return nil, err
  2392. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2393. return nil, err
  2394. } else {
  2395. for k, v := range parsed {
  2396. for _, v2 := range v {
  2397. queryValues.Add(k, v2)
  2398. }
  2399. }
  2400. }
  2401. }
  2402. if params.Type != nil {
  2403. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil {
  2404. return nil, err
  2405. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2406. return nil, err
  2407. } else {
  2408. for k, v := range parsed {
  2409. for _, v2 := range v {
  2410. queryValues.Add(k, v2)
  2411. }
  2412. }
  2413. }
  2414. }
  2415. if params.Limit != nil {
  2416. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  2417. return nil, err
  2418. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2419. return nil, err
  2420. } else {
  2421. for k, v := range parsed {
  2422. for _, v2 := range v {
  2423. queryValues.Add(k, v2)
  2424. }
  2425. }
  2426. }
  2427. }
  2428. queryURL.RawQuery = queryValues.Encode()
  2429. }
  2430. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2431. if err != nil {
  2432. return nil, err
  2433. }
  2434. return req, nil
  2435. }
  2436. // NewFindSymbolsRequest generates requests for FindSymbols
  2437. func NewFindSymbolsRequest(server string, params *FindSymbolsParams) (*http.Request, error) {
  2438. var err error
  2439. serverURL, err := url.Parse(server)
  2440. if err != nil {
  2441. return nil, err
  2442. }
  2443. operationPath := fmt.Sprintf("/find/symbol")
  2444. if operationPath[0] == '/' {
  2445. operationPath = "." + operationPath
  2446. }
  2447. queryURL, err := serverURL.Parse(operationPath)
  2448. if err != nil {
  2449. return nil, err
  2450. }
  2451. if params != nil {
  2452. queryValues := queryURL.Query()
  2453. if params.Directory != nil {
  2454. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2455. return nil, err
  2456. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2457. return nil, err
  2458. } else {
  2459. for k, v := range parsed {
  2460. for _, v2 := range v {
  2461. queryValues.Add(k, v2)
  2462. }
  2463. }
  2464. }
  2465. }
  2466. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "query", runtime.ParamLocationQuery, params.Query); err != nil {
  2467. return nil, err
  2468. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2469. return nil, err
  2470. } else {
  2471. for k, v := range parsed {
  2472. for _, v2 := range v {
  2473. queryValues.Add(k, v2)
  2474. }
  2475. }
  2476. }
  2477. queryURL.RawQuery = queryValues.Encode()
  2478. }
  2479. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2480. if err != nil {
  2481. return nil, err
  2482. }
  2483. return req, nil
  2484. }
  2485. // NewFormatterStatusRequest generates requests for FormatterStatus
  2486. func NewFormatterStatusRequest(server string, params *FormatterStatusParams) (*http.Request, error) {
  2487. var err error
  2488. serverURL, err := url.Parse(server)
  2489. if err != nil {
  2490. return nil, err
  2491. }
  2492. operationPath := fmt.Sprintf("/formatter")
  2493. if operationPath[0] == '/' {
  2494. operationPath = "." + operationPath
  2495. }
  2496. queryURL, err := serverURL.Parse(operationPath)
  2497. if err != nil {
  2498. return nil, err
  2499. }
  2500. if params != nil {
  2501. queryValues := queryURL.Query()
  2502. if params.Directory != nil {
  2503. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2504. return nil, err
  2505. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2506. return nil, err
  2507. } else {
  2508. for k, v := range parsed {
  2509. for _, v2 := range v {
  2510. queryValues.Add(k, v2)
  2511. }
  2512. }
  2513. }
  2514. }
  2515. queryURL.RawQuery = queryValues.Encode()
  2516. }
  2517. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2518. if err != nil {
  2519. return nil, err
  2520. }
  2521. return req, nil
  2522. }
  2523. // NewGlobalDisposeRequest generates requests for GlobalDispose
  2524. func NewGlobalDisposeRequest(server string) (*http.Request, error) {
  2525. var err error
  2526. serverURL, err := url.Parse(server)
  2527. if err != nil {
  2528. return nil, err
  2529. }
  2530. operationPath := fmt.Sprintf("/global/dispose")
  2531. if operationPath[0] == '/' {
  2532. operationPath = "." + operationPath
  2533. }
  2534. queryURL, err := serverURL.Parse(operationPath)
  2535. if err != nil {
  2536. return nil, err
  2537. }
  2538. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2539. if err != nil {
  2540. return nil, err
  2541. }
  2542. return req, nil
  2543. }
  2544. // NewGlobalEventRequest generates requests for GlobalEvent
  2545. func NewGlobalEventRequest(server string) (*http.Request, error) {
  2546. var err error
  2547. serverURL, err := url.Parse(server)
  2548. if err != nil {
  2549. return nil, err
  2550. }
  2551. operationPath := fmt.Sprintf("/global/event")
  2552. if operationPath[0] == '/' {
  2553. operationPath = "." + operationPath
  2554. }
  2555. queryURL, err := serverURL.Parse(operationPath)
  2556. if err != nil {
  2557. return nil, err
  2558. }
  2559. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2560. if err != nil {
  2561. return nil, err
  2562. }
  2563. return req, nil
  2564. }
  2565. // NewGlobalHealthRequest generates requests for GlobalHealth
  2566. func NewGlobalHealthRequest(server string) (*http.Request, error) {
  2567. var err error
  2568. serverURL, err := url.Parse(server)
  2569. if err != nil {
  2570. return nil, err
  2571. }
  2572. operationPath := fmt.Sprintf("/global/health")
  2573. if operationPath[0] == '/' {
  2574. operationPath = "." + operationPath
  2575. }
  2576. queryURL, err := serverURL.Parse(operationPath)
  2577. if err != nil {
  2578. return nil, err
  2579. }
  2580. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2581. if err != nil {
  2582. return nil, err
  2583. }
  2584. return req, nil
  2585. }
  2586. // NewInstanceDisposeRequest generates requests for InstanceDispose
  2587. func NewInstanceDisposeRequest(server string, params *InstanceDisposeParams) (*http.Request, error) {
  2588. var err error
  2589. serverURL, err := url.Parse(server)
  2590. if err != nil {
  2591. return nil, err
  2592. }
  2593. operationPath := fmt.Sprintf("/instance/dispose")
  2594. if operationPath[0] == '/' {
  2595. operationPath = "." + operationPath
  2596. }
  2597. queryURL, err := serverURL.Parse(operationPath)
  2598. if err != nil {
  2599. return nil, err
  2600. }
  2601. if params != nil {
  2602. queryValues := queryURL.Query()
  2603. if params.Directory != nil {
  2604. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2605. return nil, err
  2606. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2607. return nil, err
  2608. } else {
  2609. for k, v := range parsed {
  2610. for _, v2 := range v {
  2611. queryValues.Add(k, v2)
  2612. }
  2613. }
  2614. }
  2615. }
  2616. queryURL.RawQuery = queryValues.Encode()
  2617. }
  2618. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2619. if err != nil {
  2620. return nil, err
  2621. }
  2622. return req, nil
  2623. }
  2624. // NewAppLogRequest calls the generic AppLog builder with application/json body
  2625. func NewAppLogRequest(server string, params *AppLogParams, body AppLogJSONRequestBody) (*http.Request, error) {
  2626. var bodyReader io.Reader
  2627. buf, err := json.Marshal(body)
  2628. if err != nil {
  2629. return nil, err
  2630. }
  2631. bodyReader = bytes.NewReader(buf)
  2632. return NewAppLogRequestWithBody(server, params, "application/json", bodyReader)
  2633. }
  2634. // NewAppLogRequestWithBody generates requests for AppLog with any type of body
  2635. func NewAppLogRequestWithBody(server string, params *AppLogParams, contentType string, body io.Reader) (*http.Request, error) {
  2636. var err error
  2637. serverURL, err := url.Parse(server)
  2638. if err != nil {
  2639. return nil, err
  2640. }
  2641. operationPath := fmt.Sprintf("/log")
  2642. if operationPath[0] == '/' {
  2643. operationPath = "." + operationPath
  2644. }
  2645. queryURL, err := serverURL.Parse(operationPath)
  2646. if err != nil {
  2647. return nil, err
  2648. }
  2649. if params != nil {
  2650. queryValues := queryURL.Query()
  2651. if params.Directory != nil {
  2652. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2653. return nil, err
  2654. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2655. return nil, err
  2656. } else {
  2657. for k, v := range parsed {
  2658. for _, v2 := range v {
  2659. queryValues.Add(k, v2)
  2660. }
  2661. }
  2662. }
  2663. }
  2664. queryURL.RawQuery = queryValues.Encode()
  2665. }
  2666. req, err := http.NewRequest("POST", queryURL.String(), body)
  2667. if err != nil {
  2668. return nil, err
  2669. }
  2670. req.Header.Add("Content-Type", contentType)
  2671. return req, nil
  2672. }
  2673. // NewLspStatusRequest generates requests for LspStatus
  2674. func NewLspStatusRequest(server string, params *LspStatusParams) (*http.Request, error) {
  2675. var err error
  2676. serverURL, err := url.Parse(server)
  2677. if err != nil {
  2678. return nil, err
  2679. }
  2680. operationPath := fmt.Sprintf("/lsp")
  2681. if operationPath[0] == '/' {
  2682. operationPath = "." + operationPath
  2683. }
  2684. queryURL, err := serverURL.Parse(operationPath)
  2685. if err != nil {
  2686. return nil, err
  2687. }
  2688. if params != nil {
  2689. queryValues := queryURL.Query()
  2690. if params.Directory != nil {
  2691. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2692. return nil, err
  2693. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2694. return nil, err
  2695. } else {
  2696. for k, v := range parsed {
  2697. for _, v2 := range v {
  2698. queryValues.Add(k, v2)
  2699. }
  2700. }
  2701. }
  2702. }
  2703. queryURL.RawQuery = queryValues.Encode()
  2704. }
  2705. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2706. if err != nil {
  2707. return nil, err
  2708. }
  2709. return req, nil
  2710. }
  2711. // NewMcpStatusRequest generates requests for McpStatus
  2712. func NewMcpStatusRequest(server string, params *McpStatusParams) (*http.Request, error) {
  2713. var err error
  2714. serverURL, err := url.Parse(server)
  2715. if err != nil {
  2716. return nil, err
  2717. }
  2718. operationPath := fmt.Sprintf("/mcp")
  2719. if operationPath[0] == '/' {
  2720. operationPath = "." + operationPath
  2721. }
  2722. queryURL, err := serverURL.Parse(operationPath)
  2723. if err != nil {
  2724. return nil, err
  2725. }
  2726. if params != nil {
  2727. queryValues := queryURL.Query()
  2728. if params.Directory != nil {
  2729. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2730. return nil, err
  2731. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2732. return nil, err
  2733. } else {
  2734. for k, v := range parsed {
  2735. for _, v2 := range v {
  2736. queryValues.Add(k, v2)
  2737. }
  2738. }
  2739. }
  2740. }
  2741. queryURL.RawQuery = queryValues.Encode()
  2742. }
  2743. req, err := http.NewRequest("GET", queryURL.String(), nil)
  2744. if err != nil {
  2745. return nil, err
  2746. }
  2747. return req, nil
  2748. }
  2749. // NewMcpAddRequest calls the generic McpAdd builder with application/json body
  2750. func NewMcpAddRequest(server string, params *McpAddParams, body McpAddJSONRequestBody) (*http.Request, error) {
  2751. var bodyReader io.Reader
  2752. buf, err := json.Marshal(body)
  2753. if err != nil {
  2754. return nil, err
  2755. }
  2756. bodyReader = bytes.NewReader(buf)
  2757. return NewMcpAddRequestWithBody(server, params, "application/json", bodyReader)
  2758. }
  2759. // NewMcpAddRequestWithBody generates requests for McpAdd with any type of body
  2760. func NewMcpAddRequestWithBody(server string, params *McpAddParams, contentType string, body io.Reader) (*http.Request, error) {
  2761. var err error
  2762. serverURL, err := url.Parse(server)
  2763. if err != nil {
  2764. return nil, err
  2765. }
  2766. operationPath := fmt.Sprintf("/mcp")
  2767. if operationPath[0] == '/' {
  2768. operationPath = "." + operationPath
  2769. }
  2770. queryURL, err := serverURL.Parse(operationPath)
  2771. if err != nil {
  2772. return nil, err
  2773. }
  2774. if params != nil {
  2775. queryValues := queryURL.Query()
  2776. if params.Directory != nil {
  2777. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2778. return nil, err
  2779. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2780. return nil, err
  2781. } else {
  2782. for k, v := range parsed {
  2783. for _, v2 := range v {
  2784. queryValues.Add(k, v2)
  2785. }
  2786. }
  2787. }
  2788. }
  2789. queryURL.RawQuery = queryValues.Encode()
  2790. }
  2791. req, err := http.NewRequest("POST", queryURL.String(), body)
  2792. if err != nil {
  2793. return nil, err
  2794. }
  2795. req.Header.Add("Content-Type", contentType)
  2796. return req, nil
  2797. }
  2798. // NewMcpAuthRemoveRequest generates requests for McpAuthRemove
  2799. func NewMcpAuthRemoveRequest(server string, name string, params *McpAuthRemoveParams) (*http.Request, error) {
  2800. var err error
  2801. var pathParam0 string
  2802. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2803. if err != nil {
  2804. return nil, err
  2805. }
  2806. serverURL, err := url.Parse(server)
  2807. if err != nil {
  2808. return nil, err
  2809. }
  2810. operationPath := fmt.Sprintf("/mcp/%s/auth", pathParam0)
  2811. if operationPath[0] == '/' {
  2812. operationPath = "." + operationPath
  2813. }
  2814. queryURL, err := serverURL.Parse(operationPath)
  2815. if err != nil {
  2816. return nil, err
  2817. }
  2818. if params != nil {
  2819. queryValues := queryURL.Query()
  2820. if params.Directory != nil {
  2821. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2822. return nil, err
  2823. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2824. return nil, err
  2825. } else {
  2826. for k, v := range parsed {
  2827. for _, v2 := range v {
  2828. queryValues.Add(k, v2)
  2829. }
  2830. }
  2831. }
  2832. }
  2833. queryURL.RawQuery = queryValues.Encode()
  2834. }
  2835. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  2836. if err != nil {
  2837. return nil, err
  2838. }
  2839. return req, nil
  2840. }
  2841. // NewMcpAuthStartRequest generates requests for McpAuthStart
  2842. func NewMcpAuthStartRequest(server string, name string, params *McpAuthStartParams) (*http.Request, error) {
  2843. var err error
  2844. var pathParam0 string
  2845. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2846. if err != nil {
  2847. return nil, err
  2848. }
  2849. serverURL, err := url.Parse(server)
  2850. if err != nil {
  2851. return nil, err
  2852. }
  2853. operationPath := fmt.Sprintf("/mcp/%s/auth", pathParam0)
  2854. if operationPath[0] == '/' {
  2855. operationPath = "." + operationPath
  2856. }
  2857. queryURL, err := serverURL.Parse(operationPath)
  2858. if err != nil {
  2859. return nil, err
  2860. }
  2861. if params != nil {
  2862. queryValues := queryURL.Query()
  2863. if params.Directory != nil {
  2864. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2865. return nil, err
  2866. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2867. return nil, err
  2868. } else {
  2869. for k, v := range parsed {
  2870. for _, v2 := range v {
  2871. queryValues.Add(k, v2)
  2872. }
  2873. }
  2874. }
  2875. }
  2876. queryURL.RawQuery = queryValues.Encode()
  2877. }
  2878. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2879. if err != nil {
  2880. return nil, err
  2881. }
  2882. return req, nil
  2883. }
  2884. // NewMcpAuthAuthenticateRequest generates requests for McpAuthAuthenticate
  2885. func NewMcpAuthAuthenticateRequest(server string, name string, params *McpAuthAuthenticateParams) (*http.Request, error) {
  2886. var err error
  2887. var pathParam0 string
  2888. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2889. if err != nil {
  2890. return nil, err
  2891. }
  2892. serverURL, err := url.Parse(server)
  2893. if err != nil {
  2894. return nil, err
  2895. }
  2896. operationPath := fmt.Sprintf("/mcp/%s/auth/authenticate", pathParam0)
  2897. if operationPath[0] == '/' {
  2898. operationPath = "." + operationPath
  2899. }
  2900. queryURL, err := serverURL.Parse(operationPath)
  2901. if err != nil {
  2902. return nil, err
  2903. }
  2904. if params != nil {
  2905. queryValues := queryURL.Query()
  2906. if params.Directory != nil {
  2907. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2908. return nil, err
  2909. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2910. return nil, err
  2911. } else {
  2912. for k, v := range parsed {
  2913. for _, v2 := range v {
  2914. queryValues.Add(k, v2)
  2915. }
  2916. }
  2917. }
  2918. }
  2919. queryURL.RawQuery = queryValues.Encode()
  2920. }
  2921. req, err := http.NewRequest("POST", queryURL.String(), nil)
  2922. if err != nil {
  2923. return nil, err
  2924. }
  2925. return req, nil
  2926. }
  2927. // NewMcpAuthCallbackRequest calls the generic McpAuthCallback builder with application/json body
  2928. func NewMcpAuthCallbackRequest(server string, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody) (*http.Request, error) {
  2929. var bodyReader io.Reader
  2930. buf, err := json.Marshal(body)
  2931. if err != nil {
  2932. return nil, err
  2933. }
  2934. bodyReader = bytes.NewReader(buf)
  2935. return NewMcpAuthCallbackRequestWithBody(server, name, params, "application/json", bodyReader)
  2936. }
  2937. // NewMcpAuthCallbackRequestWithBody generates requests for McpAuthCallback with any type of body
  2938. func NewMcpAuthCallbackRequestWithBody(server string, name string, params *McpAuthCallbackParams, contentType string, body io.Reader) (*http.Request, error) {
  2939. var err error
  2940. var pathParam0 string
  2941. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2942. if err != nil {
  2943. return nil, err
  2944. }
  2945. serverURL, err := url.Parse(server)
  2946. if err != nil {
  2947. return nil, err
  2948. }
  2949. operationPath := fmt.Sprintf("/mcp/%s/auth/callback", pathParam0)
  2950. if operationPath[0] == '/' {
  2951. operationPath = "." + operationPath
  2952. }
  2953. queryURL, err := serverURL.Parse(operationPath)
  2954. if err != nil {
  2955. return nil, err
  2956. }
  2957. if params != nil {
  2958. queryValues := queryURL.Query()
  2959. if params.Directory != nil {
  2960. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  2961. return nil, err
  2962. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  2963. return nil, err
  2964. } else {
  2965. for k, v := range parsed {
  2966. for _, v2 := range v {
  2967. queryValues.Add(k, v2)
  2968. }
  2969. }
  2970. }
  2971. }
  2972. queryURL.RawQuery = queryValues.Encode()
  2973. }
  2974. req, err := http.NewRequest("POST", queryURL.String(), body)
  2975. if err != nil {
  2976. return nil, err
  2977. }
  2978. req.Header.Add("Content-Type", contentType)
  2979. return req, nil
  2980. }
  2981. // NewMcpConnectRequest generates requests for McpConnect
  2982. func NewMcpConnectRequest(server string, name string, params *McpConnectParams) (*http.Request, error) {
  2983. var err error
  2984. var pathParam0 string
  2985. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  2986. if err != nil {
  2987. return nil, err
  2988. }
  2989. serverURL, err := url.Parse(server)
  2990. if err != nil {
  2991. return nil, err
  2992. }
  2993. operationPath := fmt.Sprintf("/mcp/%s/connect", pathParam0)
  2994. if operationPath[0] == '/' {
  2995. operationPath = "." + operationPath
  2996. }
  2997. queryURL, err := serverURL.Parse(operationPath)
  2998. if err != nil {
  2999. return nil, err
  3000. }
  3001. if params != nil {
  3002. queryValues := queryURL.Query()
  3003. if params.Directory != nil {
  3004. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3005. return nil, err
  3006. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3007. return nil, err
  3008. } else {
  3009. for k, v := range parsed {
  3010. for _, v2 := range v {
  3011. queryValues.Add(k, v2)
  3012. }
  3013. }
  3014. }
  3015. }
  3016. queryURL.RawQuery = queryValues.Encode()
  3017. }
  3018. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3019. if err != nil {
  3020. return nil, err
  3021. }
  3022. return req, nil
  3023. }
  3024. // NewMcpDisconnectRequest generates requests for McpDisconnect
  3025. func NewMcpDisconnectRequest(server string, name string, params *McpDisconnectParams) (*http.Request, error) {
  3026. var err error
  3027. var pathParam0 string
  3028. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
  3029. if err != nil {
  3030. return nil, err
  3031. }
  3032. serverURL, err := url.Parse(server)
  3033. if err != nil {
  3034. return nil, err
  3035. }
  3036. operationPath := fmt.Sprintf("/mcp/%s/disconnect", pathParam0)
  3037. if operationPath[0] == '/' {
  3038. operationPath = "." + operationPath
  3039. }
  3040. queryURL, err := serverURL.Parse(operationPath)
  3041. if err != nil {
  3042. return nil, err
  3043. }
  3044. if params != nil {
  3045. queryValues := queryURL.Query()
  3046. if params.Directory != nil {
  3047. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3048. return nil, err
  3049. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3050. return nil, err
  3051. } else {
  3052. for k, v := range parsed {
  3053. for _, v2 := range v {
  3054. queryValues.Add(k, v2)
  3055. }
  3056. }
  3057. }
  3058. }
  3059. queryURL.RawQuery = queryValues.Encode()
  3060. }
  3061. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3062. if err != nil {
  3063. return nil, err
  3064. }
  3065. return req, nil
  3066. }
  3067. // NewPathGetRequest generates requests for PathGet
  3068. func NewPathGetRequest(server string, params *PathGetParams) (*http.Request, error) {
  3069. var err error
  3070. serverURL, err := url.Parse(server)
  3071. if err != nil {
  3072. return nil, err
  3073. }
  3074. operationPath := fmt.Sprintf("/path")
  3075. if operationPath[0] == '/' {
  3076. operationPath = "." + operationPath
  3077. }
  3078. queryURL, err := serverURL.Parse(operationPath)
  3079. if err != nil {
  3080. return nil, err
  3081. }
  3082. if params != nil {
  3083. queryValues := queryURL.Query()
  3084. if params.Directory != nil {
  3085. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3086. return nil, err
  3087. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3088. return nil, err
  3089. } else {
  3090. for k, v := range parsed {
  3091. for _, v2 := range v {
  3092. queryValues.Add(k, v2)
  3093. }
  3094. }
  3095. }
  3096. }
  3097. queryURL.RawQuery = queryValues.Encode()
  3098. }
  3099. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3100. if err != nil {
  3101. return nil, err
  3102. }
  3103. return req, nil
  3104. }
  3105. // NewPermissionListRequest generates requests for PermissionList
  3106. func NewPermissionListRequest(server string, params *PermissionListParams) (*http.Request, error) {
  3107. var err error
  3108. serverURL, err := url.Parse(server)
  3109. if err != nil {
  3110. return nil, err
  3111. }
  3112. operationPath := fmt.Sprintf("/permission")
  3113. if operationPath[0] == '/' {
  3114. operationPath = "." + operationPath
  3115. }
  3116. queryURL, err := serverURL.Parse(operationPath)
  3117. if err != nil {
  3118. return nil, err
  3119. }
  3120. if params != nil {
  3121. queryValues := queryURL.Query()
  3122. if params.Directory != nil {
  3123. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3124. return nil, err
  3125. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3126. return nil, err
  3127. } else {
  3128. for k, v := range parsed {
  3129. for _, v2 := range v {
  3130. queryValues.Add(k, v2)
  3131. }
  3132. }
  3133. }
  3134. }
  3135. queryURL.RawQuery = queryValues.Encode()
  3136. }
  3137. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3138. if err != nil {
  3139. return nil, err
  3140. }
  3141. return req, nil
  3142. }
  3143. // NewPermissionReplyRequest calls the generic PermissionReply builder with application/json body
  3144. func NewPermissionReplyRequest(server string, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody) (*http.Request, error) {
  3145. var bodyReader io.Reader
  3146. buf, err := json.Marshal(body)
  3147. if err != nil {
  3148. return nil, err
  3149. }
  3150. bodyReader = bytes.NewReader(buf)
  3151. return NewPermissionReplyRequestWithBody(server, requestID, params, "application/json", bodyReader)
  3152. }
  3153. // NewPermissionReplyRequestWithBody generates requests for PermissionReply with any type of body
  3154. func NewPermissionReplyRequestWithBody(server string, requestID string, params *PermissionReplyParams, contentType string, body io.Reader) (*http.Request, error) {
  3155. var err error
  3156. var pathParam0 string
  3157. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3158. if err != nil {
  3159. return nil, err
  3160. }
  3161. serverURL, err := url.Parse(server)
  3162. if err != nil {
  3163. return nil, err
  3164. }
  3165. operationPath := fmt.Sprintf("/permission/%s/reply", pathParam0)
  3166. if operationPath[0] == '/' {
  3167. operationPath = "." + operationPath
  3168. }
  3169. queryURL, err := serverURL.Parse(operationPath)
  3170. if err != nil {
  3171. return nil, err
  3172. }
  3173. if params != nil {
  3174. queryValues := queryURL.Query()
  3175. if params.Directory != nil {
  3176. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3177. return nil, err
  3178. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3179. return nil, err
  3180. } else {
  3181. for k, v := range parsed {
  3182. for _, v2 := range v {
  3183. queryValues.Add(k, v2)
  3184. }
  3185. }
  3186. }
  3187. }
  3188. queryURL.RawQuery = queryValues.Encode()
  3189. }
  3190. req, err := http.NewRequest("POST", queryURL.String(), body)
  3191. if err != nil {
  3192. return nil, err
  3193. }
  3194. req.Header.Add("Content-Type", contentType)
  3195. return req, nil
  3196. }
  3197. // NewProjectListRequest generates requests for ProjectList
  3198. func NewProjectListRequest(server string, params *ProjectListParams) (*http.Request, error) {
  3199. var err error
  3200. serverURL, err := url.Parse(server)
  3201. if err != nil {
  3202. return nil, err
  3203. }
  3204. operationPath := fmt.Sprintf("/project")
  3205. if operationPath[0] == '/' {
  3206. operationPath = "." + operationPath
  3207. }
  3208. queryURL, err := serverURL.Parse(operationPath)
  3209. if err != nil {
  3210. return nil, err
  3211. }
  3212. if params != nil {
  3213. queryValues := queryURL.Query()
  3214. if params.Directory != nil {
  3215. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3216. return nil, err
  3217. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3218. return nil, err
  3219. } else {
  3220. for k, v := range parsed {
  3221. for _, v2 := range v {
  3222. queryValues.Add(k, v2)
  3223. }
  3224. }
  3225. }
  3226. }
  3227. queryURL.RawQuery = queryValues.Encode()
  3228. }
  3229. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3230. if err != nil {
  3231. return nil, err
  3232. }
  3233. return req, nil
  3234. }
  3235. // NewProjectCurrentRequest generates requests for ProjectCurrent
  3236. func NewProjectCurrentRequest(server string, params *ProjectCurrentParams) (*http.Request, error) {
  3237. var err error
  3238. serverURL, err := url.Parse(server)
  3239. if err != nil {
  3240. return nil, err
  3241. }
  3242. operationPath := fmt.Sprintf("/project/current")
  3243. if operationPath[0] == '/' {
  3244. operationPath = "." + operationPath
  3245. }
  3246. queryURL, err := serverURL.Parse(operationPath)
  3247. if err != nil {
  3248. return nil, err
  3249. }
  3250. if params != nil {
  3251. queryValues := queryURL.Query()
  3252. if params.Directory != nil {
  3253. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3254. return nil, err
  3255. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3256. return nil, err
  3257. } else {
  3258. for k, v := range parsed {
  3259. for _, v2 := range v {
  3260. queryValues.Add(k, v2)
  3261. }
  3262. }
  3263. }
  3264. }
  3265. queryURL.RawQuery = queryValues.Encode()
  3266. }
  3267. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3268. if err != nil {
  3269. return nil, err
  3270. }
  3271. return req, nil
  3272. }
  3273. // NewProjectUpdateRequest calls the generic ProjectUpdate builder with application/json body
  3274. func NewProjectUpdateRequest(server string, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody) (*http.Request, error) {
  3275. var bodyReader io.Reader
  3276. buf, err := json.Marshal(body)
  3277. if err != nil {
  3278. return nil, err
  3279. }
  3280. bodyReader = bytes.NewReader(buf)
  3281. return NewProjectUpdateRequestWithBody(server, projectID, params, "application/json", bodyReader)
  3282. }
  3283. // NewProjectUpdateRequestWithBody generates requests for ProjectUpdate with any type of body
  3284. func NewProjectUpdateRequestWithBody(server string, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  3285. var err error
  3286. var pathParam0 string
  3287. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID)
  3288. if err != nil {
  3289. return nil, err
  3290. }
  3291. serverURL, err := url.Parse(server)
  3292. if err != nil {
  3293. return nil, err
  3294. }
  3295. operationPath := fmt.Sprintf("/project/%s", pathParam0)
  3296. if operationPath[0] == '/' {
  3297. operationPath = "." + operationPath
  3298. }
  3299. queryURL, err := serverURL.Parse(operationPath)
  3300. if err != nil {
  3301. return nil, err
  3302. }
  3303. if params != nil {
  3304. queryValues := queryURL.Query()
  3305. if params.Directory != nil {
  3306. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3307. return nil, err
  3308. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3309. return nil, err
  3310. } else {
  3311. for k, v := range parsed {
  3312. for _, v2 := range v {
  3313. queryValues.Add(k, v2)
  3314. }
  3315. }
  3316. }
  3317. }
  3318. queryURL.RawQuery = queryValues.Encode()
  3319. }
  3320. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  3321. if err != nil {
  3322. return nil, err
  3323. }
  3324. req.Header.Add("Content-Type", contentType)
  3325. return req, nil
  3326. }
  3327. // NewProviderListRequest generates requests for ProviderList
  3328. func NewProviderListRequest(server string, params *ProviderListParams) (*http.Request, error) {
  3329. var err error
  3330. serverURL, err := url.Parse(server)
  3331. if err != nil {
  3332. return nil, err
  3333. }
  3334. operationPath := fmt.Sprintf("/provider")
  3335. if operationPath[0] == '/' {
  3336. operationPath = "." + operationPath
  3337. }
  3338. queryURL, err := serverURL.Parse(operationPath)
  3339. if err != nil {
  3340. return nil, err
  3341. }
  3342. if params != nil {
  3343. queryValues := queryURL.Query()
  3344. if params.Directory != nil {
  3345. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3346. return nil, err
  3347. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3348. return nil, err
  3349. } else {
  3350. for k, v := range parsed {
  3351. for _, v2 := range v {
  3352. queryValues.Add(k, v2)
  3353. }
  3354. }
  3355. }
  3356. }
  3357. queryURL.RawQuery = queryValues.Encode()
  3358. }
  3359. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3360. if err != nil {
  3361. return nil, err
  3362. }
  3363. return req, nil
  3364. }
  3365. // NewProviderAuthRequest generates requests for ProviderAuth
  3366. func NewProviderAuthRequest(server string, params *ProviderAuthParams) (*http.Request, error) {
  3367. var err error
  3368. serverURL, err := url.Parse(server)
  3369. if err != nil {
  3370. return nil, err
  3371. }
  3372. operationPath := fmt.Sprintf("/provider/auth")
  3373. if operationPath[0] == '/' {
  3374. operationPath = "." + operationPath
  3375. }
  3376. queryURL, err := serverURL.Parse(operationPath)
  3377. if err != nil {
  3378. return nil, err
  3379. }
  3380. if params != nil {
  3381. queryValues := queryURL.Query()
  3382. if params.Directory != nil {
  3383. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3384. return nil, err
  3385. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3386. return nil, err
  3387. } else {
  3388. for k, v := range parsed {
  3389. for _, v2 := range v {
  3390. queryValues.Add(k, v2)
  3391. }
  3392. }
  3393. }
  3394. }
  3395. queryURL.RawQuery = queryValues.Encode()
  3396. }
  3397. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3398. if err != nil {
  3399. return nil, err
  3400. }
  3401. return req, nil
  3402. }
  3403. // NewProviderOauthAuthorizeRequest calls the generic ProviderOauthAuthorize builder with application/json body
  3404. func NewProviderOauthAuthorizeRequest(server string, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody) (*http.Request, error) {
  3405. var bodyReader io.Reader
  3406. buf, err := json.Marshal(body)
  3407. if err != nil {
  3408. return nil, err
  3409. }
  3410. bodyReader = bytes.NewReader(buf)
  3411. return NewProviderOauthAuthorizeRequestWithBody(server, providerID, params, "application/json", bodyReader)
  3412. }
  3413. // NewProviderOauthAuthorizeRequestWithBody generates requests for ProviderOauthAuthorize with any type of body
  3414. func NewProviderOauthAuthorizeRequestWithBody(server string, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader) (*http.Request, error) {
  3415. var err error
  3416. var pathParam0 string
  3417. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  3418. if err != nil {
  3419. return nil, err
  3420. }
  3421. serverURL, err := url.Parse(server)
  3422. if err != nil {
  3423. return nil, err
  3424. }
  3425. operationPath := fmt.Sprintf("/provider/%s/oauth/authorize", pathParam0)
  3426. if operationPath[0] == '/' {
  3427. operationPath = "." + operationPath
  3428. }
  3429. queryURL, err := serverURL.Parse(operationPath)
  3430. if err != nil {
  3431. return nil, err
  3432. }
  3433. if params != nil {
  3434. queryValues := queryURL.Query()
  3435. if params.Directory != nil {
  3436. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3437. return nil, err
  3438. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3439. return nil, err
  3440. } else {
  3441. for k, v := range parsed {
  3442. for _, v2 := range v {
  3443. queryValues.Add(k, v2)
  3444. }
  3445. }
  3446. }
  3447. }
  3448. queryURL.RawQuery = queryValues.Encode()
  3449. }
  3450. req, err := http.NewRequest("POST", queryURL.String(), body)
  3451. if err != nil {
  3452. return nil, err
  3453. }
  3454. req.Header.Add("Content-Type", contentType)
  3455. return req, nil
  3456. }
  3457. // NewProviderOauthCallbackRequest calls the generic ProviderOauthCallback builder with application/json body
  3458. func NewProviderOauthCallbackRequest(server string, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody) (*http.Request, error) {
  3459. var bodyReader io.Reader
  3460. buf, err := json.Marshal(body)
  3461. if err != nil {
  3462. return nil, err
  3463. }
  3464. bodyReader = bytes.NewReader(buf)
  3465. return NewProviderOauthCallbackRequestWithBody(server, providerID, params, "application/json", bodyReader)
  3466. }
  3467. // NewProviderOauthCallbackRequestWithBody generates requests for ProviderOauthCallback with any type of body
  3468. func NewProviderOauthCallbackRequestWithBody(server string, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader) (*http.Request, error) {
  3469. var err error
  3470. var pathParam0 string
  3471. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID)
  3472. if err != nil {
  3473. return nil, err
  3474. }
  3475. serverURL, err := url.Parse(server)
  3476. if err != nil {
  3477. return nil, err
  3478. }
  3479. operationPath := fmt.Sprintf("/provider/%s/oauth/callback", pathParam0)
  3480. if operationPath[0] == '/' {
  3481. operationPath = "." + operationPath
  3482. }
  3483. queryURL, err := serverURL.Parse(operationPath)
  3484. if err != nil {
  3485. return nil, err
  3486. }
  3487. if params != nil {
  3488. queryValues := queryURL.Query()
  3489. if params.Directory != nil {
  3490. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3491. return nil, err
  3492. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3493. return nil, err
  3494. } else {
  3495. for k, v := range parsed {
  3496. for _, v2 := range v {
  3497. queryValues.Add(k, v2)
  3498. }
  3499. }
  3500. }
  3501. }
  3502. queryURL.RawQuery = queryValues.Encode()
  3503. }
  3504. req, err := http.NewRequest("POST", queryURL.String(), body)
  3505. if err != nil {
  3506. return nil, err
  3507. }
  3508. req.Header.Add("Content-Type", contentType)
  3509. return req, nil
  3510. }
  3511. // NewPtyListRequest generates requests for PtyList
  3512. func NewPtyListRequest(server string, params *PtyListParams) (*http.Request, error) {
  3513. var err error
  3514. serverURL, err := url.Parse(server)
  3515. if err != nil {
  3516. return nil, err
  3517. }
  3518. operationPath := fmt.Sprintf("/pty")
  3519. if operationPath[0] == '/' {
  3520. operationPath = "." + operationPath
  3521. }
  3522. queryURL, err := serverURL.Parse(operationPath)
  3523. if err != nil {
  3524. return nil, err
  3525. }
  3526. if params != nil {
  3527. queryValues := queryURL.Query()
  3528. if params.Directory != nil {
  3529. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3530. return nil, err
  3531. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3532. return nil, err
  3533. } else {
  3534. for k, v := range parsed {
  3535. for _, v2 := range v {
  3536. queryValues.Add(k, v2)
  3537. }
  3538. }
  3539. }
  3540. }
  3541. queryURL.RawQuery = queryValues.Encode()
  3542. }
  3543. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3544. if err != nil {
  3545. return nil, err
  3546. }
  3547. return req, nil
  3548. }
  3549. // NewPtyCreateRequest calls the generic PtyCreate builder with application/json body
  3550. func NewPtyCreateRequest(server string, params *PtyCreateParams, body PtyCreateJSONRequestBody) (*http.Request, error) {
  3551. var bodyReader io.Reader
  3552. buf, err := json.Marshal(body)
  3553. if err != nil {
  3554. return nil, err
  3555. }
  3556. bodyReader = bytes.NewReader(buf)
  3557. return NewPtyCreateRequestWithBody(server, params, "application/json", bodyReader)
  3558. }
  3559. // NewPtyCreateRequestWithBody generates requests for PtyCreate with any type of body
  3560. func NewPtyCreateRequestWithBody(server string, params *PtyCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  3561. var err error
  3562. serverURL, err := url.Parse(server)
  3563. if err != nil {
  3564. return nil, err
  3565. }
  3566. operationPath := fmt.Sprintf("/pty")
  3567. if operationPath[0] == '/' {
  3568. operationPath = "." + operationPath
  3569. }
  3570. queryURL, err := serverURL.Parse(operationPath)
  3571. if err != nil {
  3572. return nil, err
  3573. }
  3574. if params != nil {
  3575. queryValues := queryURL.Query()
  3576. if params.Directory != nil {
  3577. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3578. return nil, err
  3579. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3580. return nil, err
  3581. } else {
  3582. for k, v := range parsed {
  3583. for _, v2 := range v {
  3584. queryValues.Add(k, v2)
  3585. }
  3586. }
  3587. }
  3588. }
  3589. queryURL.RawQuery = queryValues.Encode()
  3590. }
  3591. req, err := http.NewRequest("POST", queryURL.String(), body)
  3592. if err != nil {
  3593. return nil, err
  3594. }
  3595. req.Header.Add("Content-Type", contentType)
  3596. return req, nil
  3597. }
  3598. // NewPtyRemoveRequest generates requests for PtyRemove
  3599. func NewPtyRemoveRequest(server string, ptyID string, params *PtyRemoveParams) (*http.Request, error) {
  3600. var err error
  3601. var pathParam0 string
  3602. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3603. if err != nil {
  3604. return nil, err
  3605. }
  3606. serverURL, err := url.Parse(server)
  3607. if err != nil {
  3608. return nil, err
  3609. }
  3610. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3611. if operationPath[0] == '/' {
  3612. operationPath = "." + operationPath
  3613. }
  3614. queryURL, err := serverURL.Parse(operationPath)
  3615. if err != nil {
  3616. return nil, err
  3617. }
  3618. if params != nil {
  3619. queryValues := queryURL.Query()
  3620. if params.Directory != nil {
  3621. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3622. return nil, err
  3623. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3624. return nil, err
  3625. } else {
  3626. for k, v := range parsed {
  3627. for _, v2 := range v {
  3628. queryValues.Add(k, v2)
  3629. }
  3630. }
  3631. }
  3632. }
  3633. queryURL.RawQuery = queryValues.Encode()
  3634. }
  3635. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  3636. if err != nil {
  3637. return nil, err
  3638. }
  3639. return req, nil
  3640. }
  3641. // NewPtyGetRequest generates requests for PtyGet
  3642. func NewPtyGetRequest(server string, ptyID string, params *PtyGetParams) (*http.Request, error) {
  3643. var err error
  3644. var pathParam0 string
  3645. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3646. if err != nil {
  3647. return nil, err
  3648. }
  3649. serverURL, err := url.Parse(server)
  3650. if err != nil {
  3651. return nil, err
  3652. }
  3653. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3654. if operationPath[0] == '/' {
  3655. operationPath = "." + operationPath
  3656. }
  3657. queryURL, err := serverURL.Parse(operationPath)
  3658. if err != nil {
  3659. return nil, err
  3660. }
  3661. if params != nil {
  3662. queryValues := queryURL.Query()
  3663. if params.Directory != nil {
  3664. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3665. return nil, err
  3666. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3667. return nil, err
  3668. } else {
  3669. for k, v := range parsed {
  3670. for _, v2 := range v {
  3671. queryValues.Add(k, v2)
  3672. }
  3673. }
  3674. }
  3675. }
  3676. queryURL.RawQuery = queryValues.Encode()
  3677. }
  3678. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3679. if err != nil {
  3680. return nil, err
  3681. }
  3682. return req, nil
  3683. }
  3684. // NewPtyUpdateRequest calls the generic PtyUpdate builder with application/json body
  3685. func NewPtyUpdateRequest(server string, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody) (*http.Request, error) {
  3686. var bodyReader io.Reader
  3687. buf, err := json.Marshal(body)
  3688. if err != nil {
  3689. return nil, err
  3690. }
  3691. bodyReader = bytes.NewReader(buf)
  3692. return NewPtyUpdateRequestWithBody(server, ptyID, params, "application/json", bodyReader)
  3693. }
  3694. // NewPtyUpdateRequestWithBody generates requests for PtyUpdate with any type of body
  3695. func NewPtyUpdateRequestWithBody(server string, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  3696. var err error
  3697. var pathParam0 string
  3698. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3699. if err != nil {
  3700. return nil, err
  3701. }
  3702. serverURL, err := url.Parse(server)
  3703. if err != nil {
  3704. return nil, err
  3705. }
  3706. operationPath := fmt.Sprintf("/pty/%s", pathParam0)
  3707. if operationPath[0] == '/' {
  3708. operationPath = "." + operationPath
  3709. }
  3710. queryURL, err := serverURL.Parse(operationPath)
  3711. if err != nil {
  3712. return nil, err
  3713. }
  3714. if params != nil {
  3715. queryValues := queryURL.Query()
  3716. if params.Directory != nil {
  3717. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3718. return nil, err
  3719. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3720. return nil, err
  3721. } else {
  3722. for k, v := range parsed {
  3723. for _, v2 := range v {
  3724. queryValues.Add(k, v2)
  3725. }
  3726. }
  3727. }
  3728. }
  3729. queryURL.RawQuery = queryValues.Encode()
  3730. }
  3731. req, err := http.NewRequest("PUT", queryURL.String(), body)
  3732. if err != nil {
  3733. return nil, err
  3734. }
  3735. req.Header.Add("Content-Type", contentType)
  3736. return req, nil
  3737. }
  3738. // NewPtyConnectRequest generates requests for PtyConnect
  3739. func NewPtyConnectRequest(server string, ptyID string, params *PtyConnectParams) (*http.Request, error) {
  3740. var err error
  3741. var pathParam0 string
  3742. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ptyID", runtime.ParamLocationPath, ptyID)
  3743. if err != nil {
  3744. return nil, err
  3745. }
  3746. serverURL, err := url.Parse(server)
  3747. if err != nil {
  3748. return nil, err
  3749. }
  3750. operationPath := fmt.Sprintf("/pty/%s/connect", pathParam0)
  3751. if operationPath[0] == '/' {
  3752. operationPath = "." + operationPath
  3753. }
  3754. queryURL, err := serverURL.Parse(operationPath)
  3755. if err != nil {
  3756. return nil, err
  3757. }
  3758. if params != nil {
  3759. queryValues := queryURL.Query()
  3760. if params.Directory != nil {
  3761. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3762. return nil, err
  3763. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3764. return nil, err
  3765. } else {
  3766. for k, v := range parsed {
  3767. for _, v2 := range v {
  3768. queryValues.Add(k, v2)
  3769. }
  3770. }
  3771. }
  3772. }
  3773. queryURL.RawQuery = queryValues.Encode()
  3774. }
  3775. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3776. if err != nil {
  3777. return nil, err
  3778. }
  3779. return req, nil
  3780. }
  3781. // NewQuestionListRequest generates requests for QuestionList
  3782. func NewQuestionListRequest(server string, params *QuestionListParams) (*http.Request, error) {
  3783. var err error
  3784. serverURL, err := url.Parse(server)
  3785. if err != nil {
  3786. return nil, err
  3787. }
  3788. operationPath := fmt.Sprintf("/question")
  3789. if operationPath[0] == '/' {
  3790. operationPath = "." + operationPath
  3791. }
  3792. queryURL, err := serverURL.Parse(operationPath)
  3793. if err != nil {
  3794. return nil, err
  3795. }
  3796. if params != nil {
  3797. queryValues := queryURL.Query()
  3798. if params.Directory != nil {
  3799. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3800. return nil, err
  3801. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3802. return nil, err
  3803. } else {
  3804. for k, v := range parsed {
  3805. for _, v2 := range v {
  3806. queryValues.Add(k, v2)
  3807. }
  3808. }
  3809. }
  3810. }
  3811. queryURL.RawQuery = queryValues.Encode()
  3812. }
  3813. req, err := http.NewRequest("GET", queryURL.String(), nil)
  3814. if err != nil {
  3815. return nil, err
  3816. }
  3817. return req, nil
  3818. }
  3819. // NewQuestionRejectRequest generates requests for QuestionReject
  3820. func NewQuestionRejectRequest(server string, requestID string, params *QuestionRejectParams) (*http.Request, error) {
  3821. var err error
  3822. var pathParam0 string
  3823. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3824. if err != nil {
  3825. return nil, err
  3826. }
  3827. serverURL, err := url.Parse(server)
  3828. if err != nil {
  3829. return nil, err
  3830. }
  3831. operationPath := fmt.Sprintf("/question/%s/reject", pathParam0)
  3832. if operationPath[0] == '/' {
  3833. operationPath = "." + operationPath
  3834. }
  3835. queryURL, err := serverURL.Parse(operationPath)
  3836. if err != nil {
  3837. return nil, err
  3838. }
  3839. if params != nil {
  3840. queryValues := queryURL.Query()
  3841. if params.Directory != nil {
  3842. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3843. return nil, err
  3844. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3845. return nil, err
  3846. } else {
  3847. for k, v := range parsed {
  3848. for _, v2 := range v {
  3849. queryValues.Add(k, v2)
  3850. }
  3851. }
  3852. }
  3853. }
  3854. queryURL.RawQuery = queryValues.Encode()
  3855. }
  3856. req, err := http.NewRequest("POST", queryURL.String(), nil)
  3857. if err != nil {
  3858. return nil, err
  3859. }
  3860. return req, nil
  3861. }
  3862. // NewQuestionReplyRequest calls the generic QuestionReply builder with application/json body
  3863. func NewQuestionReplyRequest(server string, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody) (*http.Request, error) {
  3864. var bodyReader io.Reader
  3865. buf, err := json.Marshal(body)
  3866. if err != nil {
  3867. return nil, err
  3868. }
  3869. bodyReader = bytes.NewReader(buf)
  3870. return NewQuestionReplyRequestWithBody(server, requestID, params, "application/json", bodyReader)
  3871. }
  3872. // NewQuestionReplyRequestWithBody generates requests for QuestionReply with any type of body
  3873. func NewQuestionReplyRequestWithBody(server string, requestID string, params *QuestionReplyParams, contentType string, body io.Reader) (*http.Request, error) {
  3874. var err error
  3875. var pathParam0 string
  3876. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID)
  3877. if err != nil {
  3878. return nil, err
  3879. }
  3880. serverURL, err := url.Parse(server)
  3881. if err != nil {
  3882. return nil, err
  3883. }
  3884. operationPath := fmt.Sprintf("/question/%s/reply", pathParam0)
  3885. if operationPath[0] == '/' {
  3886. operationPath = "." + operationPath
  3887. }
  3888. queryURL, err := serverURL.Parse(operationPath)
  3889. if err != nil {
  3890. return nil, err
  3891. }
  3892. if params != nil {
  3893. queryValues := queryURL.Query()
  3894. if params.Directory != nil {
  3895. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3896. return nil, err
  3897. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3898. return nil, err
  3899. } else {
  3900. for k, v := range parsed {
  3901. for _, v2 := range v {
  3902. queryValues.Add(k, v2)
  3903. }
  3904. }
  3905. }
  3906. }
  3907. queryURL.RawQuery = queryValues.Encode()
  3908. }
  3909. req, err := http.NewRequest("POST", queryURL.String(), body)
  3910. if err != nil {
  3911. return nil, err
  3912. }
  3913. req.Header.Add("Content-Type", contentType)
  3914. return req, nil
  3915. }
  3916. // NewSessionListRequest generates requests for SessionList
  3917. func NewSessionListRequest(server string, params *SessionListParams) (*http.Request, error) {
  3918. var err error
  3919. serverURL, err := url.Parse(server)
  3920. if err != nil {
  3921. return nil, err
  3922. }
  3923. operationPath := fmt.Sprintf("/session")
  3924. if operationPath[0] == '/' {
  3925. operationPath = "." + operationPath
  3926. }
  3927. queryURL, err := serverURL.Parse(operationPath)
  3928. if err != nil {
  3929. return nil, err
  3930. }
  3931. if params != nil {
  3932. queryValues := queryURL.Query()
  3933. if params.Directory != nil {
  3934. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  3935. return nil, err
  3936. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3937. return nil, err
  3938. } else {
  3939. for k, v := range parsed {
  3940. for _, v2 := range v {
  3941. queryValues.Add(k, v2)
  3942. }
  3943. }
  3944. }
  3945. }
  3946. if params.Roots != nil {
  3947. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "roots", runtime.ParamLocationQuery, *params.Roots); err != nil {
  3948. return nil, err
  3949. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3950. return nil, err
  3951. } else {
  3952. for k, v := range parsed {
  3953. for _, v2 := range v {
  3954. queryValues.Add(k, v2)
  3955. }
  3956. }
  3957. }
  3958. }
  3959. if params.Start != nil {
  3960. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil {
  3961. return nil, err
  3962. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3963. return nil, err
  3964. } else {
  3965. for k, v := range parsed {
  3966. for _, v2 := range v {
  3967. queryValues.Add(k, v2)
  3968. }
  3969. }
  3970. }
  3971. }
  3972. if params.Search != nil {
  3973. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil {
  3974. return nil, err
  3975. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3976. return nil, err
  3977. } else {
  3978. for k, v := range parsed {
  3979. for _, v2 := range v {
  3980. queryValues.Add(k, v2)
  3981. }
  3982. }
  3983. }
  3984. }
  3985. if params.Limit != nil {
  3986. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  3987. return nil, err
  3988. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  3989. return nil, err
  3990. } else {
  3991. for k, v := range parsed {
  3992. for _, v2 := range v {
  3993. queryValues.Add(k, v2)
  3994. }
  3995. }
  3996. }
  3997. }
  3998. queryURL.RawQuery = queryValues.Encode()
  3999. }
  4000. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4001. if err != nil {
  4002. return nil, err
  4003. }
  4004. return req, nil
  4005. }
  4006. // NewSessionCreateRequest calls the generic SessionCreate builder with application/json body
  4007. func NewSessionCreateRequest(server string, params *SessionCreateParams, body SessionCreateJSONRequestBody) (*http.Request, error) {
  4008. var bodyReader io.Reader
  4009. buf, err := json.Marshal(body)
  4010. if err != nil {
  4011. return nil, err
  4012. }
  4013. bodyReader = bytes.NewReader(buf)
  4014. return NewSessionCreateRequestWithBody(server, params, "application/json", bodyReader)
  4015. }
  4016. // NewSessionCreateRequestWithBody generates requests for SessionCreate with any type of body
  4017. func NewSessionCreateRequestWithBody(server string, params *SessionCreateParams, contentType string, body io.Reader) (*http.Request, error) {
  4018. var err error
  4019. serverURL, err := url.Parse(server)
  4020. if err != nil {
  4021. return nil, err
  4022. }
  4023. operationPath := fmt.Sprintf("/session")
  4024. if operationPath[0] == '/' {
  4025. operationPath = "." + operationPath
  4026. }
  4027. queryURL, err := serverURL.Parse(operationPath)
  4028. if err != nil {
  4029. return nil, err
  4030. }
  4031. if params != nil {
  4032. queryValues := queryURL.Query()
  4033. if params.Directory != nil {
  4034. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4035. return nil, err
  4036. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4037. return nil, err
  4038. } else {
  4039. for k, v := range parsed {
  4040. for _, v2 := range v {
  4041. queryValues.Add(k, v2)
  4042. }
  4043. }
  4044. }
  4045. }
  4046. queryURL.RawQuery = queryValues.Encode()
  4047. }
  4048. req, err := http.NewRequest("POST", queryURL.String(), body)
  4049. if err != nil {
  4050. return nil, err
  4051. }
  4052. req.Header.Add("Content-Type", contentType)
  4053. return req, nil
  4054. }
  4055. // NewSessionStatusRequest generates requests for SessionStatus
  4056. func NewSessionStatusRequest(server string, params *SessionStatusParams) (*http.Request, error) {
  4057. var err error
  4058. serverURL, err := url.Parse(server)
  4059. if err != nil {
  4060. return nil, err
  4061. }
  4062. operationPath := fmt.Sprintf("/session/status")
  4063. if operationPath[0] == '/' {
  4064. operationPath = "." + operationPath
  4065. }
  4066. queryURL, err := serverURL.Parse(operationPath)
  4067. if err != nil {
  4068. return nil, err
  4069. }
  4070. if params != nil {
  4071. queryValues := queryURL.Query()
  4072. if params.Directory != nil {
  4073. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4074. return nil, err
  4075. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4076. return nil, err
  4077. } else {
  4078. for k, v := range parsed {
  4079. for _, v2 := range v {
  4080. queryValues.Add(k, v2)
  4081. }
  4082. }
  4083. }
  4084. }
  4085. queryURL.RawQuery = queryValues.Encode()
  4086. }
  4087. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4088. if err != nil {
  4089. return nil, err
  4090. }
  4091. return req, nil
  4092. }
  4093. // NewSessionDeleteRequest generates requests for SessionDelete
  4094. func NewSessionDeleteRequest(server string, sessionID string, params *SessionDeleteParams) (*http.Request, error) {
  4095. var err error
  4096. var pathParam0 string
  4097. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4098. if err != nil {
  4099. return nil, err
  4100. }
  4101. serverURL, err := url.Parse(server)
  4102. if err != nil {
  4103. return nil, err
  4104. }
  4105. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4106. if operationPath[0] == '/' {
  4107. operationPath = "." + operationPath
  4108. }
  4109. queryURL, err := serverURL.Parse(operationPath)
  4110. if err != nil {
  4111. return nil, err
  4112. }
  4113. if params != nil {
  4114. queryValues := queryURL.Query()
  4115. if params.Directory != nil {
  4116. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4117. return nil, err
  4118. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4119. return nil, err
  4120. } else {
  4121. for k, v := range parsed {
  4122. for _, v2 := range v {
  4123. queryValues.Add(k, v2)
  4124. }
  4125. }
  4126. }
  4127. }
  4128. queryURL.RawQuery = queryValues.Encode()
  4129. }
  4130. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  4131. if err != nil {
  4132. return nil, err
  4133. }
  4134. return req, nil
  4135. }
  4136. // NewSessionGetRequest generates requests for SessionGet
  4137. func NewSessionGetRequest(server string, sessionID string, params *SessionGetParams) (*http.Request, error) {
  4138. var err error
  4139. var pathParam0 string
  4140. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4141. if err != nil {
  4142. return nil, err
  4143. }
  4144. serverURL, err := url.Parse(server)
  4145. if err != nil {
  4146. return nil, err
  4147. }
  4148. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4149. if operationPath[0] == '/' {
  4150. operationPath = "." + operationPath
  4151. }
  4152. queryURL, err := serverURL.Parse(operationPath)
  4153. if err != nil {
  4154. return nil, err
  4155. }
  4156. if params != nil {
  4157. queryValues := queryURL.Query()
  4158. if params.Directory != nil {
  4159. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4160. return nil, err
  4161. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4162. return nil, err
  4163. } else {
  4164. for k, v := range parsed {
  4165. for _, v2 := range v {
  4166. queryValues.Add(k, v2)
  4167. }
  4168. }
  4169. }
  4170. }
  4171. queryURL.RawQuery = queryValues.Encode()
  4172. }
  4173. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4174. if err != nil {
  4175. return nil, err
  4176. }
  4177. return req, nil
  4178. }
  4179. // NewSessionUpdateRequest calls the generic SessionUpdate builder with application/json body
  4180. func NewSessionUpdateRequest(server string, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody) (*http.Request, error) {
  4181. var bodyReader io.Reader
  4182. buf, err := json.Marshal(body)
  4183. if err != nil {
  4184. return nil, err
  4185. }
  4186. bodyReader = bytes.NewReader(buf)
  4187. return NewSessionUpdateRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4188. }
  4189. // NewSessionUpdateRequestWithBody generates requests for SessionUpdate with any type of body
  4190. func NewSessionUpdateRequestWithBody(server string, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  4191. var err error
  4192. var pathParam0 string
  4193. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4194. if err != nil {
  4195. return nil, err
  4196. }
  4197. serverURL, err := url.Parse(server)
  4198. if err != nil {
  4199. return nil, err
  4200. }
  4201. operationPath := fmt.Sprintf("/session/%s", pathParam0)
  4202. if operationPath[0] == '/' {
  4203. operationPath = "." + operationPath
  4204. }
  4205. queryURL, err := serverURL.Parse(operationPath)
  4206. if err != nil {
  4207. return nil, err
  4208. }
  4209. if params != nil {
  4210. queryValues := queryURL.Query()
  4211. if params.Directory != nil {
  4212. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4213. return nil, err
  4214. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4215. return nil, err
  4216. } else {
  4217. for k, v := range parsed {
  4218. for _, v2 := range v {
  4219. queryValues.Add(k, v2)
  4220. }
  4221. }
  4222. }
  4223. }
  4224. queryURL.RawQuery = queryValues.Encode()
  4225. }
  4226. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  4227. if err != nil {
  4228. return nil, err
  4229. }
  4230. req.Header.Add("Content-Type", contentType)
  4231. return req, nil
  4232. }
  4233. // NewSessionAbortRequest generates requests for SessionAbort
  4234. func NewSessionAbortRequest(server string, sessionID string, params *SessionAbortParams) (*http.Request, error) {
  4235. var err error
  4236. var pathParam0 string
  4237. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4238. if err != nil {
  4239. return nil, err
  4240. }
  4241. serverURL, err := url.Parse(server)
  4242. if err != nil {
  4243. return nil, err
  4244. }
  4245. operationPath := fmt.Sprintf("/session/%s/abort", pathParam0)
  4246. if operationPath[0] == '/' {
  4247. operationPath = "." + operationPath
  4248. }
  4249. queryURL, err := serverURL.Parse(operationPath)
  4250. if err != nil {
  4251. return nil, err
  4252. }
  4253. if params != nil {
  4254. queryValues := queryURL.Query()
  4255. if params.Directory != nil {
  4256. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4257. return nil, err
  4258. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4259. return nil, err
  4260. } else {
  4261. for k, v := range parsed {
  4262. for _, v2 := range v {
  4263. queryValues.Add(k, v2)
  4264. }
  4265. }
  4266. }
  4267. }
  4268. queryURL.RawQuery = queryValues.Encode()
  4269. }
  4270. req, err := http.NewRequest("POST", queryURL.String(), nil)
  4271. if err != nil {
  4272. return nil, err
  4273. }
  4274. return req, nil
  4275. }
  4276. // NewSessionChildrenRequest generates requests for SessionChildren
  4277. func NewSessionChildrenRequest(server string, sessionID string, params *SessionChildrenParams) (*http.Request, error) {
  4278. var err error
  4279. var pathParam0 string
  4280. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4281. if err != nil {
  4282. return nil, err
  4283. }
  4284. serverURL, err := url.Parse(server)
  4285. if err != nil {
  4286. return nil, err
  4287. }
  4288. operationPath := fmt.Sprintf("/session/%s/children", pathParam0)
  4289. if operationPath[0] == '/' {
  4290. operationPath = "." + operationPath
  4291. }
  4292. queryURL, err := serverURL.Parse(operationPath)
  4293. if err != nil {
  4294. return nil, err
  4295. }
  4296. if params != nil {
  4297. queryValues := queryURL.Query()
  4298. if params.Directory != nil {
  4299. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4300. return nil, err
  4301. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4302. return nil, err
  4303. } else {
  4304. for k, v := range parsed {
  4305. for _, v2 := range v {
  4306. queryValues.Add(k, v2)
  4307. }
  4308. }
  4309. }
  4310. }
  4311. queryURL.RawQuery = queryValues.Encode()
  4312. }
  4313. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4314. if err != nil {
  4315. return nil, err
  4316. }
  4317. return req, nil
  4318. }
  4319. // NewSessionCommandRequest calls the generic SessionCommand builder with application/json body
  4320. func NewSessionCommandRequest(server string, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody) (*http.Request, error) {
  4321. var bodyReader io.Reader
  4322. buf, err := json.Marshal(body)
  4323. if err != nil {
  4324. return nil, err
  4325. }
  4326. bodyReader = bytes.NewReader(buf)
  4327. return NewSessionCommandRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4328. }
  4329. // NewSessionCommandRequestWithBody generates requests for SessionCommand with any type of body
  4330. func NewSessionCommandRequestWithBody(server string, sessionID string, params *SessionCommandParams, contentType string, body io.Reader) (*http.Request, error) {
  4331. var err error
  4332. var pathParam0 string
  4333. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4334. if err != nil {
  4335. return nil, err
  4336. }
  4337. serverURL, err := url.Parse(server)
  4338. if err != nil {
  4339. return nil, err
  4340. }
  4341. operationPath := fmt.Sprintf("/session/%s/command", pathParam0)
  4342. if operationPath[0] == '/' {
  4343. operationPath = "." + operationPath
  4344. }
  4345. queryURL, err := serverURL.Parse(operationPath)
  4346. if err != nil {
  4347. return nil, err
  4348. }
  4349. if params != nil {
  4350. queryValues := queryURL.Query()
  4351. if params.Directory != nil {
  4352. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4353. return nil, err
  4354. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4355. return nil, err
  4356. } else {
  4357. for k, v := range parsed {
  4358. for _, v2 := range v {
  4359. queryValues.Add(k, v2)
  4360. }
  4361. }
  4362. }
  4363. }
  4364. queryURL.RawQuery = queryValues.Encode()
  4365. }
  4366. req, err := http.NewRequest("POST", queryURL.String(), body)
  4367. if err != nil {
  4368. return nil, err
  4369. }
  4370. req.Header.Add("Content-Type", contentType)
  4371. return req, nil
  4372. }
  4373. // NewSessionDiffRequest generates requests for SessionDiff
  4374. func NewSessionDiffRequest(server string, sessionID string, params *SessionDiffParams) (*http.Request, error) {
  4375. var err error
  4376. var pathParam0 string
  4377. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4378. if err != nil {
  4379. return nil, err
  4380. }
  4381. serverURL, err := url.Parse(server)
  4382. if err != nil {
  4383. return nil, err
  4384. }
  4385. operationPath := fmt.Sprintf("/session/%s/diff", pathParam0)
  4386. if operationPath[0] == '/' {
  4387. operationPath = "." + operationPath
  4388. }
  4389. queryURL, err := serverURL.Parse(operationPath)
  4390. if err != nil {
  4391. return nil, err
  4392. }
  4393. if params != nil {
  4394. queryValues := queryURL.Query()
  4395. if params.Directory != nil {
  4396. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4397. return nil, err
  4398. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4399. return nil, err
  4400. } else {
  4401. for k, v := range parsed {
  4402. for _, v2 := range v {
  4403. queryValues.Add(k, v2)
  4404. }
  4405. }
  4406. }
  4407. }
  4408. if params.MessageID != nil {
  4409. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "messageID", runtime.ParamLocationQuery, *params.MessageID); err != nil {
  4410. return nil, err
  4411. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4412. return nil, err
  4413. } else {
  4414. for k, v := range parsed {
  4415. for _, v2 := range v {
  4416. queryValues.Add(k, v2)
  4417. }
  4418. }
  4419. }
  4420. }
  4421. queryURL.RawQuery = queryValues.Encode()
  4422. }
  4423. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4424. if err != nil {
  4425. return nil, err
  4426. }
  4427. return req, nil
  4428. }
  4429. // NewSessionForkRequest calls the generic SessionFork builder with application/json body
  4430. func NewSessionForkRequest(server string, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody) (*http.Request, error) {
  4431. var bodyReader io.Reader
  4432. buf, err := json.Marshal(body)
  4433. if err != nil {
  4434. return nil, err
  4435. }
  4436. bodyReader = bytes.NewReader(buf)
  4437. return NewSessionForkRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4438. }
  4439. // NewSessionForkRequestWithBody generates requests for SessionFork with any type of body
  4440. func NewSessionForkRequestWithBody(server string, sessionID string, params *SessionForkParams, contentType string, body io.Reader) (*http.Request, error) {
  4441. var err error
  4442. var pathParam0 string
  4443. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4444. if err != nil {
  4445. return nil, err
  4446. }
  4447. serverURL, err := url.Parse(server)
  4448. if err != nil {
  4449. return nil, err
  4450. }
  4451. operationPath := fmt.Sprintf("/session/%s/fork", pathParam0)
  4452. if operationPath[0] == '/' {
  4453. operationPath = "." + operationPath
  4454. }
  4455. queryURL, err := serverURL.Parse(operationPath)
  4456. if err != nil {
  4457. return nil, err
  4458. }
  4459. if params != nil {
  4460. queryValues := queryURL.Query()
  4461. if params.Directory != nil {
  4462. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4463. return nil, err
  4464. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4465. return nil, err
  4466. } else {
  4467. for k, v := range parsed {
  4468. for _, v2 := range v {
  4469. queryValues.Add(k, v2)
  4470. }
  4471. }
  4472. }
  4473. }
  4474. queryURL.RawQuery = queryValues.Encode()
  4475. }
  4476. req, err := http.NewRequest("POST", queryURL.String(), body)
  4477. if err != nil {
  4478. return nil, err
  4479. }
  4480. req.Header.Add("Content-Type", contentType)
  4481. return req, nil
  4482. }
  4483. // NewSessionInitRequest calls the generic SessionInit builder with application/json body
  4484. func NewSessionInitRequest(server string, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody) (*http.Request, error) {
  4485. var bodyReader io.Reader
  4486. buf, err := json.Marshal(body)
  4487. if err != nil {
  4488. return nil, err
  4489. }
  4490. bodyReader = bytes.NewReader(buf)
  4491. return NewSessionInitRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4492. }
  4493. // NewSessionInitRequestWithBody generates requests for SessionInit with any type of body
  4494. func NewSessionInitRequestWithBody(server string, sessionID string, params *SessionInitParams, contentType string, body io.Reader) (*http.Request, error) {
  4495. var err error
  4496. var pathParam0 string
  4497. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4498. if err != nil {
  4499. return nil, err
  4500. }
  4501. serverURL, err := url.Parse(server)
  4502. if err != nil {
  4503. return nil, err
  4504. }
  4505. operationPath := fmt.Sprintf("/session/%s/init", pathParam0)
  4506. if operationPath[0] == '/' {
  4507. operationPath = "." + operationPath
  4508. }
  4509. queryURL, err := serverURL.Parse(operationPath)
  4510. if err != nil {
  4511. return nil, err
  4512. }
  4513. if params != nil {
  4514. queryValues := queryURL.Query()
  4515. if params.Directory != nil {
  4516. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4517. return nil, err
  4518. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4519. return nil, err
  4520. } else {
  4521. for k, v := range parsed {
  4522. for _, v2 := range v {
  4523. queryValues.Add(k, v2)
  4524. }
  4525. }
  4526. }
  4527. }
  4528. queryURL.RawQuery = queryValues.Encode()
  4529. }
  4530. req, err := http.NewRequest("POST", queryURL.String(), body)
  4531. if err != nil {
  4532. return nil, err
  4533. }
  4534. req.Header.Add("Content-Type", contentType)
  4535. return req, nil
  4536. }
  4537. // NewSessionMessagesRequest generates requests for SessionMessages
  4538. func NewSessionMessagesRequest(server string, sessionID string, params *SessionMessagesParams) (*http.Request, error) {
  4539. var err error
  4540. var pathParam0 string
  4541. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4542. if err != nil {
  4543. return nil, err
  4544. }
  4545. serverURL, err := url.Parse(server)
  4546. if err != nil {
  4547. return nil, err
  4548. }
  4549. operationPath := fmt.Sprintf("/session/%s/message", pathParam0)
  4550. if operationPath[0] == '/' {
  4551. operationPath = "." + operationPath
  4552. }
  4553. queryURL, err := serverURL.Parse(operationPath)
  4554. if err != nil {
  4555. return nil, err
  4556. }
  4557. if params != nil {
  4558. queryValues := queryURL.Query()
  4559. if params.Directory != nil {
  4560. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4561. return nil, err
  4562. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4563. return nil, err
  4564. } else {
  4565. for k, v := range parsed {
  4566. for _, v2 := range v {
  4567. queryValues.Add(k, v2)
  4568. }
  4569. }
  4570. }
  4571. }
  4572. if params.Limit != nil {
  4573. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
  4574. return nil, err
  4575. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4576. return nil, err
  4577. } else {
  4578. for k, v := range parsed {
  4579. for _, v2 := range v {
  4580. queryValues.Add(k, v2)
  4581. }
  4582. }
  4583. }
  4584. }
  4585. queryURL.RawQuery = queryValues.Encode()
  4586. }
  4587. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4588. if err != nil {
  4589. return nil, err
  4590. }
  4591. return req, nil
  4592. }
  4593. // NewSessionPromptRequest calls the generic SessionPrompt builder with application/json body
  4594. func NewSessionPromptRequest(server string, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody) (*http.Request, error) {
  4595. var bodyReader io.Reader
  4596. buf, err := json.Marshal(body)
  4597. if err != nil {
  4598. return nil, err
  4599. }
  4600. bodyReader = bytes.NewReader(buf)
  4601. return NewSessionPromptRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4602. }
  4603. // NewSessionPromptRequestWithBody generates requests for SessionPrompt with any type of body
  4604. func NewSessionPromptRequestWithBody(server string, sessionID string, params *SessionPromptParams, contentType string, body io.Reader) (*http.Request, error) {
  4605. var err error
  4606. var pathParam0 string
  4607. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4608. if err != nil {
  4609. return nil, err
  4610. }
  4611. serverURL, err := url.Parse(server)
  4612. if err != nil {
  4613. return nil, err
  4614. }
  4615. operationPath := fmt.Sprintf("/session/%s/message", pathParam0)
  4616. if operationPath[0] == '/' {
  4617. operationPath = "." + operationPath
  4618. }
  4619. queryURL, err := serverURL.Parse(operationPath)
  4620. if err != nil {
  4621. return nil, err
  4622. }
  4623. if params != nil {
  4624. queryValues := queryURL.Query()
  4625. if params.Directory != nil {
  4626. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4627. return nil, err
  4628. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4629. return nil, err
  4630. } else {
  4631. for k, v := range parsed {
  4632. for _, v2 := range v {
  4633. queryValues.Add(k, v2)
  4634. }
  4635. }
  4636. }
  4637. }
  4638. queryURL.RawQuery = queryValues.Encode()
  4639. }
  4640. req, err := http.NewRequest("POST", queryURL.String(), body)
  4641. if err != nil {
  4642. return nil, err
  4643. }
  4644. req.Header.Add("Content-Type", contentType)
  4645. return req, nil
  4646. }
  4647. // NewSessionMessageRequest generates requests for SessionMessage
  4648. func NewSessionMessageRequest(server string, sessionID string, messageID string, params *SessionMessageParams) (*http.Request, error) {
  4649. var err error
  4650. var pathParam0 string
  4651. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4652. if err != nil {
  4653. return nil, err
  4654. }
  4655. var pathParam1 string
  4656. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4657. if err != nil {
  4658. return nil, err
  4659. }
  4660. serverURL, err := url.Parse(server)
  4661. if err != nil {
  4662. return nil, err
  4663. }
  4664. operationPath := fmt.Sprintf("/session/%s/message/%s", pathParam0, pathParam1)
  4665. if operationPath[0] == '/' {
  4666. operationPath = "." + operationPath
  4667. }
  4668. queryURL, err := serverURL.Parse(operationPath)
  4669. if err != nil {
  4670. return nil, err
  4671. }
  4672. if params != nil {
  4673. queryValues := queryURL.Query()
  4674. if params.Directory != nil {
  4675. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4676. return nil, err
  4677. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4678. return nil, err
  4679. } else {
  4680. for k, v := range parsed {
  4681. for _, v2 := range v {
  4682. queryValues.Add(k, v2)
  4683. }
  4684. }
  4685. }
  4686. }
  4687. queryURL.RawQuery = queryValues.Encode()
  4688. }
  4689. req, err := http.NewRequest("GET", queryURL.String(), nil)
  4690. if err != nil {
  4691. return nil, err
  4692. }
  4693. return req, nil
  4694. }
  4695. // NewPartDeleteRequest generates requests for PartDelete
  4696. func NewPartDeleteRequest(server string, sessionID string, messageID string, partID string, params *PartDeleteParams) (*http.Request, error) {
  4697. var err error
  4698. var pathParam0 string
  4699. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4700. if err != nil {
  4701. return nil, err
  4702. }
  4703. var pathParam1 string
  4704. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4705. if err != nil {
  4706. return nil, err
  4707. }
  4708. var pathParam2 string
  4709. pathParam2, err = runtime.StyleParamWithLocation("simple", false, "partID", runtime.ParamLocationPath, partID)
  4710. if err != nil {
  4711. return nil, err
  4712. }
  4713. serverURL, err := url.Parse(server)
  4714. if err != nil {
  4715. return nil, err
  4716. }
  4717. operationPath := fmt.Sprintf("/session/%s/message/%s/part/%s", pathParam0, pathParam1, pathParam2)
  4718. if operationPath[0] == '/' {
  4719. operationPath = "." + operationPath
  4720. }
  4721. queryURL, err := serverURL.Parse(operationPath)
  4722. if err != nil {
  4723. return nil, err
  4724. }
  4725. if params != nil {
  4726. queryValues := queryURL.Query()
  4727. if params.Directory != nil {
  4728. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4729. return nil, err
  4730. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4731. return nil, err
  4732. } else {
  4733. for k, v := range parsed {
  4734. for _, v2 := range v {
  4735. queryValues.Add(k, v2)
  4736. }
  4737. }
  4738. }
  4739. }
  4740. queryURL.RawQuery = queryValues.Encode()
  4741. }
  4742. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  4743. if err != nil {
  4744. return nil, err
  4745. }
  4746. return req, nil
  4747. }
  4748. // NewPartUpdateRequest calls the generic PartUpdate builder with application/json body
  4749. func NewPartUpdateRequest(server string, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody) (*http.Request, error) {
  4750. var bodyReader io.Reader
  4751. buf, err := json.Marshal(body)
  4752. if err != nil {
  4753. return nil, err
  4754. }
  4755. bodyReader = bytes.NewReader(buf)
  4756. return NewPartUpdateRequestWithBody(server, sessionID, messageID, partID, params, "application/json", bodyReader)
  4757. }
  4758. // NewPartUpdateRequestWithBody generates requests for PartUpdate with any type of body
  4759. func NewPartUpdateRequestWithBody(server string, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader) (*http.Request, error) {
  4760. var err error
  4761. var pathParam0 string
  4762. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4763. if err != nil {
  4764. return nil, err
  4765. }
  4766. var pathParam1 string
  4767. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "messageID", runtime.ParamLocationPath, messageID)
  4768. if err != nil {
  4769. return nil, err
  4770. }
  4771. var pathParam2 string
  4772. pathParam2, err = runtime.StyleParamWithLocation("simple", false, "partID", runtime.ParamLocationPath, partID)
  4773. if err != nil {
  4774. return nil, err
  4775. }
  4776. serverURL, err := url.Parse(server)
  4777. if err != nil {
  4778. return nil, err
  4779. }
  4780. operationPath := fmt.Sprintf("/session/%s/message/%s/part/%s", pathParam0, pathParam1, pathParam2)
  4781. if operationPath[0] == '/' {
  4782. operationPath = "." + operationPath
  4783. }
  4784. queryURL, err := serverURL.Parse(operationPath)
  4785. if err != nil {
  4786. return nil, err
  4787. }
  4788. if params != nil {
  4789. queryValues := queryURL.Query()
  4790. if params.Directory != nil {
  4791. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4792. return nil, err
  4793. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4794. return nil, err
  4795. } else {
  4796. for k, v := range parsed {
  4797. for _, v2 := range v {
  4798. queryValues.Add(k, v2)
  4799. }
  4800. }
  4801. }
  4802. }
  4803. queryURL.RawQuery = queryValues.Encode()
  4804. }
  4805. req, err := http.NewRequest("PATCH", queryURL.String(), body)
  4806. if err != nil {
  4807. return nil, err
  4808. }
  4809. req.Header.Add("Content-Type", contentType)
  4810. return req, nil
  4811. }
  4812. // NewPermissionRespondRequest calls the generic PermissionRespond builder with application/json body
  4813. func NewPermissionRespondRequest(server string, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody) (*http.Request, error) {
  4814. var bodyReader io.Reader
  4815. buf, err := json.Marshal(body)
  4816. if err != nil {
  4817. return nil, err
  4818. }
  4819. bodyReader = bytes.NewReader(buf)
  4820. return NewPermissionRespondRequestWithBody(server, sessionID, permissionID, params, "application/json", bodyReader)
  4821. }
  4822. // NewPermissionRespondRequestWithBody generates requests for PermissionRespond with any type of body
  4823. func NewPermissionRespondRequestWithBody(server string, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader) (*http.Request, error) {
  4824. var err error
  4825. var pathParam0 string
  4826. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4827. if err != nil {
  4828. return nil, err
  4829. }
  4830. var pathParam1 string
  4831. pathParam1, err = runtime.StyleParamWithLocation("simple", false, "permissionID", runtime.ParamLocationPath, permissionID)
  4832. if err != nil {
  4833. return nil, err
  4834. }
  4835. serverURL, err := url.Parse(server)
  4836. if err != nil {
  4837. return nil, err
  4838. }
  4839. operationPath := fmt.Sprintf("/session/%s/permissions/%s", pathParam0, pathParam1)
  4840. if operationPath[0] == '/' {
  4841. operationPath = "." + operationPath
  4842. }
  4843. queryURL, err := serverURL.Parse(operationPath)
  4844. if err != nil {
  4845. return nil, err
  4846. }
  4847. if params != nil {
  4848. queryValues := queryURL.Query()
  4849. if params.Directory != nil {
  4850. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4851. return nil, err
  4852. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4853. return nil, err
  4854. } else {
  4855. for k, v := range parsed {
  4856. for _, v2 := range v {
  4857. queryValues.Add(k, v2)
  4858. }
  4859. }
  4860. }
  4861. }
  4862. queryURL.RawQuery = queryValues.Encode()
  4863. }
  4864. req, err := http.NewRequest("POST", queryURL.String(), body)
  4865. if err != nil {
  4866. return nil, err
  4867. }
  4868. req.Header.Add("Content-Type", contentType)
  4869. return req, nil
  4870. }
  4871. // NewSessionPromptAsyncRequest calls the generic SessionPromptAsync builder with application/json body
  4872. func NewSessionPromptAsyncRequest(server string, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody) (*http.Request, error) {
  4873. var bodyReader io.Reader
  4874. buf, err := json.Marshal(body)
  4875. if err != nil {
  4876. return nil, err
  4877. }
  4878. bodyReader = bytes.NewReader(buf)
  4879. return NewSessionPromptAsyncRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4880. }
  4881. // NewSessionPromptAsyncRequestWithBody generates requests for SessionPromptAsync with any type of body
  4882. func NewSessionPromptAsyncRequestWithBody(server string, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader) (*http.Request, error) {
  4883. var err error
  4884. var pathParam0 string
  4885. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4886. if err != nil {
  4887. return nil, err
  4888. }
  4889. serverURL, err := url.Parse(server)
  4890. if err != nil {
  4891. return nil, err
  4892. }
  4893. operationPath := fmt.Sprintf("/session/%s/prompt_async", pathParam0)
  4894. if operationPath[0] == '/' {
  4895. operationPath = "." + operationPath
  4896. }
  4897. queryURL, err := serverURL.Parse(operationPath)
  4898. if err != nil {
  4899. return nil, err
  4900. }
  4901. if params != nil {
  4902. queryValues := queryURL.Query()
  4903. if params.Directory != nil {
  4904. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4905. return nil, err
  4906. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4907. return nil, err
  4908. } else {
  4909. for k, v := range parsed {
  4910. for _, v2 := range v {
  4911. queryValues.Add(k, v2)
  4912. }
  4913. }
  4914. }
  4915. }
  4916. queryURL.RawQuery = queryValues.Encode()
  4917. }
  4918. req, err := http.NewRequest("POST", queryURL.String(), body)
  4919. if err != nil {
  4920. return nil, err
  4921. }
  4922. req.Header.Add("Content-Type", contentType)
  4923. return req, nil
  4924. }
  4925. // NewSessionRevertRequest calls the generic SessionRevert builder with application/json body
  4926. func NewSessionRevertRequest(server string, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody) (*http.Request, error) {
  4927. var bodyReader io.Reader
  4928. buf, err := json.Marshal(body)
  4929. if err != nil {
  4930. return nil, err
  4931. }
  4932. bodyReader = bytes.NewReader(buf)
  4933. return NewSessionRevertRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  4934. }
  4935. // NewSessionRevertRequestWithBody generates requests for SessionRevert with any type of body
  4936. func NewSessionRevertRequestWithBody(server string, sessionID string, params *SessionRevertParams, contentType string, body io.Reader) (*http.Request, error) {
  4937. var err error
  4938. var pathParam0 string
  4939. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4940. if err != nil {
  4941. return nil, err
  4942. }
  4943. serverURL, err := url.Parse(server)
  4944. if err != nil {
  4945. return nil, err
  4946. }
  4947. operationPath := fmt.Sprintf("/session/%s/revert", pathParam0)
  4948. if operationPath[0] == '/' {
  4949. operationPath = "." + operationPath
  4950. }
  4951. queryURL, err := serverURL.Parse(operationPath)
  4952. if err != nil {
  4953. return nil, err
  4954. }
  4955. if params != nil {
  4956. queryValues := queryURL.Query()
  4957. if params.Directory != nil {
  4958. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  4959. return nil, err
  4960. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  4961. return nil, err
  4962. } else {
  4963. for k, v := range parsed {
  4964. for _, v2 := range v {
  4965. queryValues.Add(k, v2)
  4966. }
  4967. }
  4968. }
  4969. }
  4970. queryURL.RawQuery = queryValues.Encode()
  4971. }
  4972. req, err := http.NewRequest("POST", queryURL.String(), body)
  4973. if err != nil {
  4974. return nil, err
  4975. }
  4976. req.Header.Add("Content-Type", contentType)
  4977. return req, nil
  4978. }
  4979. // NewSessionUnshareRequest generates requests for SessionUnshare
  4980. func NewSessionUnshareRequest(server string, sessionID string, params *SessionUnshareParams) (*http.Request, error) {
  4981. var err error
  4982. var pathParam0 string
  4983. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  4984. if err != nil {
  4985. return nil, err
  4986. }
  4987. serverURL, err := url.Parse(server)
  4988. if err != nil {
  4989. return nil, err
  4990. }
  4991. operationPath := fmt.Sprintf("/session/%s/share", pathParam0)
  4992. if operationPath[0] == '/' {
  4993. operationPath = "." + operationPath
  4994. }
  4995. queryURL, err := serverURL.Parse(operationPath)
  4996. if err != nil {
  4997. return nil, err
  4998. }
  4999. if params != nil {
  5000. queryValues := queryURL.Query()
  5001. if params.Directory != nil {
  5002. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5003. return nil, err
  5004. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5005. return nil, err
  5006. } else {
  5007. for k, v := range parsed {
  5008. for _, v2 := range v {
  5009. queryValues.Add(k, v2)
  5010. }
  5011. }
  5012. }
  5013. }
  5014. queryURL.RawQuery = queryValues.Encode()
  5015. }
  5016. req, err := http.NewRequest("DELETE", queryURL.String(), nil)
  5017. if err != nil {
  5018. return nil, err
  5019. }
  5020. return req, nil
  5021. }
  5022. // NewSessionShareRequest generates requests for SessionShare
  5023. func NewSessionShareRequest(server string, sessionID string, params *SessionShareParams) (*http.Request, error) {
  5024. var err error
  5025. var pathParam0 string
  5026. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5027. if err != nil {
  5028. return nil, err
  5029. }
  5030. serverURL, err := url.Parse(server)
  5031. if err != nil {
  5032. return nil, err
  5033. }
  5034. operationPath := fmt.Sprintf("/session/%s/share", pathParam0)
  5035. if operationPath[0] == '/' {
  5036. operationPath = "." + operationPath
  5037. }
  5038. queryURL, err := serverURL.Parse(operationPath)
  5039. if err != nil {
  5040. return nil, err
  5041. }
  5042. if params != nil {
  5043. queryValues := queryURL.Query()
  5044. if params.Directory != nil {
  5045. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5046. return nil, err
  5047. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5048. return nil, err
  5049. } else {
  5050. for k, v := range parsed {
  5051. for _, v2 := range v {
  5052. queryValues.Add(k, v2)
  5053. }
  5054. }
  5055. }
  5056. }
  5057. queryURL.RawQuery = queryValues.Encode()
  5058. }
  5059. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5060. if err != nil {
  5061. return nil, err
  5062. }
  5063. return req, nil
  5064. }
  5065. // NewSessionShellRequest calls the generic SessionShell builder with application/json body
  5066. func NewSessionShellRequest(server string, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody) (*http.Request, error) {
  5067. var bodyReader io.Reader
  5068. buf, err := json.Marshal(body)
  5069. if err != nil {
  5070. return nil, err
  5071. }
  5072. bodyReader = bytes.NewReader(buf)
  5073. return NewSessionShellRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  5074. }
  5075. // NewSessionShellRequestWithBody generates requests for SessionShell with any type of body
  5076. func NewSessionShellRequestWithBody(server string, sessionID string, params *SessionShellParams, contentType string, body io.Reader) (*http.Request, error) {
  5077. var err error
  5078. var pathParam0 string
  5079. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5080. if err != nil {
  5081. return nil, err
  5082. }
  5083. serverURL, err := url.Parse(server)
  5084. if err != nil {
  5085. return nil, err
  5086. }
  5087. operationPath := fmt.Sprintf("/session/%s/shell", pathParam0)
  5088. if operationPath[0] == '/' {
  5089. operationPath = "." + operationPath
  5090. }
  5091. queryURL, err := serverURL.Parse(operationPath)
  5092. if err != nil {
  5093. return nil, err
  5094. }
  5095. if params != nil {
  5096. queryValues := queryURL.Query()
  5097. if params.Directory != nil {
  5098. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5099. return nil, err
  5100. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5101. return nil, err
  5102. } else {
  5103. for k, v := range parsed {
  5104. for _, v2 := range v {
  5105. queryValues.Add(k, v2)
  5106. }
  5107. }
  5108. }
  5109. }
  5110. queryURL.RawQuery = queryValues.Encode()
  5111. }
  5112. req, err := http.NewRequest("POST", queryURL.String(), body)
  5113. if err != nil {
  5114. return nil, err
  5115. }
  5116. req.Header.Add("Content-Type", contentType)
  5117. return req, nil
  5118. }
  5119. // NewSessionSummarizeRequest calls the generic SessionSummarize builder with application/json body
  5120. func NewSessionSummarizeRequest(server string, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody) (*http.Request, error) {
  5121. var bodyReader io.Reader
  5122. buf, err := json.Marshal(body)
  5123. if err != nil {
  5124. return nil, err
  5125. }
  5126. bodyReader = bytes.NewReader(buf)
  5127. return NewSessionSummarizeRequestWithBody(server, sessionID, params, "application/json", bodyReader)
  5128. }
  5129. // NewSessionSummarizeRequestWithBody generates requests for SessionSummarize with any type of body
  5130. func NewSessionSummarizeRequestWithBody(server string, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader) (*http.Request, error) {
  5131. var err error
  5132. var pathParam0 string
  5133. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5134. if err != nil {
  5135. return nil, err
  5136. }
  5137. serverURL, err := url.Parse(server)
  5138. if err != nil {
  5139. return nil, err
  5140. }
  5141. operationPath := fmt.Sprintf("/session/%s/summarize", pathParam0)
  5142. if operationPath[0] == '/' {
  5143. operationPath = "." + operationPath
  5144. }
  5145. queryURL, err := serverURL.Parse(operationPath)
  5146. if err != nil {
  5147. return nil, err
  5148. }
  5149. if params != nil {
  5150. queryValues := queryURL.Query()
  5151. if params.Directory != nil {
  5152. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5153. return nil, err
  5154. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5155. return nil, err
  5156. } else {
  5157. for k, v := range parsed {
  5158. for _, v2 := range v {
  5159. queryValues.Add(k, v2)
  5160. }
  5161. }
  5162. }
  5163. }
  5164. queryURL.RawQuery = queryValues.Encode()
  5165. }
  5166. req, err := http.NewRequest("POST", queryURL.String(), body)
  5167. if err != nil {
  5168. return nil, err
  5169. }
  5170. req.Header.Add("Content-Type", contentType)
  5171. return req, nil
  5172. }
  5173. // NewSessionTodoRequest generates requests for SessionTodo
  5174. func NewSessionTodoRequest(server string, sessionID string, params *SessionTodoParams) (*http.Request, error) {
  5175. var err error
  5176. var pathParam0 string
  5177. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5178. if err != nil {
  5179. return nil, err
  5180. }
  5181. serverURL, err := url.Parse(server)
  5182. if err != nil {
  5183. return nil, err
  5184. }
  5185. operationPath := fmt.Sprintf("/session/%s/todo", pathParam0)
  5186. if operationPath[0] == '/' {
  5187. operationPath = "." + operationPath
  5188. }
  5189. queryURL, err := serverURL.Parse(operationPath)
  5190. if err != nil {
  5191. return nil, err
  5192. }
  5193. if params != nil {
  5194. queryValues := queryURL.Query()
  5195. if params.Directory != nil {
  5196. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5197. return nil, err
  5198. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5199. return nil, err
  5200. } else {
  5201. for k, v := range parsed {
  5202. for _, v2 := range v {
  5203. queryValues.Add(k, v2)
  5204. }
  5205. }
  5206. }
  5207. }
  5208. queryURL.RawQuery = queryValues.Encode()
  5209. }
  5210. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5211. if err != nil {
  5212. return nil, err
  5213. }
  5214. return req, nil
  5215. }
  5216. // NewSessionUnrevertRequest generates requests for SessionUnrevert
  5217. func NewSessionUnrevertRequest(server string, sessionID string, params *SessionUnrevertParams) (*http.Request, error) {
  5218. var err error
  5219. var pathParam0 string
  5220. pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID)
  5221. if err != nil {
  5222. return nil, err
  5223. }
  5224. serverURL, err := url.Parse(server)
  5225. if err != nil {
  5226. return nil, err
  5227. }
  5228. operationPath := fmt.Sprintf("/session/%s/unrevert", pathParam0)
  5229. if operationPath[0] == '/' {
  5230. operationPath = "." + operationPath
  5231. }
  5232. queryURL, err := serverURL.Parse(operationPath)
  5233. if err != nil {
  5234. return nil, err
  5235. }
  5236. if params != nil {
  5237. queryValues := queryURL.Query()
  5238. if params.Directory != nil {
  5239. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5240. return nil, err
  5241. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5242. return nil, err
  5243. } else {
  5244. for k, v := range parsed {
  5245. for _, v2 := range v {
  5246. queryValues.Add(k, v2)
  5247. }
  5248. }
  5249. }
  5250. }
  5251. queryURL.RawQuery = queryValues.Encode()
  5252. }
  5253. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5254. if err != nil {
  5255. return nil, err
  5256. }
  5257. return req, nil
  5258. }
  5259. // NewTuiAppendPromptRequest calls the generic TuiAppendPrompt builder with application/json body
  5260. func NewTuiAppendPromptRequest(server string, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody) (*http.Request, error) {
  5261. var bodyReader io.Reader
  5262. buf, err := json.Marshal(body)
  5263. if err != nil {
  5264. return nil, err
  5265. }
  5266. bodyReader = bytes.NewReader(buf)
  5267. return NewTuiAppendPromptRequestWithBody(server, params, "application/json", bodyReader)
  5268. }
  5269. // NewTuiAppendPromptRequestWithBody generates requests for TuiAppendPrompt with any type of body
  5270. func NewTuiAppendPromptRequestWithBody(server string, params *TuiAppendPromptParams, contentType string, body io.Reader) (*http.Request, error) {
  5271. var err error
  5272. serverURL, err := url.Parse(server)
  5273. if err != nil {
  5274. return nil, err
  5275. }
  5276. operationPath := fmt.Sprintf("/tui/append-prompt")
  5277. if operationPath[0] == '/' {
  5278. operationPath = "." + operationPath
  5279. }
  5280. queryURL, err := serverURL.Parse(operationPath)
  5281. if err != nil {
  5282. return nil, err
  5283. }
  5284. if params != nil {
  5285. queryValues := queryURL.Query()
  5286. if params.Directory != nil {
  5287. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5288. return nil, err
  5289. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5290. return nil, err
  5291. } else {
  5292. for k, v := range parsed {
  5293. for _, v2 := range v {
  5294. queryValues.Add(k, v2)
  5295. }
  5296. }
  5297. }
  5298. }
  5299. queryURL.RawQuery = queryValues.Encode()
  5300. }
  5301. req, err := http.NewRequest("POST", queryURL.String(), body)
  5302. if err != nil {
  5303. return nil, err
  5304. }
  5305. req.Header.Add("Content-Type", contentType)
  5306. return req, nil
  5307. }
  5308. // NewTuiClearPromptRequest generates requests for TuiClearPrompt
  5309. func NewTuiClearPromptRequest(server string, params *TuiClearPromptParams) (*http.Request, error) {
  5310. var err error
  5311. serverURL, err := url.Parse(server)
  5312. if err != nil {
  5313. return nil, err
  5314. }
  5315. operationPath := fmt.Sprintf("/tui/clear-prompt")
  5316. if operationPath[0] == '/' {
  5317. operationPath = "." + operationPath
  5318. }
  5319. queryURL, err := serverURL.Parse(operationPath)
  5320. if err != nil {
  5321. return nil, err
  5322. }
  5323. if params != nil {
  5324. queryValues := queryURL.Query()
  5325. if params.Directory != nil {
  5326. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5327. return nil, err
  5328. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5329. return nil, err
  5330. } else {
  5331. for k, v := range parsed {
  5332. for _, v2 := range v {
  5333. queryValues.Add(k, v2)
  5334. }
  5335. }
  5336. }
  5337. }
  5338. queryURL.RawQuery = queryValues.Encode()
  5339. }
  5340. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5341. if err != nil {
  5342. return nil, err
  5343. }
  5344. return req, nil
  5345. }
  5346. // NewTuiControlNextRequest generates requests for TuiControlNext
  5347. func NewTuiControlNextRequest(server string, params *TuiControlNextParams) (*http.Request, error) {
  5348. var err error
  5349. serverURL, err := url.Parse(server)
  5350. if err != nil {
  5351. return nil, err
  5352. }
  5353. operationPath := fmt.Sprintf("/tui/control/next")
  5354. if operationPath[0] == '/' {
  5355. operationPath = "." + operationPath
  5356. }
  5357. queryURL, err := serverURL.Parse(operationPath)
  5358. if err != nil {
  5359. return nil, err
  5360. }
  5361. if params != nil {
  5362. queryValues := queryURL.Query()
  5363. if params.Directory != nil {
  5364. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5365. return nil, err
  5366. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5367. return nil, err
  5368. } else {
  5369. for k, v := range parsed {
  5370. for _, v2 := range v {
  5371. queryValues.Add(k, v2)
  5372. }
  5373. }
  5374. }
  5375. }
  5376. queryURL.RawQuery = queryValues.Encode()
  5377. }
  5378. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5379. if err != nil {
  5380. return nil, err
  5381. }
  5382. return req, nil
  5383. }
  5384. // NewTuiControlResponseRequest calls the generic TuiControlResponse builder with application/json body
  5385. func NewTuiControlResponseRequest(server string, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody) (*http.Request, error) {
  5386. var bodyReader io.Reader
  5387. buf, err := json.Marshal(body)
  5388. if err != nil {
  5389. return nil, err
  5390. }
  5391. bodyReader = bytes.NewReader(buf)
  5392. return NewTuiControlResponseRequestWithBody(server, params, "application/json", bodyReader)
  5393. }
  5394. // NewTuiControlResponseRequestWithBody generates requests for TuiControlResponse with any type of body
  5395. func NewTuiControlResponseRequestWithBody(server string, params *TuiControlResponseParams, contentType string, body io.Reader) (*http.Request, error) {
  5396. var err error
  5397. serverURL, err := url.Parse(server)
  5398. if err != nil {
  5399. return nil, err
  5400. }
  5401. operationPath := fmt.Sprintf("/tui/control/response")
  5402. if operationPath[0] == '/' {
  5403. operationPath = "." + operationPath
  5404. }
  5405. queryURL, err := serverURL.Parse(operationPath)
  5406. if err != nil {
  5407. return nil, err
  5408. }
  5409. if params != nil {
  5410. queryValues := queryURL.Query()
  5411. if params.Directory != nil {
  5412. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5413. return nil, err
  5414. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5415. return nil, err
  5416. } else {
  5417. for k, v := range parsed {
  5418. for _, v2 := range v {
  5419. queryValues.Add(k, v2)
  5420. }
  5421. }
  5422. }
  5423. }
  5424. queryURL.RawQuery = queryValues.Encode()
  5425. }
  5426. req, err := http.NewRequest("POST", queryURL.String(), body)
  5427. if err != nil {
  5428. return nil, err
  5429. }
  5430. req.Header.Add("Content-Type", contentType)
  5431. return req, nil
  5432. }
  5433. // NewTuiExecuteCommandRequest calls the generic TuiExecuteCommand builder with application/json body
  5434. func NewTuiExecuteCommandRequest(server string, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody) (*http.Request, error) {
  5435. var bodyReader io.Reader
  5436. buf, err := json.Marshal(body)
  5437. if err != nil {
  5438. return nil, err
  5439. }
  5440. bodyReader = bytes.NewReader(buf)
  5441. return NewTuiExecuteCommandRequestWithBody(server, params, "application/json", bodyReader)
  5442. }
  5443. // NewTuiExecuteCommandRequestWithBody generates requests for TuiExecuteCommand with any type of body
  5444. func NewTuiExecuteCommandRequestWithBody(server string, params *TuiExecuteCommandParams, contentType string, body io.Reader) (*http.Request, error) {
  5445. var err error
  5446. serverURL, err := url.Parse(server)
  5447. if err != nil {
  5448. return nil, err
  5449. }
  5450. operationPath := fmt.Sprintf("/tui/execute-command")
  5451. if operationPath[0] == '/' {
  5452. operationPath = "." + operationPath
  5453. }
  5454. queryURL, err := serverURL.Parse(operationPath)
  5455. if err != nil {
  5456. return nil, err
  5457. }
  5458. if params != nil {
  5459. queryValues := queryURL.Query()
  5460. if params.Directory != nil {
  5461. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5462. return nil, err
  5463. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5464. return nil, err
  5465. } else {
  5466. for k, v := range parsed {
  5467. for _, v2 := range v {
  5468. queryValues.Add(k, v2)
  5469. }
  5470. }
  5471. }
  5472. }
  5473. queryURL.RawQuery = queryValues.Encode()
  5474. }
  5475. req, err := http.NewRequest("POST", queryURL.String(), body)
  5476. if err != nil {
  5477. return nil, err
  5478. }
  5479. req.Header.Add("Content-Type", contentType)
  5480. return req, nil
  5481. }
  5482. // NewTuiOpenHelpRequest generates requests for TuiOpenHelp
  5483. func NewTuiOpenHelpRequest(server string, params *TuiOpenHelpParams) (*http.Request, error) {
  5484. var err error
  5485. serverURL, err := url.Parse(server)
  5486. if err != nil {
  5487. return nil, err
  5488. }
  5489. operationPath := fmt.Sprintf("/tui/open-help")
  5490. if operationPath[0] == '/' {
  5491. operationPath = "." + operationPath
  5492. }
  5493. queryURL, err := serverURL.Parse(operationPath)
  5494. if err != nil {
  5495. return nil, err
  5496. }
  5497. if params != nil {
  5498. queryValues := queryURL.Query()
  5499. if params.Directory != nil {
  5500. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5501. return nil, err
  5502. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5503. return nil, err
  5504. } else {
  5505. for k, v := range parsed {
  5506. for _, v2 := range v {
  5507. queryValues.Add(k, v2)
  5508. }
  5509. }
  5510. }
  5511. }
  5512. queryURL.RawQuery = queryValues.Encode()
  5513. }
  5514. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5515. if err != nil {
  5516. return nil, err
  5517. }
  5518. return req, nil
  5519. }
  5520. // NewTuiOpenModelsRequest generates requests for TuiOpenModels
  5521. func NewTuiOpenModelsRequest(server string, params *TuiOpenModelsParams) (*http.Request, error) {
  5522. var err error
  5523. serverURL, err := url.Parse(server)
  5524. if err != nil {
  5525. return nil, err
  5526. }
  5527. operationPath := fmt.Sprintf("/tui/open-models")
  5528. if operationPath[0] == '/' {
  5529. operationPath = "." + operationPath
  5530. }
  5531. queryURL, err := serverURL.Parse(operationPath)
  5532. if err != nil {
  5533. return nil, err
  5534. }
  5535. if params != nil {
  5536. queryValues := queryURL.Query()
  5537. if params.Directory != nil {
  5538. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5539. return nil, err
  5540. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5541. return nil, err
  5542. } else {
  5543. for k, v := range parsed {
  5544. for _, v2 := range v {
  5545. queryValues.Add(k, v2)
  5546. }
  5547. }
  5548. }
  5549. }
  5550. queryURL.RawQuery = queryValues.Encode()
  5551. }
  5552. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5553. if err != nil {
  5554. return nil, err
  5555. }
  5556. return req, nil
  5557. }
  5558. // NewTuiOpenSessionsRequest generates requests for TuiOpenSessions
  5559. func NewTuiOpenSessionsRequest(server string, params *TuiOpenSessionsParams) (*http.Request, error) {
  5560. var err error
  5561. serverURL, err := url.Parse(server)
  5562. if err != nil {
  5563. return nil, err
  5564. }
  5565. operationPath := fmt.Sprintf("/tui/open-sessions")
  5566. if operationPath[0] == '/' {
  5567. operationPath = "." + operationPath
  5568. }
  5569. queryURL, err := serverURL.Parse(operationPath)
  5570. if err != nil {
  5571. return nil, err
  5572. }
  5573. if params != nil {
  5574. queryValues := queryURL.Query()
  5575. if params.Directory != nil {
  5576. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5577. return nil, err
  5578. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5579. return nil, err
  5580. } else {
  5581. for k, v := range parsed {
  5582. for _, v2 := range v {
  5583. queryValues.Add(k, v2)
  5584. }
  5585. }
  5586. }
  5587. }
  5588. queryURL.RawQuery = queryValues.Encode()
  5589. }
  5590. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5591. if err != nil {
  5592. return nil, err
  5593. }
  5594. return req, nil
  5595. }
  5596. // NewTuiOpenThemesRequest generates requests for TuiOpenThemes
  5597. func NewTuiOpenThemesRequest(server string, params *TuiOpenThemesParams) (*http.Request, error) {
  5598. var err error
  5599. serverURL, err := url.Parse(server)
  5600. if err != nil {
  5601. return nil, err
  5602. }
  5603. operationPath := fmt.Sprintf("/tui/open-themes")
  5604. if operationPath[0] == '/' {
  5605. operationPath = "." + operationPath
  5606. }
  5607. queryURL, err := serverURL.Parse(operationPath)
  5608. if err != nil {
  5609. return nil, err
  5610. }
  5611. if params != nil {
  5612. queryValues := queryURL.Query()
  5613. if params.Directory != nil {
  5614. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5615. return nil, err
  5616. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5617. return nil, err
  5618. } else {
  5619. for k, v := range parsed {
  5620. for _, v2 := range v {
  5621. queryValues.Add(k, v2)
  5622. }
  5623. }
  5624. }
  5625. }
  5626. queryURL.RawQuery = queryValues.Encode()
  5627. }
  5628. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5629. if err != nil {
  5630. return nil, err
  5631. }
  5632. return req, nil
  5633. }
  5634. // NewTuiPublishRequest calls the generic TuiPublish builder with application/json body
  5635. func NewTuiPublishRequest(server string, params *TuiPublishParams, body TuiPublishJSONRequestBody) (*http.Request, error) {
  5636. var bodyReader io.Reader
  5637. buf, err := json.Marshal(body)
  5638. if err != nil {
  5639. return nil, err
  5640. }
  5641. bodyReader = bytes.NewReader(buf)
  5642. return NewTuiPublishRequestWithBody(server, params, "application/json", bodyReader)
  5643. }
  5644. // NewTuiPublishRequestWithBody generates requests for TuiPublish with any type of body
  5645. func NewTuiPublishRequestWithBody(server string, params *TuiPublishParams, contentType string, body io.Reader) (*http.Request, error) {
  5646. var err error
  5647. serverURL, err := url.Parse(server)
  5648. if err != nil {
  5649. return nil, err
  5650. }
  5651. operationPath := fmt.Sprintf("/tui/publish")
  5652. if operationPath[0] == '/' {
  5653. operationPath = "." + operationPath
  5654. }
  5655. queryURL, err := serverURL.Parse(operationPath)
  5656. if err != nil {
  5657. return nil, err
  5658. }
  5659. if params != nil {
  5660. queryValues := queryURL.Query()
  5661. if params.Directory != nil {
  5662. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5663. return nil, err
  5664. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5665. return nil, err
  5666. } else {
  5667. for k, v := range parsed {
  5668. for _, v2 := range v {
  5669. queryValues.Add(k, v2)
  5670. }
  5671. }
  5672. }
  5673. }
  5674. queryURL.RawQuery = queryValues.Encode()
  5675. }
  5676. req, err := http.NewRequest("POST", queryURL.String(), body)
  5677. if err != nil {
  5678. return nil, err
  5679. }
  5680. req.Header.Add("Content-Type", contentType)
  5681. return req, nil
  5682. }
  5683. // NewTuiSelectSessionRequest calls the generic TuiSelectSession builder with application/json body
  5684. func NewTuiSelectSessionRequest(server string, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody) (*http.Request, error) {
  5685. var bodyReader io.Reader
  5686. buf, err := json.Marshal(body)
  5687. if err != nil {
  5688. return nil, err
  5689. }
  5690. bodyReader = bytes.NewReader(buf)
  5691. return NewTuiSelectSessionRequestWithBody(server, params, "application/json", bodyReader)
  5692. }
  5693. // NewTuiSelectSessionRequestWithBody generates requests for TuiSelectSession with any type of body
  5694. func NewTuiSelectSessionRequestWithBody(server string, params *TuiSelectSessionParams, contentType string, body io.Reader) (*http.Request, error) {
  5695. var err error
  5696. serverURL, err := url.Parse(server)
  5697. if err != nil {
  5698. return nil, err
  5699. }
  5700. operationPath := fmt.Sprintf("/tui/select-session")
  5701. if operationPath[0] == '/' {
  5702. operationPath = "." + operationPath
  5703. }
  5704. queryURL, err := serverURL.Parse(operationPath)
  5705. if err != nil {
  5706. return nil, err
  5707. }
  5708. if params != nil {
  5709. queryValues := queryURL.Query()
  5710. if params.Directory != nil {
  5711. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5712. return nil, err
  5713. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5714. return nil, err
  5715. } else {
  5716. for k, v := range parsed {
  5717. for _, v2 := range v {
  5718. queryValues.Add(k, v2)
  5719. }
  5720. }
  5721. }
  5722. }
  5723. queryURL.RawQuery = queryValues.Encode()
  5724. }
  5725. req, err := http.NewRequest("POST", queryURL.String(), body)
  5726. if err != nil {
  5727. return nil, err
  5728. }
  5729. req.Header.Add("Content-Type", contentType)
  5730. return req, nil
  5731. }
  5732. // NewTuiShowToastRequest calls the generic TuiShowToast builder with application/json body
  5733. func NewTuiShowToastRequest(server string, params *TuiShowToastParams, body TuiShowToastJSONRequestBody) (*http.Request, error) {
  5734. var bodyReader io.Reader
  5735. buf, err := json.Marshal(body)
  5736. if err != nil {
  5737. return nil, err
  5738. }
  5739. bodyReader = bytes.NewReader(buf)
  5740. return NewTuiShowToastRequestWithBody(server, params, "application/json", bodyReader)
  5741. }
  5742. // NewTuiShowToastRequestWithBody generates requests for TuiShowToast with any type of body
  5743. func NewTuiShowToastRequestWithBody(server string, params *TuiShowToastParams, contentType string, body io.Reader) (*http.Request, error) {
  5744. var err error
  5745. serverURL, err := url.Parse(server)
  5746. if err != nil {
  5747. return nil, err
  5748. }
  5749. operationPath := fmt.Sprintf("/tui/show-toast")
  5750. if operationPath[0] == '/' {
  5751. operationPath = "." + operationPath
  5752. }
  5753. queryURL, err := serverURL.Parse(operationPath)
  5754. if err != nil {
  5755. return nil, err
  5756. }
  5757. if params != nil {
  5758. queryValues := queryURL.Query()
  5759. if params.Directory != nil {
  5760. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5761. return nil, err
  5762. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5763. return nil, err
  5764. } else {
  5765. for k, v := range parsed {
  5766. for _, v2 := range v {
  5767. queryValues.Add(k, v2)
  5768. }
  5769. }
  5770. }
  5771. }
  5772. queryURL.RawQuery = queryValues.Encode()
  5773. }
  5774. req, err := http.NewRequest("POST", queryURL.String(), body)
  5775. if err != nil {
  5776. return nil, err
  5777. }
  5778. req.Header.Add("Content-Type", contentType)
  5779. return req, nil
  5780. }
  5781. // NewTuiSubmitPromptRequest generates requests for TuiSubmitPrompt
  5782. func NewTuiSubmitPromptRequest(server string, params *TuiSubmitPromptParams) (*http.Request, error) {
  5783. var err error
  5784. serverURL, err := url.Parse(server)
  5785. if err != nil {
  5786. return nil, err
  5787. }
  5788. operationPath := fmt.Sprintf("/tui/submit-prompt")
  5789. if operationPath[0] == '/' {
  5790. operationPath = "." + operationPath
  5791. }
  5792. queryURL, err := serverURL.Parse(operationPath)
  5793. if err != nil {
  5794. return nil, err
  5795. }
  5796. if params != nil {
  5797. queryValues := queryURL.Query()
  5798. if params.Directory != nil {
  5799. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5800. return nil, err
  5801. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5802. return nil, err
  5803. } else {
  5804. for k, v := range parsed {
  5805. for _, v2 := range v {
  5806. queryValues.Add(k, v2)
  5807. }
  5808. }
  5809. }
  5810. }
  5811. queryURL.RawQuery = queryValues.Encode()
  5812. }
  5813. req, err := http.NewRequest("POST", queryURL.String(), nil)
  5814. if err != nil {
  5815. return nil, err
  5816. }
  5817. return req, nil
  5818. }
  5819. // NewVcsGetRequest generates requests for VcsGet
  5820. func NewVcsGetRequest(server string, params *VcsGetParams) (*http.Request, error) {
  5821. var err error
  5822. serverURL, err := url.Parse(server)
  5823. if err != nil {
  5824. return nil, err
  5825. }
  5826. operationPath := fmt.Sprintf("/vcs")
  5827. if operationPath[0] == '/' {
  5828. operationPath = "." + operationPath
  5829. }
  5830. queryURL, err := serverURL.Parse(operationPath)
  5831. if err != nil {
  5832. return nil, err
  5833. }
  5834. if params != nil {
  5835. queryValues := queryURL.Query()
  5836. if params.Directory != nil {
  5837. if queryFrag, err := runtime.StyleParamWithLocation("form", true, "directory", runtime.ParamLocationQuery, *params.Directory); err != nil {
  5838. return nil, err
  5839. } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
  5840. return nil, err
  5841. } else {
  5842. for k, v := range parsed {
  5843. for _, v2 := range v {
  5844. queryValues.Add(k, v2)
  5845. }
  5846. }
  5847. }
  5848. }
  5849. queryURL.RawQuery = queryValues.Encode()
  5850. }
  5851. req, err := http.NewRequest("GET", queryURL.String(), nil)
  5852. if err != nil {
  5853. return nil, err
  5854. }
  5855. return req, nil
  5856. }
  5857. func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
  5858. for _, r := range c.RequestEditors {
  5859. if err := r(ctx, req); err != nil {
  5860. return err
  5861. }
  5862. }
  5863. for _, r := range additionalEditors {
  5864. if err := r(ctx, req); err != nil {
  5865. return err
  5866. }
  5867. }
  5868. return nil
  5869. }
  5870. // ClientWithResponses builds on ClientInterface to offer response payloads
  5871. type ClientWithResponses struct {
  5872. ClientInterface
  5873. }
  5874. // NewClientWithResponses creates a new ClientWithResponses, which wraps
  5875. // Client with return type handling
  5876. func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
  5877. client, err := NewClient(server, opts...)
  5878. if err != nil {
  5879. return nil, err
  5880. }
  5881. return &ClientWithResponses{client}, nil
  5882. }
  5883. // WithBaseURL overrides the baseURL.
  5884. func WithBaseURL(baseURL string) ClientOption {
  5885. return func(c *Client) error {
  5886. newBaseURL, err := url.Parse(baseURL)
  5887. if err != nil {
  5888. return err
  5889. }
  5890. c.Server = newBaseURL.String()
  5891. return nil
  5892. }
  5893. }
  5894. // ClientWithResponsesInterface is the interface specification for the client with responses above.
  5895. type ClientWithResponsesInterface interface {
  5896. // AppAgentsWithResponse request
  5897. AppAgentsWithResponse(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*AppAgentsResponse, error)
  5898. // AuthSetWithBodyWithResponse request with any body
  5899. AuthSetWithBodyWithResponse(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthSetResponse, error)
  5900. AuthSetWithResponse(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthSetResponse, error)
  5901. // CommandListWithResponse request
  5902. CommandListWithResponse(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*CommandListResponse, error)
  5903. // ConfigGetWithResponse request
  5904. ConfigGetWithResponse(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*ConfigGetResponse, error)
  5905. // ConfigUpdateWithBodyWithResponse request with any body
  5906. ConfigUpdateWithBodyWithResponse(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error)
  5907. ConfigUpdateWithResponse(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error)
  5908. // ConfigProvidersWithResponse request
  5909. ConfigProvidersWithResponse(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*ConfigProvidersResponse, error)
  5910. // EventSubscribeWithResponse request
  5911. EventSubscribeWithResponse(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*EventSubscribeResponse, error)
  5912. // ExperimentalResourceListWithResponse request
  5913. ExperimentalResourceListWithResponse(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*ExperimentalResourceListResponse, error)
  5914. // ToolListWithResponse request
  5915. ToolListWithResponse(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*ToolListResponse, error)
  5916. // ToolIdsWithResponse request
  5917. ToolIdsWithResponse(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*ToolIdsResponse, error)
  5918. // WorktreeListWithResponse request
  5919. WorktreeListWithResponse(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*WorktreeListResponse, error)
  5920. // WorktreeCreateWithBodyWithResponse request with any body
  5921. WorktreeCreateWithBodyWithResponse(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error)
  5922. WorktreeCreateWithResponse(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error)
  5923. // FileListWithResponse request
  5924. FileListWithResponse(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*FileListResponse, error)
  5925. // FileReadWithResponse request
  5926. FileReadWithResponse(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*FileReadResponse, error)
  5927. // FileStatusWithResponse request
  5928. FileStatusWithResponse(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*FileStatusResponse, error)
  5929. // FindTextWithResponse request
  5930. FindTextWithResponse(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*FindTextResponse, error)
  5931. // FindFilesWithResponse request
  5932. FindFilesWithResponse(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*FindFilesResponse, error)
  5933. // FindSymbolsWithResponse request
  5934. FindSymbolsWithResponse(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*FindSymbolsResponse, error)
  5935. // FormatterStatusWithResponse request
  5936. FormatterStatusWithResponse(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*FormatterStatusResponse, error)
  5937. // GlobalDisposeWithResponse request
  5938. GlobalDisposeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalDisposeResponse, error)
  5939. // GlobalEventWithResponse request
  5940. GlobalEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalEventResponse, error)
  5941. // GlobalHealthWithResponse request
  5942. GlobalHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalHealthResponse, error)
  5943. // InstanceDisposeWithResponse request
  5944. InstanceDisposeWithResponse(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*InstanceDisposeResponse, error)
  5945. // AppLogWithBodyWithResponse request with any body
  5946. AppLogWithBodyWithResponse(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppLogResponse, error)
  5947. AppLogWithResponse(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*AppLogResponse, error)
  5948. // LspStatusWithResponse request
  5949. LspStatusWithResponse(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*LspStatusResponse, error)
  5950. // McpStatusWithResponse request
  5951. McpStatusWithResponse(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*McpStatusResponse, error)
  5952. // McpAddWithBodyWithResponse request with any body
  5953. McpAddWithBodyWithResponse(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAddResponse, error)
  5954. McpAddWithResponse(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAddResponse, error)
  5955. // McpAuthRemoveWithResponse request
  5956. McpAuthRemoveWithResponse(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*McpAuthRemoveResponse, error)
  5957. // McpAuthStartWithResponse request
  5958. McpAuthStartWithResponse(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*McpAuthStartResponse, error)
  5959. // McpAuthAuthenticateWithResponse request
  5960. McpAuthAuthenticateWithResponse(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*McpAuthAuthenticateResponse, error)
  5961. // McpAuthCallbackWithBodyWithResponse request with any body
  5962. McpAuthCallbackWithBodyWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error)
  5963. McpAuthCallbackWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error)
  5964. // McpConnectWithResponse request
  5965. McpConnectWithResponse(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*McpConnectResponse, error)
  5966. // McpDisconnectWithResponse request
  5967. McpDisconnectWithResponse(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*McpDisconnectResponse, error)
  5968. // PathGetWithResponse request
  5969. PathGetWithResponse(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*PathGetResponse, error)
  5970. // PermissionListWithResponse request
  5971. PermissionListWithResponse(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*PermissionListResponse, error)
  5972. // PermissionReplyWithBodyWithResponse request with any body
  5973. PermissionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error)
  5974. PermissionReplyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error)
  5975. // ProjectListWithResponse request
  5976. ProjectListWithResponse(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*ProjectListResponse, error)
  5977. // ProjectCurrentWithResponse request
  5978. ProjectCurrentWithResponse(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*ProjectCurrentResponse, error)
  5979. // ProjectUpdateWithBodyWithResponse request with any body
  5980. ProjectUpdateWithBodyWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error)
  5981. ProjectUpdateWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error)
  5982. // ProviderListWithResponse request
  5983. ProviderListWithResponse(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*ProviderListResponse, error)
  5984. // ProviderAuthWithResponse request
  5985. ProviderAuthWithResponse(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*ProviderAuthResponse, error)
  5986. // ProviderOauthAuthorizeWithBodyWithResponse request with any body
  5987. ProviderOauthAuthorizeWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error)
  5988. ProviderOauthAuthorizeWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error)
  5989. // ProviderOauthCallbackWithBodyWithResponse request with any body
  5990. ProviderOauthCallbackWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error)
  5991. ProviderOauthCallbackWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error)
  5992. // PtyListWithResponse request
  5993. PtyListWithResponse(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*PtyListResponse, error)
  5994. // PtyCreateWithBodyWithResponse request with any body
  5995. PtyCreateWithBodyWithResponse(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error)
  5996. PtyCreateWithResponse(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error)
  5997. // PtyRemoveWithResponse request
  5998. PtyRemoveWithResponse(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*PtyRemoveResponse, error)
  5999. // PtyGetWithResponse request
  6000. PtyGetWithResponse(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*PtyGetResponse, error)
  6001. // PtyUpdateWithBodyWithResponse request with any body
  6002. PtyUpdateWithBodyWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error)
  6003. PtyUpdateWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error)
  6004. // PtyConnectWithResponse request
  6005. PtyConnectWithResponse(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*PtyConnectResponse, error)
  6006. // QuestionListWithResponse request
  6007. QuestionListWithResponse(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*QuestionListResponse, error)
  6008. // QuestionRejectWithResponse request
  6009. QuestionRejectWithResponse(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*QuestionRejectResponse, error)
  6010. // QuestionReplyWithBodyWithResponse request with any body
  6011. QuestionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error)
  6012. QuestionReplyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error)
  6013. // SessionListWithResponse request
  6014. SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error)
  6015. // SessionCreateWithBodyWithResponse request with any body
  6016. SessionCreateWithBodyWithResponse(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error)
  6017. SessionCreateWithResponse(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error)
  6018. // SessionStatusWithResponse request
  6019. SessionStatusWithResponse(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*SessionStatusResponse, error)
  6020. // SessionDeleteWithResponse request
  6021. SessionDeleteWithResponse(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*SessionDeleteResponse, error)
  6022. // SessionGetWithResponse request
  6023. SessionGetWithResponse(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*SessionGetResponse, error)
  6024. // SessionUpdateWithBodyWithResponse request with any body
  6025. SessionUpdateWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error)
  6026. SessionUpdateWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error)
  6027. // SessionAbortWithResponse request
  6028. SessionAbortWithResponse(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*SessionAbortResponse, error)
  6029. // SessionChildrenWithResponse request
  6030. SessionChildrenWithResponse(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*SessionChildrenResponse, error)
  6031. // SessionCommandWithBodyWithResponse request with any body
  6032. SessionCommandWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error)
  6033. SessionCommandWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error)
  6034. // SessionDiffWithResponse request
  6035. SessionDiffWithResponse(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*SessionDiffResponse, error)
  6036. // SessionForkWithBodyWithResponse request with any body
  6037. SessionForkWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionForkResponse, error)
  6038. SessionForkWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionForkResponse, error)
  6039. // SessionInitWithBodyWithResponse request with any body
  6040. SessionInitWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionInitResponse, error)
  6041. SessionInitWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionInitResponse, error)
  6042. // SessionMessagesWithResponse request
  6043. SessionMessagesWithResponse(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*SessionMessagesResponse, error)
  6044. // SessionPromptWithBodyWithResponse request with any body
  6045. SessionPromptWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error)
  6046. SessionPromptWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error)
  6047. // SessionMessageWithResponse request
  6048. SessionMessageWithResponse(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*SessionMessageResponse, error)
  6049. // PartDeleteWithResponse request
  6050. PartDeleteWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*PartDeleteResponse, error)
  6051. // PartUpdateWithBodyWithResponse request with any body
  6052. PartUpdateWithBodyWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error)
  6053. PartUpdateWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error)
  6054. // PermissionRespondWithBodyWithResponse request with any body
  6055. PermissionRespondWithBodyWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error)
  6056. PermissionRespondWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error)
  6057. // SessionPromptAsyncWithBodyWithResponse request with any body
  6058. SessionPromptAsyncWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error)
  6059. SessionPromptAsyncWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error)
  6060. // SessionRevertWithBodyWithResponse request with any body
  6061. SessionRevertWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error)
  6062. SessionRevertWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error)
  6063. // SessionUnshareWithResponse request
  6064. SessionUnshareWithResponse(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*SessionUnshareResponse, error)
  6065. // SessionShareWithResponse request
  6066. SessionShareWithResponse(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*SessionShareResponse, error)
  6067. // SessionShellWithBodyWithResponse request with any body
  6068. SessionShellWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionShellResponse, error)
  6069. SessionShellWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionShellResponse, error)
  6070. // SessionSummarizeWithBodyWithResponse request with any body
  6071. SessionSummarizeWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error)
  6072. SessionSummarizeWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error)
  6073. // SessionTodoWithResponse request
  6074. SessionTodoWithResponse(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*SessionTodoResponse, error)
  6075. // SessionUnrevertWithResponse request
  6076. SessionUnrevertWithResponse(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*SessionUnrevertResponse, error)
  6077. // TuiAppendPromptWithBodyWithResponse request with any body
  6078. TuiAppendPromptWithBodyWithResponse(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error)
  6079. TuiAppendPromptWithResponse(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error)
  6080. // TuiClearPromptWithResponse request
  6081. TuiClearPromptWithResponse(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*TuiClearPromptResponse, error)
  6082. // TuiControlNextWithResponse request
  6083. TuiControlNextWithResponse(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*TuiControlNextResponse, error)
  6084. // TuiControlResponseWithBodyWithResponse request with any body
  6085. TuiControlResponseWithBodyWithResponse(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error)
  6086. TuiControlResponseWithResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error)
  6087. // TuiExecuteCommandWithBodyWithResponse request with any body
  6088. TuiExecuteCommandWithBodyWithResponse(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error)
  6089. TuiExecuteCommandWithResponse(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error)
  6090. // TuiOpenHelpWithResponse request
  6091. TuiOpenHelpWithResponse(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*TuiOpenHelpResponse, error)
  6092. // TuiOpenModelsWithResponse request
  6093. TuiOpenModelsWithResponse(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*TuiOpenModelsResponse, error)
  6094. // TuiOpenSessionsWithResponse request
  6095. TuiOpenSessionsWithResponse(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*TuiOpenSessionsResponse, error)
  6096. // TuiOpenThemesWithResponse request
  6097. TuiOpenThemesWithResponse(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*TuiOpenThemesResponse, error)
  6098. // TuiPublishWithBodyWithResponse request with any body
  6099. TuiPublishWithBodyWithResponse(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error)
  6100. TuiPublishWithResponse(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error)
  6101. // TuiSelectSessionWithBodyWithResponse request with any body
  6102. TuiSelectSessionWithBodyWithResponse(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error)
  6103. TuiSelectSessionWithResponse(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error)
  6104. // TuiShowToastWithBodyWithResponse request with any body
  6105. TuiShowToastWithBodyWithResponse(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error)
  6106. TuiShowToastWithResponse(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error)
  6107. // TuiSubmitPromptWithResponse request
  6108. TuiSubmitPromptWithResponse(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*TuiSubmitPromptResponse, error)
  6109. // VcsGetWithResponse request
  6110. VcsGetWithResponse(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*VcsGetResponse, error)
  6111. }
  6112. type AppAgentsResponse struct {
  6113. Body []byte
  6114. HTTPResponse *http.Response
  6115. JSON200 *[]Agent
  6116. }
  6117. // Status returns HTTPResponse.Status
  6118. func (r AppAgentsResponse) Status() string {
  6119. if r.HTTPResponse != nil {
  6120. return r.HTTPResponse.Status
  6121. }
  6122. return http.StatusText(0)
  6123. }
  6124. // StatusCode returns HTTPResponse.StatusCode
  6125. func (r AppAgentsResponse) StatusCode() int {
  6126. if r.HTTPResponse != nil {
  6127. return r.HTTPResponse.StatusCode
  6128. }
  6129. return 0
  6130. }
  6131. type AuthSetResponse struct {
  6132. Body []byte
  6133. HTTPResponse *http.Response
  6134. JSON200 *bool
  6135. JSON400 *BadRequestError
  6136. }
  6137. // Status returns HTTPResponse.Status
  6138. func (r AuthSetResponse) Status() string {
  6139. if r.HTTPResponse != nil {
  6140. return r.HTTPResponse.Status
  6141. }
  6142. return http.StatusText(0)
  6143. }
  6144. // StatusCode returns HTTPResponse.StatusCode
  6145. func (r AuthSetResponse) StatusCode() int {
  6146. if r.HTTPResponse != nil {
  6147. return r.HTTPResponse.StatusCode
  6148. }
  6149. return 0
  6150. }
  6151. type CommandListResponse struct {
  6152. Body []byte
  6153. HTTPResponse *http.Response
  6154. JSON200 *[]Command
  6155. }
  6156. // Status returns HTTPResponse.Status
  6157. func (r CommandListResponse) Status() string {
  6158. if r.HTTPResponse != nil {
  6159. return r.HTTPResponse.Status
  6160. }
  6161. return http.StatusText(0)
  6162. }
  6163. // StatusCode returns HTTPResponse.StatusCode
  6164. func (r CommandListResponse) StatusCode() int {
  6165. if r.HTTPResponse != nil {
  6166. return r.HTTPResponse.StatusCode
  6167. }
  6168. return 0
  6169. }
  6170. type ConfigGetResponse struct {
  6171. Body []byte
  6172. HTTPResponse *http.Response
  6173. JSON200 *Config
  6174. }
  6175. // Status returns HTTPResponse.Status
  6176. func (r ConfigGetResponse) Status() string {
  6177. if r.HTTPResponse != nil {
  6178. return r.HTTPResponse.Status
  6179. }
  6180. return http.StatusText(0)
  6181. }
  6182. // StatusCode returns HTTPResponse.StatusCode
  6183. func (r ConfigGetResponse) StatusCode() int {
  6184. if r.HTTPResponse != nil {
  6185. return r.HTTPResponse.StatusCode
  6186. }
  6187. return 0
  6188. }
  6189. type ConfigUpdateResponse struct {
  6190. Body []byte
  6191. HTTPResponse *http.Response
  6192. JSON200 *Config
  6193. JSON400 *BadRequestError
  6194. }
  6195. // Status returns HTTPResponse.Status
  6196. func (r ConfigUpdateResponse) Status() string {
  6197. if r.HTTPResponse != nil {
  6198. return r.HTTPResponse.Status
  6199. }
  6200. return http.StatusText(0)
  6201. }
  6202. // StatusCode returns HTTPResponse.StatusCode
  6203. func (r ConfigUpdateResponse) StatusCode() int {
  6204. if r.HTTPResponse != nil {
  6205. return r.HTTPResponse.StatusCode
  6206. }
  6207. return 0
  6208. }
  6209. type ConfigProvidersResponse struct {
  6210. Body []byte
  6211. HTTPResponse *http.Response
  6212. JSON200 *struct {
  6213. Default map[string]string `json:"default"`
  6214. Providers []Provider `json:"providers"`
  6215. }
  6216. }
  6217. // Status returns HTTPResponse.Status
  6218. func (r ConfigProvidersResponse) Status() string {
  6219. if r.HTTPResponse != nil {
  6220. return r.HTTPResponse.Status
  6221. }
  6222. return http.StatusText(0)
  6223. }
  6224. // StatusCode returns HTTPResponse.StatusCode
  6225. func (r ConfigProvidersResponse) StatusCode() int {
  6226. if r.HTTPResponse != nil {
  6227. return r.HTTPResponse.StatusCode
  6228. }
  6229. return 0
  6230. }
  6231. type EventSubscribeResponse struct {
  6232. Body []byte
  6233. HTTPResponse *http.Response
  6234. }
  6235. // Status returns HTTPResponse.Status
  6236. func (r EventSubscribeResponse) Status() string {
  6237. if r.HTTPResponse != nil {
  6238. return r.HTTPResponse.Status
  6239. }
  6240. return http.StatusText(0)
  6241. }
  6242. // StatusCode returns HTTPResponse.StatusCode
  6243. func (r EventSubscribeResponse) StatusCode() int {
  6244. if r.HTTPResponse != nil {
  6245. return r.HTTPResponse.StatusCode
  6246. }
  6247. return 0
  6248. }
  6249. type ExperimentalResourceListResponse struct {
  6250. Body []byte
  6251. HTTPResponse *http.Response
  6252. JSON200 *map[string]McpResource
  6253. }
  6254. // Status returns HTTPResponse.Status
  6255. func (r ExperimentalResourceListResponse) Status() string {
  6256. if r.HTTPResponse != nil {
  6257. return r.HTTPResponse.Status
  6258. }
  6259. return http.StatusText(0)
  6260. }
  6261. // StatusCode returns HTTPResponse.StatusCode
  6262. func (r ExperimentalResourceListResponse) StatusCode() int {
  6263. if r.HTTPResponse != nil {
  6264. return r.HTTPResponse.StatusCode
  6265. }
  6266. return 0
  6267. }
  6268. type ToolListResponse struct {
  6269. Body []byte
  6270. HTTPResponse *http.Response
  6271. JSON200 *ToolList
  6272. JSON400 *BadRequestError
  6273. }
  6274. // Status returns HTTPResponse.Status
  6275. func (r ToolListResponse) Status() string {
  6276. if r.HTTPResponse != nil {
  6277. return r.HTTPResponse.Status
  6278. }
  6279. return http.StatusText(0)
  6280. }
  6281. // StatusCode returns HTTPResponse.StatusCode
  6282. func (r ToolListResponse) StatusCode() int {
  6283. if r.HTTPResponse != nil {
  6284. return r.HTTPResponse.StatusCode
  6285. }
  6286. return 0
  6287. }
  6288. type ToolIdsResponse struct {
  6289. Body []byte
  6290. HTTPResponse *http.Response
  6291. JSON200 *ToolIDs
  6292. JSON400 *BadRequestError
  6293. }
  6294. // Status returns HTTPResponse.Status
  6295. func (r ToolIdsResponse) Status() string {
  6296. if r.HTTPResponse != nil {
  6297. return r.HTTPResponse.Status
  6298. }
  6299. return http.StatusText(0)
  6300. }
  6301. // StatusCode returns HTTPResponse.StatusCode
  6302. func (r ToolIdsResponse) StatusCode() int {
  6303. if r.HTTPResponse != nil {
  6304. return r.HTTPResponse.StatusCode
  6305. }
  6306. return 0
  6307. }
  6308. type WorktreeListResponse struct {
  6309. Body []byte
  6310. HTTPResponse *http.Response
  6311. JSON200 *[]string
  6312. }
  6313. // Status returns HTTPResponse.Status
  6314. func (r WorktreeListResponse) Status() string {
  6315. if r.HTTPResponse != nil {
  6316. return r.HTTPResponse.Status
  6317. }
  6318. return http.StatusText(0)
  6319. }
  6320. // StatusCode returns HTTPResponse.StatusCode
  6321. func (r WorktreeListResponse) StatusCode() int {
  6322. if r.HTTPResponse != nil {
  6323. return r.HTTPResponse.StatusCode
  6324. }
  6325. return 0
  6326. }
  6327. type WorktreeCreateResponse struct {
  6328. Body []byte
  6329. HTTPResponse *http.Response
  6330. JSON200 *Worktree
  6331. JSON400 *BadRequestError
  6332. }
  6333. // Status returns HTTPResponse.Status
  6334. func (r WorktreeCreateResponse) Status() string {
  6335. if r.HTTPResponse != nil {
  6336. return r.HTTPResponse.Status
  6337. }
  6338. return http.StatusText(0)
  6339. }
  6340. // StatusCode returns HTTPResponse.StatusCode
  6341. func (r WorktreeCreateResponse) StatusCode() int {
  6342. if r.HTTPResponse != nil {
  6343. return r.HTTPResponse.StatusCode
  6344. }
  6345. return 0
  6346. }
  6347. type FileListResponse struct {
  6348. Body []byte
  6349. HTTPResponse *http.Response
  6350. JSON200 *[]FileNode
  6351. }
  6352. // Status returns HTTPResponse.Status
  6353. func (r FileListResponse) Status() string {
  6354. if r.HTTPResponse != nil {
  6355. return r.HTTPResponse.Status
  6356. }
  6357. return http.StatusText(0)
  6358. }
  6359. // StatusCode returns HTTPResponse.StatusCode
  6360. func (r FileListResponse) StatusCode() int {
  6361. if r.HTTPResponse != nil {
  6362. return r.HTTPResponse.StatusCode
  6363. }
  6364. return 0
  6365. }
  6366. type FileReadResponse struct {
  6367. Body []byte
  6368. HTTPResponse *http.Response
  6369. JSON200 *FileContent
  6370. }
  6371. // Status returns HTTPResponse.Status
  6372. func (r FileReadResponse) Status() string {
  6373. if r.HTTPResponse != nil {
  6374. return r.HTTPResponse.Status
  6375. }
  6376. return http.StatusText(0)
  6377. }
  6378. // StatusCode returns HTTPResponse.StatusCode
  6379. func (r FileReadResponse) StatusCode() int {
  6380. if r.HTTPResponse != nil {
  6381. return r.HTTPResponse.StatusCode
  6382. }
  6383. return 0
  6384. }
  6385. type FileStatusResponse struct {
  6386. Body []byte
  6387. HTTPResponse *http.Response
  6388. JSON200 *[]File
  6389. }
  6390. // Status returns HTTPResponse.Status
  6391. func (r FileStatusResponse) Status() string {
  6392. if r.HTTPResponse != nil {
  6393. return r.HTTPResponse.Status
  6394. }
  6395. return http.StatusText(0)
  6396. }
  6397. // StatusCode returns HTTPResponse.StatusCode
  6398. func (r FileStatusResponse) StatusCode() int {
  6399. if r.HTTPResponse != nil {
  6400. return r.HTTPResponse.StatusCode
  6401. }
  6402. return 0
  6403. }
  6404. type FindTextResponse struct {
  6405. Body []byte
  6406. HTTPResponse *http.Response
  6407. JSON200 *[]struct {
  6408. AbsoluteOffset float32 `json:"absolute_offset"`
  6409. LineNumber float32 `json:"line_number"`
  6410. Lines struct {
  6411. Text string `json:"text"`
  6412. } `json:"lines"`
  6413. Path struct {
  6414. Text string `json:"text"`
  6415. } `json:"path"`
  6416. Submatches []struct {
  6417. End float32 `json:"end"`
  6418. Match struct {
  6419. Text string `json:"text"`
  6420. } `json:"match"`
  6421. Start float32 `json:"start"`
  6422. } `json:"submatches"`
  6423. }
  6424. }
  6425. // Status returns HTTPResponse.Status
  6426. func (r FindTextResponse) Status() string {
  6427. if r.HTTPResponse != nil {
  6428. return r.HTTPResponse.Status
  6429. }
  6430. return http.StatusText(0)
  6431. }
  6432. // StatusCode returns HTTPResponse.StatusCode
  6433. func (r FindTextResponse) StatusCode() int {
  6434. if r.HTTPResponse != nil {
  6435. return r.HTTPResponse.StatusCode
  6436. }
  6437. return 0
  6438. }
  6439. type FindFilesResponse struct {
  6440. Body []byte
  6441. HTTPResponse *http.Response
  6442. JSON200 *[]string
  6443. }
  6444. // Status returns HTTPResponse.Status
  6445. func (r FindFilesResponse) Status() string {
  6446. if r.HTTPResponse != nil {
  6447. return r.HTTPResponse.Status
  6448. }
  6449. return http.StatusText(0)
  6450. }
  6451. // StatusCode returns HTTPResponse.StatusCode
  6452. func (r FindFilesResponse) StatusCode() int {
  6453. if r.HTTPResponse != nil {
  6454. return r.HTTPResponse.StatusCode
  6455. }
  6456. return 0
  6457. }
  6458. type FindSymbolsResponse struct {
  6459. Body []byte
  6460. HTTPResponse *http.Response
  6461. JSON200 *[]Symbol
  6462. }
  6463. // Status returns HTTPResponse.Status
  6464. func (r FindSymbolsResponse) Status() string {
  6465. if r.HTTPResponse != nil {
  6466. return r.HTTPResponse.Status
  6467. }
  6468. return http.StatusText(0)
  6469. }
  6470. // StatusCode returns HTTPResponse.StatusCode
  6471. func (r FindSymbolsResponse) StatusCode() int {
  6472. if r.HTTPResponse != nil {
  6473. return r.HTTPResponse.StatusCode
  6474. }
  6475. return 0
  6476. }
  6477. type FormatterStatusResponse struct {
  6478. Body []byte
  6479. HTTPResponse *http.Response
  6480. JSON200 *[]FormatterStatus
  6481. }
  6482. // Status returns HTTPResponse.Status
  6483. func (r FormatterStatusResponse) Status() string {
  6484. if r.HTTPResponse != nil {
  6485. return r.HTTPResponse.Status
  6486. }
  6487. return http.StatusText(0)
  6488. }
  6489. // StatusCode returns HTTPResponse.StatusCode
  6490. func (r FormatterStatusResponse) StatusCode() int {
  6491. if r.HTTPResponse != nil {
  6492. return r.HTTPResponse.StatusCode
  6493. }
  6494. return 0
  6495. }
  6496. type GlobalDisposeResponse struct {
  6497. Body []byte
  6498. HTTPResponse *http.Response
  6499. JSON200 *bool
  6500. }
  6501. // Status returns HTTPResponse.Status
  6502. func (r GlobalDisposeResponse) Status() string {
  6503. if r.HTTPResponse != nil {
  6504. return r.HTTPResponse.Status
  6505. }
  6506. return http.StatusText(0)
  6507. }
  6508. // StatusCode returns HTTPResponse.StatusCode
  6509. func (r GlobalDisposeResponse) StatusCode() int {
  6510. if r.HTTPResponse != nil {
  6511. return r.HTTPResponse.StatusCode
  6512. }
  6513. return 0
  6514. }
  6515. type GlobalEventResponse struct {
  6516. Body []byte
  6517. HTTPResponse *http.Response
  6518. }
  6519. // Status returns HTTPResponse.Status
  6520. func (r GlobalEventResponse) Status() string {
  6521. if r.HTTPResponse != nil {
  6522. return r.HTTPResponse.Status
  6523. }
  6524. return http.StatusText(0)
  6525. }
  6526. // StatusCode returns HTTPResponse.StatusCode
  6527. func (r GlobalEventResponse) StatusCode() int {
  6528. if r.HTTPResponse != nil {
  6529. return r.HTTPResponse.StatusCode
  6530. }
  6531. return 0
  6532. }
  6533. type GlobalHealthResponse struct {
  6534. Body []byte
  6535. HTTPResponse *http.Response
  6536. JSON200 *struct {
  6537. Healthy bool `json:"healthy"`
  6538. Version string `json:"version"`
  6539. }
  6540. }
  6541. // Status returns HTTPResponse.Status
  6542. func (r GlobalHealthResponse) Status() string {
  6543. if r.HTTPResponse != nil {
  6544. return r.HTTPResponse.Status
  6545. }
  6546. return http.StatusText(0)
  6547. }
  6548. // StatusCode returns HTTPResponse.StatusCode
  6549. func (r GlobalHealthResponse) StatusCode() int {
  6550. if r.HTTPResponse != nil {
  6551. return r.HTTPResponse.StatusCode
  6552. }
  6553. return 0
  6554. }
  6555. type InstanceDisposeResponse struct {
  6556. Body []byte
  6557. HTTPResponse *http.Response
  6558. JSON200 *bool
  6559. }
  6560. // Status returns HTTPResponse.Status
  6561. func (r InstanceDisposeResponse) Status() string {
  6562. if r.HTTPResponse != nil {
  6563. return r.HTTPResponse.Status
  6564. }
  6565. return http.StatusText(0)
  6566. }
  6567. // StatusCode returns HTTPResponse.StatusCode
  6568. func (r InstanceDisposeResponse) StatusCode() int {
  6569. if r.HTTPResponse != nil {
  6570. return r.HTTPResponse.StatusCode
  6571. }
  6572. return 0
  6573. }
  6574. type AppLogResponse struct {
  6575. Body []byte
  6576. HTTPResponse *http.Response
  6577. JSON200 *bool
  6578. JSON400 *BadRequestError
  6579. }
  6580. // Status returns HTTPResponse.Status
  6581. func (r AppLogResponse) Status() string {
  6582. if r.HTTPResponse != nil {
  6583. return r.HTTPResponse.Status
  6584. }
  6585. return http.StatusText(0)
  6586. }
  6587. // StatusCode returns HTTPResponse.StatusCode
  6588. func (r AppLogResponse) StatusCode() int {
  6589. if r.HTTPResponse != nil {
  6590. return r.HTTPResponse.StatusCode
  6591. }
  6592. return 0
  6593. }
  6594. type LspStatusResponse struct {
  6595. Body []byte
  6596. HTTPResponse *http.Response
  6597. JSON200 *[]LSPStatus
  6598. }
  6599. // Status returns HTTPResponse.Status
  6600. func (r LspStatusResponse) Status() string {
  6601. if r.HTTPResponse != nil {
  6602. return r.HTTPResponse.Status
  6603. }
  6604. return http.StatusText(0)
  6605. }
  6606. // StatusCode returns HTTPResponse.StatusCode
  6607. func (r LspStatusResponse) StatusCode() int {
  6608. if r.HTTPResponse != nil {
  6609. return r.HTTPResponse.StatusCode
  6610. }
  6611. return 0
  6612. }
  6613. type McpStatusResponse struct {
  6614. Body []byte
  6615. HTTPResponse *http.Response
  6616. JSON200 *map[string]MCPStatus
  6617. }
  6618. // Status returns HTTPResponse.Status
  6619. func (r McpStatusResponse) Status() string {
  6620. if r.HTTPResponse != nil {
  6621. return r.HTTPResponse.Status
  6622. }
  6623. return http.StatusText(0)
  6624. }
  6625. // StatusCode returns HTTPResponse.StatusCode
  6626. func (r McpStatusResponse) StatusCode() int {
  6627. if r.HTTPResponse != nil {
  6628. return r.HTTPResponse.StatusCode
  6629. }
  6630. return 0
  6631. }
  6632. type McpAddResponse struct {
  6633. Body []byte
  6634. HTTPResponse *http.Response
  6635. JSON200 *map[string]MCPStatus
  6636. JSON400 *BadRequestError
  6637. }
  6638. // Status returns HTTPResponse.Status
  6639. func (r McpAddResponse) Status() string {
  6640. if r.HTTPResponse != nil {
  6641. return r.HTTPResponse.Status
  6642. }
  6643. return http.StatusText(0)
  6644. }
  6645. // StatusCode returns HTTPResponse.StatusCode
  6646. func (r McpAddResponse) StatusCode() int {
  6647. if r.HTTPResponse != nil {
  6648. return r.HTTPResponse.StatusCode
  6649. }
  6650. return 0
  6651. }
  6652. type McpAuthRemoveResponse struct {
  6653. Body []byte
  6654. HTTPResponse *http.Response
  6655. JSON200 *struct {
  6656. Success bool `json:"success"`
  6657. }
  6658. JSON404 *NotFoundError
  6659. }
  6660. // Status returns HTTPResponse.Status
  6661. func (r McpAuthRemoveResponse) Status() string {
  6662. if r.HTTPResponse != nil {
  6663. return r.HTTPResponse.Status
  6664. }
  6665. return http.StatusText(0)
  6666. }
  6667. // StatusCode returns HTTPResponse.StatusCode
  6668. func (r McpAuthRemoveResponse) StatusCode() int {
  6669. if r.HTTPResponse != nil {
  6670. return r.HTTPResponse.StatusCode
  6671. }
  6672. return 0
  6673. }
  6674. type McpAuthStartResponse struct {
  6675. Body []byte
  6676. HTTPResponse *http.Response
  6677. JSON200 *struct {
  6678. // AuthorizationUrl URL to open in browser for authorization
  6679. AuthorizationUrl string `json:"authorizationUrl"`
  6680. }
  6681. JSON400 *BadRequestError
  6682. JSON404 *NotFoundError
  6683. }
  6684. // Status returns HTTPResponse.Status
  6685. func (r McpAuthStartResponse) Status() string {
  6686. if r.HTTPResponse != nil {
  6687. return r.HTTPResponse.Status
  6688. }
  6689. return http.StatusText(0)
  6690. }
  6691. // StatusCode returns HTTPResponse.StatusCode
  6692. func (r McpAuthStartResponse) StatusCode() int {
  6693. if r.HTTPResponse != nil {
  6694. return r.HTTPResponse.StatusCode
  6695. }
  6696. return 0
  6697. }
  6698. type McpAuthAuthenticateResponse struct {
  6699. Body []byte
  6700. HTTPResponse *http.Response
  6701. JSON200 *MCPStatus
  6702. JSON400 *BadRequestError
  6703. JSON404 *NotFoundError
  6704. }
  6705. // Status returns HTTPResponse.Status
  6706. func (r McpAuthAuthenticateResponse) Status() string {
  6707. if r.HTTPResponse != nil {
  6708. return r.HTTPResponse.Status
  6709. }
  6710. return http.StatusText(0)
  6711. }
  6712. // StatusCode returns HTTPResponse.StatusCode
  6713. func (r McpAuthAuthenticateResponse) StatusCode() int {
  6714. if r.HTTPResponse != nil {
  6715. return r.HTTPResponse.StatusCode
  6716. }
  6717. return 0
  6718. }
  6719. type McpAuthCallbackResponse struct {
  6720. Body []byte
  6721. HTTPResponse *http.Response
  6722. JSON200 *MCPStatus
  6723. JSON400 *BadRequestError
  6724. JSON404 *NotFoundError
  6725. }
  6726. // Status returns HTTPResponse.Status
  6727. func (r McpAuthCallbackResponse) Status() string {
  6728. if r.HTTPResponse != nil {
  6729. return r.HTTPResponse.Status
  6730. }
  6731. return http.StatusText(0)
  6732. }
  6733. // StatusCode returns HTTPResponse.StatusCode
  6734. func (r McpAuthCallbackResponse) StatusCode() int {
  6735. if r.HTTPResponse != nil {
  6736. return r.HTTPResponse.StatusCode
  6737. }
  6738. return 0
  6739. }
  6740. type McpConnectResponse struct {
  6741. Body []byte
  6742. HTTPResponse *http.Response
  6743. JSON200 *bool
  6744. }
  6745. // Status returns HTTPResponse.Status
  6746. func (r McpConnectResponse) Status() string {
  6747. if r.HTTPResponse != nil {
  6748. return r.HTTPResponse.Status
  6749. }
  6750. return http.StatusText(0)
  6751. }
  6752. // StatusCode returns HTTPResponse.StatusCode
  6753. func (r McpConnectResponse) StatusCode() int {
  6754. if r.HTTPResponse != nil {
  6755. return r.HTTPResponse.StatusCode
  6756. }
  6757. return 0
  6758. }
  6759. type McpDisconnectResponse struct {
  6760. Body []byte
  6761. HTTPResponse *http.Response
  6762. JSON200 *bool
  6763. }
  6764. // Status returns HTTPResponse.Status
  6765. func (r McpDisconnectResponse) Status() string {
  6766. if r.HTTPResponse != nil {
  6767. return r.HTTPResponse.Status
  6768. }
  6769. return http.StatusText(0)
  6770. }
  6771. // StatusCode returns HTTPResponse.StatusCode
  6772. func (r McpDisconnectResponse) StatusCode() int {
  6773. if r.HTTPResponse != nil {
  6774. return r.HTTPResponse.StatusCode
  6775. }
  6776. return 0
  6777. }
  6778. type PathGetResponse struct {
  6779. Body []byte
  6780. HTTPResponse *http.Response
  6781. JSON200 *Path
  6782. }
  6783. // Status returns HTTPResponse.Status
  6784. func (r PathGetResponse) Status() string {
  6785. if r.HTTPResponse != nil {
  6786. return r.HTTPResponse.Status
  6787. }
  6788. return http.StatusText(0)
  6789. }
  6790. // StatusCode returns HTTPResponse.StatusCode
  6791. func (r PathGetResponse) StatusCode() int {
  6792. if r.HTTPResponse != nil {
  6793. return r.HTTPResponse.StatusCode
  6794. }
  6795. return 0
  6796. }
  6797. type PermissionListResponse struct {
  6798. Body []byte
  6799. HTTPResponse *http.Response
  6800. JSON200 *[]PermissionRequest
  6801. }
  6802. // Status returns HTTPResponse.Status
  6803. func (r PermissionListResponse) Status() string {
  6804. if r.HTTPResponse != nil {
  6805. return r.HTTPResponse.Status
  6806. }
  6807. return http.StatusText(0)
  6808. }
  6809. // StatusCode returns HTTPResponse.StatusCode
  6810. func (r PermissionListResponse) StatusCode() int {
  6811. if r.HTTPResponse != nil {
  6812. return r.HTTPResponse.StatusCode
  6813. }
  6814. return 0
  6815. }
  6816. type PermissionReplyResponse struct {
  6817. Body []byte
  6818. HTTPResponse *http.Response
  6819. JSON200 *bool
  6820. JSON400 *BadRequestError
  6821. JSON404 *NotFoundError
  6822. }
  6823. // Status returns HTTPResponse.Status
  6824. func (r PermissionReplyResponse) Status() string {
  6825. if r.HTTPResponse != nil {
  6826. return r.HTTPResponse.Status
  6827. }
  6828. return http.StatusText(0)
  6829. }
  6830. // StatusCode returns HTTPResponse.StatusCode
  6831. func (r PermissionReplyResponse) StatusCode() int {
  6832. if r.HTTPResponse != nil {
  6833. return r.HTTPResponse.StatusCode
  6834. }
  6835. return 0
  6836. }
  6837. type ProjectListResponse struct {
  6838. Body []byte
  6839. HTTPResponse *http.Response
  6840. JSON200 *[]Project
  6841. }
  6842. // Status returns HTTPResponse.Status
  6843. func (r ProjectListResponse) Status() string {
  6844. if r.HTTPResponse != nil {
  6845. return r.HTTPResponse.Status
  6846. }
  6847. return http.StatusText(0)
  6848. }
  6849. // StatusCode returns HTTPResponse.StatusCode
  6850. func (r ProjectListResponse) StatusCode() int {
  6851. if r.HTTPResponse != nil {
  6852. return r.HTTPResponse.StatusCode
  6853. }
  6854. return 0
  6855. }
  6856. type ProjectCurrentResponse struct {
  6857. Body []byte
  6858. HTTPResponse *http.Response
  6859. JSON200 *Project
  6860. }
  6861. // Status returns HTTPResponse.Status
  6862. func (r ProjectCurrentResponse) Status() string {
  6863. if r.HTTPResponse != nil {
  6864. return r.HTTPResponse.Status
  6865. }
  6866. return http.StatusText(0)
  6867. }
  6868. // StatusCode returns HTTPResponse.StatusCode
  6869. func (r ProjectCurrentResponse) StatusCode() int {
  6870. if r.HTTPResponse != nil {
  6871. return r.HTTPResponse.StatusCode
  6872. }
  6873. return 0
  6874. }
  6875. type ProjectUpdateResponse struct {
  6876. Body []byte
  6877. HTTPResponse *http.Response
  6878. JSON200 *Project
  6879. JSON400 *BadRequestError
  6880. JSON404 *NotFoundError
  6881. }
  6882. // Status returns HTTPResponse.Status
  6883. func (r ProjectUpdateResponse) Status() string {
  6884. if r.HTTPResponse != nil {
  6885. return r.HTTPResponse.Status
  6886. }
  6887. return http.StatusText(0)
  6888. }
  6889. // StatusCode returns HTTPResponse.StatusCode
  6890. func (r ProjectUpdateResponse) StatusCode() int {
  6891. if r.HTTPResponse != nil {
  6892. return r.HTTPResponse.StatusCode
  6893. }
  6894. return 0
  6895. }
  6896. type ProviderListResponse struct {
  6897. Body []byte
  6898. HTTPResponse *http.Response
  6899. JSON200 *struct {
  6900. All []struct {
  6901. Api *string `json:"api,omitempty"`
  6902. Env []string `json:"env"`
  6903. Id string `json:"id"`
  6904. Models map[string]struct {
  6905. Attachment bool `json:"attachment"`
  6906. Cost *struct {
  6907. CacheRead *float32 `json:"cache_read,omitempty"`
  6908. CacheWrite *float32 `json:"cache_write,omitempty"`
  6909. ContextOver200k *struct {
  6910. CacheRead *float32 `json:"cache_read,omitempty"`
  6911. CacheWrite *float32 `json:"cache_write,omitempty"`
  6912. Input float32 `json:"input"`
  6913. Output float32 `json:"output"`
  6914. } `json:"context_over_200k,omitempty"`
  6915. Input float32 `json:"input"`
  6916. Output float32 `json:"output"`
  6917. } `json:"cost,omitempty"`
  6918. Experimental *bool `json:"experimental,omitempty"`
  6919. Family *string `json:"family,omitempty"`
  6920. Headers *map[string]string `json:"headers,omitempty"`
  6921. Id string `json:"id"`
  6922. Interleaved *ProviderList_200_All_Models_Interleaved `json:"interleaved,omitempty"`
  6923. Limit struct {
  6924. Context float32 `json:"context"`
  6925. Input *float32 `json:"input,omitempty"`
  6926. Output float32 `json:"output"`
  6927. } `json:"limit"`
  6928. Modalities *struct {
  6929. Input []ProviderList200AllModelsModalitiesInput `json:"input"`
  6930. Output []ProviderList200AllModelsModalitiesOutput `json:"output"`
  6931. } `json:"modalities,omitempty"`
  6932. Name string `json:"name"`
  6933. Options map[string]interface{} `json:"options"`
  6934. Provider *struct {
  6935. Npm string `json:"npm"`
  6936. } `json:"provider,omitempty"`
  6937. Reasoning bool `json:"reasoning"`
  6938. ReleaseDate string `json:"release_date"`
  6939. Status *ProviderList200AllModelsStatus `json:"status,omitempty"`
  6940. Temperature bool `json:"temperature"`
  6941. ToolCall bool `json:"tool_call"`
  6942. Variants *map[string]map[string]interface{} `json:"variants,omitempty"`
  6943. } `json:"models"`
  6944. Name string `json:"name"`
  6945. Npm *string `json:"npm,omitempty"`
  6946. } `json:"all"`
  6947. Connected []string `json:"connected"`
  6948. Default map[string]string `json:"default"`
  6949. }
  6950. }
  6951. type ProviderList200AllModelsInterleaved0 = bool
  6952. type ProviderList200AllModelsInterleaved1 struct {
  6953. Field ProviderList200AllModelsInterleaved1Field `json:"field"`
  6954. }
  6955. type ProviderList200AllModelsInterleaved1Field string
  6956. type ProviderList_200_All_Models_Interleaved struct {
  6957. union json.RawMessage
  6958. }
  6959. type ProviderList200AllModelsModalitiesInput string
  6960. type ProviderList200AllModelsModalitiesOutput string
  6961. type ProviderList200AllModelsStatus string
  6962. // Status returns HTTPResponse.Status
  6963. func (r ProviderListResponse) Status() string {
  6964. if r.HTTPResponse != nil {
  6965. return r.HTTPResponse.Status
  6966. }
  6967. return http.StatusText(0)
  6968. }
  6969. // StatusCode returns HTTPResponse.StatusCode
  6970. func (r ProviderListResponse) StatusCode() int {
  6971. if r.HTTPResponse != nil {
  6972. return r.HTTPResponse.StatusCode
  6973. }
  6974. return 0
  6975. }
  6976. type ProviderAuthResponse struct {
  6977. Body []byte
  6978. HTTPResponse *http.Response
  6979. JSON200 *map[string][]ProviderAuthMethod
  6980. }
  6981. // Status returns HTTPResponse.Status
  6982. func (r ProviderAuthResponse) Status() string {
  6983. if r.HTTPResponse != nil {
  6984. return r.HTTPResponse.Status
  6985. }
  6986. return http.StatusText(0)
  6987. }
  6988. // StatusCode returns HTTPResponse.StatusCode
  6989. func (r ProviderAuthResponse) StatusCode() int {
  6990. if r.HTTPResponse != nil {
  6991. return r.HTTPResponse.StatusCode
  6992. }
  6993. return 0
  6994. }
  6995. type ProviderOauthAuthorizeResponse struct {
  6996. Body []byte
  6997. HTTPResponse *http.Response
  6998. JSON200 *ProviderAuthAuthorization
  6999. JSON400 *BadRequestError
  7000. }
  7001. // Status returns HTTPResponse.Status
  7002. func (r ProviderOauthAuthorizeResponse) Status() string {
  7003. if r.HTTPResponse != nil {
  7004. return r.HTTPResponse.Status
  7005. }
  7006. return http.StatusText(0)
  7007. }
  7008. // StatusCode returns HTTPResponse.StatusCode
  7009. func (r ProviderOauthAuthorizeResponse) StatusCode() int {
  7010. if r.HTTPResponse != nil {
  7011. return r.HTTPResponse.StatusCode
  7012. }
  7013. return 0
  7014. }
  7015. type ProviderOauthCallbackResponse struct {
  7016. Body []byte
  7017. HTTPResponse *http.Response
  7018. JSON200 *bool
  7019. JSON400 *BadRequestError
  7020. }
  7021. // Status returns HTTPResponse.Status
  7022. func (r ProviderOauthCallbackResponse) Status() string {
  7023. if r.HTTPResponse != nil {
  7024. return r.HTTPResponse.Status
  7025. }
  7026. return http.StatusText(0)
  7027. }
  7028. // StatusCode returns HTTPResponse.StatusCode
  7029. func (r ProviderOauthCallbackResponse) StatusCode() int {
  7030. if r.HTTPResponse != nil {
  7031. return r.HTTPResponse.StatusCode
  7032. }
  7033. return 0
  7034. }
  7035. type PtyListResponse struct {
  7036. Body []byte
  7037. HTTPResponse *http.Response
  7038. JSON200 *[]Pty
  7039. }
  7040. // Status returns HTTPResponse.Status
  7041. func (r PtyListResponse) Status() string {
  7042. if r.HTTPResponse != nil {
  7043. return r.HTTPResponse.Status
  7044. }
  7045. return http.StatusText(0)
  7046. }
  7047. // StatusCode returns HTTPResponse.StatusCode
  7048. func (r PtyListResponse) StatusCode() int {
  7049. if r.HTTPResponse != nil {
  7050. return r.HTTPResponse.StatusCode
  7051. }
  7052. return 0
  7053. }
  7054. type PtyCreateResponse struct {
  7055. Body []byte
  7056. HTTPResponse *http.Response
  7057. JSON200 *Pty
  7058. JSON400 *BadRequestError
  7059. }
  7060. // Status returns HTTPResponse.Status
  7061. func (r PtyCreateResponse) Status() string {
  7062. if r.HTTPResponse != nil {
  7063. return r.HTTPResponse.Status
  7064. }
  7065. return http.StatusText(0)
  7066. }
  7067. // StatusCode returns HTTPResponse.StatusCode
  7068. func (r PtyCreateResponse) StatusCode() int {
  7069. if r.HTTPResponse != nil {
  7070. return r.HTTPResponse.StatusCode
  7071. }
  7072. return 0
  7073. }
  7074. type PtyRemoveResponse struct {
  7075. Body []byte
  7076. HTTPResponse *http.Response
  7077. JSON200 *bool
  7078. JSON404 *NotFoundError
  7079. }
  7080. // Status returns HTTPResponse.Status
  7081. func (r PtyRemoveResponse) Status() string {
  7082. if r.HTTPResponse != nil {
  7083. return r.HTTPResponse.Status
  7084. }
  7085. return http.StatusText(0)
  7086. }
  7087. // StatusCode returns HTTPResponse.StatusCode
  7088. func (r PtyRemoveResponse) StatusCode() int {
  7089. if r.HTTPResponse != nil {
  7090. return r.HTTPResponse.StatusCode
  7091. }
  7092. return 0
  7093. }
  7094. type PtyGetResponse struct {
  7095. Body []byte
  7096. HTTPResponse *http.Response
  7097. JSON200 *Pty
  7098. JSON404 *NotFoundError
  7099. }
  7100. // Status returns HTTPResponse.Status
  7101. func (r PtyGetResponse) Status() string {
  7102. if r.HTTPResponse != nil {
  7103. return r.HTTPResponse.Status
  7104. }
  7105. return http.StatusText(0)
  7106. }
  7107. // StatusCode returns HTTPResponse.StatusCode
  7108. func (r PtyGetResponse) StatusCode() int {
  7109. if r.HTTPResponse != nil {
  7110. return r.HTTPResponse.StatusCode
  7111. }
  7112. return 0
  7113. }
  7114. type PtyUpdateResponse struct {
  7115. Body []byte
  7116. HTTPResponse *http.Response
  7117. JSON200 *Pty
  7118. JSON400 *BadRequestError
  7119. }
  7120. // Status returns HTTPResponse.Status
  7121. func (r PtyUpdateResponse) Status() string {
  7122. if r.HTTPResponse != nil {
  7123. return r.HTTPResponse.Status
  7124. }
  7125. return http.StatusText(0)
  7126. }
  7127. // StatusCode returns HTTPResponse.StatusCode
  7128. func (r PtyUpdateResponse) StatusCode() int {
  7129. if r.HTTPResponse != nil {
  7130. return r.HTTPResponse.StatusCode
  7131. }
  7132. return 0
  7133. }
  7134. type PtyConnectResponse struct {
  7135. Body []byte
  7136. HTTPResponse *http.Response
  7137. JSON200 *bool
  7138. JSON404 *NotFoundError
  7139. }
  7140. // Status returns HTTPResponse.Status
  7141. func (r PtyConnectResponse) Status() string {
  7142. if r.HTTPResponse != nil {
  7143. return r.HTTPResponse.Status
  7144. }
  7145. return http.StatusText(0)
  7146. }
  7147. // StatusCode returns HTTPResponse.StatusCode
  7148. func (r PtyConnectResponse) StatusCode() int {
  7149. if r.HTTPResponse != nil {
  7150. return r.HTTPResponse.StatusCode
  7151. }
  7152. return 0
  7153. }
  7154. type QuestionListResponse struct {
  7155. Body []byte
  7156. HTTPResponse *http.Response
  7157. JSON200 *[]QuestionRequest
  7158. }
  7159. // Status returns HTTPResponse.Status
  7160. func (r QuestionListResponse) Status() string {
  7161. if r.HTTPResponse != nil {
  7162. return r.HTTPResponse.Status
  7163. }
  7164. return http.StatusText(0)
  7165. }
  7166. // StatusCode returns HTTPResponse.StatusCode
  7167. func (r QuestionListResponse) StatusCode() int {
  7168. if r.HTTPResponse != nil {
  7169. return r.HTTPResponse.StatusCode
  7170. }
  7171. return 0
  7172. }
  7173. type QuestionRejectResponse struct {
  7174. Body []byte
  7175. HTTPResponse *http.Response
  7176. JSON200 *bool
  7177. JSON400 *BadRequestError
  7178. JSON404 *NotFoundError
  7179. }
  7180. // Status returns HTTPResponse.Status
  7181. func (r QuestionRejectResponse) Status() string {
  7182. if r.HTTPResponse != nil {
  7183. return r.HTTPResponse.Status
  7184. }
  7185. return http.StatusText(0)
  7186. }
  7187. // StatusCode returns HTTPResponse.StatusCode
  7188. func (r QuestionRejectResponse) StatusCode() int {
  7189. if r.HTTPResponse != nil {
  7190. return r.HTTPResponse.StatusCode
  7191. }
  7192. return 0
  7193. }
  7194. type QuestionReplyResponse struct {
  7195. Body []byte
  7196. HTTPResponse *http.Response
  7197. JSON200 *bool
  7198. JSON400 *BadRequestError
  7199. JSON404 *NotFoundError
  7200. }
  7201. // Status returns HTTPResponse.Status
  7202. func (r QuestionReplyResponse) Status() string {
  7203. if r.HTTPResponse != nil {
  7204. return r.HTTPResponse.Status
  7205. }
  7206. return http.StatusText(0)
  7207. }
  7208. // StatusCode returns HTTPResponse.StatusCode
  7209. func (r QuestionReplyResponse) StatusCode() int {
  7210. if r.HTTPResponse != nil {
  7211. return r.HTTPResponse.StatusCode
  7212. }
  7213. return 0
  7214. }
  7215. type SessionListResponse struct {
  7216. Body []byte
  7217. HTTPResponse *http.Response
  7218. JSON200 *[]Session
  7219. }
  7220. // Status returns HTTPResponse.Status
  7221. func (r SessionListResponse) Status() string {
  7222. if r.HTTPResponse != nil {
  7223. return r.HTTPResponse.Status
  7224. }
  7225. return http.StatusText(0)
  7226. }
  7227. // StatusCode returns HTTPResponse.StatusCode
  7228. func (r SessionListResponse) StatusCode() int {
  7229. if r.HTTPResponse != nil {
  7230. return r.HTTPResponse.StatusCode
  7231. }
  7232. return 0
  7233. }
  7234. type SessionCreateResponse struct {
  7235. Body []byte
  7236. HTTPResponse *http.Response
  7237. JSON200 *Session
  7238. JSON400 *BadRequestError
  7239. }
  7240. // Status returns HTTPResponse.Status
  7241. func (r SessionCreateResponse) Status() string {
  7242. if r.HTTPResponse != nil {
  7243. return r.HTTPResponse.Status
  7244. }
  7245. return http.StatusText(0)
  7246. }
  7247. // StatusCode returns HTTPResponse.StatusCode
  7248. func (r SessionCreateResponse) StatusCode() int {
  7249. if r.HTTPResponse != nil {
  7250. return r.HTTPResponse.StatusCode
  7251. }
  7252. return 0
  7253. }
  7254. type SessionStatusResponse struct {
  7255. Body []byte
  7256. HTTPResponse *http.Response
  7257. JSON200 *map[string]SessionStatus
  7258. JSON400 *BadRequestError
  7259. }
  7260. // Status returns HTTPResponse.Status
  7261. func (r SessionStatusResponse) Status() string {
  7262. if r.HTTPResponse != nil {
  7263. return r.HTTPResponse.Status
  7264. }
  7265. return http.StatusText(0)
  7266. }
  7267. // StatusCode returns HTTPResponse.StatusCode
  7268. func (r SessionStatusResponse) StatusCode() int {
  7269. if r.HTTPResponse != nil {
  7270. return r.HTTPResponse.StatusCode
  7271. }
  7272. return 0
  7273. }
  7274. type SessionDeleteResponse struct {
  7275. Body []byte
  7276. HTTPResponse *http.Response
  7277. JSON200 *bool
  7278. JSON400 *BadRequestError
  7279. JSON404 *NotFoundError
  7280. }
  7281. // Status returns HTTPResponse.Status
  7282. func (r SessionDeleteResponse) Status() string {
  7283. if r.HTTPResponse != nil {
  7284. return r.HTTPResponse.Status
  7285. }
  7286. return http.StatusText(0)
  7287. }
  7288. // StatusCode returns HTTPResponse.StatusCode
  7289. func (r SessionDeleteResponse) StatusCode() int {
  7290. if r.HTTPResponse != nil {
  7291. return r.HTTPResponse.StatusCode
  7292. }
  7293. return 0
  7294. }
  7295. type SessionGetResponse struct {
  7296. Body []byte
  7297. HTTPResponse *http.Response
  7298. JSON200 *Session
  7299. JSON400 *BadRequestError
  7300. JSON404 *NotFoundError
  7301. }
  7302. // Status returns HTTPResponse.Status
  7303. func (r SessionGetResponse) Status() string {
  7304. if r.HTTPResponse != nil {
  7305. return r.HTTPResponse.Status
  7306. }
  7307. return http.StatusText(0)
  7308. }
  7309. // StatusCode returns HTTPResponse.StatusCode
  7310. func (r SessionGetResponse) StatusCode() int {
  7311. if r.HTTPResponse != nil {
  7312. return r.HTTPResponse.StatusCode
  7313. }
  7314. return 0
  7315. }
  7316. type SessionUpdateResponse struct {
  7317. Body []byte
  7318. HTTPResponse *http.Response
  7319. JSON200 *Session
  7320. JSON400 *BadRequestError
  7321. JSON404 *NotFoundError
  7322. }
  7323. // Status returns HTTPResponse.Status
  7324. func (r SessionUpdateResponse) Status() string {
  7325. if r.HTTPResponse != nil {
  7326. return r.HTTPResponse.Status
  7327. }
  7328. return http.StatusText(0)
  7329. }
  7330. // StatusCode returns HTTPResponse.StatusCode
  7331. func (r SessionUpdateResponse) StatusCode() int {
  7332. if r.HTTPResponse != nil {
  7333. return r.HTTPResponse.StatusCode
  7334. }
  7335. return 0
  7336. }
  7337. type SessionAbortResponse struct {
  7338. Body []byte
  7339. HTTPResponse *http.Response
  7340. JSON200 *bool
  7341. JSON400 *BadRequestError
  7342. JSON404 *NotFoundError
  7343. }
  7344. // Status returns HTTPResponse.Status
  7345. func (r SessionAbortResponse) Status() string {
  7346. if r.HTTPResponse != nil {
  7347. return r.HTTPResponse.Status
  7348. }
  7349. return http.StatusText(0)
  7350. }
  7351. // StatusCode returns HTTPResponse.StatusCode
  7352. func (r SessionAbortResponse) StatusCode() int {
  7353. if r.HTTPResponse != nil {
  7354. return r.HTTPResponse.StatusCode
  7355. }
  7356. return 0
  7357. }
  7358. type SessionChildrenResponse struct {
  7359. Body []byte
  7360. HTTPResponse *http.Response
  7361. JSON200 *[]Session
  7362. JSON400 *BadRequestError
  7363. JSON404 *NotFoundError
  7364. }
  7365. // Status returns HTTPResponse.Status
  7366. func (r SessionChildrenResponse) Status() string {
  7367. if r.HTTPResponse != nil {
  7368. return r.HTTPResponse.Status
  7369. }
  7370. return http.StatusText(0)
  7371. }
  7372. // StatusCode returns HTTPResponse.StatusCode
  7373. func (r SessionChildrenResponse) StatusCode() int {
  7374. if r.HTTPResponse != nil {
  7375. return r.HTTPResponse.StatusCode
  7376. }
  7377. return 0
  7378. }
  7379. type SessionCommandResponse struct {
  7380. Body []byte
  7381. HTTPResponse *http.Response
  7382. JSON200 *struct {
  7383. Info AssistantMessage `json:"info"`
  7384. Parts []Part `json:"parts"`
  7385. }
  7386. JSON400 *BadRequestError
  7387. JSON404 *NotFoundError
  7388. }
  7389. // Status returns HTTPResponse.Status
  7390. func (r SessionCommandResponse) Status() string {
  7391. if r.HTTPResponse != nil {
  7392. return r.HTTPResponse.Status
  7393. }
  7394. return http.StatusText(0)
  7395. }
  7396. // StatusCode returns HTTPResponse.StatusCode
  7397. func (r SessionCommandResponse) StatusCode() int {
  7398. if r.HTTPResponse != nil {
  7399. return r.HTTPResponse.StatusCode
  7400. }
  7401. return 0
  7402. }
  7403. type SessionDiffResponse struct {
  7404. Body []byte
  7405. HTTPResponse *http.Response
  7406. JSON200 *[]FileDiff
  7407. JSON400 *BadRequestError
  7408. JSON404 *NotFoundError
  7409. }
  7410. // Status returns HTTPResponse.Status
  7411. func (r SessionDiffResponse) Status() string {
  7412. if r.HTTPResponse != nil {
  7413. return r.HTTPResponse.Status
  7414. }
  7415. return http.StatusText(0)
  7416. }
  7417. // StatusCode returns HTTPResponse.StatusCode
  7418. func (r SessionDiffResponse) StatusCode() int {
  7419. if r.HTTPResponse != nil {
  7420. return r.HTTPResponse.StatusCode
  7421. }
  7422. return 0
  7423. }
  7424. type SessionForkResponse struct {
  7425. Body []byte
  7426. HTTPResponse *http.Response
  7427. JSON200 *Session
  7428. }
  7429. // Status returns HTTPResponse.Status
  7430. func (r SessionForkResponse) Status() string {
  7431. if r.HTTPResponse != nil {
  7432. return r.HTTPResponse.Status
  7433. }
  7434. return http.StatusText(0)
  7435. }
  7436. // StatusCode returns HTTPResponse.StatusCode
  7437. func (r SessionForkResponse) StatusCode() int {
  7438. if r.HTTPResponse != nil {
  7439. return r.HTTPResponse.StatusCode
  7440. }
  7441. return 0
  7442. }
  7443. type SessionInitResponse struct {
  7444. Body []byte
  7445. HTTPResponse *http.Response
  7446. JSON200 *bool
  7447. JSON400 *BadRequestError
  7448. JSON404 *NotFoundError
  7449. }
  7450. // Status returns HTTPResponse.Status
  7451. func (r SessionInitResponse) Status() string {
  7452. if r.HTTPResponse != nil {
  7453. return r.HTTPResponse.Status
  7454. }
  7455. return http.StatusText(0)
  7456. }
  7457. // StatusCode returns HTTPResponse.StatusCode
  7458. func (r SessionInitResponse) StatusCode() int {
  7459. if r.HTTPResponse != nil {
  7460. return r.HTTPResponse.StatusCode
  7461. }
  7462. return 0
  7463. }
  7464. type SessionMessagesResponse struct {
  7465. Body []byte
  7466. HTTPResponse *http.Response
  7467. JSON200 *[]struct {
  7468. Info Message `json:"info"`
  7469. Parts []Part `json:"parts"`
  7470. }
  7471. JSON400 *BadRequestError
  7472. JSON404 *NotFoundError
  7473. }
  7474. // Status returns HTTPResponse.Status
  7475. func (r SessionMessagesResponse) Status() string {
  7476. if r.HTTPResponse != nil {
  7477. return r.HTTPResponse.Status
  7478. }
  7479. return http.StatusText(0)
  7480. }
  7481. // StatusCode returns HTTPResponse.StatusCode
  7482. func (r SessionMessagesResponse) StatusCode() int {
  7483. if r.HTTPResponse != nil {
  7484. return r.HTTPResponse.StatusCode
  7485. }
  7486. return 0
  7487. }
  7488. type SessionPromptResponse struct {
  7489. Body []byte
  7490. HTTPResponse *http.Response
  7491. JSON200 *struct {
  7492. Info AssistantMessage `json:"info"`
  7493. Parts []Part `json:"parts"`
  7494. }
  7495. JSON400 *BadRequestError
  7496. JSON404 *NotFoundError
  7497. }
  7498. // Status returns HTTPResponse.Status
  7499. func (r SessionPromptResponse) Status() string {
  7500. if r.HTTPResponse != nil {
  7501. return r.HTTPResponse.Status
  7502. }
  7503. return http.StatusText(0)
  7504. }
  7505. // StatusCode returns HTTPResponse.StatusCode
  7506. func (r SessionPromptResponse) StatusCode() int {
  7507. if r.HTTPResponse != nil {
  7508. return r.HTTPResponse.StatusCode
  7509. }
  7510. return 0
  7511. }
  7512. type SessionMessageResponse struct {
  7513. Body []byte
  7514. HTTPResponse *http.Response
  7515. JSON200 *struct {
  7516. Info Message `json:"info"`
  7517. Parts []Part `json:"parts"`
  7518. }
  7519. JSON400 *BadRequestError
  7520. JSON404 *NotFoundError
  7521. }
  7522. // Status returns HTTPResponse.Status
  7523. func (r SessionMessageResponse) Status() string {
  7524. if r.HTTPResponse != nil {
  7525. return r.HTTPResponse.Status
  7526. }
  7527. return http.StatusText(0)
  7528. }
  7529. // StatusCode returns HTTPResponse.StatusCode
  7530. func (r SessionMessageResponse) StatusCode() int {
  7531. if r.HTTPResponse != nil {
  7532. return r.HTTPResponse.StatusCode
  7533. }
  7534. return 0
  7535. }
  7536. type PartDeleteResponse struct {
  7537. Body []byte
  7538. HTTPResponse *http.Response
  7539. JSON200 *bool
  7540. JSON400 *BadRequestError
  7541. JSON404 *NotFoundError
  7542. }
  7543. // Status returns HTTPResponse.Status
  7544. func (r PartDeleteResponse) Status() string {
  7545. if r.HTTPResponse != nil {
  7546. return r.HTTPResponse.Status
  7547. }
  7548. return http.StatusText(0)
  7549. }
  7550. // StatusCode returns HTTPResponse.StatusCode
  7551. func (r PartDeleteResponse) StatusCode() int {
  7552. if r.HTTPResponse != nil {
  7553. return r.HTTPResponse.StatusCode
  7554. }
  7555. return 0
  7556. }
  7557. type PartUpdateResponse struct {
  7558. Body []byte
  7559. HTTPResponse *http.Response
  7560. JSON200 *Part
  7561. JSON400 *BadRequestError
  7562. JSON404 *NotFoundError
  7563. }
  7564. // Status returns HTTPResponse.Status
  7565. func (r PartUpdateResponse) Status() string {
  7566. if r.HTTPResponse != nil {
  7567. return r.HTTPResponse.Status
  7568. }
  7569. return http.StatusText(0)
  7570. }
  7571. // StatusCode returns HTTPResponse.StatusCode
  7572. func (r PartUpdateResponse) StatusCode() int {
  7573. if r.HTTPResponse != nil {
  7574. return r.HTTPResponse.StatusCode
  7575. }
  7576. return 0
  7577. }
  7578. type PermissionRespondResponse struct {
  7579. Body []byte
  7580. HTTPResponse *http.Response
  7581. JSON200 *bool
  7582. JSON400 *BadRequestError
  7583. JSON404 *NotFoundError
  7584. }
  7585. // Status returns HTTPResponse.Status
  7586. func (r PermissionRespondResponse) Status() string {
  7587. if r.HTTPResponse != nil {
  7588. return r.HTTPResponse.Status
  7589. }
  7590. return http.StatusText(0)
  7591. }
  7592. // StatusCode returns HTTPResponse.StatusCode
  7593. func (r PermissionRespondResponse) StatusCode() int {
  7594. if r.HTTPResponse != nil {
  7595. return r.HTTPResponse.StatusCode
  7596. }
  7597. return 0
  7598. }
  7599. type SessionPromptAsyncResponse struct {
  7600. Body []byte
  7601. HTTPResponse *http.Response
  7602. JSON400 *BadRequestError
  7603. JSON404 *NotFoundError
  7604. }
  7605. // Status returns HTTPResponse.Status
  7606. func (r SessionPromptAsyncResponse) Status() string {
  7607. if r.HTTPResponse != nil {
  7608. return r.HTTPResponse.Status
  7609. }
  7610. return http.StatusText(0)
  7611. }
  7612. // StatusCode returns HTTPResponse.StatusCode
  7613. func (r SessionPromptAsyncResponse) StatusCode() int {
  7614. if r.HTTPResponse != nil {
  7615. return r.HTTPResponse.StatusCode
  7616. }
  7617. return 0
  7618. }
  7619. type SessionRevertResponse struct {
  7620. Body []byte
  7621. HTTPResponse *http.Response
  7622. JSON200 *Session
  7623. JSON400 *BadRequestError
  7624. JSON404 *NotFoundError
  7625. }
  7626. // Status returns HTTPResponse.Status
  7627. func (r SessionRevertResponse) Status() string {
  7628. if r.HTTPResponse != nil {
  7629. return r.HTTPResponse.Status
  7630. }
  7631. return http.StatusText(0)
  7632. }
  7633. // StatusCode returns HTTPResponse.StatusCode
  7634. func (r SessionRevertResponse) StatusCode() int {
  7635. if r.HTTPResponse != nil {
  7636. return r.HTTPResponse.StatusCode
  7637. }
  7638. return 0
  7639. }
  7640. type SessionUnshareResponse struct {
  7641. Body []byte
  7642. HTTPResponse *http.Response
  7643. JSON200 *Session
  7644. JSON400 *BadRequestError
  7645. JSON404 *NotFoundError
  7646. }
  7647. // Status returns HTTPResponse.Status
  7648. func (r SessionUnshareResponse) Status() string {
  7649. if r.HTTPResponse != nil {
  7650. return r.HTTPResponse.Status
  7651. }
  7652. return http.StatusText(0)
  7653. }
  7654. // StatusCode returns HTTPResponse.StatusCode
  7655. func (r SessionUnshareResponse) StatusCode() int {
  7656. if r.HTTPResponse != nil {
  7657. return r.HTTPResponse.StatusCode
  7658. }
  7659. return 0
  7660. }
  7661. type SessionShareResponse struct {
  7662. Body []byte
  7663. HTTPResponse *http.Response
  7664. JSON200 *Session
  7665. JSON400 *BadRequestError
  7666. JSON404 *NotFoundError
  7667. }
  7668. // Status returns HTTPResponse.Status
  7669. func (r SessionShareResponse) Status() string {
  7670. if r.HTTPResponse != nil {
  7671. return r.HTTPResponse.Status
  7672. }
  7673. return http.StatusText(0)
  7674. }
  7675. // StatusCode returns HTTPResponse.StatusCode
  7676. func (r SessionShareResponse) StatusCode() int {
  7677. if r.HTTPResponse != nil {
  7678. return r.HTTPResponse.StatusCode
  7679. }
  7680. return 0
  7681. }
  7682. type SessionShellResponse struct {
  7683. Body []byte
  7684. HTTPResponse *http.Response
  7685. JSON200 *AssistantMessage
  7686. JSON400 *BadRequestError
  7687. JSON404 *NotFoundError
  7688. }
  7689. // Status returns HTTPResponse.Status
  7690. func (r SessionShellResponse) Status() string {
  7691. if r.HTTPResponse != nil {
  7692. return r.HTTPResponse.Status
  7693. }
  7694. return http.StatusText(0)
  7695. }
  7696. // StatusCode returns HTTPResponse.StatusCode
  7697. func (r SessionShellResponse) StatusCode() int {
  7698. if r.HTTPResponse != nil {
  7699. return r.HTTPResponse.StatusCode
  7700. }
  7701. return 0
  7702. }
  7703. type SessionSummarizeResponse struct {
  7704. Body []byte
  7705. HTTPResponse *http.Response
  7706. JSON200 *bool
  7707. JSON400 *BadRequestError
  7708. JSON404 *NotFoundError
  7709. }
  7710. // Status returns HTTPResponse.Status
  7711. func (r SessionSummarizeResponse) Status() string {
  7712. if r.HTTPResponse != nil {
  7713. return r.HTTPResponse.Status
  7714. }
  7715. return http.StatusText(0)
  7716. }
  7717. // StatusCode returns HTTPResponse.StatusCode
  7718. func (r SessionSummarizeResponse) StatusCode() int {
  7719. if r.HTTPResponse != nil {
  7720. return r.HTTPResponse.StatusCode
  7721. }
  7722. return 0
  7723. }
  7724. type SessionTodoResponse struct {
  7725. Body []byte
  7726. HTTPResponse *http.Response
  7727. JSON200 *[]Todo
  7728. JSON400 *BadRequestError
  7729. JSON404 *NotFoundError
  7730. }
  7731. // Status returns HTTPResponse.Status
  7732. func (r SessionTodoResponse) Status() string {
  7733. if r.HTTPResponse != nil {
  7734. return r.HTTPResponse.Status
  7735. }
  7736. return http.StatusText(0)
  7737. }
  7738. // StatusCode returns HTTPResponse.StatusCode
  7739. func (r SessionTodoResponse) StatusCode() int {
  7740. if r.HTTPResponse != nil {
  7741. return r.HTTPResponse.StatusCode
  7742. }
  7743. return 0
  7744. }
  7745. type SessionUnrevertResponse struct {
  7746. Body []byte
  7747. HTTPResponse *http.Response
  7748. JSON200 *Session
  7749. JSON400 *BadRequestError
  7750. JSON404 *NotFoundError
  7751. }
  7752. // Status returns HTTPResponse.Status
  7753. func (r SessionUnrevertResponse) Status() string {
  7754. if r.HTTPResponse != nil {
  7755. return r.HTTPResponse.Status
  7756. }
  7757. return http.StatusText(0)
  7758. }
  7759. // StatusCode returns HTTPResponse.StatusCode
  7760. func (r SessionUnrevertResponse) StatusCode() int {
  7761. if r.HTTPResponse != nil {
  7762. return r.HTTPResponse.StatusCode
  7763. }
  7764. return 0
  7765. }
  7766. type TuiAppendPromptResponse struct {
  7767. Body []byte
  7768. HTTPResponse *http.Response
  7769. JSON200 *bool
  7770. JSON400 *BadRequestError
  7771. }
  7772. // Status returns HTTPResponse.Status
  7773. func (r TuiAppendPromptResponse) Status() string {
  7774. if r.HTTPResponse != nil {
  7775. return r.HTTPResponse.Status
  7776. }
  7777. return http.StatusText(0)
  7778. }
  7779. // StatusCode returns HTTPResponse.StatusCode
  7780. func (r TuiAppendPromptResponse) StatusCode() int {
  7781. if r.HTTPResponse != nil {
  7782. return r.HTTPResponse.StatusCode
  7783. }
  7784. return 0
  7785. }
  7786. type TuiClearPromptResponse struct {
  7787. Body []byte
  7788. HTTPResponse *http.Response
  7789. JSON200 *bool
  7790. }
  7791. // Status returns HTTPResponse.Status
  7792. func (r TuiClearPromptResponse) Status() string {
  7793. if r.HTTPResponse != nil {
  7794. return r.HTTPResponse.Status
  7795. }
  7796. return http.StatusText(0)
  7797. }
  7798. // StatusCode returns HTTPResponse.StatusCode
  7799. func (r TuiClearPromptResponse) StatusCode() int {
  7800. if r.HTTPResponse != nil {
  7801. return r.HTTPResponse.StatusCode
  7802. }
  7803. return 0
  7804. }
  7805. type TuiControlNextResponse struct {
  7806. Body []byte
  7807. HTTPResponse *http.Response
  7808. JSON200 *struct {
  7809. Body interface{} `json:"body"`
  7810. Path string `json:"path"`
  7811. }
  7812. }
  7813. // Status returns HTTPResponse.Status
  7814. func (r TuiControlNextResponse) Status() string {
  7815. if r.HTTPResponse != nil {
  7816. return r.HTTPResponse.Status
  7817. }
  7818. return http.StatusText(0)
  7819. }
  7820. // StatusCode returns HTTPResponse.StatusCode
  7821. func (r TuiControlNextResponse) StatusCode() int {
  7822. if r.HTTPResponse != nil {
  7823. return r.HTTPResponse.StatusCode
  7824. }
  7825. return 0
  7826. }
  7827. type TuiControlResponseResponse struct {
  7828. Body []byte
  7829. HTTPResponse *http.Response
  7830. JSON200 *bool
  7831. }
  7832. // Status returns HTTPResponse.Status
  7833. func (r TuiControlResponseResponse) Status() string {
  7834. if r.HTTPResponse != nil {
  7835. return r.HTTPResponse.Status
  7836. }
  7837. return http.StatusText(0)
  7838. }
  7839. // StatusCode returns HTTPResponse.StatusCode
  7840. func (r TuiControlResponseResponse) StatusCode() int {
  7841. if r.HTTPResponse != nil {
  7842. return r.HTTPResponse.StatusCode
  7843. }
  7844. return 0
  7845. }
  7846. type TuiExecuteCommandResponse struct {
  7847. Body []byte
  7848. HTTPResponse *http.Response
  7849. JSON200 *bool
  7850. JSON400 *BadRequestError
  7851. }
  7852. // Status returns HTTPResponse.Status
  7853. func (r TuiExecuteCommandResponse) Status() string {
  7854. if r.HTTPResponse != nil {
  7855. return r.HTTPResponse.Status
  7856. }
  7857. return http.StatusText(0)
  7858. }
  7859. // StatusCode returns HTTPResponse.StatusCode
  7860. func (r TuiExecuteCommandResponse) StatusCode() int {
  7861. if r.HTTPResponse != nil {
  7862. return r.HTTPResponse.StatusCode
  7863. }
  7864. return 0
  7865. }
  7866. type TuiOpenHelpResponse struct {
  7867. Body []byte
  7868. HTTPResponse *http.Response
  7869. JSON200 *bool
  7870. }
  7871. // Status returns HTTPResponse.Status
  7872. func (r TuiOpenHelpResponse) Status() string {
  7873. if r.HTTPResponse != nil {
  7874. return r.HTTPResponse.Status
  7875. }
  7876. return http.StatusText(0)
  7877. }
  7878. // StatusCode returns HTTPResponse.StatusCode
  7879. func (r TuiOpenHelpResponse) StatusCode() int {
  7880. if r.HTTPResponse != nil {
  7881. return r.HTTPResponse.StatusCode
  7882. }
  7883. return 0
  7884. }
  7885. type TuiOpenModelsResponse struct {
  7886. Body []byte
  7887. HTTPResponse *http.Response
  7888. JSON200 *bool
  7889. }
  7890. // Status returns HTTPResponse.Status
  7891. func (r TuiOpenModelsResponse) Status() string {
  7892. if r.HTTPResponse != nil {
  7893. return r.HTTPResponse.Status
  7894. }
  7895. return http.StatusText(0)
  7896. }
  7897. // StatusCode returns HTTPResponse.StatusCode
  7898. func (r TuiOpenModelsResponse) StatusCode() int {
  7899. if r.HTTPResponse != nil {
  7900. return r.HTTPResponse.StatusCode
  7901. }
  7902. return 0
  7903. }
  7904. type TuiOpenSessionsResponse struct {
  7905. Body []byte
  7906. HTTPResponse *http.Response
  7907. JSON200 *bool
  7908. }
  7909. // Status returns HTTPResponse.Status
  7910. func (r TuiOpenSessionsResponse) Status() string {
  7911. if r.HTTPResponse != nil {
  7912. return r.HTTPResponse.Status
  7913. }
  7914. return http.StatusText(0)
  7915. }
  7916. // StatusCode returns HTTPResponse.StatusCode
  7917. func (r TuiOpenSessionsResponse) StatusCode() int {
  7918. if r.HTTPResponse != nil {
  7919. return r.HTTPResponse.StatusCode
  7920. }
  7921. return 0
  7922. }
  7923. type TuiOpenThemesResponse struct {
  7924. Body []byte
  7925. HTTPResponse *http.Response
  7926. JSON200 *bool
  7927. }
  7928. // Status returns HTTPResponse.Status
  7929. func (r TuiOpenThemesResponse) Status() string {
  7930. if r.HTTPResponse != nil {
  7931. return r.HTTPResponse.Status
  7932. }
  7933. return http.StatusText(0)
  7934. }
  7935. // StatusCode returns HTTPResponse.StatusCode
  7936. func (r TuiOpenThemesResponse) StatusCode() int {
  7937. if r.HTTPResponse != nil {
  7938. return r.HTTPResponse.StatusCode
  7939. }
  7940. return 0
  7941. }
  7942. type TuiPublishResponse struct {
  7943. Body []byte
  7944. HTTPResponse *http.Response
  7945. JSON200 *bool
  7946. JSON400 *BadRequestError
  7947. }
  7948. // Status returns HTTPResponse.Status
  7949. func (r TuiPublishResponse) Status() string {
  7950. if r.HTTPResponse != nil {
  7951. return r.HTTPResponse.Status
  7952. }
  7953. return http.StatusText(0)
  7954. }
  7955. // StatusCode returns HTTPResponse.StatusCode
  7956. func (r TuiPublishResponse) StatusCode() int {
  7957. if r.HTTPResponse != nil {
  7958. return r.HTTPResponse.StatusCode
  7959. }
  7960. return 0
  7961. }
  7962. type TuiSelectSessionResponse struct {
  7963. Body []byte
  7964. HTTPResponse *http.Response
  7965. JSON200 *bool
  7966. JSON400 *BadRequestError
  7967. JSON404 *NotFoundError
  7968. }
  7969. // Status returns HTTPResponse.Status
  7970. func (r TuiSelectSessionResponse) Status() string {
  7971. if r.HTTPResponse != nil {
  7972. return r.HTTPResponse.Status
  7973. }
  7974. return http.StatusText(0)
  7975. }
  7976. // StatusCode returns HTTPResponse.StatusCode
  7977. func (r TuiSelectSessionResponse) StatusCode() int {
  7978. if r.HTTPResponse != nil {
  7979. return r.HTTPResponse.StatusCode
  7980. }
  7981. return 0
  7982. }
  7983. type TuiShowToastResponse struct {
  7984. Body []byte
  7985. HTTPResponse *http.Response
  7986. JSON200 *bool
  7987. }
  7988. // Status returns HTTPResponse.Status
  7989. func (r TuiShowToastResponse) Status() string {
  7990. if r.HTTPResponse != nil {
  7991. return r.HTTPResponse.Status
  7992. }
  7993. return http.StatusText(0)
  7994. }
  7995. // StatusCode returns HTTPResponse.StatusCode
  7996. func (r TuiShowToastResponse) StatusCode() int {
  7997. if r.HTTPResponse != nil {
  7998. return r.HTTPResponse.StatusCode
  7999. }
  8000. return 0
  8001. }
  8002. type TuiSubmitPromptResponse struct {
  8003. Body []byte
  8004. HTTPResponse *http.Response
  8005. JSON200 *bool
  8006. }
  8007. // Status returns HTTPResponse.Status
  8008. func (r TuiSubmitPromptResponse) Status() string {
  8009. if r.HTTPResponse != nil {
  8010. return r.HTTPResponse.Status
  8011. }
  8012. return http.StatusText(0)
  8013. }
  8014. // StatusCode returns HTTPResponse.StatusCode
  8015. func (r TuiSubmitPromptResponse) StatusCode() int {
  8016. if r.HTTPResponse != nil {
  8017. return r.HTTPResponse.StatusCode
  8018. }
  8019. return 0
  8020. }
  8021. type VcsGetResponse struct {
  8022. Body []byte
  8023. HTTPResponse *http.Response
  8024. JSON200 *VcsInfo
  8025. }
  8026. // Status returns HTTPResponse.Status
  8027. func (r VcsGetResponse) Status() string {
  8028. if r.HTTPResponse != nil {
  8029. return r.HTTPResponse.Status
  8030. }
  8031. return http.StatusText(0)
  8032. }
  8033. // StatusCode returns HTTPResponse.StatusCode
  8034. func (r VcsGetResponse) StatusCode() int {
  8035. if r.HTTPResponse != nil {
  8036. return r.HTTPResponse.StatusCode
  8037. }
  8038. return 0
  8039. }
  8040. // AppAgentsWithResponse request returning *AppAgentsResponse
  8041. func (c *ClientWithResponses) AppAgentsWithResponse(ctx context.Context, params *AppAgentsParams, reqEditors ...RequestEditorFn) (*AppAgentsResponse, error) {
  8042. rsp, err := c.AppAgents(ctx, params, reqEditors...)
  8043. if err != nil {
  8044. return nil, err
  8045. }
  8046. return ParseAppAgentsResponse(rsp)
  8047. }
  8048. // AuthSetWithBodyWithResponse request with arbitrary body returning *AuthSetResponse
  8049. func (c *ClientWithResponses) AuthSetWithBodyWithResponse(ctx context.Context, providerID string, params *AuthSetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthSetResponse, error) {
  8050. rsp, err := c.AuthSetWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8051. if err != nil {
  8052. return nil, err
  8053. }
  8054. return ParseAuthSetResponse(rsp)
  8055. }
  8056. func (c *ClientWithResponses) AuthSetWithResponse(ctx context.Context, providerID string, params *AuthSetParams, body AuthSetJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthSetResponse, error) {
  8057. rsp, err := c.AuthSet(ctx, providerID, params, body, reqEditors...)
  8058. if err != nil {
  8059. return nil, err
  8060. }
  8061. return ParseAuthSetResponse(rsp)
  8062. }
  8063. // CommandListWithResponse request returning *CommandListResponse
  8064. func (c *ClientWithResponses) CommandListWithResponse(ctx context.Context, params *CommandListParams, reqEditors ...RequestEditorFn) (*CommandListResponse, error) {
  8065. rsp, err := c.CommandList(ctx, params, reqEditors...)
  8066. if err != nil {
  8067. return nil, err
  8068. }
  8069. return ParseCommandListResponse(rsp)
  8070. }
  8071. // ConfigGetWithResponse request returning *ConfigGetResponse
  8072. func (c *ClientWithResponses) ConfigGetWithResponse(ctx context.Context, params *ConfigGetParams, reqEditors ...RequestEditorFn) (*ConfigGetResponse, error) {
  8073. rsp, err := c.ConfigGet(ctx, params, reqEditors...)
  8074. if err != nil {
  8075. return nil, err
  8076. }
  8077. return ParseConfigGetResponse(rsp)
  8078. }
  8079. // ConfigUpdateWithBodyWithResponse request with arbitrary body returning *ConfigUpdateResponse
  8080. func (c *ClientWithResponses) ConfigUpdateWithBodyWithResponse(ctx context.Context, params *ConfigUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error) {
  8081. rsp, err := c.ConfigUpdateWithBody(ctx, params, contentType, body, reqEditors...)
  8082. if err != nil {
  8083. return nil, err
  8084. }
  8085. return ParseConfigUpdateResponse(rsp)
  8086. }
  8087. func (c *ClientWithResponses) ConfigUpdateWithResponse(ctx context.Context, params *ConfigUpdateParams, body ConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigUpdateResponse, error) {
  8088. rsp, err := c.ConfigUpdate(ctx, params, body, reqEditors...)
  8089. if err != nil {
  8090. return nil, err
  8091. }
  8092. return ParseConfigUpdateResponse(rsp)
  8093. }
  8094. // ConfigProvidersWithResponse request returning *ConfigProvidersResponse
  8095. func (c *ClientWithResponses) ConfigProvidersWithResponse(ctx context.Context, params *ConfigProvidersParams, reqEditors ...RequestEditorFn) (*ConfigProvidersResponse, error) {
  8096. rsp, err := c.ConfigProviders(ctx, params, reqEditors...)
  8097. if err != nil {
  8098. return nil, err
  8099. }
  8100. return ParseConfigProvidersResponse(rsp)
  8101. }
  8102. // EventSubscribeWithResponse request returning *EventSubscribeResponse
  8103. func (c *ClientWithResponses) EventSubscribeWithResponse(ctx context.Context, params *EventSubscribeParams, reqEditors ...RequestEditorFn) (*EventSubscribeResponse, error) {
  8104. rsp, err := c.EventSubscribe(ctx, params, reqEditors...)
  8105. if err != nil {
  8106. return nil, err
  8107. }
  8108. return ParseEventSubscribeResponse(rsp)
  8109. }
  8110. // ExperimentalResourceListWithResponse request returning *ExperimentalResourceListResponse
  8111. func (c *ClientWithResponses) ExperimentalResourceListWithResponse(ctx context.Context, params *ExperimentalResourceListParams, reqEditors ...RequestEditorFn) (*ExperimentalResourceListResponse, error) {
  8112. rsp, err := c.ExperimentalResourceList(ctx, params, reqEditors...)
  8113. if err != nil {
  8114. return nil, err
  8115. }
  8116. return ParseExperimentalResourceListResponse(rsp)
  8117. }
  8118. // ToolListWithResponse request returning *ToolListResponse
  8119. func (c *ClientWithResponses) ToolListWithResponse(ctx context.Context, params *ToolListParams, reqEditors ...RequestEditorFn) (*ToolListResponse, error) {
  8120. rsp, err := c.ToolList(ctx, params, reqEditors...)
  8121. if err != nil {
  8122. return nil, err
  8123. }
  8124. return ParseToolListResponse(rsp)
  8125. }
  8126. // ToolIdsWithResponse request returning *ToolIdsResponse
  8127. func (c *ClientWithResponses) ToolIdsWithResponse(ctx context.Context, params *ToolIdsParams, reqEditors ...RequestEditorFn) (*ToolIdsResponse, error) {
  8128. rsp, err := c.ToolIds(ctx, params, reqEditors...)
  8129. if err != nil {
  8130. return nil, err
  8131. }
  8132. return ParseToolIdsResponse(rsp)
  8133. }
  8134. // WorktreeListWithResponse request returning *WorktreeListResponse
  8135. func (c *ClientWithResponses) WorktreeListWithResponse(ctx context.Context, params *WorktreeListParams, reqEditors ...RequestEditorFn) (*WorktreeListResponse, error) {
  8136. rsp, err := c.WorktreeList(ctx, params, reqEditors...)
  8137. if err != nil {
  8138. return nil, err
  8139. }
  8140. return ParseWorktreeListResponse(rsp)
  8141. }
  8142. // WorktreeCreateWithBodyWithResponse request with arbitrary body returning *WorktreeCreateResponse
  8143. func (c *ClientWithResponses) WorktreeCreateWithBodyWithResponse(ctx context.Context, params *WorktreeCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error) {
  8144. rsp, err := c.WorktreeCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8145. if err != nil {
  8146. return nil, err
  8147. }
  8148. return ParseWorktreeCreateResponse(rsp)
  8149. }
  8150. func (c *ClientWithResponses) WorktreeCreateWithResponse(ctx context.Context, params *WorktreeCreateParams, body WorktreeCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WorktreeCreateResponse, error) {
  8151. rsp, err := c.WorktreeCreate(ctx, params, body, reqEditors...)
  8152. if err != nil {
  8153. return nil, err
  8154. }
  8155. return ParseWorktreeCreateResponse(rsp)
  8156. }
  8157. // FileListWithResponse request returning *FileListResponse
  8158. func (c *ClientWithResponses) FileListWithResponse(ctx context.Context, params *FileListParams, reqEditors ...RequestEditorFn) (*FileListResponse, error) {
  8159. rsp, err := c.FileList(ctx, params, reqEditors...)
  8160. if err != nil {
  8161. return nil, err
  8162. }
  8163. return ParseFileListResponse(rsp)
  8164. }
  8165. // FileReadWithResponse request returning *FileReadResponse
  8166. func (c *ClientWithResponses) FileReadWithResponse(ctx context.Context, params *FileReadParams, reqEditors ...RequestEditorFn) (*FileReadResponse, error) {
  8167. rsp, err := c.FileRead(ctx, params, reqEditors...)
  8168. if err != nil {
  8169. return nil, err
  8170. }
  8171. return ParseFileReadResponse(rsp)
  8172. }
  8173. // FileStatusWithResponse request returning *FileStatusResponse
  8174. func (c *ClientWithResponses) FileStatusWithResponse(ctx context.Context, params *FileStatusParams, reqEditors ...RequestEditorFn) (*FileStatusResponse, error) {
  8175. rsp, err := c.FileStatus(ctx, params, reqEditors...)
  8176. if err != nil {
  8177. return nil, err
  8178. }
  8179. return ParseFileStatusResponse(rsp)
  8180. }
  8181. // FindTextWithResponse request returning *FindTextResponse
  8182. func (c *ClientWithResponses) FindTextWithResponse(ctx context.Context, params *FindTextParams, reqEditors ...RequestEditorFn) (*FindTextResponse, error) {
  8183. rsp, err := c.FindText(ctx, params, reqEditors...)
  8184. if err != nil {
  8185. return nil, err
  8186. }
  8187. return ParseFindTextResponse(rsp)
  8188. }
  8189. // FindFilesWithResponse request returning *FindFilesResponse
  8190. func (c *ClientWithResponses) FindFilesWithResponse(ctx context.Context, params *FindFilesParams, reqEditors ...RequestEditorFn) (*FindFilesResponse, error) {
  8191. rsp, err := c.FindFiles(ctx, params, reqEditors...)
  8192. if err != nil {
  8193. return nil, err
  8194. }
  8195. return ParseFindFilesResponse(rsp)
  8196. }
  8197. // FindSymbolsWithResponse request returning *FindSymbolsResponse
  8198. func (c *ClientWithResponses) FindSymbolsWithResponse(ctx context.Context, params *FindSymbolsParams, reqEditors ...RequestEditorFn) (*FindSymbolsResponse, error) {
  8199. rsp, err := c.FindSymbols(ctx, params, reqEditors...)
  8200. if err != nil {
  8201. return nil, err
  8202. }
  8203. return ParseFindSymbolsResponse(rsp)
  8204. }
  8205. // FormatterStatusWithResponse request returning *FormatterStatusResponse
  8206. func (c *ClientWithResponses) FormatterStatusWithResponse(ctx context.Context, params *FormatterStatusParams, reqEditors ...RequestEditorFn) (*FormatterStatusResponse, error) {
  8207. rsp, err := c.FormatterStatus(ctx, params, reqEditors...)
  8208. if err != nil {
  8209. return nil, err
  8210. }
  8211. return ParseFormatterStatusResponse(rsp)
  8212. }
  8213. // GlobalDisposeWithResponse request returning *GlobalDisposeResponse
  8214. func (c *ClientWithResponses) GlobalDisposeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalDisposeResponse, error) {
  8215. rsp, err := c.GlobalDispose(ctx, reqEditors...)
  8216. if err != nil {
  8217. return nil, err
  8218. }
  8219. return ParseGlobalDisposeResponse(rsp)
  8220. }
  8221. // GlobalEventWithResponse request returning *GlobalEventResponse
  8222. func (c *ClientWithResponses) GlobalEventWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalEventResponse, error) {
  8223. rsp, err := c.GlobalEvent(ctx, reqEditors...)
  8224. if err != nil {
  8225. return nil, err
  8226. }
  8227. return ParseGlobalEventResponse(rsp)
  8228. }
  8229. // GlobalHealthWithResponse request returning *GlobalHealthResponse
  8230. func (c *ClientWithResponses) GlobalHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GlobalHealthResponse, error) {
  8231. rsp, err := c.GlobalHealth(ctx, reqEditors...)
  8232. if err != nil {
  8233. return nil, err
  8234. }
  8235. return ParseGlobalHealthResponse(rsp)
  8236. }
  8237. // InstanceDisposeWithResponse request returning *InstanceDisposeResponse
  8238. func (c *ClientWithResponses) InstanceDisposeWithResponse(ctx context.Context, params *InstanceDisposeParams, reqEditors ...RequestEditorFn) (*InstanceDisposeResponse, error) {
  8239. rsp, err := c.InstanceDispose(ctx, params, reqEditors...)
  8240. if err != nil {
  8241. return nil, err
  8242. }
  8243. return ParseInstanceDisposeResponse(rsp)
  8244. }
  8245. // AppLogWithBodyWithResponse request with arbitrary body returning *AppLogResponse
  8246. func (c *ClientWithResponses) AppLogWithBodyWithResponse(ctx context.Context, params *AppLogParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppLogResponse, error) {
  8247. rsp, err := c.AppLogWithBody(ctx, params, contentType, body, reqEditors...)
  8248. if err != nil {
  8249. return nil, err
  8250. }
  8251. return ParseAppLogResponse(rsp)
  8252. }
  8253. func (c *ClientWithResponses) AppLogWithResponse(ctx context.Context, params *AppLogParams, body AppLogJSONRequestBody, reqEditors ...RequestEditorFn) (*AppLogResponse, error) {
  8254. rsp, err := c.AppLog(ctx, params, body, reqEditors...)
  8255. if err != nil {
  8256. return nil, err
  8257. }
  8258. return ParseAppLogResponse(rsp)
  8259. }
  8260. // LspStatusWithResponse request returning *LspStatusResponse
  8261. func (c *ClientWithResponses) LspStatusWithResponse(ctx context.Context, params *LspStatusParams, reqEditors ...RequestEditorFn) (*LspStatusResponse, error) {
  8262. rsp, err := c.LspStatus(ctx, params, reqEditors...)
  8263. if err != nil {
  8264. return nil, err
  8265. }
  8266. return ParseLspStatusResponse(rsp)
  8267. }
  8268. // McpStatusWithResponse request returning *McpStatusResponse
  8269. func (c *ClientWithResponses) McpStatusWithResponse(ctx context.Context, params *McpStatusParams, reqEditors ...RequestEditorFn) (*McpStatusResponse, error) {
  8270. rsp, err := c.McpStatus(ctx, params, reqEditors...)
  8271. if err != nil {
  8272. return nil, err
  8273. }
  8274. return ParseMcpStatusResponse(rsp)
  8275. }
  8276. // McpAddWithBodyWithResponse request with arbitrary body returning *McpAddResponse
  8277. func (c *ClientWithResponses) McpAddWithBodyWithResponse(ctx context.Context, params *McpAddParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAddResponse, error) {
  8278. rsp, err := c.McpAddWithBody(ctx, params, contentType, body, reqEditors...)
  8279. if err != nil {
  8280. return nil, err
  8281. }
  8282. return ParseMcpAddResponse(rsp)
  8283. }
  8284. func (c *ClientWithResponses) McpAddWithResponse(ctx context.Context, params *McpAddParams, body McpAddJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAddResponse, error) {
  8285. rsp, err := c.McpAdd(ctx, params, body, reqEditors...)
  8286. if err != nil {
  8287. return nil, err
  8288. }
  8289. return ParseMcpAddResponse(rsp)
  8290. }
  8291. // McpAuthRemoveWithResponse request returning *McpAuthRemoveResponse
  8292. func (c *ClientWithResponses) McpAuthRemoveWithResponse(ctx context.Context, name string, params *McpAuthRemoveParams, reqEditors ...RequestEditorFn) (*McpAuthRemoveResponse, error) {
  8293. rsp, err := c.McpAuthRemove(ctx, name, params, reqEditors...)
  8294. if err != nil {
  8295. return nil, err
  8296. }
  8297. return ParseMcpAuthRemoveResponse(rsp)
  8298. }
  8299. // McpAuthStartWithResponse request returning *McpAuthStartResponse
  8300. func (c *ClientWithResponses) McpAuthStartWithResponse(ctx context.Context, name string, params *McpAuthStartParams, reqEditors ...RequestEditorFn) (*McpAuthStartResponse, error) {
  8301. rsp, err := c.McpAuthStart(ctx, name, params, reqEditors...)
  8302. if err != nil {
  8303. return nil, err
  8304. }
  8305. return ParseMcpAuthStartResponse(rsp)
  8306. }
  8307. // McpAuthAuthenticateWithResponse request returning *McpAuthAuthenticateResponse
  8308. func (c *ClientWithResponses) McpAuthAuthenticateWithResponse(ctx context.Context, name string, params *McpAuthAuthenticateParams, reqEditors ...RequestEditorFn) (*McpAuthAuthenticateResponse, error) {
  8309. rsp, err := c.McpAuthAuthenticate(ctx, name, params, reqEditors...)
  8310. if err != nil {
  8311. return nil, err
  8312. }
  8313. return ParseMcpAuthAuthenticateResponse(rsp)
  8314. }
  8315. // McpAuthCallbackWithBodyWithResponse request with arbitrary body returning *McpAuthCallbackResponse
  8316. func (c *ClientWithResponses) McpAuthCallbackWithBodyWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error) {
  8317. rsp, err := c.McpAuthCallbackWithBody(ctx, name, params, contentType, body, reqEditors...)
  8318. if err != nil {
  8319. return nil, err
  8320. }
  8321. return ParseMcpAuthCallbackResponse(rsp)
  8322. }
  8323. func (c *ClientWithResponses) McpAuthCallbackWithResponse(ctx context.Context, name string, params *McpAuthCallbackParams, body McpAuthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*McpAuthCallbackResponse, error) {
  8324. rsp, err := c.McpAuthCallback(ctx, name, params, body, reqEditors...)
  8325. if err != nil {
  8326. return nil, err
  8327. }
  8328. return ParseMcpAuthCallbackResponse(rsp)
  8329. }
  8330. // McpConnectWithResponse request returning *McpConnectResponse
  8331. func (c *ClientWithResponses) McpConnectWithResponse(ctx context.Context, name string, params *McpConnectParams, reqEditors ...RequestEditorFn) (*McpConnectResponse, error) {
  8332. rsp, err := c.McpConnect(ctx, name, params, reqEditors...)
  8333. if err != nil {
  8334. return nil, err
  8335. }
  8336. return ParseMcpConnectResponse(rsp)
  8337. }
  8338. // McpDisconnectWithResponse request returning *McpDisconnectResponse
  8339. func (c *ClientWithResponses) McpDisconnectWithResponse(ctx context.Context, name string, params *McpDisconnectParams, reqEditors ...RequestEditorFn) (*McpDisconnectResponse, error) {
  8340. rsp, err := c.McpDisconnect(ctx, name, params, reqEditors...)
  8341. if err != nil {
  8342. return nil, err
  8343. }
  8344. return ParseMcpDisconnectResponse(rsp)
  8345. }
  8346. // PathGetWithResponse request returning *PathGetResponse
  8347. func (c *ClientWithResponses) PathGetWithResponse(ctx context.Context, params *PathGetParams, reqEditors ...RequestEditorFn) (*PathGetResponse, error) {
  8348. rsp, err := c.PathGet(ctx, params, reqEditors...)
  8349. if err != nil {
  8350. return nil, err
  8351. }
  8352. return ParsePathGetResponse(rsp)
  8353. }
  8354. // PermissionListWithResponse request returning *PermissionListResponse
  8355. func (c *ClientWithResponses) PermissionListWithResponse(ctx context.Context, params *PermissionListParams, reqEditors ...RequestEditorFn) (*PermissionListResponse, error) {
  8356. rsp, err := c.PermissionList(ctx, params, reqEditors...)
  8357. if err != nil {
  8358. return nil, err
  8359. }
  8360. return ParsePermissionListResponse(rsp)
  8361. }
  8362. // PermissionReplyWithBodyWithResponse request with arbitrary body returning *PermissionReplyResponse
  8363. func (c *ClientWithResponses) PermissionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error) {
  8364. rsp, err := c.PermissionReplyWithBody(ctx, requestID, params, contentType, body, reqEditors...)
  8365. if err != nil {
  8366. return nil, err
  8367. }
  8368. return ParsePermissionReplyResponse(rsp)
  8369. }
  8370. func (c *ClientWithResponses) PermissionReplyWithResponse(ctx context.Context, requestID string, params *PermissionReplyParams, body PermissionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionReplyResponse, error) {
  8371. rsp, err := c.PermissionReply(ctx, requestID, params, body, reqEditors...)
  8372. if err != nil {
  8373. return nil, err
  8374. }
  8375. return ParsePermissionReplyResponse(rsp)
  8376. }
  8377. // ProjectListWithResponse request returning *ProjectListResponse
  8378. func (c *ClientWithResponses) ProjectListWithResponse(ctx context.Context, params *ProjectListParams, reqEditors ...RequestEditorFn) (*ProjectListResponse, error) {
  8379. rsp, err := c.ProjectList(ctx, params, reqEditors...)
  8380. if err != nil {
  8381. return nil, err
  8382. }
  8383. return ParseProjectListResponse(rsp)
  8384. }
  8385. // ProjectCurrentWithResponse request returning *ProjectCurrentResponse
  8386. func (c *ClientWithResponses) ProjectCurrentWithResponse(ctx context.Context, params *ProjectCurrentParams, reqEditors ...RequestEditorFn) (*ProjectCurrentResponse, error) {
  8387. rsp, err := c.ProjectCurrent(ctx, params, reqEditors...)
  8388. if err != nil {
  8389. return nil, err
  8390. }
  8391. return ParseProjectCurrentResponse(rsp)
  8392. }
  8393. // ProjectUpdateWithBodyWithResponse request with arbitrary body returning *ProjectUpdateResponse
  8394. func (c *ClientWithResponses) ProjectUpdateWithBodyWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error) {
  8395. rsp, err := c.ProjectUpdateWithBody(ctx, projectID, params, contentType, body, reqEditors...)
  8396. if err != nil {
  8397. return nil, err
  8398. }
  8399. return ParseProjectUpdateResponse(rsp)
  8400. }
  8401. func (c *ClientWithResponses) ProjectUpdateWithResponse(ctx context.Context, projectID string, params *ProjectUpdateParams, body ProjectUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectUpdateResponse, error) {
  8402. rsp, err := c.ProjectUpdate(ctx, projectID, params, body, reqEditors...)
  8403. if err != nil {
  8404. return nil, err
  8405. }
  8406. return ParseProjectUpdateResponse(rsp)
  8407. }
  8408. // ProviderListWithResponse request returning *ProviderListResponse
  8409. func (c *ClientWithResponses) ProviderListWithResponse(ctx context.Context, params *ProviderListParams, reqEditors ...RequestEditorFn) (*ProviderListResponse, error) {
  8410. rsp, err := c.ProviderList(ctx, params, reqEditors...)
  8411. if err != nil {
  8412. return nil, err
  8413. }
  8414. return ParseProviderListResponse(rsp)
  8415. }
  8416. // ProviderAuthWithResponse request returning *ProviderAuthResponse
  8417. func (c *ClientWithResponses) ProviderAuthWithResponse(ctx context.Context, params *ProviderAuthParams, reqEditors ...RequestEditorFn) (*ProviderAuthResponse, error) {
  8418. rsp, err := c.ProviderAuth(ctx, params, reqEditors...)
  8419. if err != nil {
  8420. return nil, err
  8421. }
  8422. return ParseProviderAuthResponse(rsp)
  8423. }
  8424. // ProviderOauthAuthorizeWithBodyWithResponse request with arbitrary body returning *ProviderOauthAuthorizeResponse
  8425. func (c *ClientWithResponses) ProviderOauthAuthorizeWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error) {
  8426. rsp, err := c.ProviderOauthAuthorizeWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8427. if err != nil {
  8428. return nil, err
  8429. }
  8430. return ParseProviderOauthAuthorizeResponse(rsp)
  8431. }
  8432. func (c *ClientWithResponses) ProviderOauthAuthorizeWithResponse(ctx context.Context, providerID string, params *ProviderOauthAuthorizeParams, body ProviderOauthAuthorizeJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthAuthorizeResponse, error) {
  8433. rsp, err := c.ProviderOauthAuthorize(ctx, providerID, params, body, reqEditors...)
  8434. if err != nil {
  8435. return nil, err
  8436. }
  8437. return ParseProviderOauthAuthorizeResponse(rsp)
  8438. }
  8439. // ProviderOauthCallbackWithBodyWithResponse request with arbitrary body returning *ProviderOauthCallbackResponse
  8440. func (c *ClientWithResponses) ProviderOauthCallbackWithBodyWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error) {
  8441. rsp, err := c.ProviderOauthCallbackWithBody(ctx, providerID, params, contentType, body, reqEditors...)
  8442. if err != nil {
  8443. return nil, err
  8444. }
  8445. return ParseProviderOauthCallbackResponse(rsp)
  8446. }
  8447. func (c *ClientWithResponses) ProviderOauthCallbackWithResponse(ctx context.Context, providerID string, params *ProviderOauthCallbackParams, body ProviderOauthCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*ProviderOauthCallbackResponse, error) {
  8448. rsp, err := c.ProviderOauthCallback(ctx, providerID, params, body, reqEditors...)
  8449. if err != nil {
  8450. return nil, err
  8451. }
  8452. return ParseProviderOauthCallbackResponse(rsp)
  8453. }
  8454. // PtyListWithResponse request returning *PtyListResponse
  8455. func (c *ClientWithResponses) PtyListWithResponse(ctx context.Context, params *PtyListParams, reqEditors ...RequestEditorFn) (*PtyListResponse, error) {
  8456. rsp, err := c.PtyList(ctx, params, reqEditors...)
  8457. if err != nil {
  8458. return nil, err
  8459. }
  8460. return ParsePtyListResponse(rsp)
  8461. }
  8462. // PtyCreateWithBodyWithResponse request with arbitrary body returning *PtyCreateResponse
  8463. func (c *ClientWithResponses) PtyCreateWithBodyWithResponse(ctx context.Context, params *PtyCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error) {
  8464. rsp, err := c.PtyCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8465. if err != nil {
  8466. return nil, err
  8467. }
  8468. return ParsePtyCreateResponse(rsp)
  8469. }
  8470. func (c *ClientWithResponses) PtyCreateWithResponse(ctx context.Context, params *PtyCreateParams, body PtyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyCreateResponse, error) {
  8471. rsp, err := c.PtyCreate(ctx, params, body, reqEditors...)
  8472. if err != nil {
  8473. return nil, err
  8474. }
  8475. return ParsePtyCreateResponse(rsp)
  8476. }
  8477. // PtyRemoveWithResponse request returning *PtyRemoveResponse
  8478. func (c *ClientWithResponses) PtyRemoveWithResponse(ctx context.Context, ptyID string, params *PtyRemoveParams, reqEditors ...RequestEditorFn) (*PtyRemoveResponse, error) {
  8479. rsp, err := c.PtyRemove(ctx, ptyID, params, reqEditors...)
  8480. if err != nil {
  8481. return nil, err
  8482. }
  8483. return ParsePtyRemoveResponse(rsp)
  8484. }
  8485. // PtyGetWithResponse request returning *PtyGetResponse
  8486. func (c *ClientWithResponses) PtyGetWithResponse(ctx context.Context, ptyID string, params *PtyGetParams, reqEditors ...RequestEditorFn) (*PtyGetResponse, error) {
  8487. rsp, err := c.PtyGet(ctx, ptyID, params, reqEditors...)
  8488. if err != nil {
  8489. return nil, err
  8490. }
  8491. return ParsePtyGetResponse(rsp)
  8492. }
  8493. // PtyUpdateWithBodyWithResponse request with arbitrary body returning *PtyUpdateResponse
  8494. func (c *ClientWithResponses) PtyUpdateWithBodyWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error) {
  8495. rsp, err := c.PtyUpdateWithBody(ctx, ptyID, params, contentType, body, reqEditors...)
  8496. if err != nil {
  8497. return nil, err
  8498. }
  8499. return ParsePtyUpdateResponse(rsp)
  8500. }
  8501. func (c *ClientWithResponses) PtyUpdateWithResponse(ctx context.Context, ptyID string, params *PtyUpdateParams, body PtyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PtyUpdateResponse, error) {
  8502. rsp, err := c.PtyUpdate(ctx, ptyID, params, body, reqEditors...)
  8503. if err != nil {
  8504. return nil, err
  8505. }
  8506. return ParsePtyUpdateResponse(rsp)
  8507. }
  8508. // PtyConnectWithResponse request returning *PtyConnectResponse
  8509. func (c *ClientWithResponses) PtyConnectWithResponse(ctx context.Context, ptyID string, params *PtyConnectParams, reqEditors ...RequestEditorFn) (*PtyConnectResponse, error) {
  8510. rsp, err := c.PtyConnect(ctx, ptyID, params, reqEditors...)
  8511. if err != nil {
  8512. return nil, err
  8513. }
  8514. return ParsePtyConnectResponse(rsp)
  8515. }
  8516. // QuestionListWithResponse request returning *QuestionListResponse
  8517. func (c *ClientWithResponses) QuestionListWithResponse(ctx context.Context, params *QuestionListParams, reqEditors ...RequestEditorFn) (*QuestionListResponse, error) {
  8518. rsp, err := c.QuestionList(ctx, params, reqEditors...)
  8519. if err != nil {
  8520. return nil, err
  8521. }
  8522. return ParseQuestionListResponse(rsp)
  8523. }
  8524. // QuestionRejectWithResponse request returning *QuestionRejectResponse
  8525. func (c *ClientWithResponses) QuestionRejectWithResponse(ctx context.Context, requestID string, params *QuestionRejectParams, reqEditors ...RequestEditorFn) (*QuestionRejectResponse, error) {
  8526. rsp, err := c.QuestionReject(ctx, requestID, params, reqEditors...)
  8527. if err != nil {
  8528. return nil, err
  8529. }
  8530. return ParseQuestionRejectResponse(rsp)
  8531. }
  8532. // QuestionReplyWithBodyWithResponse request with arbitrary body returning *QuestionReplyResponse
  8533. func (c *ClientWithResponses) QuestionReplyWithBodyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error) {
  8534. rsp, err := c.QuestionReplyWithBody(ctx, requestID, params, contentType, body, reqEditors...)
  8535. if err != nil {
  8536. return nil, err
  8537. }
  8538. return ParseQuestionReplyResponse(rsp)
  8539. }
  8540. func (c *ClientWithResponses) QuestionReplyWithResponse(ctx context.Context, requestID string, params *QuestionReplyParams, body QuestionReplyJSONRequestBody, reqEditors ...RequestEditorFn) (*QuestionReplyResponse, error) {
  8541. rsp, err := c.QuestionReply(ctx, requestID, params, body, reqEditors...)
  8542. if err != nil {
  8543. return nil, err
  8544. }
  8545. return ParseQuestionReplyResponse(rsp)
  8546. }
  8547. // SessionListWithResponse request returning *SessionListResponse
  8548. func (c *ClientWithResponses) SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error) {
  8549. rsp, err := c.SessionList(ctx, params, reqEditors...)
  8550. if err != nil {
  8551. return nil, err
  8552. }
  8553. return ParseSessionListResponse(rsp)
  8554. }
  8555. // SessionCreateWithBodyWithResponse request with arbitrary body returning *SessionCreateResponse
  8556. func (c *ClientWithResponses) SessionCreateWithBodyWithResponse(ctx context.Context, params *SessionCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error) {
  8557. rsp, err := c.SessionCreateWithBody(ctx, params, contentType, body, reqEditors...)
  8558. if err != nil {
  8559. return nil, err
  8560. }
  8561. return ParseSessionCreateResponse(rsp)
  8562. }
  8563. func (c *ClientWithResponses) SessionCreateWithResponse(ctx context.Context, params *SessionCreateParams, body SessionCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCreateResponse, error) {
  8564. rsp, err := c.SessionCreate(ctx, params, body, reqEditors...)
  8565. if err != nil {
  8566. return nil, err
  8567. }
  8568. return ParseSessionCreateResponse(rsp)
  8569. }
  8570. // SessionStatusWithResponse request returning *SessionStatusResponse
  8571. func (c *ClientWithResponses) SessionStatusWithResponse(ctx context.Context, params *SessionStatusParams, reqEditors ...RequestEditorFn) (*SessionStatusResponse, error) {
  8572. rsp, err := c.SessionStatus(ctx, params, reqEditors...)
  8573. if err != nil {
  8574. return nil, err
  8575. }
  8576. return ParseSessionStatusResponse(rsp)
  8577. }
  8578. // SessionDeleteWithResponse request returning *SessionDeleteResponse
  8579. func (c *ClientWithResponses) SessionDeleteWithResponse(ctx context.Context, sessionID string, params *SessionDeleteParams, reqEditors ...RequestEditorFn) (*SessionDeleteResponse, error) {
  8580. rsp, err := c.SessionDelete(ctx, sessionID, params, reqEditors...)
  8581. if err != nil {
  8582. return nil, err
  8583. }
  8584. return ParseSessionDeleteResponse(rsp)
  8585. }
  8586. // SessionGetWithResponse request returning *SessionGetResponse
  8587. func (c *ClientWithResponses) SessionGetWithResponse(ctx context.Context, sessionID string, params *SessionGetParams, reqEditors ...RequestEditorFn) (*SessionGetResponse, error) {
  8588. rsp, err := c.SessionGet(ctx, sessionID, params, reqEditors...)
  8589. if err != nil {
  8590. return nil, err
  8591. }
  8592. return ParseSessionGetResponse(rsp)
  8593. }
  8594. // SessionUpdateWithBodyWithResponse request with arbitrary body returning *SessionUpdateResponse
  8595. func (c *ClientWithResponses) SessionUpdateWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error) {
  8596. rsp, err := c.SessionUpdateWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8597. if err != nil {
  8598. return nil, err
  8599. }
  8600. return ParseSessionUpdateResponse(rsp)
  8601. }
  8602. func (c *ClientWithResponses) SessionUpdateWithResponse(ctx context.Context, sessionID string, params *SessionUpdateParams, body SessionUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionUpdateResponse, error) {
  8603. rsp, err := c.SessionUpdate(ctx, sessionID, params, body, reqEditors...)
  8604. if err != nil {
  8605. return nil, err
  8606. }
  8607. return ParseSessionUpdateResponse(rsp)
  8608. }
  8609. // SessionAbortWithResponse request returning *SessionAbortResponse
  8610. func (c *ClientWithResponses) SessionAbortWithResponse(ctx context.Context, sessionID string, params *SessionAbortParams, reqEditors ...RequestEditorFn) (*SessionAbortResponse, error) {
  8611. rsp, err := c.SessionAbort(ctx, sessionID, params, reqEditors...)
  8612. if err != nil {
  8613. return nil, err
  8614. }
  8615. return ParseSessionAbortResponse(rsp)
  8616. }
  8617. // SessionChildrenWithResponse request returning *SessionChildrenResponse
  8618. func (c *ClientWithResponses) SessionChildrenWithResponse(ctx context.Context, sessionID string, params *SessionChildrenParams, reqEditors ...RequestEditorFn) (*SessionChildrenResponse, error) {
  8619. rsp, err := c.SessionChildren(ctx, sessionID, params, reqEditors...)
  8620. if err != nil {
  8621. return nil, err
  8622. }
  8623. return ParseSessionChildrenResponse(rsp)
  8624. }
  8625. // SessionCommandWithBodyWithResponse request with arbitrary body returning *SessionCommandResponse
  8626. func (c *ClientWithResponses) SessionCommandWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error) {
  8627. rsp, err := c.SessionCommandWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8628. if err != nil {
  8629. return nil, err
  8630. }
  8631. return ParseSessionCommandResponse(rsp)
  8632. }
  8633. func (c *ClientWithResponses) SessionCommandWithResponse(ctx context.Context, sessionID string, params *SessionCommandParams, body SessionCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionCommandResponse, error) {
  8634. rsp, err := c.SessionCommand(ctx, sessionID, params, body, reqEditors...)
  8635. if err != nil {
  8636. return nil, err
  8637. }
  8638. return ParseSessionCommandResponse(rsp)
  8639. }
  8640. // SessionDiffWithResponse request returning *SessionDiffResponse
  8641. func (c *ClientWithResponses) SessionDiffWithResponse(ctx context.Context, sessionID string, params *SessionDiffParams, reqEditors ...RequestEditorFn) (*SessionDiffResponse, error) {
  8642. rsp, err := c.SessionDiff(ctx, sessionID, params, reqEditors...)
  8643. if err != nil {
  8644. return nil, err
  8645. }
  8646. return ParseSessionDiffResponse(rsp)
  8647. }
  8648. // SessionForkWithBodyWithResponse request with arbitrary body returning *SessionForkResponse
  8649. func (c *ClientWithResponses) SessionForkWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionForkResponse, error) {
  8650. rsp, err := c.SessionForkWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8651. if err != nil {
  8652. return nil, err
  8653. }
  8654. return ParseSessionForkResponse(rsp)
  8655. }
  8656. func (c *ClientWithResponses) SessionForkWithResponse(ctx context.Context, sessionID string, params *SessionForkParams, body SessionForkJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionForkResponse, error) {
  8657. rsp, err := c.SessionFork(ctx, sessionID, params, body, reqEditors...)
  8658. if err != nil {
  8659. return nil, err
  8660. }
  8661. return ParseSessionForkResponse(rsp)
  8662. }
  8663. // SessionInitWithBodyWithResponse request with arbitrary body returning *SessionInitResponse
  8664. func (c *ClientWithResponses) SessionInitWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionInitResponse, error) {
  8665. rsp, err := c.SessionInitWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8666. if err != nil {
  8667. return nil, err
  8668. }
  8669. return ParseSessionInitResponse(rsp)
  8670. }
  8671. func (c *ClientWithResponses) SessionInitWithResponse(ctx context.Context, sessionID string, params *SessionInitParams, body SessionInitJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionInitResponse, error) {
  8672. rsp, err := c.SessionInit(ctx, sessionID, params, body, reqEditors...)
  8673. if err != nil {
  8674. return nil, err
  8675. }
  8676. return ParseSessionInitResponse(rsp)
  8677. }
  8678. // SessionMessagesWithResponse request returning *SessionMessagesResponse
  8679. func (c *ClientWithResponses) SessionMessagesWithResponse(ctx context.Context, sessionID string, params *SessionMessagesParams, reqEditors ...RequestEditorFn) (*SessionMessagesResponse, error) {
  8680. rsp, err := c.SessionMessages(ctx, sessionID, params, reqEditors...)
  8681. if err != nil {
  8682. return nil, err
  8683. }
  8684. return ParseSessionMessagesResponse(rsp)
  8685. }
  8686. // SessionPromptWithBodyWithResponse request with arbitrary body returning *SessionPromptResponse
  8687. func (c *ClientWithResponses) SessionPromptWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error) {
  8688. rsp, err := c.SessionPromptWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8689. if err != nil {
  8690. return nil, err
  8691. }
  8692. return ParseSessionPromptResponse(rsp)
  8693. }
  8694. func (c *ClientWithResponses) SessionPromptWithResponse(ctx context.Context, sessionID string, params *SessionPromptParams, body SessionPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptResponse, error) {
  8695. rsp, err := c.SessionPrompt(ctx, sessionID, params, body, reqEditors...)
  8696. if err != nil {
  8697. return nil, err
  8698. }
  8699. return ParseSessionPromptResponse(rsp)
  8700. }
  8701. // SessionMessageWithResponse request returning *SessionMessageResponse
  8702. func (c *ClientWithResponses) SessionMessageWithResponse(ctx context.Context, sessionID string, messageID string, params *SessionMessageParams, reqEditors ...RequestEditorFn) (*SessionMessageResponse, error) {
  8703. rsp, err := c.SessionMessage(ctx, sessionID, messageID, params, reqEditors...)
  8704. if err != nil {
  8705. return nil, err
  8706. }
  8707. return ParseSessionMessageResponse(rsp)
  8708. }
  8709. // PartDeleteWithResponse request returning *PartDeleteResponse
  8710. func (c *ClientWithResponses) PartDeleteWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartDeleteParams, reqEditors ...RequestEditorFn) (*PartDeleteResponse, error) {
  8711. rsp, err := c.PartDelete(ctx, sessionID, messageID, partID, params, reqEditors...)
  8712. if err != nil {
  8713. return nil, err
  8714. }
  8715. return ParsePartDeleteResponse(rsp)
  8716. }
  8717. // PartUpdateWithBodyWithResponse request with arbitrary body returning *PartUpdateResponse
  8718. func (c *ClientWithResponses) PartUpdateWithBodyWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error) {
  8719. rsp, err := c.PartUpdateWithBody(ctx, sessionID, messageID, partID, params, contentType, body, reqEditors...)
  8720. if err != nil {
  8721. return nil, err
  8722. }
  8723. return ParsePartUpdateResponse(rsp)
  8724. }
  8725. func (c *ClientWithResponses) PartUpdateWithResponse(ctx context.Context, sessionID string, messageID string, partID string, params *PartUpdateParams, body PartUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PartUpdateResponse, error) {
  8726. rsp, err := c.PartUpdate(ctx, sessionID, messageID, partID, params, body, reqEditors...)
  8727. if err != nil {
  8728. return nil, err
  8729. }
  8730. return ParsePartUpdateResponse(rsp)
  8731. }
  8732. // PermissionRespondWithBodyWithResponse request with arbitrary body returning *PermissionRespondResponse
  8733. func (c *ClientWithResponses) PermissionRespondWithBodyWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error) {
  8734. rsp, err := c.PermissionRespondWithBody(ctx, sessionID, permissionID, params, contentType, body, reqEditors...)
  8735. if err != nil {
  8736. return nil, err
  8737. }
  8738. return ParsePermissionRespondResponse(rsp)
  8739. }
  8740. func (c *ClientWithResponses) PermissionRespondWithResponse(ctx context.Context, sessionID string, permissionID string, params *PermissionRespondParams, body PermissionRespondJSONRequestBody, reqEditors ...RequestEditorFn) (*PermissionRespondResponse, error) {
  8741. rsp, err := c.PermissionRespond(ctx, sessionID, permissionID, params, body, reqEditors...)
  8742. if err != nil {
  8743. return nil, err
  8744. }
  8745. return ParsePermissionRespondResponse(rsp)
  8746. }
  8747. // SessionPromptAsyncWithBodyWithResponse request with arbitrary body returning *SessionPromptAsyncResponse
  8748. func (c *ClientWithResponses) SessionPromptAsyncWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error) {
  8749. rsp, err := c.SessionPromptAsyncWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8750. if err != nil {
  8751. return nil, err
  8752. }
  8753. return ParseSessionPromptAsyncResponse(rsp)
  8754. }
  8755. func (c *ClientWithResponses) SessionPromptAsyncWithResponse(ctx context.Context, sessionID string, params *SessionPromptAsyncParams, body SessionPromptAsyncJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionPromptAsyncResponse, error) {
  8756. rsp, err := c.SessionPromptAsync(ctx, sessionID, params, body, reqEditors...)
  8757. if err != nil {
  8758. return nil, err
  8759. }
  8760. return ParseSessionPromptAsyncResponse(rsp)
  8761. }
  8762. // SessionRevertWithBodyWithResponse request with arbitrary body returning *SessionRevertResponse
  8763. func (c *ClientWithResponses) SessionRevertWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error) {
  8764. rsp, err := c.SessionRevertWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8765. if err != nil {
  8766. return nil, err
  8767. }
  8768. return ParseSessionRevertResponse(rsp)
  8769. }
  8770. func (c *ClientWithResponses) SessionRevertWithResponse(ctx context.Context, sessionID string, params *SessionRevertParams, body SessionRevertJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRevertResponse, error) {
  8771. rsp, err := c.SessionRevert(ctx, sessionID, params, body, reqEditors...)
  8772. if err != nil {
  8773. return nil, err
  8774. }
  8775. return ParseSessionRevertResponse(rsp)
  8776. }
  8777. // SessionUnshareWithResponse request returning *SessionUnshareResponse
  8778. func (c *ClientWithResponses) SessionUnshareWithResponse(ctx context.Context, sessionID string, params *SessionUnshareParams, reqEditors ...RequestEditorFn) (*SessionUnshareResponse, error) {
  8779. rsp, err := c.SessionUnshare(ctx, sessionID, params, reqEditors...)
  8780. if err != nil {
  8781. return nil, err
  8782. }
  8783. return ParseSessionUnshareResponse(rsp)
  8784. }
  8785. // SessionShareWithResponse request returning *SessionShareResponse
  8786. func (c *ClientWithResponses) SessionShareWithResponse(ctx context.Context, sessionID string, params *SessionShareParams, reqEditors ...RequestEditorFn) (*SessionShareResponse, error) {
  8787. rsp, err := c.SessionShare(ctx, sessionID, params, reqEditors...)
  8788. if err != nil {
  8789. return nil, err
  8790. }
  8791. return ParseSessionShareResponse(rsp)
  8792. }
  8793. // SessionShellWithBodyWithResponse request with arbitrary body returning *SessionShellResponse
  8794. func (c *ClientWithResponses) SessionShellWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionShellResponse, error) {
  8795. rsp, err := c.SessionShellWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8796. if err != nil {
  8797. return nil, err
  8798. }
  8799. return ParseSessionShellResponse(rsp)
  8800. }
  8801. func (c *ClientWithResponses) SessionShellWithResponse(ctx context.Context, sessionID string, params *SessionShellParams, body SessionShellJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionShellResponse, error) {
  8802. rsp, err := c.SessionShell(ctx, sessionID, params, body, reqEditors...)
  8803. if err != nil {
  8804. return nil, err
  8805. }
  8806. return ParseSessionShellResponse(rsp)
  8807. }
  8808. // SessionSummarizeWithBodyWithResponse request with arbitrary body returning *SessionSummarizeResponse
  8809. func (c *ClientWithResponses) SessionSummarizeWithBodyWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error) {
  8810. rsp, err := c.SessionSummarizeWithBody(ctx, sessionID, params, contentType, body, reqEditors...)
  8811. if err != nil {
  8812. return nil, err
  8813. }
  8814. return ParseSessionSummarizeResponse(rsp)
  8815. }
  8816. func (c *ClientWithResponses) SessionSummarizeWithResponse(ctx context.Context, sessionID string, params *SessionSummarizeParams, body SessionSummarizeJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionSummarizeResponse, error) {
  8817. rsp, err := c.SessionSummarize(ctx, sessionID, params, body, reqEditors...)
  8818. if err != nil {
  8819. return nil, err
  8820. }
  8821. return ParseSessionSummarizeResponse(rsp)
  8822. }
  8823. // SessionTodoWithResponse request returning *SessionTodoResponse
  8824. func (c *ClientWithResponses) SessionTodoWithResponse(ctx context.Context, sessionID string, params *SessionTodoParams, reqEditors ...RequestEditorFn) (*SessionTodoResponse, error) {
  8825. rsp, err := c.SessionTodo(ctx, sessionID, params, reqEditors...)
  8826. if err != nil {
  8827. return nil, err
  8828. }
  8829. return ParseSessionTodoResponse(rsp)
  8830. }
  8831. // SessionUnrevertWithResponse request returning *SessionUnrevertResponse
  8832. func (c *ClientWithResponses) SessionUnrevertWithResponse(ctx context.Context, sessionID string, params *SessionUnrevertParams, reqEditors ...RequestEditorFn) (*SessionUnrevertResponse, error) {
  8833. rsp, err := c.SessionUnrevert(ctx, sessionID, params, reqEditors...)
  8834. if err != nil {
  8835. return nil, err
  8836. }
  8837. return ParseSessionUnrevertResponse(rsp)
  8838. }
  8839. // TuiAppendPromptWithBodyWithResponse request with arbitrary body returning *TuiAppendPromptResponse
  8840. func (c *ClientWithResponses) TuiAppendPromptWithBodyWithResponse(ctx context.Context, params *TuiAppendPromptParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error) {
  8841. rsp, err := c.TuiAppendPromptWithBody(ctx, params, contentType, body, reqEditors...)
  8842. if err != nil {
  8843. return nil, err
  8844. }
  8845. return ParseTuiAppendPromptResponse(rsp)
  8846. }
  8847. func (c *ClientWithResponses) TuiAppendPromptWithResponse(ctx context.Context, params *TuiAppendPromptParams, body TuiAppendPromptJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiAppendPromptResponse, error) {
  8848. rsp, err := c.TuiAppendPrompt(ctx, params, body, reqEditors...)
  8849. if err != nil {
  8850. return nil, err
  8851. }
  8852. return ParseTuiAppendPromptResponse(rsp)
  8853. }
  8854. // TuiClearPromptWithResponse request returning *TuiClearPromptResponse
  8855. func (c *ClientWithResponses) TuiClearPromptWithResponse(ctx context.Context, params *TuiClearPromptParams, reqEditors ...RequestEditorFn) (*TuiClearPromptResponse, error) {
  8856. rsp, err := c.TuiClearPrompt(ctx, params, reqEditors...)
  8857. if err != nil {
  8858. return nil, err
  8859. }
  8860. return ParseTuiClearPromptResponse(rsp)
  8861. }
  8862. // TuiControlNextWithResponse request returning *TuiControlNextResponse
  8863. func (c *ClientWithResponses) TuiControlNextWithResponse(ctx context.Context, params *TuiControlNextParams, reqEditors ...RequestEditorFn) (*TuiControlNextResponse, error) {
  8864. rsp, err := c.TuiControlNext(ctx, params, reqEditors...)
  8865. if err != nil {
  8866. return nil, err
  8867. }
  8868. return ParseTuiControlNextResponse(rsp)
  8869. }
  8870. // TuiControlResponseWithBodyWithResponse request with arbitrary body returning *TuiControlResponseResponse
  8871. func (c *ClientWithResponses) TuiControlResponseWithBodyWithResponse(ctx context.Context, params *TuiControlResponseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error) {
  8872. rsp, err := c.TuiControlResponseWithBody(ctx, params, contentType, body, reqEditors...)
  8873. if err != nil {
  8874. return nil, err
  8875. }
  8876. return ParseTuiControlResponseResponse(rsp)
  8877. }
  8878. func (c *ClientWithResponses) TuiControlResponseWithResponse(ctx context.Context, params *TuiControlResponseParams, body TuiControlResponseJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiControlResponseResponse, error) {
  8879. rsp, err := c.TuiControlResponse(ctx, params, body, reqEditors...)
  8880. if err != nil {
  8881. return nil, err
  8882. }
  8883. return ParseTuiControlResponseResponse(rsp)
  8884. }
  8885. // TuiExecuteCommandWithBodyWithResponse request with arbitrary body returning *TuiExecuteCommandResponse
  8886. func (c *ClientWithResponses) TuiExecuteCommandWithBodyWithResponse(ctx context.Context, params *TuiExecuteCommandParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error) {
  8887. rsp, err := c.TuiExecuteCommandWithBody(ctx, params, contentType, body, reqEditors...)
  8888. if err != nil {
  8889. return nil, err
  8890. }
  8891. return ParseTuiExecuteCommandResponse(rsp)
  8892. }
  8893. func (c *ClientWithResponses) TuiExecuteCommandWithResponse(ctx context.Context, params *TuiExecuteCommandParams, body TuiExecuteCommandJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiExecuteCommandResponse, error) {
  8894. rsp, err := c.TuiExecuteCommand(ctx, params, body, reqEditors...)
  8895. if err != nil {
  8896. return nil, err
  8897. }
  8898. return ParseTuiExecuteCommandResponse(rsp)
  8899. }
  8900. // TuiOpenHelpWithResponse request returning *TuiOpenHelpResponse
  8901. func (c *ClientWithResponses) TuiOpenHelpWithResponse(ctx context.Context, params *TuiOpenHelpParams, reqEditors ...RequestEditorFn) (*TuiOpenHelpResponse, error) {
  8902. rsp, err := c.TuiOpenHelp(ctx, params, reqEditors...)
  8903. if err != nil {
  8904. return nil, err
  8905. }
  8906. return ParseTuiOpenHelpResponse(rsp)
  8907. }
  8908. // TuiOpenModelsWithResponse request returning *TuiOpenModelsResponse
  8909. func (c *ClientWithResponses) TuiOpenModelsWithResponse(ctx context.Context, params *TuiOpenModelsParams, reqEditors ...RequestEditorFn) (*TuiOpenModelsResponse, error) {
  8910. rsp, err := c.TuiOpenModels(ctx, params, reqEditors...)
  8911. if err != nil {
  8912. return nil, err
  8913. }
  8914. return ParseTuiOpenModelsResponse(rsp)
  8915. }
  8916. // TuiOpenSessionsWithResponse request returning *TuiOpenSessionsResponse
  8917. func (c *ClientWithResponses) TuiOpenSessionsWithResponse(ctx context.Context, params *TuiOpenSessionsParams, reqEditors ...RequestEditorFn) (*TuiOpenSessionsResponse, error) {
  8918. rsp, err := c.TuiOpenSessions(ctx, params, reqEditors...)
  8919. if err != nil {
  8920. return nil, err
  8921. }
  8922. return ParseTuiOpenSessionsResponse(rsp)
  8923. }
  8924. // TuiOpenThemesWithResponse request returning *TuiOpenThemesResponse
  8925. func (c *ClientWithResponses) TuiOpenThemesWithResponse(ctx context.Context, params *TuiOpenThemesParams, reqEditors ...RequestEditorFn) (*TuiOpenThemesResponse, error) {
  8926. rsp, err := c.TuiOpenThemes(ctx, params, reqEditors...)
  8927. if err != nil {
  8928. return nil, err
  8929. }
  8930. return ParseTuiOpenThemesResponse(rsp)
  8931. }
  8932. // TuiPublishWithBodyWithResponse request with arbitrary body returning *TuiPublishResponse
  8933. func (c *ClientWithResponses) TuiPublishWithBodyWithResponse(ctx context.Context, params *TuiPublishParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error) {
  8934. rsp, err := c.TuiPublishWithBody(ctx, params, contentType, body, reqEditors...)
  8935. if err != nil {
  8936. return nil, err
  8937. }
  8938. return ParseTuiPublishResponse(rsp)
  8939. }
  8940. func (c *ClientWithResponses) TuiPublishWithResponse(ctx context.Context, params *TuiPublishParams, body TuiPublishJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiPublishResponse, error) {
  8941. rsp, err := c.TuiPublish(ctx, params, body, reqEditors...)
  8942. if err != nil {
  8943. return nil, err
  8944. }
  8945. return ParseTuiPublishResponse(rsp)
  8946. }
  8947. // TuiSelectSessionWithBodyWithResponse request with arbitrary body returning *TuiSelectSessionResponse
  8948. func (c *ClientWithResponses) TuiSelectSessionWithBodyWithResponse(ctx context.Context, params *TuiSelectSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error) {
  8949. rsp, err := c.TuiSelectSessionWithBody(ctx, params, contentType, body, reqEditors...)
  8950. if err != nil {
  8951. return nil, err
  8952. }
  8953. return ParseTuiSelectSessionResponse(rsp)
  8954. }
  8955. func (c *ClientWithResponses) TuiSelectSessionWithResponse(ctx context.Context, params *TuiSelectSessionParams, body TuiSelectSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiSelectSessionResponse, error) {
  8956. rsp, err := c.TuiSelectSession(ctx, params, body, reqEditors...)
  8957. if err != nil {
  8958. return nil, err
  8959. }
  8960. return ParseTuiSelectSessionResponse(rsp)
  8961. }
  8962. // TuiShowToastWithBodyWithResponse request with arbitrary body returning *TuiShowToastResponse
  8963. func (c *ClientWithResponses) TuiShowToastWithBodyWithResponse(ctx context.Context, params *TuiShowToastParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error) {
  8964. rsp, err := c.TuiShowToastWithBody(ctx, params, contentType, body, reqEditors...)
  8965. if err != nil {
  8966. return nil, err
  8967. }
  8968. return ParseTuiShowToastResponse(rsp)
  8969. }
  8970. func (c *ClientWithResponses) TuiShowToastWithResponse(ctx context.Context, params *TuiShowToastParams, body TuiShowToastJSONRequestBody, reqEditors ...RequestEditorFn) (*TuiShowToastResponse, error) {
  8971. rsp, err := c.TuiShowToast(ctx, params, body, reqEditors...)
  8972. if err != nil {
  8973. return nil, err
  8974. }
  8975. return ParseTuiShowToastResponse(rsp)
  8976. }
  8977. // TuiSubmitPromptWithResponse request returning *TuiSubmitPromptResponse
  8978. func (c *ClientWithResponses) TuiSubmitPromptWithResponse(ctx context.Context, params *TuiSubmitPromptParams, reqEditors ...RequestEditorFn) (*TuiSubmitPromptResponse, error) {
  8979. rsp, err := c.TuiSubmitPrompt(ctx, params, reqEditors...)
  8980. if err != nil {
  8981. return nil, err
  8982. }
  8983. return ParseTuiSubmitPromptResponse(rsp)
  8984. }
  8985. // VcsGetWithResponse request returning *VcsGetResponse
  8986. func (c *ClientWithResponses) VcsGetWithResponse(ctx context.Context, params *VcsGetParams, reqEditors ...RequestEditorFn) (*VcsGetResponse, error) {
  8987. rsp, err := c.VcsGet(ctx, params, reqEditors...)
  8988. if err != nil {
  8989. return nil, err
  8990. }
  8991. return ParseVcsGetResponse(rsp)
  8992. }
  8993. // ParseAppAgentsResponse parses an HTTP response from a AppAgentsWithResponse call
  8994. func ParseAppAgentsResponse(rsp *http.Response) (*AppAgentsResponse, error) {
  8995. bodyBytes, err := io.ReadAll(rsp.Body)
  8996. defer func() { _ = rsp.Body.Close() }()
  8997. if err != nil {
  8998. return nil, err
  8999. }
  9000. response := &AppAgentsResponse{
  9001. Body: bodyBytes,
  9002. HTTPResponse: rsp,
  9003. }
  9004. switch {
  9005. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9006. var dest []Agent
  9007. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9008. return nil, err
  9009. }
  9010. response.JSON200 = &dest
  9011. }
  9012. return response, nil
  9013. }
  9014. // ParseAuthSetResponse parses an HTTP response from a AuthSetWithResponse call
  9015. func ParseAuthSetResponse(rsp *http.Response) (*AuthSetResponse, error) {
  9016. bodyBytes, err := io.ReadAll(rsp.Body)
  9017. defer func() { _ = rsp.Body.Close() }()
  9018. if err != nil {
  9019. return nil, err
  9020. }
  9021. response := &AuthSetResponse{
  9022. Body: bodyBytes,
  9023. HTTPResponse: rsp,
  9024. }
  9025. switch {
  9026. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9027. var dest bool
  9028. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9029. return nil, err
  9030. }
  9031. response.JSON200 = &dest
  9032. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9033. var dest BadRequestError
  9034. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9035. return nil, err
  9036. }
  9037. response.JSON400 = &dest
  9038. }
  9039. return response, nil
  9040. }
  9041. // ParseCommandListResponse parses an HTTP response from a CommandListWithResponse call
  9042. func ParseCommandListResponse(rsp *http.Response) (*CommandListResponse, error) {
  9043. bodyBytes, err := io.ReadAll(rsp.Body)
  9044. defer func() { _ = rsp.Body.Close() }()
  9045. if err != nil {
  9046. return nil, err
  9047. }
  9048. response := &CommandListResponse{
  9049. Body: bodyBytes,
  9050. HTTPResponse: rsp,
  9051. }
  9052. switch {
  9053. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9054. var dest []Command
  9055. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9056. return nil, err
  9057. }
  9058. response.JSON200 = &dest
  9059. }
  9060. return response, nil
  9061. }
  9062. // ParseConfigGetResponse parses an HTTP response from a ConfigGetWithResponse call
  9063. func ParseConfigGetResponse(rsp *http.Response) (*ConfigGetResponse, error) {
  9064. bodyBytes, err := io.ReadAll(rsp.Body)
  9065. defer func() { _ = rsp.Body.Close() }()
  9066. if err != nil {
  9067. return nil, err
  9068. }
  9069. response := &ConfigGetResponse{
  9070. Body: bodyBytes,
  9071. HTTPResponse: rsp,
  9072. }
  9073. switch {
  9074. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9075. var dest Config
  9076. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9077. return nil, err
  9078. }
  9079. response.JSON200 = &dest
  9080. }
  9081. return response, nil
  9082. }
  9083. // ParseConfigUpdateResponse parses an HTTP response from a ConfigUpdateWithResponse call
  9084. func ParseConfigUpdateResponse(rsp *http.Response) (*ConfigUpdateResponse, error) {
  9085. bodyBytes, err := io.ReadAll(rsp.Body)
  9086. defer func() { _ = rsp.Body.Close() }()
  9087. if err != nil {
  9088. return nil, err
  9089. }
  9090. response := &ConfigUpdateResponse{
  9091. Body: bodyBytes,
  9092. HTTPResponse: rsp,
  9093. }
  9094. switch {
  9095. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9096. var dest Config
  9097. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9098. return nil, err
  9099. }
  9100. response.JSON200 = &dest
  9101. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9102. var dest BadRequestError
  9103. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9104. return nil, err
  9105. }
  9106. response.JSON400 = &dest
  9107. }
  9108. return response, nil
  9109. }
  9110. // ParseConfigProvidersResponse parses an HTTP response from a ConfigProvidersWithResponse call
  9111. func ParseConfigProvidersResponse(rsp *http.Response) (*ConfigProvidersResponse, error) {
  9112. bodyBytes, err := io.ReadAll(rsp.Body)
  9113. defer func() { _ = rsp.Body.Close() }()
  9114. if err != nil {
  9115. return nil, err
  9116. }
  9117. response := &ConfigProvidersResponse{
  9118. Body: bodyBytes,
  9119. HTTPResponse: rsp,
  9120. }
  9121. switch {
  9122. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9123. var dest struct {
  9124. Default map[string]string `json:"default"`
  9125. Providers []Provider `json:"providers"`
  9126. }
  9127. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9128. return nil, err
  9129. }
  9130. response.JSON200 = &dest
  9131. }
  9132. return response, nil
  9133. }
  9134. // ParseEventSubscribeResponse parses an HTTP response from a EventSubscribeWithResponse call
  9135. func ParseEventSubscribeResponse(rsp *http.Response) (*EventSubscribeResponse, error) {
  9136. bodyBytes, err := io.ReadAll(rsp.Body)
  9137. defer func() { _ = rsp.Body.Close() }()
  9138. if err != nil {
  9139. return nil, err
  9140. }
  9141. response := &EventSubscribeResponse{
  9142. Body: bodyBytes,
  9143. HTTPResponse: rsp,
  9144. }
  9145. return response, nil
  9146. }
  9147. // ParseExperimentalResourceListResponse parses an HTTP response from a ExperimentalResourceListWithResponse call
  9148. func ParseExperimentalResourceListResponse(rsp *http.Response) (*ExperimentalResourceListResponse, error) {
  9149. bodyBytes, err := io.ReadAll(rsp.Body)
  9150. defer func() { _ = rsp.Body.Close() }()
  9151. if err != nil {
  9152. return nil, err
  9153. }
  9154. response := &ExperimentalResourceListResponse{
  9155. Body: bodyBytes,
  9156. HTTPResponse: rsp,
  9157. }
  9158. switch {
  9159. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9160. var dest map[string]McpResource
  9161. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9162. return nil, err
  9163. }
  9164. response.JSON200 = &dest
  9165. }
  9166. return response, nil
  9167. }
  9168. // ParseToolListResponse parses an HTTP response from a ToolListWithResponse call
  9169. func ParseToolListResponse(rsp *http.Response) (*ToolListResponse, error) {
  9170. bodyBytes, err := io.ReadAll(rsp.Body)
  9171. defer func() { _ = rsp.Body.Close() }()
  9172. if err != nil {
  9173. return nil, err
  9174. }
  9175. response := &ToolListResponse{
  9176. Body: bodyBytes,
  9177. HTTPResponse: rsp,
  9178. }
  9179. switch {
  9180. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9181. var dest ToolList
  9182. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9183. return nil, err
  9184. }
  9185. response.JSON200 = &dest
  9186. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9187. var dest BadRequestError
  9188. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9189. return nil, err
  9190. }
  9191. response.JSON400 = &dest
  9192. }
  9193. return response, nil
  9194. }
  9195. // ParseToolIdsResponse parses an HTTP response from a ToolIdsWithResponse call
  9196. func ParseToolIdsResponse(rsp *http.Response) (*ToolIdsResponse, error) {
  9197. bodyBytes, err := io.ReadAll(rsp.Body)
  9198. defer func() { _ = rsp.Body.Close() }()
  9199. if err != nil {
  9200. return nil, err
  9201. }
  9202. response := &ToolIdsResponse{
  9203. Body: bodyBytes,
  9204. HTTPResponse: rsp,
  9205. }
  9206. switch {
  9207. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9208. var dest ToolIDs
  9209. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9210. return nil, err
  9211. }
  9212. response.JSON200 = &dest
  9213. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9214. var dest BadRequestError
  9215. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9216. return nil, err
  9217. }
  9218. response.JSON400 = &dest
  9219. }
  9220. return response, nil
  9221. }
  9222. // ParseWorktreeListResponse parses an HTTP response from a WorktreeListWithResponse call
  9223. func ParseWorktreeListResponse(rsp *http.Response) (*WorktreeListResponse, error) {
  9224. bodyBytes, err := io.ReadAll(rsp.Body)
  9225. defer func() { _ = rsp.Body.Close() }()
  9226. if err != nil {
  9227. return nil, err
  9228. }
  9229. response := &WorktreeListResponse{
  9230. Body: bodyBytes,
  9231. HTTPResponse: rsp,
  9232. }
  9233. switch {
  9234. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9235. var dest []string
  9236. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9237. return nil, err
  9238. }
  9239. response.JSON200 = &dest
  9240. }
  9241. return response, nil
  9242. }
  9243. // ParseWorktreeCreateResponse parses an HTTP response from a WorktreeCreateWithResponse call
  9244. func ParseWorktreeCreateResponse(rsp *http.Response) (*WorktreeCreateResponse, error) {
  9245. bodyBytes, err := io.ReadAll(rsp.Body)
  9246. defer func() { _ = rsp.Body.Close() }()
  9247. if err != nil {
  9248. return nil, err
  9249. }
  9250. response := &WorktreeCreateResponse{
  9251. Body: bodyBytes,
  9252. HTTPResponse: rsp,
  9253. }
  9254. switch {
  9255. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9256. var dest Worktree
  9257. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9258. return nil, err
  9259. }
  9260. response.JSON200 = &dest
  9261. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9262. var dest BadRequestError
  9263. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9264. return nil, err
  9265. }
  9266. response.JSON400 = &dest
  9267. }
  9268. return response, nil
  9269. }
  9270. // ParseFileListResponse parses an HTTP response from a FileListWithResponse call
  9271. func ParseFileListResponse(rsp *http.Response) (*FileListResponse, error) {
  9272. bodyBytes, err := io.ReadAll(rsp.Body)
  9273. defer func() { _ = rsp.Body.Close() }()
  9274. if err != nil {
  9275. return nil, err
  9276. }
  9277. response := &FileListResponse{
  9278. Body: bodyBytes,
  9279. HTTPResponse: rsp,
  9280. }
  9281. switch {
  9282. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9283. var dest []FileNode
  9284. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9285. return nil, err
  9286. }
  9287. response.JSON200 = &dest
  9288. }
  9289. return response, nil
  9290. }
  9291. // ParseFileReadResponse parses an HTTP response from a FileReadWithResponse call
  9292. func ParseFileReadResponse(rsp *http.Response) (*FileReadResponse, error) {
  9293. bodyBytes, err := io.ReadAll(rsp.Body)
  9294. defer func() { _ = rsp.Body.Close() }()
  9295. if err != nil {
  9296. return nil, err
  9297. }
  9298. response := &FileReadResponse{
  9299. Body: bodyBytes,
  9300. HTTPResponse: rsp,
  9301. }
  9302. switch {
  9303. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9304. var dest FileContent
  9305. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9306. return nil, err
  9307. }
  9308. response.JSON200 = &dest
  9309. }
  9310. return response, nil
  9311. }
  9312. // ParseFileStatusResponse parses an HTTP response from a FileStatusWithResponse call
  9313. func ParseFileStatusResponse(rsp *http.Response) (*FileStatusResponse, error) {
  9314. bodyBytes, err := io.ReadAll(rsp.Body)
  9315. defer func() { _ = rsp.Body.Close() }()
  9316. if err != nil {
  9317. return nil, err
  9318. }
  9319. response := &FileStatusResponse{
  9320. Body: bodyBytes,
  9321. HTTPResponse: rsp,
  9322. }
  9323. switch {
  9324. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9325. var dest []File
  9326. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9327. return nil, err
  9328. }
  9329. response.JSON200 = &dest
  9330. }
  9331. return response, nil
  9332. }
  9333. // ParseFindTextResponse parses an HTTP response from a FindTextWithResponse call
  9334. func ParseFindTextResponse(rsp *http.Response) (*FindTextResponse, error) {
  9335. bodyBytes, err := io.ReadAll(rsp.Body)
  9336. defer func() { _ = rsp.Body.Close() }()
  9337. if err != nil {
  9338. return nil, err
  9339. }
  9340. response := &FindTextResponse{
  9341. Body: bodyBytes,
  9342. HTTPResponse: rsp,
  9343. }
  9344. switch {
  9345. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9346. var dest []struct {
  9347. AbsoluteOffset float32 `json:"absolute_offset"`
  9348. LineNumber float32 `json:"line_number"`
  9349. Lines struct {
  9350. Text string `json:"text"`
  9351. } `json:"lines"`
  9352. Path struct {
  9353. Text string `json:"text"`
  9354. } `json:"path"`
  9355. Submatches []struct {
  9356. End float32 `json:"end"`
  9357. Match struct {
  9358. Text string `json:"text"`
  9359. } `json:"match"`
  9360. Start float32 `json:"start"`
  9361. } `json:"submatches"`
  9362. }
  9363. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9364. return nil, err
  9365. }
  9366. response.JSON200 = &dest
  9367. }
  9368. return response, nil
  9369. }
  9370. // ParseFindFilesResponse parses an HTTP response from a FindFilesWithResponse call
  9371. func ParseFindFilesResponse(rsp *http.Response) (*FindFilesResponse, error) {
  9372. bodyBytes, err := io.ReadAll(rsp.Body)
  9373. defer func() { _ = rsp.Body.Close() }()
  9374. if err != nil {
  9375. return nil, err
  9376. }
  9377. response := &FindFilesResponse{
  9378. Body: bodyBytes,
  9379. HTTPResponse: rsp,
  9380. }
  9381. switch {
  9382. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9383. var dest []string
  9384. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9385. return nil, err
  9386. }
  9387. response.JSON200 = &dest
  9388. }
  9389. return response, nil
  9390. }
  9391. // ParseFindSymbolsResponse parses an HTTP response from a FindSymbolsWithResponse call
  9392. func ParseFindSymbolsResponse(rsp *http.Response) (*FindSymbolsResponse, error) {
  9393. bodyBytes, err := io.ReadAll(rsp.Body)
  9394. defer func() { _ = rsp.Body.Close() }()
  9395. if err != nil {
  9396. return nil, err
  9397. }
  9398. response := &FindSymbolsResponse{
  9399. Body: bodyBytes,
  9400. HTTPResponse: rsp,
  9401. }
  9402. switch {
  9403. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9404. var dest []Symbol
  9405. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9406. return nil, err
  9407. }
  9408. response.JSON200 = &dest
  9409. }
  9410. return response, nil
  9411. }
  9412. // ParseFormatterStatusResponse parses an HTTP response from a FormatterStatusWithResponse call
  9413. func ParseFormatterStatusResponse(rsp *http.Response) (*FormatterStatusResponse, error) {
  9414. bodyBytes, err := io.ReadAll(rsp.Body)
  9415. defer func() { _ = rsp.Body.Close() }()
  9416. if err != nil {
  9417. return nil, err
  9418. }
  9419. response := &FormatterStatusResponse{
  9420. Body: bodyBytes,
  9421. HTTPResponse: rsp,
  9422. }
  9423. switch {
  9424. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9425. var dest []FormatterStatus
  9426. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9427. return nil, err
  9428. }
  9429. response.JSON200 = &dest
  9430. }
  9431. return response, nil
  9432. }
  9433. // ParseGlobalDisposeResponse parses an HTTP response from a GlobalDisposeWithResponse call
  9434. func ParseGlobalDisposeResponse(rsp *http.Response) (*GlobalDisposeResponse, error) {
  9435. bodyBytes, err := io.ReadAll(rsp.Body)
  9436. defer func() { _ = rsp.Body.Close() }()
  9437. if err != nil {
  9438. return nil, err
  9439. }
  9440. response := &GlobalDisposeResponse{
  9441. Body: bodyBytes,
  9442. HTTPResponse: rsp,
  9443. }
  9444. switch {
  9445. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9446. var dest bool
  9447. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9448. return nil, err
  9449. }
  9450. response.JSON200 = &dest
  9451. }
  9452. return response, nil
  9453. }
  9454. // ParseGlobalEventResponse parses an HTTP response from a GlobalEventWithResponse call
  9455. func ParseGlobalEventResponse(rsp *http.Response) (*GlobalEventResponse, error) {
  9456. bodyBytes, err := io.ReadAll(rsp.Body)
  9457. defer func() { _ = rsp.Body.Close() }()
  9458. if err != nil {
  9459. return nil, err
  9460. }
  9461. response := &GlobalEventResponse{
  9462. Body: bodyBytes,
  9463. HTTPResponse: rsp,
  9464. }
  9465. return response, nil
  9466. }
  9467. // ParseGlobalHealthResponse parses an HTTP response from a GlobalHealthWithResponse call
  9468. func ParseGlobalHealthResponse(rsp *http.Response) (*GlobalHealthResponse, error) {
  9469. bodyBytes, err := io.ReadAll(rsp.Body)
  9470. defer func() { _ = rsp.Body.Close() }()
  9471. if err != nil {
  9472. return nil, err
  9473. }
  9474. response := &GlobalHealthResponse{
  9475. Body: bodyBytes,
  9476. HTTPResponse: rsp,
  9477. }
  9478. switch {
  9479. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9480. var dest struct {
  9481. Healthy bool `json:"healthy"`
  9482. Version string `json:"version"`
  9483. }
  9484. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9485. return nil, err
  9486. }
  9487. response.JSON200 = &dest
  9488. }
  9489. return response, nil
  9490. }
  9491. // ParseInstanceDisposeResponse parses an HTTP response from a InstanceDisposeWithResponse call
  9492. func ParseInstanceDisposeResponse(rsp *http.Response) (*InstanceDisposeResponse, error) {
  9493. bodyBytes, err := io.ReadAll(rsp.Body)
  9494. defer func() { _ = rsp.Body.Close() }()
  9495. if err != nil {
  9496. return nil, err
  9497. }
  9498. response := &InstanceDisposeResponse{
  9499. Body: bodyBytes,
  9500. HTTPResponse: rsp,
  9501. }
  9502. switch {
  9503. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9504. var dest bool
  9505. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9506. return nil, err
  9507. }
  9508. response.JSON200 = &dest
  9509. }
  9510. return response, nil
  9511. }
  9512. // ParseAppLogResponse parses an HTTP response from a AppLogWithResponse call
  9513. func ParseAppLogResponse(rsp *http.Response) (*AppLogResponse, error) {
  9514. bodyBytes, err := io.ReadAll(rsp.Body)
  9515. defer func() { _ = rsp.Body.Close() }()
  9516. if err != nil {
  9517. return nil, err
  9518. }
  9519. response := &AppLogResponse{
  9520. Body: bodyBytes,
  9521. HTTPResponse: rsp,
  9522. }
  9523. switch {
  9524. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9525. var dest bool
  9526. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9527. return nil, err
  9528. }
  9529. response.JSON200 = &dest
  9530. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9531. var dest BadRequestError
  9532. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9533. return nil, err
  9534. }
  9535. response.JSON400 = &dest
  9536. }
  9537. return response, nil
  9538. }
  9539. // ParseLspStatusResponse parses an HTTP response from a LspStatusWithResponse call
  9540. func ParseLspStatusResponse(rsp *http.Response) (*LspStatusResponse, error) {
  9541. bodyBytes, err := io.ReadAll(rsp.Body)
  9542. defer func() { _ = rsp.Body.Close() }()
  9543. if err != nil {
  9544. return nil, err
  9545. }
  9546. response := &LspStatusResponse{
  9547. Body: bodyBytes,
  9548. HTTPResponse: rsp,
  9549. }
  9550. switch {
  9551. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9552. var dest []LSPStatus
  9553. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9554. return nil, err
  9555. }
  9556. response.JSON200 = &dest
  9557. }
  9558. return response, nil
  9559. }
  9560. // ParseMcpStatusResponse parses an HTTP response from a McpStatusWithResponse call
  9561. func ParseMcpStatusResponse(rsp *http.Response) (*McpStatusResponse, error) {
  9562. bodyBytes, err := io.ReadAll(rsp.Body)
  9563. defer func() { _ = rsp.Body.Close() }()
  9564. if err != nil {
  9565. return nil, err
  9566. }
  9567. response := &McpStatusResponse{
  9568. Body: bodyBytes,
  9569. HTTPResponse: rsp,
  9570. }
  9571. switch {
  9572. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9573. var dest map[string]MCPStatus
  9574. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9575. return nil, err
  9576. }
  9577. response.JSON200 = &dest
  9578. }
  9579. return response, nil
  9580. }
  9581. // ParseMcpAddResponse parses an HTTP response from a McpAddWithResponse call
  9582. func ParseMcpAddResponse(rsp *http.Response) (*McpAddResponse, error) {
  9583. bodyBytes, err := io.ReadAll(rsp.Body)
  9584. defer func() { _ = rsp.Body.Close() }()
  9585. if err != nil {
  9586. return nil, err
  9587. }
  9588. response := &McpAddResponse{
  9589. Body: bodyBytes,
  9590. HTTPResponse: rsp,
  9591. }
  9592. switch {
  9593. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9594. var dest map[string]MCPStatus
  9595. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9596. return nil, err
  9597. }
  9598. response.JSON200 = &dest
  9599. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9600. var dest BadRequestError
  9601. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9602. return nil, err
  9603. }
  9604. response.JSON400 = &dest
  9605. }
  9606. return response, nil
  9607. }
  9608. // ParseMcpAuthRemoveResponse parses an HTTP response from a McpAuthRemoveWithResponse call
  9609. func ParseMcpAuthRemoveResponse(rsp *http.Response) (*McpAuthRemoveResponse, error) {
  9610. bodyBytes, err := io.ReadAll(rsp.Body)
  9611. defer func() { _ = rsp.Body.Close() }()
  9612. if err != nil {
  9613. return nil, err
  9614. }
  9615. response := &McpAuthRemoveResponse{
  9616. Body: bodyBytes,
  9617. HTTPResponse: rsp,
  9618. }
  9619. switch {
  9620. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9621. var dest struct {
  9622. Success bool `json:"success"`
  9623. }
  9624. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9625. return nil, err
  9626. }
  9627. response.JSON200 = &dest
  9628. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9629. var dest NotFoundError
  9630. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9631. return nil, err
  9632. }
  9633. response.JSON404 = &dest
  9634. }
  9635. return response, nil
  9636. }
  9637. // ParseMcpAuthStartResponse parses an HTTP response from a McpAuthStartWithResponse call
  9638. func ParseMcpAuthStartResponse(rsp *http.Response) (*McpAuthStartResponse, error) {
  9639. bodyBytes, err := io.ReadAll(rsp.Body)
  9640. defer func() { _ = rsp.Body.Close() }()
  9641. if err != nil {
  9642. return nil, err
  9643. }
  9644. response := &McpAuthStartResponse{
  9645. Body: bodyBytes,
  9646. HTTPResponse: rsp,
  9647. }
  9648. switch {
  9649. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9650. var dest struct {
  9651. // AuthorizationUrl URL to open in browser for authorization
  9652. AuthorizationUrl string `json:"authorizationUrl"`
  9653. }
  9654. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9655. return nil, err
  9656. }
  9657. response.JSON200 = &dest
  9658. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9659. var dest BadRequestError
  9660. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9661. return nil, err
  9662. }
  9663. response.JSON400 = &dest
  9664. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9665. var dest NotFoundError
  9666. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9667. return nil, err
  9668. }
  9669. response.JSON404 = &dest
  9670. }
  9671. return response, nil
  9672. }
  9673. // ParseMcpAuthAuthenticateResponse parses an HTTP response from a McpAuthAuthenticateWithResponse call
  9674. func ParseMcpAuthAuthenticateResponse(rsp *http.Response) (*McpAuthAuthenticateResponse, error) {
  9675. bodyBytes, err := io.ReadAll(rsp.Body)
  9676. defer func() { _ = rsp.Body.Close() }()
  9677. if err != nil {
  9678. return nil, err
  9679. }
  9680. response := &McpAuthAuthenticateResponse{
  9681. Body: bodyBytes,
  9682. HTTPResponse: rsp,
  9683. }
  9684. switch {
  9685. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9686. var dest MCPStatus
  9687. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9688. return nil, err
  9689. }
  9690. response.JSON200 = &dest
  9691. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9692. var dest BadRequestError
  9693. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9694. return nil, err
  9695. }
  9696. response.JSON400 = &dest
  9697. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9698. var dest NotFoundError
  9699. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9700. return nil, err
  9701. }
  9702. response.JSON404 = &dest
  9703. }
  9704. return response, nil
  9705. }
  9706. // ParseMcpAuthCallbackResponse parses an HTTP response from a McpAuthCallbackWithResponse call
  9707. func ParseMcpAuthCallbackResponse(rsp *http.Response) (*McpAuthCallbackResponse, error) {
  9708. bodyBytes, err := io.ReadAll(rsp.Body)
  9709. defer func() { _ = rsp.Body.Close() }()
  9710. if err != nil {
  9711. return nil, err
  9712. }
  9713. response := &McpAuthCallbackResponse{
  9714. Body: bodyBytes,
  9715. HTTPResponse: rsp,
  9716. }
  9717. switch {
  9718. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9719. var dest MCPStatus
  9720. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9721. return nil, err
  9722. }
  9723. response.JSON200 = &dest
  9724. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9725. var dest BadRequestError
  9726. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9727. return nil, err
  9728. }
  9729. response.JSON400 = &dest
  9730. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9731. var dest NotFoundError
  9732. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9733. return nil, err
  9734. }
  9735. response.JSON404 = &dest
  9736. }
  9737. return response, nil
  9738. }
  9739. // ParseMcpConnectResponse parses an HTTP response from a McpConnectWithResponse call
  9740. func ParseMcpConnectResponse(rsp *http.Response) (*McpConnectResponse, error) {
  9741. bodyBytes, err := io.ReadAll(rsp.Body)
  9742. defer func() { _ = rsp.Body.Close() }()
  9743. if err != nil {
  9744. return nil, err
  9745. }
  9746. response := &McpConnectResponse{
  9747. Body: bodyBytes,
  9748. HTTPResponse: rsp,
  9749. }
  9750. switch {
  9751. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9752. var dest bool
  9753. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9754. return nil, err
  9755. }
  9756. response.JSON200 = &dest
  9757. }
  9758. return response, nil
  9759. }
  9760. // ParseMcpDisconnectResponse parses an HTTP response from a McpDisconnectWithResponse call
  9761. func ParseMcpDisconnectResponse(rsp *http.Response) (*McpDisconnectResponse, error) {
  9762. bodyBytes, err := io.ReadAll(rsp.Body)
  9763. defer func() { _ = rsp.Body.Close() }()
  9764. if err != nil {
  9765. return nil, err
  9766. }
  9767. response := &McpDisconnectResponse{
  9768. Body: bodyBytes,
  9769. HTTPResponse: rsp,
  9770. }
  9771. switch {
  9772. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9773. var dest bool
  9774. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9775. return nil, err
  9776. }
  9777. response.JSON200 = &dest
  9778. }
  9779. return response, nil
  9780. }
  9781. // ParsePathGetResponse parses an HTTP response from a PathGetWithResponse call
  9782. func ParsePathGetResponse(rsp *http.Response) (*PathGetResponse, error) {
  9783. bodyBytes, err := io.ReadAll(rsp.Body)
  9784. defer func() { _ = rsp.Body.Close() }()
  9785. if err != nil {
  9786. return nil, err
  9787. }
  9788. response := &PathGetResponse{
  9789. Body: bodyBytes,
  9790. HTTPResponse: rsp,
  9791. }
  9792. switch {
  9793. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9794. var dest Path
  9795. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9796. return nil, err
  9797. }
  9798. response.JSON200 = &dest
  9799. }
  9800. return response, nil
  9801. }
  9802. // ParsePermissionListResponse parses an HTTP response from a PermissionListWithResponse call
  9803. func ParsePermissionListResponse(rsp *http.Response) (*PermissionListResponse, error) {
  9804. bodyBytes, err := io.ReadAll(rsp.Body)
  9805. defer func() { _ = rsp.Body.Close() }()
  9806. if err != nil {
  9807. return nil, err
  9808. }
  9809. response := &PermissionListResponse{
  9810. Body: bodyBytes,
  9811. HTTPResponse: rsp,
  9812. }
  9813. switch {
  9814. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9815. var dest []PermissionRequest
  9816. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9817. return nil, err
  9818. }
  9819. response.JSON200 = &dest
  9820. }
  9821. return response, nil
  9822. }
  9823. // ParsePermissionReplyResponse parses an HTTP response from a PermissionReplyWithResponse call
  9824. func ParsePermissionReplyResponse(rsp *http.Response) (*PermissionReplyResponse, error) {
  9825. bodyBytes, err := io.ReadAll(rsp.Body)
  9826. defer func() { _ = rsp.Body.Close() }()
  9827. if err != nil {
  9828. return nil, err
  9829. }
  9830. response := &PermissionReplyResponse{
  9831. Body: bodyBytes,
  9832. HTTPResponse: rsp,
  9833. }
  9834. switch {
  9835. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9836. var dest bool
  9837. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9838. return nil, err
  9839. }
  9840. response.JSON200 = &dest
  9841. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9842. var dest BadRequestError
  9843. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9844. return nil, err
  9845. }
  9846. response.JSON400 = &dest
  9847. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9848. var dest NotFoundError
  9849. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9850. return nil, err
  9851. }
  9852. response.JSON404 = &dest
  9853. }
  9854. return response, nil
  9855. }
  9856. // ParseProjectListResponse parses an HTTP response from a ProjectListWithResponse call
  9857. func ParseProjectListResponse(rsp *http.Response) (*ProjectListResponse, error) {
  9858. bodyBytes, err := io.ReadAll(rsp.Body)
  9859. defer func() { _ = rsp.Body.Close() }()
  9860. if err != nil {
  9861. return nil, err
  9862. }
  9863. response := &ProjectListResponse{
  9864. Body: bodyBytes,
  9865. HTTPResponse: rsp,
  9866. }
  9867. switch {
  9868. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9869. var dest []Project
  9870. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9871. return nil, err
  9872. }
  9873. response.JSON200 = &dest
  9874. }
  9875. return response, nil
  9876. }
  9877. // ParseProjectCurrentResponse parses an HTTP response from a ProjectCurrentWithResponse call
  9878. func ParseProjectCurrentResponse(rsp *http.Response) (*ProjectCurrentResponse, error) {
  9879. bodyBytes, err := io.ReadAll(rsp.Body)
  9880. defer func() { _ = rsp.Body.Close() }()
  9881. if err != nil {
  9882. return nil, err
  9883. }
  9884. response := &ProjectCurrentResponse{
  9885. Body: bodyBytes,
  9886. HTTPResponse: rsp,
  9887. }
  9888. switch {
  9889. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9890. var dest Project
  9891. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9892. return nil, err
  9893. }
  9894. response.JSON200 = &dest
  9895. }
  9896. return response, nil
  9897. }
  9898. // ParseProjectUpdateResponse parses an HTTP response from a ProjectUpdateWithResponse call
  9899. func ParseProjectUpdateResponse(rsp *http.Response) (*ProjectUpdateResponse, error) {
  9900. bodyBytes, err := io.ReadAll(rsp.Body)
  9901. defer func() { _ = rsp.Body.Close() }()
  9902. if err != nil {
  9903. return nil, err
  9904. }
  9905. response := &ProjectUpdateResponse{
  9906. Body: bodyBytes,
  9907. HTTPResponse: rsp,
  9908. }
  9909. switch {
  9910. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9911. var dest Project
  9912. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9913. return nil, err
  9914. }
  9915. response.JSON200 = &dest
  9916. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  9917. var dest BadRequestError
  9918. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9919. return nil, err
  9920. }
  9921. response.JSON400 = &dest
  9922. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  9923. var dest NotFoundError
  9924. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9925. return nil, err
  9926. }
  9927. response.JSON404 = &dest
  9928. }
  9929. return response, nil
  9930. }
  9931. // ParseProviderListResponse parses an HTTP response from a ProviderListWithResponse call
  9932. func ParseProviderListResponse(rsp *http.Response) (*ProviderListResponse, error) {
  9933. bodyBytes, err := io.ReadAll(rsp.Body)
  9934. defer func() { _ = rsp.Body.Close() }()
  9935. if err != nil {
  9936. return nil, err
  9937. }
  9938. response := &ProviderListResponse{
  9939. Body: bodyBytes,
  9940. HTTPResponse: rsp,
  9941. }
  9942. switch {
  9943. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  9944. var dest struct {
  9945. All []struct {
  9946. Api *string `json:"api,omitempty"`
  9947. Env []string `json:"env"`
  9948. Id string `json:"id"`
  9949. Models map[string]struct {
  9950. Attachment bool `json:"attachment"`
  9951. Cost *struct {
  9952. CacheRead *float32 `json:"cache_read,omitempty"`
  9953. CacheWrite *float32 `json:"cache_write,omitempty"`
  9954. ContextOver200k *struct {
  9955. CacheRead *float32 `json:"cache_read,omitempty"`
  9956. CacheWrite *float32 `json:"cache_write,omitempty"`
  9957. Input float32 `json:"input"`
  9958. Output float32 `json:"output"`
  9959. } `json:"context_over_200k,omitempty"`
  9960. Input float32 `json:"input"`
  9961. Output float32 `json:"output"`
  9962. } `json:"cost,omitempty"`
  9963. Experimental *bool `json:"experimental,omitempty"`
  9964. Family *string `json:"family,omitempty"`
  9965. Headers *map[string]string `json:"headers,omitempty"`
  9966. Id string `json:"id"`
  9967. Interleaved *ProviderList_200_All_Models_Interleaved `json:"interleaved,omitempty"`
  9968. Limit struct {
  9969. Context float32 `json:"context"`
  9970. Input *float32 `json:"input,omitempty"`
  9971. Output float32 `json:"output"`
  9972. } `json:"limit"`
  9973. Modalities *struct {
  9974. Input []ProviderList200AllModelsModalitiesInput `json:"input"`
  9975. Output []ProviderList200AllModelsModalitiesOutput `json:"output"`
  9976. } `json:"modalities,omitempty"`
  9977. Name string `json:"name"`
  9978. Options map[string]interface{} `json:"options"`
  9979. Provider *struct {
  9980. Npm string `json:"npm"`
  9981. } `json:"provider,omitempty"`
  9982. Reasoning bool `json:"reasoning"`
  9983. ReleaseDate string `json:"release_date"`
  9984. Status *ProviderList200AllModelsStatus `json:"status,omitempty"`
  9985. Temperature bool `json:"temperature"`
  9986. ToolCall bool `json:"tool_call"`
  9987. Variants *map[string]map[string]interface{} `json:"variants,omitempty"`
  9988. } `json:"models"`
  9989. Name string `json:"name"`
  9990. Npm *string `json:"npm,omitempty"`
  9991. } `json:"all"`
  9992. Connected []string `json:"connected"`
  9993. Default map[string]string `json:"default"`
  9994. }
  9995. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  9996. return nil, err
  9997. }
  9998. response.JSON200 = &dest
  9999. }
  10000. return response, nil
  10001. }
  10002. // ParseProviderAuthResponse parses an HTTP response from a ProviderAuthWithResponse call
  10003. func ParseProviderAuthResponse(rsp *http.Response) (*ProviderAuthResponse, error) {
  10004. bodyBytes, err := io.ReadAll(rsp.Body)
  10005. defer func() { _ = rsp.Body.Close() }()
  10006. if err != nil {
  10007. return nil, err
  10008. }
  10009. response := &ProviderAuthResponse{
  10010. Body: bodyBytes,
  10011. HTTPResponse: rsp,
  10012. }
  10013. switch {
  10014. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10015. var dest map[string][]ProviderAuthMethod
  10016. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10017. return nil, err
  10018. }
  10019. response.JSON200 = &dest
  10020. }
  10021. return response, nil
  10022. }
  10023. // ParseProviderOauthAuthorizeResponse parses an HTTP response from a ProviderOauthAuthorizeWithResponse call
  10024. func ParseProviderOauthAuthorizeResponse(rsp *http.Response) (*ProviderOauthAuthorizeResponse, error) {
  10025. bodyBytes, err := io.ReadAll(rsp.Body)
  10026. defer func() { _ = rsp.Body.Close() }()
  10027. if err != nil {
  10028. return nil, err
  10029. }
  10030. response := &ProviderOauthAuthorizeResponse{
  10031. Body: bodyBytes,
  10032. HTTPResponse: rsp,
  10033. }
  10034. switch {
  10035. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10036. var dest ProviderAuthAuthorization
  10037. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10038. return nil, err
  10039. }
  10040. response.JSON200 = &dest
  10041. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10042. var dest BadRequestError
  10043. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10044. return nil, err
  10045. }
  10046. response.JSON400 = &dest
  10047. }
  10048. return response, nil
  10049. }
  10050. // ParseProviderOauthCallbackResponse parses an HTTP response from a ProviderOauthCallbackWithResponse call
  10051. func ParseProviderOauthCallbackResponse(rsp *http.Response) (*ProviderOauthCallbackResponse, error) {
  10052. bodyBytes, err := io.ReadAll(rsp.Body)
  10053. defer func() { _ = rsp.Body.Close() }()
  10054. if err != nil {
  10055. return nil, err
  10056. }
  10057. response := &ProviderOauthCallbackResponse{
  10058. Body: bodyBytes,
  10059. HTTPResponse: rsp,
  10060. }
  10061. switch {
  10062. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10063. var dest bool
  10064. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10065. return nil, err
  10066. }
  10067. response.JSON200 = &dest
  10068. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10069. var dest BadRequestError
  10070. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10071. return nil, err
  10072. }
  10073. response.JSON400 = &dest
  10074. }
  10075. return response, nil
  10076. }
  10077. // ParsePtyListResponse parses an HTTP response from a PtyListWithResponse call
  10078. func ParsePtyListResponse(rsp *http.Response) (*PtyListResponse, error) {
  10079. bodyBytes, err := io.ReadAll(rsp.Body)
  10080. defer func() { _ = rsp.Body.Close() }()
  10081. if err != nil {
  10082. return nil, err
  10083. }
  10084. response := &PtyListResponse{
  10085. Body: bodyBytes,
  10086. HTTPResponse: rsp,
  10087. }
  10088. switch {
  10089. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10090. var dest []Pty
  10091. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10092. return nil, err
  10093. }
  10094. response.JSON200 = &dest
  10095. }
  10096. return response, nil
  10097. }
  10098. // ParsePtyCreateResponse parses an HTTP response from a PtyCreateWithResponse call
  10099. func ParsePtyCreateResponse(rsp *http.Response) (*PtyCreateResponse, error) {
  10100. bodyBytes, err := io.ReadAll(rsp.Body)
  10101. defer func() { _ = rsp.Body.Close() }()
  10102. if err != nil {
  10103. return nil, err
  10104. }
  10105. response := &PtyCreateResponse{
  10106. Body: bodyBytes,
  10107. HTTPResponse: rsp,
  10108. }
  10109. switch {
  10110. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10111. var dest Pty
  10112. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10113. return nil, err
  10114. }
  10115. response.JSON200 = &dest
  10116. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10117. var dest BadRequestError
  10118. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10119. return nil, err
  10120. }
  10121. response.JSON400 = &dest
  10122. }
  10123. return response, nil
  10124. }
  10125. // ParsePtyRemoveResponse parses an HTTP response from a PtyRemoveWithResponse call
  10126. func ParsePtyRemoveResponse(rsp *http.Response) (*PtyRemoveResponse, error) {
  10127. bodyBytes, err := io.ReadAll(rsp.Body)
  10128. defer func() { _ = rsp.Body.Close() }()
  10129. if err != nil {
  10130. return nil, err
  10131. }
  10132. response := &PtyRemoveResponse{
  10133. Body: bodyBytes,
  10134. HTTPResponse: rsp,
  10135. }
  10136. switch {
  10137. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10138. var dest bool
  10139. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10140. return nil, err
  10141. }
  10142. response.JSON200 = &dest
  10143. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10144. var dest NotFoundError
  10145. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10146. return nil, err
  10147. }
  10148. response.JSON404 = &dest
  10149. }
  10150. return response, nil
  10151. }
  10152. // ParsePtyGetResponse parses an HTTP response from a PtyGetWithResponse call
  10153. func ParsePtyGetResponse(rsp *http.Response) (*PtyGetResponse, error) {
  10154. bodyBytes, err := io.ReadAll(rsp.Body)
  10155. defer func() { _ = rsp.Body.Close() }()
  10156. if err != nil {
  10157. return nil, err
  10158. }
  10159. response := &PtyGetResponse{
  10160. Body: bodyBytes,
  10161. HTTPResponse: rsp,
  10162. }
  10163. switch {
  10164. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10165. var dest Pty
  10166. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10167. return nil, err
  10168. }
  10169. response.JSON200 = &dest
  10170. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10171. var dest NotFoundError
  10172. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10173. return nil, err
  10174. }
  10175. response.JSON404 = &dest
  10176. }
  10177. return response, nil
  10178. }
  10179. // ParsePtyUpdateResponse parses an HTTP response from a PtyUpdateWithResponse call
  10180. func ParsePtyUpdateResponse(rsp *http.Response) (*PtyUpdateResponse, error) {
  10181. bodyBytes, err := io.ReadAll(rsp.Body)
  10182. defer func() { _ = rsp.Body.Close() }()
  10183. if err != nil {
  10184. return nil, err
  10185. }
  10186. response := &PtyUpdateResponse{
  10187. Body: bodyBytes,
  10188. HTTPResponse: rsp,
  10189. }
  10190. switch {
  10191. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10192. var dest Pty
  10193. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10194. return nil, err
  10195. }
  10196. response.JSON200 = &dest
  10197. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10198. var dest BadRequestError
  10199. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10200. return nil, err
  10201. }
  10202. response.JSON400 = &dest
  10203. }
  10204. return response, nil
  10205. }
  10206. // ParsePtyConnectResponse parses an HTTP response from a PtyConnectWithResponse call
  10207. func ParsePtyConnectResponse(rsp *http.Response) (*PtyConnectResponse, error) {
  10208. bodyBytes, err := io.ReadAll(rsp.Body)
  10209. defer func() { _ = rsp.Body.Close() }()
  10210. if err != nil {
  10211. return nil, err
  10212. }
  10213. response := &PtyConnectResponse{
  10214. Body: bodyBytes,
  10215. HTTPResponse: rsp,
  10216. }
  10217. switch {
  10218. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10219. var dest bool
  10220. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10221. return nil, err
  10222. }
  10223. response.JSON200 = &dest
  10224. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10225. var dest NotFoundError
  10226. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10227. return nil, err
  10228. }
  10229. response.JSON404 = &dest
  10230. }
  10231. return response, nil
  10232. }
  10233. // ParseQuestionListResponse parses an HTTP response from a QuestionListWithResponse call
  10234. func ParseQuestionListResponse(rsp *http.Response) (*QuestionListResponse, error) {
  10235. bodyBytes, err := io.ReadAll(rsp.Body)
  10236. defer func() { _ = rsp.Body.Close() }()
  10237. if err != nil {
  10238. return nil, err
  10239. }
  10240. response := &QuestionListResponse{
  10241. Body: bodyBytes,
  10242. HTTPResponse: rsp,
  10243. }
  10244. switch {
  10245. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10246. var dest []QuestionRequest
  10247. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10248. return nil, err
  10249. }
  10250. response.JSON200 = &dest
  10251. }
  10252. return response, nil
  10253. }
  10254. // ParseQuestionRejectResponse parses an HTTP response from a QuestionRejectWithResponse call
  10255. func ParseQuestionRejectResponse(rsp *http.Response) (*QuestionRejectResponse, error) {
  10256. bodyBytes, err := io.ReadAll(rsp.Body)
  10257. defer func() { _ = rsp.Body.Close() }()
  10258. if err != nil {
  10259. return nil, err
  10260. }
  10261. response := &QuestionRejectResponse{
  10262. Body: bodyBytes,
  10263. HTTPResponse: rsp,
  10264. }
  10265. switch {
  10266. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10267. var dest bool
  10268. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10269. return nil, err
  10270. }
  10271. response.JSON200 = &dest
  10272. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10273. var dest BadRequestError
  10274. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10275. return nil, err
  10276. }
  10277. response.JSON400 = &dest
  10278. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10279. var dest NotFoundError
  10280. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10281. return nil, err
  10282. }
  10283. response.JSON404 = &dest
  10284. }
  10285. return response, nil
  10286. }
  10287. // ParseQuestionReplyResponse parses an HTTP response from a QuestionReplyWithResponse call
  10288. func ParseQuestionReplyResponse(rsp *http.Response) (*QuestionReplyResponse, error) {
  10289. bodyBytes, err := io.ReadAll(rsp.Body)
  10290. defer func() { _ = rsp.Body.Close() }()
  10291. if err != nil {
  10292. return nil, err
  10293. }
  10294. response := &QuestionReplyResponse{
  10295. Body: bodyBytes,
  10296. HTTPResponse: rsp,
  10297. }
  10298. switch {
  10299. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10300. var dest bool
  10301. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10302. return nil, err
  10303. }
  10304. response.JSON200 = &dest
  10305. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10306. var dest BadRequestError
  10307. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10308. return nil, err
  10309. }
  10310. response.JSON400 = &dest
  10311. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10312. var dest NotFoundError
  10313. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10314. return nil, err
  10315. }
  10316. response.JSON404 = &dest
  10317. }
  10318. return response, nil
  10319. }
  10320. // ParseSessionListResponse parses an HTTP response from a SessionListWithResponse call
  10321. func ParseSessionListResponse(rsp *http.Response) (*SessionListResponse, error) {
  10322. bodyBytes, err := io.ReadAll(rsp.Body)
  10323. defer func() { _ = rsp.Body.Close() }()
  10324. if err != nil {
  10325. return nil, err
  10326. }
  10327. response := &SessionListResponse{
  10328. Body: bodyBytes,
  10329. HTTPResponse: rsp,
  10330. }
  10331. switch {
  10332. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10333. var dest []Session
  10334. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10335. return nil, err
  10336. }
  10337. response.JSON200 = &dest
  10338. }
  10339. return response, nil
  10340. }
  10341. // ParseSessionCreateResponse parses an HTTP response from a SessionCreateWithResponse call
  10342. func ParseSessionCreateResponse(rsp *http.Response) (*SessionCreateResponse, error) {
  10343. bodyBytes, err := io.ReadAll(rsp.Body)
  10344. defer func() { _ = rsp.Body.Close() }()
  10345. if err != nil {
  10346. return nil, err
  10347. }
  10348. response := &SessionCreateResponse{
  10349. Body: bodyBytes,
  10350. HTTPResponse: rsp,
  10351. }
  10352. switch {
  10353. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10354. var dest Session
  10355. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10356. return nil, err
  10357. }
  10358. response.JSON200 = &dest
  10359. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10360. var dest BadRequestError
  10361. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10362. return nil, err
  10363. }
  10364. response.JSON400 = &dest
  10365. }
  10366. return response, nil
  10367. }
  10368. // ParseSessionStatusResponse parses an HTTP response from a SessionStatusWithResponse call
  10369. func ParseSessionStatusResponse(rsp *http.Response) (*SessionStatusResponse, error) {
  10370. bodyBytes, err := io.ReadAll(rsp.Body)
  10371. defer func() { _ = rsp.Body.Close() }()
  10372. if err != nil {
  10373. return nil, err
  10374. }
  10375. response := &SessionStatusResponse{
  10376. Body: bodyBytes,
  10377. HTTPResponse: rsp,
  10378. }
  10379. switch {
  10380. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10381. var dest map[string]SessionStatus
  10382. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10383. return nil, err
  10384. }
  10385. response.JSON200 = &dest
  10386. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10387. var dest BadRequestError
  10388. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10389. return nil, err
  10390. }
  10391. response.JSON400 = &dest
  10392. }
  10393. return response, nil
  10394. }
  10395. // ParseSessionDeleteResponse parses an HTTP response from a SessionDeleteWithResponse call
  10396. func ParseSessionDeleteResponse(rsp *http.Response) (*SessionDeleteResponse, error) {
  10397. bodyBytes, err := io.ReadAll(rsp.Body)
  10398. defer func() { _ = rsp.Body.Close() }()
  10399. if err != nil {
  10400. return nil, err
  10401. }
  10402. response := &SessionDeleteResponse{
  10403. Body: bodyBytes,
  10404. HTTPResponse: rsp,
  10405. }
  10406. switch {
  10407. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10408. var dest bool
  10409. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10410. return nil, err
  10411. }
  10412. response.JSON200 = &dest
  10413. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10414. var dest BadRequestError
  10415. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10416. return nil, err
  10417. }
  10418. response.JSON400 = &dest
  10419. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10420. var dest NotFoundError
  10421. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10422. return nil, err
  10423. }
  10424. response.JSON404 = &dest
  10425. }
  10426. return response, nil
  10427. }
  10428. // ParseSessionGetResponse parses an HTTP response from a SessionGetWithResponse call
  10429. func ParseSessionGetResponse(rsp *http.Response) (*SessionGetResponse, error) {
  10430. bodyBytes, err := io.ReadAll(rsp.Body)
  10431. defer func() { _ = rsp.Body.Close() }()
  10432. if err != nil {
  10433. return nil, err
  10434. }
  10435. response := &SessionGetResponse{
  10436. Body: bodyBytes,
  10437. HTTPResponse: rsp,
  10438. }
  10439. switch {
  10440. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10441. var dest Session
  10442. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10443. return nil, err
  10444. }
  10445. response.JSON200 = &dest
  10446. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10447. var dest BadRequestError
  10448. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10449. return nil, err
  10450. }
  10451. response.JSON400 = &dest
  10452. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10453. var dest NotFoundError
  10454. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10455. return nil, err
  10456. }
  10457. response.JSON404 = &dest
  10458. }
  10459. return response, nil
  10460. }
  10461. // ParseSessionUpdateResponse parses an HTTP response from a SessionUpdateWithResponse call
  10462. func ParseSessionUpdateResponse(rsp *http.Response) (*SessionUpdateResponse, error) {
  10463. bodyBytes, err := io.ReadAll(rsp.Body)
  10464. defer func() { _ = rsp.Body.Close() }()
  10465. if err != nil {
  10466. return nil, err
  10467. }
  10468. response := &SessionUpdateResponse{
  10469. Body: bodyBytes,
  10470. HTTPResponse: rsp,
  10471. }
  10472. switch {
  10473. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10474. var dest Session
  10475. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10476. return nil, err
  10477. }
  10478. response.JSON200 = &dest
  10479. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10480. var dest BadRequestError
  10481. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10482. return nil, err
  10483. }
  10484. response.JSON400 = &dest
  10485. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10486. var dest NotFoundError
  10487. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10488. return nil, err
  10489. }
  10490. response.JSON404 = &dest
  10491. }
  10492. return response, nil
  10493. }
  10494. // ParseSessionAbortResponse parses an HTTP response from a SessionAbortWithResponse call
  10495. func ParseSessionAbortResponse(rsp *http.Response) (*SessionAbortResponse, error) {
  10496. bodyBytes, err := io.ReadAll(rsp.Body)
  10497. defer func() { _ = rsp.Body.Close() }()
  10498. if err != nil {
  10499. return nil, err
  10500. }
  10501. response := &SessionAbortResponse{
  10502. Body: bodyBytes,
  10503. HTTPResponse: rsp,
  10504. }
  10505. switch {
  10506. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10507. var dest bool
  10508. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10509. return nil, err
  10510. }
  10511. response.JSON200 = &dest
  10512. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10513. var dest BadRequestError
  10514. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10515. return nil, err
  10516. }
  10517. response.JSON400 = &dest
  10518. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10519. var dest NotFoundError
  10520. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10521. return nil, err
  10522. }
  10523. response.JSON404 = &dest
  10524. }
  10525. return response, nil
  10526. }
  10527. // ParseSessionChildrenResponse parses an HTTP response from a SessionChildrenWithResponse call
  10528. func ParseSessionChildrenResponse(rsp *http.Response) (*SessionChildrenResponse, error) {
  10529. bodyBytes, err := io.ReadAll(rsp.Body)
  10530. defer func() { _ = rsp.Body.Close() }()
  10531. if err != nil {
  10532. return nil, err
  10533. }
  10534. response := &SessionChildrenResponse{
  10535. Body: bodyBytes,
  10536. HTTPResponse: rsp,
  10537. }
  10538. switch {
  10539. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10540. var dest []Session
  10541. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10542. return nil, err
  10543. }
  10544. response.JSON200 = &dest
  10545. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10546. var dest BadRequestError
  10547. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10548. return nil, err
  10549. }
  10550. response.JSON400 = &dest
  10551. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10552. var dest NotFoundError
  10553. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10554. return nil, err
  10555. }
  10556. response.JSON404 = &dest
  10557. }
  10558. return response, nil
  10559. }
  10560. // ParseSessionCommandResponse parses an HTTP response from a SessionCommandWithResponse call
  10561. func ParseSessionCommandResponse(rsp *http.Response) (*SessionCommandResponse, error) {
  10562. bodyBytes, err := io.ReadAll(rsp.Body)
  10563. defer func() { _ = rsp.Body.Close() }()
  10564. if err != nil {
  10565. return nil, err
  10566. }
  10567. response := &SessionCommandResponse{
  10568. Body: bodyBytes,
  10569. HTTPResponse: rsp,
  10570. }
  10571. switch {
  10572. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10573. var dest struct {
  10574. Info AssistantMessage `json:"info"`
  10575. Parts []Part `json:"parts"`
  10576. }
  10577. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10578. return nil, err
  10579. }
  10580. response.JSON200 = &dest
  10581. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10582. var dest BadRequestError
  10583. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10584. return nil, err
  10585. }
  10586. response.JSON400 = &dest
  10587. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10588. var dest NotFoundError
  10589. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10590. return nil, err
  10591. }
  10592. response.JSON404 = &dest
  10593. }
  10594. return response, nil
  10595. }
  10596. // ParseSessionDiffResponse parses an HTTP response from a SessionDiffWithResponse call
  10597. func ParseSessionDiffResponse(rsp *http.Response) (*SessionDiffResponse, error) {
  10598. bodyBytes, err := io.ReadAll(rsp.Body)
  10599. defer func() { _ = rsp.Body.Close() }()
  10600. if err != nil {
  10601. return nil, err
  10602. }
  10603. response := &SessionDiffResponse{
  10604. Body: bodyBytes,
  10605. HTTPResponse: rsp,
  10606. }
  10607. switch {
  10608. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10609. var dest []FileDiff
  10610. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10611. return nil, err
  10612. }
  10613. response.JSON200 = &dest
  10614. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10615. var dest BadRequestError
  10616. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10617. return nil, err
  10618. }
  10619. response.JSON400 = &dest
  10620. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10621. var dest NotFoundError
  10622. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10623. return nil, err
  10624. }
  10625. response.JSON404 = &dest
  10626. }
  10627. return response, nil
  10628. }
  10629. // ParseSessionForkResponse parses an HTTP response from a SessionForkWithResponse call
  10630. func ParseSessionForkResponse(rsp *http.Response) (*SessionForkResponse, error) {
  10631. bodyBytes, err := io.ReadAll(rsp.Body)
  10632. defer func() { _ = rsp.Body.Close() }()
  10633. if err != nil {
  10634. return nil, err
  10635. }
  10636. response := &SessionForkResponse{
  10637. Body: bodyBytes,
  10638. HTTPResponse: rsp,
  10639. }
  10640. switch {
  10641. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10642. var dest Session
  10643. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10644. return nil, err
  10645. }
  10646. response.JSON200 = &dest
  10647. }
  10648. return response, nil
  10649. }
  10650. // ParseSessionInitResponse parses an HTTP response from a SessionInitWithResponse call
  10651. func ParseSessionInitResponse(rsp *http.Response) (*SessionInitResponse, error) {
  10652. bodyBytes, err := io.ReadAll(rsp.Body)
  10653. defer func() { _ = rsp.Body.Close() }()
  10654. if err != nil {
  10655. return nil, err
  10656. }
  10657. response := &SessionInitResponse{
  10658. Body: bodyBytes,
  10659. HTTPResponse: rsp,
  10660. }
  10661. switch {
  10662. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10663. var dest bool
  10664. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10665. return nil, err
  10666. }
  10667. response.JSON200 = &dest
  10668. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10669. var dest BadRequestError
  10670. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10671. return nil, err
  10672. }
  10673. response.JSON400 = &dest
  10674. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10675. var dest NotFoundError
  10676. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10677. return nil, err
  10678. }
  10679. response.JSON404 = &dest
  10680. }
  10681. return response, nil
  10682. }
  10683. // ParseSessionMessagesResponse parses an HTTP response from a SessionMessagesWithResponse call
  10684. func ParseSessionMessagesResponse(rsp *http.Response) (*SessionMessagesResponse, error) {
  10685. bodyBytes, err := io.ReadAll(rsp.Body)
  10686. defer func() { _ = rsp.Body.Close() }()
  10687. if err != nil {
  10688. return nil, err
  10689. }
  10690. response := &SessionMessagesResponse{
  10691. Body: bodyBytes,
  10692. HTTPResponse: rsp,
  10693. }
  10694. switch {
  10695. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10696. var dest []struct {
  10697. Info Message `json:"info"`
  10698. Parts []Part `json:"parts"`
  10699. }
  10700. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10701. return nil, err
  10702. }
  10703. response.JSON200 = &dest
  10704. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10705. var dest BadRequestError
  10706. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10707. return nil, err
  10708. }
  10709. response.JSON400 = &dest
  10710. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10711. var dest NotFoundError
  10712. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10713. return nil, err
  10714. }
  10715. response.JSON404 = &dest
  10716. }
  10717. return response, nil
  10718. }
  10719. // ParseSessionPromptResponse parses an HTTP response from a SessionPromptWithResponse call
  10720. func ParseSessionPromptResponse(rsp *http.Response) (*SessionPromptResponse, error) {
  10721. bodyBytes, err := io.ReadAll(rsp.Body)
  10722. defer func() { _ = rsp.Body.Close() }()
  10723. if err != nil {
  10724. return nil, err
  10725. }
  10726. response := &SessionPromptResponse{
  10727. Body: bodyBytes,
  10728. HTTPResponse: rsp,
  10729. }
  10730. switch {
  10731. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10732. var dest struct {
  10733. Info AssistantMessage `json:"info"`
  10734. Parts []Part `json:"parts"`
  10735. }
  10736. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10737. return nil, err
  10738. }
  10739. response.JSON200 = &dest
  10740. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10741. var dest BadRequestError
  10742. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10743. return nil, err
  10744. }
  10745. response.JSON400 = &dest
  10746. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10747. var dest NotFoundError
  10748. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10749. return nil, err
  10750. }
  10751. response.JSON404 = &dest
  10752. }
  10753. return response, nil
  10754. }
  10755. // ParseSessionMessageResponse parses an HTTP response from a SessionMessageWithResponse call
  10756. func ParseSessionMessageResponse(rsp *http.Response) (*SessionMessageResponse, error) {
  10757. bodyBytes, err := io.ReadAll(rsp.Body)
  10758. defer func() { _ = rsp.Body.Close() }()
  10759. if err != nil {
  10760. return nil, err
  10761. }
  10762. response := &SessionMessageResponse{
  10763. Body: bodyBytes,
  10764. HTTPResponse: rsp,
  10765. }
  10766. switch {
  10767. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10768. var dest struct {
  10769. Info Message `json:"info"`
  10770. Parts []Part `json:"parts"`
  10771. }
  10772. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10773. return nil, err
  10774. }
  10775. response.JSON200 = &dest
  10776. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10777. var dest BadRequestError
  10778. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10779. return nil, err
  10780. }
  10781. response.JSON400 = &dest
  10782. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10783. var dest NotFoundError
  10784. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10785. return nil, err
  10786. }
  10787. response.JSON404 = &dest
  10788. }
  10789. return response, nil
  10790. }
  10791. // ParsePartDeleteResponse parses an HTTP response from a PartDeleteWithResponse call
  10792. func ParsePartDeleteResponse(rsp *http.Response) (*PartDeleteResponse, error) {
  10793. bodyBytes, err := io.ReadAll(rsp.Body)
  10794. defer func() { _ = rsp.Body.Close() }()
  10795. if err != nil {
  10796. return nil, err
  10797. }
  10798. response := &PartDeleteResponse{
  10799. Body: bodyBytes,
  10800. HTTPResponse: rsp,
  10801. }
  10802. switch {
  10803. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10804. var dest bool
  10805. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10806. return nil, err
  10807. }
  10808. response.JSON200 = &dest
  10809. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10810. var dest BadRequestError
  10811. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10812. return nil, err
  10813. }
  10814. response.JSON400 = &dest
  10815. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10816. var dest NotFoundError
  10817. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10818. return nil, err
  10819. }
  10820. response.JSON404 = &dest
  10821. }
  10822. return response, nil
  10823. }
  10824. // ParsePartUpdateResponse parses an HTTP response from a PartUpdateWithResponse call
  10825. func ParsePartUpdateResponse(rsp *http.Response) (*PartUpdateResponse, error) {
  10826. bodyBytes, err := io.ReadAll(rsp.Body)
  10827. defer func() { _ = rsp.Body.Close() }()
  10828. if err != nil {
  10829. return nil, err
  10830. }
  10831. response := &PartUpdateResponse{
  10832. Body: bodyBytes,
  10833. HTTPResponse: rsp,
  10834. }
  10835. switch {
  10836. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10837. var dest Part
  10838. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10839. return nil, err
  10840. }
  10841. response.JSON200 = &dest
  10842. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10843. var dest BadRequestError
  10844. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10845. return nil, err
  10846. }
  10847. response.JSON400 = &dest
  10848. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10849. var dest NotFoundError
  10850. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10851. return nil, err
  10852. }
  10853. response.JSON404 = &dest
  10854. }
  10855. return response, nil
  10856. }
  10857. // ParsePermissionRespondResponse parses an HTTP response from a PermissionRespondWithResponse call
  10858. func ParsePermissionRespondResponse(rsp *http.Response) (*PermissionRespondResponse, error) {
  10859. bodyBytes, err := io.ReadAll(rsp.Body)
  10860. defer func() { _ = rsp.Body.Close() }()
  10861. if err != nil {
  10862. return nil, err
  10863. }
  10864. response := &PermissionRespondResponse{
  10865. Body: bodyBytes,
  10866. HTTPResponse: rsp,
  10867. }
  10868. switch {
  10869. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10870. var dest bool
  10871. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10872. return nil, err
  10873. }
  10874. response.JSON200 = &dest
  10875. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10876. var dest BadRequestError
  10877. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10878. return nil, err
  10879. }
  10880. response.JSON400 = &dest
  10881. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10882. var dest NotFoundError
  10883. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10884. return nil, err
  10885. }
  10886. response.JSON404 = &dest
  10887. }
  10888. return response, nil
  10889. }
  10890. // ParseSessionPromptAsyncResponse parses an HTTP response from a SessionPromptAsyncWithResponse call
  10891. func ParseSessionPromptAsyncResponse(rsp *http.Response) (*SessionPromptAsyncResponse, error) {
  10892. bodyBytes, err := io.ReadAll(rsp.Body)
  10893. defer func() { _ = rsp.Body.Close() }()
  10894. if err != nil {
  10895. return nil, err
  10896. }
  10897. response := &SessionPromptAsyncResponse{
  10898. Body: bodyBytes,
  10899. HTTPResponse: rsp,
  10900. }
  10901. switch {
  10902. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10903. var dest BadRequestError
  10904. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10905. return nil, err
  10906. }
  10907. response.JSON400 = &dest
  10908. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10909. var dest NotFoundError
  10910. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10911. return nil, err
  10912. }
  10913. response.JSON404 = &dest
  10914. }
  10915. return response, nil
  10916. }
  10917. // ParseSessionRevertResponse parses an HTTP response from a SessionRevertWithResponse call
  10918. func ParseSessionRevertResponse(rsp *http.Response) (*SessionRevertResponse, error) {
  10919. bodyBytes, err := io.ReadAll(rsp.Body)
  10920. defer func() { _ = rsp.Body.Close() }()
  10921. if err != nil {
  10922. return nil, err
  10923. }
  10924. response := &SessionRevertResponse{
  10925. Body: bodyBytes,
  10926. HTTPResponse: rsp,
  10927. }
  10928. switch {
  10929. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10930. var dest Session
  10931. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10932. return nil, err
  10933. }
  10934. response.JSON200 = &dest
  10935. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10936. var dest BadRequestError
  10937. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10938. return nil, err
  10939. }
  10940. response.JSON400 = &dest
  10941. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10942. var dest NotFoundError
  10943. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10944. return nil, err
  10945. }
  10946. response.JSON404 = &dest
  10947. }
  10948. return response, nil
  10949. }
  10950. // ParseSessionUnshareResponse parses an HTTP response from a SessionUnshareWithResponse call
  10951. func ParseSessionUnshareResponse(rsp *http.Response) (*SessionUnshareResponse, error) {
  10952. bodyBytes, err := io.ReadAll(rsp.Body)
  10953. defer func() { _ = rsp.Body.Close() }()
  10954. if err != nil {
  10955. return nil, err
  10956. }
  10957. response := &SessionUnshareResponse{
  10958. Body: bodyBytes,
  10959. HTTPResponse: rsp,
  10960. }
  10961. switch {
  10962. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10963. var dest Session
  10964. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10965. return nil, err
  10966. }
  10967. response.JSON200 = &dest
  10968. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  10969. var dest BadRequestError
  10970. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10971. return nil, err
  10972. }
  10973. response.JSON400 = &dest
  10974. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  10975. var dest NotFoundError
  10976. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10977. return nil, err
  10978. }
  10979. response.JSON404 = &dest
  10980. }
  10981. return response, nil
  10982. }
  10983. // ParseSessionShareResponse parses an HTTP response from a SessionShareWithResponse call
  10984. func ParseSessionShareResponse(rsp *http.Response) (*SessionShareResponse, error) {
  10985. bodyBytes, err := io.ReadAll(rsp.Body)
  10986. defer func() { _ = rsp.Body.Close() }()
  10987. if err != nil {
  10988. return nil, err
  10989. }
  10990. response := &SessionShareResponse{
  10991. Body: bodyBytes,
  10992. HTTPResponse: rsp,
  10993. }
  10994. switch {
  10995. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  10996. var dest Session
  10997. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  10998. return nil, err
  10999. }
  11000. response.JSON200 = &dest
  11001. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11002. var dest BadRequestError
  11003. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11004. return nil, err
  11005. }
  11006. response.JSON400 = &dest
  11007. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11008. var dest NotFoundError
  11009. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11010. return nil, err
  11011. }
  11012. response.JSON404 = &dest
  11013. }
  11014. return response, nil
  11015. }
  11016. // ParseSessionShellResponse parses an HTTP response from a SessionShellWithResponse call
  11017. func ParseSessionShellResponse(rsp *http.Response) (*SessionShellResponse, error) {
  11018. bodyBytes, err := io.ReadAll(rsp.Body)
  11019. defer func() { _ = rsp.Body.Close() }()
  11020. if err != nil {
  11021. return nil, err
  11022. }
  11023. response := &SessionShellResponse{
  11024. Body: bodyBytes,
  11025. HTTPResponse: rsp,
  11026. }
  11027. switch {
  11028. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11029. var dest AssistantMessage
  11030. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11031. return nil, err
  11032. }
  11033. response.JSON200 = &dest
  11034. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11035. var dest BadRequestError
  11036. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11037. return nil, err
  11038. }
  11039. response.JSON400 = &dest
  11040. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11041. var dest NotFoundError
  11042. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11043. return nil, err
  11044. }
  11045. response.JSON404 = &dest
  11046. }
  11047. return response, nil
  11048. }
  11049. // ParseSessionSummarizeResponse parses an HTTP response from a SessionSummarizeWithResponse call
  11050. func ParseSessionSummarizeResponse(rsp *http.Response) (*SessionSummarizeResponse, error) {
  11051. bodyBytes, err := io.ReadAll(rsp.Body)
  11052. defer func() { _ = rsp.Body.Close() }()
  11053. if err != nil {
  11054. return nil, err
  11055. }
  11056. response := &SessionSummarizeResponse{
  11057. Body: bodyBytes,
  11058. HTTPResponse: rsp,
  11059. }
  11060. switch {
  11061. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11062. var dest bool
  11063. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11064. return nil, err
  11065. }
  11066. response.JSON200 = &dest
  11067. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11068. var dest BadRequestError
  11069. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11070. return nil, err
  11071. }
  11072. response.JSON400 = &dest
  11073. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11074. var dest NotFoundError
  11075. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11076. return nil, err
  11077. }
  11078. response.JSON404 = &dest
  11079. }
  11080. return response, nil
  11081. }
  11082. // ParseSessionTodoResponse parses an HTTP response from a SessionTodoWithResponse call
  11083. func ParseSessionTodoResponse(rsp *http.Response) (*SessionTodoResponse, error) {
  11084. bodyBytes, err := io.ReadAll(rsp.Body)
  11085. defer func() { _ = rsp.Body.Close() }()
  11086. if err != nil {
  11087. return nil, err
  11088. }
  11089. response := &SessionTodoResponse{
  11090. Body: bodyBytes,
  11091. HTTPResponse: rsp,
  11092. }
  11093. switch {
  11094. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11095. var dest []Todo
  11096. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11097. return nil, err
  11098. }
  11099. response.JSON200 = &dest
  11100. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11101. var dest BadRequestError
  11102. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11103. return nil, err
  11104. }
  11105. response.JSON400 = &dest
  11106. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11107. var dest NotFoundError
  11108. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11109. return nil, err
  11110. }
  11111. response.JSON404 = &dest
  11112. }
  11113. return response, nil
  11114. }
  11115. // ParseSessionUnrevertResponse parses an HTTP response from a SessionUnrevertWithResponse call
  11116. func ParseSessionUnrevertResponse(rsp *http.Response) (*SessionUnrevertResponse, error) {
  11117. bodyBytes, err := io.ReadAll(rsp.Body)
  11118. defer func() { _ = rsp.Body.Close() }()
  11119. if err != nil {
  11120. return nil, err
  11121. }
  11122. response := &SessionUnrevertResponse{
  11123. Body: bodyBytes,
  11124. HTTPResponse: rsp,
  11125. }
  11126. switch {
  11127. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11128. var dest Session
  11129. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11130. return nil, err
  11131. }
  11132. response.JSON200 = &dest
  11133. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11134. var dest BadRequestError
  11135. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11136. return nil, err
  11137. }
  11138. response.JSON400 = &dest
  11139. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11140. var dest NotFoundError
  11141. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11142. return nil, err
  11143. }
  11144. response.JSON404 = &dest
  11145. }
  11146. return response, nil
  11147. }
  11148. // ParseTuiAppendPromptResponse parses an HTTP response from a TuiAppendPromptWithResponse call
  11149. func ParseTuiAppendPromptResponse(rsp *http.Response) (*TuiAppendPromptResponse, error) {
  11150. bodyBytes, err := io.ReadAll(rsp.Body)
  11151. defer func() { _ = rsp.Body.Close() }()
  11152. if err != nil {
  11153. return nil, err
  11154. }
  11155. response := &TuiAppendPromptResponse{
  11156. Body: bodyBytes,
  11157. HTTPResponse: rsp,
  11158. }
  11159. switch {
  11160. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11161. var dest bool
  11162. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11163. return nil, err
  11164. }
  11165. response.JSON200 = &dest
  11166. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11167. var dest BadRequestError
  11168. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11169. return nil, err
  11170. }
  11171. response.JSON400 = &dest
  11172. }
  11173. return response, nil
  11174. }
  11175. // ParseTuiClearPromptResponse parses an HTTP response from a TuiClearPromptWithResponse call
  11176. func ParseTuiClearPromptResponse(rsp *http.Response) (*TuiClearPromptResponse, error) {
  11177. bodyBytes, err := io.ReadAll(rsp.Body)
  11178. defer func() { _ = rsp.Body.Close() }()
  11179. if err != nil {
  11180. return nil, err
  11181. }
  11182. response := &TuiClearPromptResponse{
  11183. Body: bodyBytes,
  11184. HTTPResponse: rsp,
  11185. }
  11186. switch {
  11187. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11188. var dest bool
  11189. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11190. return nil, err
  11191. }
  11192. response.JSON200 = &dest
  11193. }
  11194. return response, nil
  11195. }
  11196. // ParseTuiControlNextResponse parses an HTTP response from a TuiControlNextWithResponse call
  11197. func ParseTuiControlNextResponse(rsp *http.Response) (*TuiControlNextResponse, error) {
  11198. bodyBytes, err := io.ReadAll(rsp.Body)
  11199. defer func() { _ = rsp.Body.Close() }()
  11200. if err != nil {
  11201. return nil, err
  11202. }
  11203. response := &TuiControlNextResponse{
  11204. Body: bodyBytes,
  11205. HTTPResponse: rsp,
  11206. }
  11207. switch {
  11208. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11209. var dest struct {
  11210. Body interface{} `json:"body"`
  11211. Path string `json:"path"`
  11212. }
  11213. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11214. return nil, err
  11215. }
  11216. response.JSON200 = &dest
  11217. }
  11218. return response, nil
  11219. }
  11220. // ParseTuiControlResponseResponse parses an HTTP response from a TuiControlResponseWithResponse call
  11221. func ParseTuiControlResponseResponse(rsp *http.Response) (*TuiControlResponseResponse, error) {
  11222. bodyBytes, err := io.ReadAll(rsp.Body)
  11223. defer func() { _ = rsp.Body.Close() }()
  11224. if err != nil {
  11225. return nil, err
  11226. }
  11227. response := &TuiControlResponseResponse{
  11228. Body: bodyBytes,
  11229. HTTPResponse: rsp,
  11230. }
  11231. switch {
  11232. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11233. var dest bool
  11234. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11235. return nil, err
  11236. }
  11237. response.JSON200 = &dest
  11238. }
  11239. return response, nil
  11240. }
  11241. // ParseTuiExecuteCommandResponse parses an HTTP response from a TuiExecuteCommandWithResponse call
  11242. func ParseTuiExecuteCommandResponse(rsp *http.Response) (*TuiExecuteCommandResponse, error) {
  11243. bodyBytes, err := io.ReadAll(rsp.Body)
  11244. defer func() { _ = rsp.Body.Close() }()
  11245. if err != nil {
  11246. return nil, err
  11247. }
  11248. response := &TuiExecuteCommandResponse{
  11249. Body: bodyBytes,
  11250. HTTPResponse: rsp,
  11251. }
  11252. switch {
  11253. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11254. var dest bool
  11255. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11256. return nil, err
  11257. }
  11258. response.JSON200 = &dest
  11259. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11260. var dest BadRequestError
  11261. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11262. return nil, err
  11263. }
  11264. response.JSON400 = &dest
  11265. }
  11266. return response, nil
  11267. }
  11268. // ParseTuiOpenHelpResponse parses an HTTP response from a TuiOpenHelpWithResponse call
  11269. func ParseTuiOpenHelpResponse(rsp *http.Response) (*TuiOpenHelpResponse, error) {
  11270. bodyBytes, err := io.ReadAll(rsp.Body)
  11271. defer func() { _ = rsp.Body.Close() }()
  11272. if err != nil {
  11273. return nil, err
  11274. }
  11275. response := &TuiOpenHelpResponse{
  11276. Body: bodyBytes,
  11277. HTTPResponse: rsp,
  11278. }
  11279. switch {
  11280. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11281. var dest bool
  11282. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11283. return nil, err
  11284. }
  11285. response.JSON200 = &dest
  11286. }
  11287. return response, nil
  11288. }
  11289. // ParseTuiOpenModelsResponse parses an HTTP response from a TuiOpenModelsWithResponse call
  11290. func ParseTuiOpenModelsResponse(rsp *http.Response) (*TuiOpenModelsResponse, error) {
  11291. bodyBytes, err := io.ReadAll(rsp.Body)
  11292. defer func() { _ = rsp.Body.Close() }()
  11293. if err != nil {
  11294. return nil, err
  11295. }
  11296. response := &TuiOpenModelsResponse{
  11297. Body: bodyBytes,
  11298. HTTPResponse: rsp,
  11299. }
  11300. switch {
  11301. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11302. var dest bool
  11303. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11304. return nil, err
  11305. }
  11306. response.JSON200 = &dest
  11307. }
  11308. return response, nil
  11309. }
  11310. // ParseTuiOpenSessionsResponse parses an HTTP response from a TuiOpenSessionsWithResponse call
  11311. func ParseTuiOpenSessionsResponse(rsp *http.Response) (*TuiOpenSessionsResponse, error) {
  11312. bodyBytes, err := io.ReadAll(rsp.Body)
  11313. defer func() { _ = rsp.Body.Close() }()
  11314. if err != nil {
  11315. return nil, err
  11316. }
  11317. response := &TuiOpenSessionsResponse{
  11318. Body: bodyBytes,
  11319. HTTPResponse: rsp,
  11320. }
  11321. switch {
  11322. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11323. var dest bool
  11324. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11325. return nil, err
  11326. }
  11327. response.JSON200 = &dest
  11328. }
  11329. return response, nil
  11330. }
  11331. // ParseTuiOpenThemesResponse parses an HTTP response from a TuiOpenThemesWithResponse call
  11332. func ParseTuiOpenThemesResponse(rsp *http.Response) (*TuiOpenThemesResponse, error) {
  11333. bodyBytes, err := io.ReadAll(rsp.Body)
  11334. defer func() { _ = rsp.Body.Close() }()
  11335. if err != nil {
  11336. return nil, err
  11337. }
  11338. response := &TuiOpenThemesResponse{
  11339. Body: bodyBytes,
  11340. HTTPResponse: rsp,
  11341. }
  11342. switch {
  11343. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11344. var dest bool
  11345. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11346. return nil, err
  11347. }
  11348. response.JSON200 = &dest
  11349. }
  11350. return response, nil
  11351. }
  11352. // ParseTuiPublishResponse parses an HTTP response from a TuiPublishWithResponse call
  11353. func ParseTuiPublishResponse(rsp *http.Response) (*TuiPublishResponse, error) {
  11354. bodyBytes, err := io.ReadAll(rsp.Body)
  11355. defer func() { _ = rsp.Body.Close() }()
  11356. if err != nil {
  11357. return nil, err
  11358. }
  11359. response := &TuiPublishResponse{
  11360. Body: bodyBytes,
  11361. HTTPResponse: rsp,
  11362. }
  11363. switch {
  11364. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11365. var dest bool
  11366. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11367. return nil, err
  11368. }
  11369. response.JSON200 = &dest
  11370. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11371. var dest BadRequestError
  11372. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11373. return nil, err
  11374. }
  11375. response.JSON400 = &dest
  11376. }
  11377. return response, nil
  11378. }
  11379. // ParseTuiSelectSessionResponse parses an HTTP response from a TuiSelectSessionWithResponse call
  11380. func ParseTuiSelectSessionResponse(rsp *http.Response) (*TuiSelectSessionResponse, error) {
  11381. bodyBytes, err := io.ReadAll(rsp.Body)
  11382. defer func() { _ = rsp.Body.Close() }()
  11383. if err != nil {
  11384. return nil, err
  11385. }
  11386. response := &TuiSelectSessionResponse{
  11387. Body: bodyBytes,
  11388. HTTPResponse: rsp,
  11389. }
  11390. switch {
  11391. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11392. var dest bool
  11393. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11394. return nil, err
  11395. }
  11396. response.JSON200 = &dest
  11397. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
  11398. var dest BadRequestError
  11399. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11400. return nil, err
  11401. }
  11402. response.JSON400 = &dest
  11403. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
  11404. var dest NotFoundError
  11405. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11406. return nil, err
  11407. }
  11408. response.JSON404 = &dest
  11409. }
  11410. return response, nil
  11411. }
  11412. // ParseTuiShowToastResponse parses an HTTP response from a TuiShowToastWithResponse call
  11413. func ParseTuiShowToastResponse(rsp *http.Response) (*TuiShowToastResponse, error) {
  11414. bodyBytes, err := io.ReadAll(rsp.Body)
  11415. defer func() { _ = rsp.Body.Close() }()
  11416. if err != nil {
  11417. return nil, err
  11418. }
  11419. response := &TuiShowToastResponse{
  11420. Body: bodyBytes,
  11421. HTTPResponse: rsp,
  11422. }
  11423. switch {
  11424. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11425. var dest bool
  11426. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11427. return nil, err
  11428. }
  11429. response.JSON200 = &dest
  11430. }
  11431. return response, nil
  11432. }
  11433. // ParseTuiSubmitPromptResponse parses an HTTP response from a TuiSubmitPromptWithResponse call
  11434. func ParseTuiSubmitPromptResponse(rsp *http.Response) (*TuiSubmitPromptResponse, error) {
  11435. bodyBytes, err := io.ReadAll(rsp.Body)
  11436. defer func() { _ = rsp.Body.Close() }()
  11437. if err != nil {
  11438. return nil, err
  11439. }
  11440. response := &TuiSubmitPromptResponse{
  11441. Body: bodyBytes,
  11442. HTTPResponse: rsp,
  11443. }
  11444. switch {
  11445. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11446. var dest bool
  11447. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11448. return nil, err
  11449. }
  11450. response.JSON200 = &dest
  11451. }
  11452. return response, nil
  11453. }
  11454. // ParseVcsGetResponse parses an HTTP response from a VcsGetWithResponse call
  11455. func ParseVcsGetResponse(rsp *http.Response) (*VcsGetResponse, error) {
  11456. bodyBytes, err := io.ReadAll(rsp.Body)
  11457. defer func() { _ = rsp.Body.Close() }()
  11458. if err != nil {
  11459. return nil, err
  11460. }
  11461. response := &VcsGetResponse{
  11462. Body: bodyBytes,
  11463. HTTPResponse: rsp,
  11464. }
  11465. switch {
  11466. case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
  11467. var dest VcsInfo
  11468. if err := json.Unmarshal(bodyBytes, &dest); err != nil {
  11469. return nil, err
  11470. }
  11471. response.JSON200 = &dest
  11472. }
  11473. return response, nil
  11474. }