genomics-gen.go 307 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457
  1. // Package genomics provides access to the Genomics API.
  2. //
  3. // Usage example:
  4. //
  5. // import "google.golang.org/api/genomics/v1"
  6. // ...
  7. // genomicsService, err := genomics.New(oauthHttpClient)
  8. package genomics // import "google.golang.org/api/genomics/v1"
  9. import (
  10. "bytes"
  11. "encoding/json"
  12. "errors"
  13. "fmt"
  14. context "golang.org/x/net/context"
  15. ctxhttp "golang.org/x/net/context/ctxhttp"
  16. gensupport "google.golang.org/api/gensupport"
  17. googleapi "google.golang.org/api/googleapi"
  18. "io"
  19. "net/http"
  20. "net/url"
  21. "strconv"
  22. "strings"
  23. )
  24. // Always reference these packages, just in case the auto-generated code
  25. // below doesn't.
  26. var _ = bytes.NewBuffer
  27. var _ = strconv.Itoa
  28. var _ = fmt.Sprintf
  29. var _ = json.NewDecoder
  30. var _ = io.Copy
  31. var _ = url.Parse
  32. var _ = gensupport.MarshalJSON
  33. var _ = googleapi.Version
  34. var _ = errors.New
  35. var _ = strings.Replace
  36. var _ = context.Canceled
  37. var _ = ctxhttp.Do
  38. const apiId = "genomics:v1"
  39. const apiName = "genomics"
  40. const apiVersion = "v1"
  41. const basePath = "https://genomics.googleapis.com/"
  42. // OAuth2 scopes used by this API.
  43. const (
  44. // View and manage your data in Google BigQuery
  45. BigqueryScope = "https://www.googleapis.com/auth/bigquery"
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // Manage your data in Google Cloud Storage
  49. DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
  50. // View and manage Genomics data
  51. GenomicsScope = "https://www.googleapis.com/auth/genomics"
  52. // View Genomics data
  53. GenomicsReadonlyScope = "https://www.googleapis.com/auth/genomics.readonly"
  54. )
  55. func New(client *http.Client) (*Service, error) {
  56. if client == nil {
  57. return nil, errors.New("client is nil")
  58. }
  59. s := &Service{client: client, BasePath: basePath}
  60. s.Callsets = NewCallsetsService(s)
  61. s.Datasets = NewDatasetsService(s)
  62. s.Operations = NewOperationsService(s)
  63. s.Readgroupsets = NewReadgroupsetsService(s)
  64. s.Reads = NewReadsService(s)
  65. s.References = NewReferencesService(s)
  66. s.Referencesets = NewReferencesetsService(s)
  67. s.Variants = NewVariantsService(s)
  68. s.Variantsets = NewVariantsetsService(s)
  69. return s, nil
  70. }
  71. type Service struct {
  72. client *http.Client
  73. BasePath string // API endpoint base URL
  74. UserAgent string // optional additional User-Agent fragment
  75. Callsets *CallsetsService
  76. Datasets *DatasetsService
  77. Operations *OperationsService
  78. Readgroupsets *ReadgroupsetsService
  79. Reads *ReadsService
  80. References *ReferencesService
  81. Referencesets *ReferencesetsService
  82. Variants *VariantsService
  83. Variantsets *VariantsetsService
  84. }
  85. func (s *Service) userAgent() string {
  86. if s.UserAgent == "" {
  87. return googleapi.UserAgent
  88. }
  89. return googleapi.UserAgent + " " + s.UserAgent
  90. }
  91. func NewCallsetsService(s *Service) *CallsetsService {
  92. rs := &CallsetsService{s: s}
  93. return rs
  94. }
  95. type CallsetsService struct {
  96. s *Service
  97. }
  98. func NewDatasetsService(s *Service) *DatasetsService {
  99. rs := &DatasetsService{s: s}
  100. return rs
  101. }
  102. type DatasetsService struct {
  103. s *Service
  104. }
  105. func NewOperationsService(s *Service) *OperationsService {
  106. rs := &OperationsService{s: s}
  107. return rs
  108. }
  109. type OperationsService struct {
  110. s *Service
  111. }
  112. func NewReadgroupsetsService(s *Service) *ReadgroupsetsService {
  113. rs := &ReadgroupsetsService{s: s}
  114. rs.Coveragebuckets = NewReadgroupsetsCoveragebucketsService(s)
  115. return rs
  116. }
  117. type ReadgroupsetsService struct {
  118. s *Service
  119. Coveragebuckets *ReadgroupsetsCoveragebucketsService
  120. }
  121. func NewReadgroupsetsCoveragebucketsService(s *Service) *ReadgroupsetsCoveragebucketsService {
  122. rs := &ReadgroupsetsCoveragebucketsService{s: s}
  123. return rs
  124. }
  125. type ReadgroupsetsCoveragebucketsService struct {
  126. s *Service
  127. }
  128. func NewReadsService(s *Service) *ReadsService {
  129. rs := &ReadsService{s: s}
  130. return rs
  131. }
  132. type ReadsService struct {
  133. s *Service
  134. }
  135. func NewReferencesService(s *Service) *ReferencesService {
  136. rs := &ReferencesService{s: s}
  137. rs.Bases = NewReferencesBasesService(s)
  138. return rs
  139. }
  140. type ReferencesService struct {
  141. s *Service
  142. Bases *ReferencesBasesService
  143. }
  144. func NewReferencesBasesService(s *Service) *ReferencesBasesService {
  145. rs := &ReferencesBasesService{s: s}
  146. return rs
  147. }
  148. type ReferencesBasesService struct {
  149. s *Service
  150. }
  151. func NewReferencesetsService(s *Service) *ReferencesetsService {
  152. rs := &ReferencesetsService{s: s}
  153. return rs
  154. }
  155. type ReferencesetsService struct {
  156. s *Service
  157. }
  158. func NewVariantsService(s *Service) *VariantsService {
  159. rs := &VariantsService{s: s}
  160. return rs
  161. }
  162. type VariantsService struct {
  163. s *Service
  164. }
  165. func NewVariantsetsService(s *Service) *VariantsetsService {
  166. rs := &VariantsetsService{s: s}
  167. return rs
  168. }
  169. type VariantsetsService struct {
  170. s *Service
  171. }
  172. // Binding: Associates `members` with a `role`.
  173. type Binding struct {
  174. // Members: Specifies the identities requesting access for a Cloud
  175. // Platform resource. `members` can have the following values: *
  176. // `allUsers`: A special identifier that represents anyone who is on the
  177. // internet; with or without a Google account. *
  178. // `allAuthenticatedUsers`: A special identifier that represents anyone
  179. // who is authenticated with a Google account or a service account. *
  180. // `user:{emailid}`: An email address that represents a specific Google
  181. // account. For example, `alice@gmail.com` or `joe@example.com`. *
  182. // `serviceAccount:{emailid}`: An email address that represents a
  183. // service account. For example,
  184. // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
  185. // email address that represents a Google group. For example,
  186. // `admins@example.com`. * `domain:{domain}`: A Google Apps domain name
  187. // that represents all the users of that domain. For example,
  188. // `google.com` or `example.com`.
  189. Members []string `json:"members,omitempty"`
  190. // Role: Role that is assigned to `members`. For example,
  191. // `roles/viewer`, `roles/editor`, or `roles/owner`. Required
  192. Role string `json:"role,omitempty"`
  193. // ForceSendFields is a list of field names (e.g. "Members") to
  194. // unconditionally include in API requests. By default, fields with
  195. // empty values are omitted from API requests. However, any non-pointer,
  196. // non-interface field appearing in ForceSendFields will be sent to the
  197. // server regardless of whether the field is empty or not. This may be
  198. // used to include empty fields in Patch requests.
  199. ForceSendFields []string `json:"-"`
  200. }
  201. func (s *Binding) MarshalJSON() ([]byte, error) {
  202. type noMethod Binding
  203. raw := noMethod(*s)
  204. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  205. }
  206. // CallSet: A call set is a collection of variant calls, typically for
  207. // one sample. It belongs to a variant set. For more genomics resource
  208. // definitions, see [Fundamentals of Google
  209. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  210. // omics)
  211. type CallSet struct {
  212. // Created: The date this call set was created in milliseconds from the
  213. // epoch.
  214. Created int64 `json:"created,omitempty,string"`
  215. // Id: The server-generated call set ID, unique across all call sets.
  216. Id string `json:"id,omitempty"`
  217. // Info: A map of additional call set information. This must be of the
  218. // form map (string key mapping to a list of string values).
  219. Info *CallSetInfo `json:"info,omitempty"`
  220. // Name: The call set name.
  221. Name string `json:"name,omitempty"`
  222. // SampleId: The sample ID this call set corresponds to.
  223. SampleId string `json:"sampleId,omitempty"`
  224. // VariantSetIds: The IDs of the variant sets this call set belongs to.
  225. // This field must have exactly length one, as a call set belongs to a
  226. // single variant set. This field is repeated for compatibility with the
  227. // [GA4GH 0.5.1
  228. // API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/a
  229. // vro/variants.avdl#L76).
  230. VariantSetIds []string `json:"variantSetIds,omitempty"`
  231. // ServerResponse contains the HTTP response code and headers from the
  232. // server.
  233. googleapi.ServerResponse `json:"-"`
  234. // ForceSendFields is a list of field names (e.g. "Created") to
  235. // unconditionally include in API requests. By default, fields with
  236. // empty values are omitted from API requests. However, any non-pointer,
  237. // non-interface field appearing in ForceSendFields will be sent to the
  238. // server regardless of whether the field is empty or not. This may be
  239. // used to include empty fields in Patch requests.
  240. ForceSendFields []string `json:"-"`
  241. }
  242. func (s *CallSet) MarshalJSON() ([]byte, error) {
  243. type noMethod CallSet
  244. raw := noMethod(*s)
  245. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  246. }
  247. // CallSetInfo: A map of additional call set information. This must be
  248. // of the form map (string key mapping to a list of string values).
  249. type CallSetInfo struct {
  250. }
  251. // CancelOperationRequest: The request message for
  252. // Operations.CancelOperation.
  253. type CancelOperationRequest struct {
  254. }
  255. // CigarUnit: A single CIGAR operation.
  256. type CigarUnit struct {
  257. // Possible values:
  258. // "OPERATION_UNSPECIFIED"
  259. // "ALIGNMENT_MATCH"
  260. // "INSERT"
  261. // "DELETE"
  262. // "SKIP"
  263. // "CLIP_SOFT"
  264. // "CLIP_HARD"
  265. // "PAD"
  266. // "SEQUENCE_MATCH"
  267. // "SEQUENCE_MISMATCH"
  268. Operation string `json:"operation,omitempty"`
  269. // OperationLength: The number of genomic bases that the operation runs
  270. // for. Required.
  271. OperationLength int64 `json:"operationLength,omitempty,string"`
  272. // ReferenceSequence: `referenceSequence` is only used at mismatches
  273. // (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field
  274. // replaces SAM's MD tag. If the relevant information is not available,
  275. // this field is unset.
  276. ReferenceSequence string `json:"referenceSequence,omitempty"`
  277. // ForceSendFields is a list of field names (e.g. "Operation") to
  278. // unconditionally include in API requests. By default, fields with
  279. // empty values are omitted from API requests. However, any non-pointer,
  280. // non-interface field appearing in ForceSendFields will be sent to the
  281. // server regardless of whether the field is empty or not. This may be
  282. // used to include empty fields in Patch requests.
  283. ForceSendFields []string `json:"-"`
  284. }
  285. func (s *CigarUnit) MarshalJSON() ([]byte, error) {
  286. type noMethod CigarUnit
  287. raw := noMethod(*s)
  288. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  289. }
  290. // CloudAuditOptions: Write a Cloud Audit log
  291. type CloudAuditOptions struct {
  292. }
  293. // Condition: A condition to be met.
  294. type Condition struct {
  295. // Iam: Trusted attributes supplied by the IAM system.
  296. //
  297. // Possible values:
  298. // "NO_ATTR"
  299. // "AUTHORITY"
  300. // "ATTRIBUTION"
  301. Iam string `json:"iam,omitempty"`
  302. // Op: An operator to apply the subject with.
  303. //
  304. // Possible values:
  305. // "NO_OP"
  306. // "EQUALS"
  307. // "NOT_EQUALS"
  308. // "IN"
  309. // "NOT_IN"
  310. // "DISCHARGED"
  311. Op string `json:"op,omitempty"`
  312. // Svc: Trusted attributes discharged by the service.
  313. Svc string `json:"svc,omitempty"`
  314. // Sys: Trusted attributes supplied by any service that owns resources
  315. // and uses the IAM system for access control.
  316. //
  317. // Possible values:
  318. // "NO_ATTR"
  319. // "REGION"
  320. // "SERVICE"
  321. // "NAME"
  322. // "IP"
  323. Sys string `json:"sys,omitempty"`
  324. // Value: The object of the condition. Exactly one of these must be set.
  325. Value string `json:"value,omitempty"`
  326. // Values: The objects of the condition. This is mutually exclusive with
  327. // 'value'.
  328. Values []string `json:"values,omitempty"`
  329. // ForceSendFields is a list of field names (e.g. "Iam") to
  330. // unconditionally include in API requests. By default, fields with
  331. // empty values are omitted from API requests. However, any non-pointer,
  332. // non-interface field appearing in ForceSendFields will be sent to the
  333. // server regardless of whether the field is empty or not. This may be
  334. // used to include empty fields in Patch requests.
  335. ForceSendFields []string `json:"-"`
  336. }
  337. func (s *Condition) MarshalJSON() ([]byte, error) {
  338. type noMethod Condition
  339. raw := noMethod(*s)
  340. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  341. }
  342. // CounterOptions: Options for counters
  343. type CounterOptions struct {
  344. // Field: The field value to attribute.
  345. Field string `json:"field,omitempty"`
  346. // Metric: The metric to update.
  347. Metric string `json:"metric,omitempty"`
  348. // ForceSendFields is a list of field names (e.g. "Field") to
  349. // unconditionally include in API requests. By default, fields with
  350. // empty values are omitted from API requests. However, any non-pointer,
  351. // non-interface field appearing in ForceSendFields will be sent to the
  352. // server regardless of whether the field is empty or not. This may be
  353. // used to include empty fields in Patch requests.
  354. ForceSendFields []string `json:"-"`
  355. }
  356. func (s *CounterOptions) MarshalJSON() ([]byte, error) {
  357. type noMethod CounterOptions
  358. raw := noMethod(*s)
  359. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  360. }
  361. // CoverageBucket: A bucket over which read coverage has been
  362. // precomputed. A bucket corresponds to a specific range of the
  363. // reference sequence.
  364. type CoverageBucket struct {
  365. // MeanCoverage: The average number of reads which are aligned to each
  366. // individual reference base in this bucket.
  367. MeanCoverage float64 `json:"meanCoverage,omitempty"`
  368. // Range: The genomic coordinate range spanned by this bucket.
  369. Range *Range `json:"range,omitempty"`
  370. // ForceSendFields is a list of field names (e.g. "MeanCoverage") to
  371. // unconditionally include in API requests. By default, fields with
  372. // empty values are omitted from API requests. However, any non-pointer,
  373. // non-interface field appearing in ForceSendFields will be sent to the
  374. // server regardless of whether the field is empty or not. This may be
  375. // used to include empty fields in Patch requests.
  376. ForceSendFields []string `json:"-"`
  377. }
  378. func (s *CoverageBucket) MarshalJSON() ([]byte, error) {
  379. type noMethod CoverageBucket
  380. raw := noMethod(*s)
  381. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  382. }
  383. // DataAccessOptions: Write a Data Access (Gin) log
  384. type DataAccessOptions struct {
  385. }
  386. // Dataset: A Dataset is a collection of genomic data. For more genomics
  387. // resource definitions, see [Fundamentals of Google
  388. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  389. // omics)
  390. type Dataset struct {
  391. // CreateTime: The time this dataset was created, in seconds from the
  392. // epoch.
  393. CreateTime string `json:"createTime,omitempty"`
  394. // Id: The server-generated dataset ID, unique across all datasets.
  395. Id string `json:"id,omitempty"`
  396. // Name: The dataset name.
  397. Name string `json:"name,omitempty"`
  398. // ProjectId: The Google Developers Console project ID that this dataset
  399. // belongs to.
  400. ProjectId string `json:"projectId,omitempty"`
  401. // ServerResponse contains the HTTP response code and headers from the
  402. // server.
  403. googleapi.ServerResponse `json:"-"`
  404. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  405. // unconditionally include in API requests. By default, fields with
  406. // empty values are omitted from API requests. However, any non-pointer,
  407. // non-interface field appearing in ForceSendFields will be sent to the
  408. // server regardless of whether the field is empty or not. This may be
  409. // used to include empty fields in Patch requests.
  410. ForceSendFields []string `json:"-"`
  411. }
  412. func (s *Dataset) MarshalJSON() ([]byte, error) {
  413. type noMethod Dataset
  414. raw := noMethod(*s)
  415. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  416. }
  417. // Empty: A generic empty message that you can re-use to avoid defining
  418. // duplicated empty messages in your APIs. A typical example is to use
  419. // it as the request or the response type of an API method. For
  420. // instance: service Foo { rpc Bar(google.protobuf.Empty) returns
  421. // (google.protobuf.Empty); } The JSON representation for `Empty` is
  422. // empty JSON object `{}`.
  423. type Empty struct {
  424. // ServerResponse contains the HTTP response code and headers from the
  425. // server.
  426. googleapi.ServerResponse `json:"-"`
  427. }
  428. type Experiment struct {
  429. // InstrumentModel: The instrument model used as part of this
  430. // experiment. This maps to sequencing technology in the SAM spec.
  431. InstrumentModel string `json:"instrumentModel,omitempty"`
  432. // LibraryId: A client-supplied library identifier; a library is a
  433. // collection of DNA fragments which have been prepared for sequencing
  434. // from a sample. This field is important for quality control as error
  435. // or bias can be introduced during sample preparation.
  436. LibraryId string `json:"libraryId,omitempty"`
  437. // PlatformUnit: The platform unit used as part of this experiment, for
  438. // example flowcell-barcode.lane for Illumina or slide for SOLiD.
  439. // Corresponds to the @RG PU field in the SAM spec.
  440. PlatformUnit string `json:"platformUnit,omitempty"`
  441. // SequencingCenter: The sequencing center used as part of this
  442. // experiment.
  443. SequencingCenter string `json:"sequencingCenter,omitempty"`
  444. // ForceSendFields is a list of field names (e.g. "InstrumentModel") to
  445. // unconditionally include in API requests. By default, fields with
  446. // empty values are omitted from API requests. However, any non-pointer,
  447. // non-interface field appearing in ForceSendFields will be sent to the
  448. // server regardless of whether the field is empty or not. This may be
  449. // used to include empty fields in Patch requests.
  450. ForceSendFields []string `json:"-"`
  451. }
  452. func (s *Experiment) MarshalJSON() ([]byte, error) {
  453. type noMethod Experiment
  454. raw := noMethod(*s)
  455. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  456. }
  457. // ExportReadGroupSetRequest: The read group set export request.
  458. type ExportReadGroupSetRequest struct {
  459. // ExportUri: Required. A Google Cloud Storage URI for the exported BAM
  460. // file. The currently authenticated user must have write access to the
  461. // new file. An error will be returned if the URI already contains data.
  462. ExportUri string `json:"exportUri,omitempty"`
  463. // ProjectId: Required. The Google Developers Console project ID that
  464. // owns this export. The caller must have WRITE access to this project.
  465. ProjectId string `json:"projectId,omitempty"`
  466. // ReferenceNames: The reference names to export. If this is not
  467. // specified, all reference sequences, including unmapped reads, are
  468. // exported. Use `*` to export only unmapped reads.
  469. ReferenceNames []string `json:"referenceNames,omitempty"`
  470. // ForceSendFields is a list of field names (e.g. "ExportUri") to
  471. // unconditionally include in API requests. By default, fields with
  472. // empty values are omitted from API requests. However, any non-pointer,
  473. // non-interface field appearing in ForceSendFields will be sent to the
  474. // server regardless of whether the field is empty or not. This may be
  475. // used to include empty fields in Patch requests.
  476. ForceSendFields []string `json:"-"`
  477. }
  478. func (s *ExportReadGroupSetRequest) MarshalJSON() ([]byte, error) {
  479. type noMethod ExportReadGroupSetRequest
  480. raw := noMethod(*s)
  481. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  482. }
  483. // ExportVariantSetRequest: The variant data export request.
  484. type ExportVariantSetRequest struct {
  485. // BigqueryDataset: Required. The BigQuery dataset to export data to.
  486. // This dataset must already exist. Note that this is distinct from the
  487. // Genomics concept of "dataset".
  488. BigqueryDataset string `json:"bigqueryDataset,omitempty"`
  489. // BigqueryTable: Required. The BigQuery table to export data to. If the
  490. // table doesn't exist, it will be created. If it already exists, it
  491. // will be overwritten.
  492. BigqueryTable string `json:"bigqueryTable,omitempty"`
  493. // CallSetIds: If provided, only variant call information from the
  494. // specified call sets will be exported. By default all variant calls
  495. // are exported.
  496. CallSetIds []string `json:"callSetIds,omitempty"`
  497. // Format: The format for the exported data.
  498. //
  499. // Possible values:
  500. // "FORMAT_UNSPECIFIED"
  501. // "FORMAT_BIGQUERY"
  502. Format string `json:"format,omitempty"`
  503. // ProjectId: Required. The Google Cloud project ID that owns the
  504. // destination BigQuery dataset. The caller must have WRITE access to
  505. // this project. This project will also own the resulting export job.
  506. ProjectId string `json:"projectId,omitempty"`
  507. // ForceSendFields is a list of field names (e.g. "BigqueryDataset") to
  508. // unconditionally include in API requests. By default, fields with
  509. // empty values are omitted from API requests. However, any non-pointer,
  510. // non-interface field appearing in ForceSendFields will be sent to the
  511. // server regardless of whether the field is empty or not. This may be
  512. // used to include empty fields in Patch requests.
  513. ForceSendFields []string `json:"-"`
  514. }
  515. func (s *ExportVariantSetRequest) MarshalJSON() ([]byte, error) {
  516. type noMethod ExportVariantSetRequest
  517. raw := noMethod(*s)
  518. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  519. }
  520. // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  521. type GetIamPolicyRequest struct {
  522. }
  523. // ImportReadGroupSetsRequest: The read group set import request.
  524. type ImportReadGroupSetsRequest struct {
  525. // DatasetId: Required. The ID of the dataset these read group sets will
  526. // belong to. The caller must have WRITE permissions to this dataset.
  527. DatasetId string `json:"datasetId,omitempty"`
  528. // PartitionStrategy: The partition strategy describes how read groups
  529. // are partitioned into read group sets.
  530. //
  531. // Possible values:
  532. // "PARTITION_STRATEGY_UNSPECIFIED"
  533. // "PER_FILE_PER_SAMPLE"
  534. // "MERGE_ALL"
  535. PartitionStrategy string `json:"partitionStrategy,omitempty"`
  536. // ReferenceSetId: The reference set to which the imported read group
  537. // sets are aligned to, if any. The reference names of this reference
  538. // set must be a superset of those found in the imported file headers.
  539. // If no reference set id is provided, a best effort is made to
  540. // associate with a matching reference set.
  541. ReferenceSetId string `json:"referenceSetId,omitempty"`
  542. // SourceUris: A list of URIs pointing at [BAM
  543. // files](https://samtools.github.io/hts-specs/SAMv1.pdf) in Google
  544. // Cloud Storage.
  545. SourceUris []string `json:"sourceUris,omitempty"`
  546. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  547. // unconditionally include in API requests. By default, fields with
  548. // empty values are omitted from API requests. However, any non-pointer,
  549. // non-interface field appearing in ForceSendFields will be sent to the
  550. // server regardless of whether the field is empty or not. This may be
  551. // used to include empty fields in Patch requests.
  552. ForceSendFields []string `json:"-"`
  553. }
  554. func (s *ImportReadGroupSetsRequest) MarshalJSON() ([]byte, error) {
  555. type noMethod ImportReadGroupSetsRequest
  556. raw := noMethod(*s)
  557. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  558. }
  559. // ImportReadGroupSetsResponse: The read group set import response.
  560. type ImportReadGroupSetsResponse struct {
  561. // ReadGroupSetIds: IDs of the read group sets that were created.
  562. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  563. // ForceSendFields is a list of field names (e.g. "ReadGroupSetIds") to
  564. // unconditionally include in API requests. By default, fields with
  565. // empty values are omitted from API requests. However, any non-pointer,
  566. // non-interface field appearing in ForceSendFields will be sent to the
  567. // server regardless of whether the field is empty or not. This may be
  568. // used to include empty fields in Patch requests.
  569. ForceSendFields []string `json:"-"`
  570. }
  571. func (s *ImportReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  572. type noMethod ImportReadGroupSetsResponse
  573. raw := noMethod(*s)
  574. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  575. }
  576. // ImportVariantsRequest: The variant data import request.
  577. type ImportVariantsRequest struct {
  578. // Format: The format of the variant data being imported. If
  579. // unspecified, defaults to to `VCF`.
  580. //
  581. // Possible values:
  582. // "FORMAT_UNSPECIFIED"
  583. // "FORMAT_VCF"
  584. // "FORMAT_COMPLETE_GENOMICS"
  585. Format string `json:"format,omitempty"`
  586. // NormalizeReferenceNames: Convert reference names to the canonical
  587. // representation. hg19 haploytypes (those reference names containing
  588. // "_hap") are not modified in any way. All other reference names are
  589. // modified according to the following rules: The reference name is
  590. // capitalized. The "chr" prefix is dropped for all autosomes and sex
  591. // chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X".
  592. // All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
  593. NormalizeReferenceNames bool `json:"normalizeReferenceNames,omitempty"`
  594. // SourceUris: A list of URIs referencing variant files in Google Cloud
  595. // Storage. URIs can include wildcards [as described
  596. // here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNa
  597. // mes). Note that recursive wildcards ('**') are not supported.
  598. SourceUris []string `json:"sourceUris,omitempty"`
  599. // VariantSetId: Required. The variant set to which variant data should
  600. // be imported.
  601. VariantSetId string `json:"variantSetId,omitempty"`
  602. // ForceSendFields is a list of field names (e.g. "Format") to
  603. // unconditionally include in API requests. By default, fields with
  604. // empty values are omitted from API requests. However, any non-pointer,
  605. // non-interface field appearing in ForceSendFields will be sent to the
  606. // server regardless of whether the field is empty or not. This may be
  607. // used to include empty fields in Patch requests.
  608. ForceSendFields []string `json:"-"`
  609. }
  610. func (s *ImportVariantsRequest) MarshalJSON() ([]byte, error) {
  611. type noMethod ImportVariantsRequest
  612. raw := noMethod(*s)
  613. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  614. }
  615. // ImportVariantsResponse: The variant data import response.
  616. type ImportVariantsResponse struct {
  617. // CallSetIds: IDs of the call sets created during the import.
  618. CallSetIds []string `json:"callSetIds,omitempty"`
  619. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  620. // unconditionally include in API requests. By default, fields with
  621. // empty values are omitted from API requests. However, any non-pointer,
  622. // non-interface field appearing in ForceSendFields will be sent to the
  623. // server regardless of whether the field is empty or not. This may be
  624. // used to include empty fields in Patch requests.
  625. ForceSendFields []string `json:"-"`
  626. }
  627. func (s *ImportVariantsResponse) MarshalJSON() ([]byte, error) {
  628. type noMethod ImportVariantsResponse
  629. raw := noMethod(*s)
  630. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  631. }
  632. // LinearAlignment: A linear alignment can be represented by one CIGAR
  633. // string. Describes the mapped position and local alignment of the read
  634. // to the reference.
  635. type LinearAlignment struct {
  636. // Cigar: Represents the local alignment of this sequence (alignment
  637. // matches, indels, etc) against the reference.
  638. Cigar []*CigarUnit `json:"cigar,omitempty"`
  639. // MappingQuality: The mapping quality of this alignment. Represents how
  640. // likely the read maps to this position as opposed to other locations.
  641. // Specifically, this is -10 log10 Pr(mapping position is wrong),
  642. // rounded to the nearest integer.
  643. MappingQuality int64 `json:"mappingQuality,omitempty"`
  644. // Position: The position of this alignment.
  645. Position *Position `json:"position,omitempty"`
  646. // ForceSendFields is a list of field names (e.g. "Cigar") to
  647. // unconditionally include in API requests. By default, fields with
  648. // empty values are omitted from API requests. However, any non-pointer,
  649. // non-interface field appearing in ForceSendFields will be sent to the
  650. // server regardless of whether the field is empty or not. This may be
  651. // used to include empty fields in Patch requests.
  652. ForceSendFields []string `json:"-"`
  653. }
  654. func (s *LinearAlignment) MarshalJSON() ([]byte, error) {
  655. type noMethod LinearAlignment
  656. raw := noMethod(*s)
  657. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  658. }
  659. type ListBasesResponse struct {
  660. // NextPageToken: The continuation token, which is used to page through
  661. // large result sets. Provide this value in a subsequent request to
  662. // return the next page of results. This field will be empty if there
  663. // aren't any additional results.
  664. NextPageToken string `json:"nextPageToken,omitempty"`
  665. // Offset: The offset position (0-based) of the given `sequence` from
  666. // the start of this `Reference`. This value will differ for each page
  667. // in a paginated request.
  668. Offset int64 `json:"offset,omitempty,string"`
  669. // Sequence: A substring of the bases that make up this reference.
  670. Sequence string `json:"sequence,omitempty"`
  671. // ServerResponse contains the HTTP response code and headers from the
  672. // server.
  673. googleapi.ServerResponse `json:"-"`
  674. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  675. // unconditionally include in API requests. By default, fields with
  676. // empty values are omitted from API requests. However, any non-pointer,
  677. // non-interface field appearing in ForceSendFields will be sent to the
  678. // server regardless of whether the field is empty or not. This may be
  679. // used to include empty fields in Patch requests.
  680. ForceSendFields []string `json:"-"`
  681. }
  682. func (s *ListBasesResponse) MarshalJSON() ([]byte, error) {
  683. type noMethod ListBasesResponse
  684. raw := noMethod(*s)
  685. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  686. }
  687. type ListCoverageBucketsResponse struct {
  688. // BucketWidth: The length of each coverage bucket in base pairs. Note
  689. // that buckets at the end of a reference sequence may be shorter. This
  690. // value is omitted if the bucket width is infinity (the default
  691. // behaviour, with no range or `targetBucketWidth`).
  692. BucketWidth int64 `json:"bucketWidth,omitempty,string"`
  693. // CoverageBuckets: The coverage buckets. The list of buckets is sparse;
  694. // a bucket with 0 overlapping reads is not returned. A bucket never
  695. // crosses more than one reference sequence. Each bucket has width
  696. // `bucketWidth`, unless its end is the end of the reference sequence.
  697. CoverageBuckets []*CoverageBucket `json:"coverageBuckets,omitempty"`
  698. // NextPageToken: The continuation token, which is used to page through
  699. // large result sets. Provide this value in a subsequent request to
  700. // return the next page of results. This field will be empty if there
  701. // aren't any additional results.
  702. NextPageToken string `json:"nextPageToken,omitempty"`
  703. // ServerResponse contains the HTTP response code and headers from the
  704. // server.
  705. googleapi.ServerResponse `json:"-"`
  706. // ForceSendFields is a list of field names (e.g. "BucketWidth") to
  707. // unconditionally include in API requests. By default, fields with
  708. // empty values are omitted from API requests. However, any non-pointer,
  709. // non-interface field appearing in ForceSendFields will be sent to the
  710. // server regardless of whether the field is empty or not. This may be
  711. // used to include empty fields in Patch requests.
  712. ForceSendFields []string `json:"-"`
  713. }
  714. func (s *ListCoverageBucketsResponse) MarshalJSON() ([]byte, error) {
  715. type noMethod ListCoverageBucketsResponse
  716. raw := noMethod(*s)
  717. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  718. }
  719. // ListDatasetsResponse: The dataset list response.
  720. type ListDatasetsResponse struct {
  721. // Datasets: The list of matching Datasets.
  722. Datasets []*Dataset `json:"datasets,omitempty"`
  723. // NextPageToken: The continuation token, which is used to page through
  724. // large result sets. Provide this value in a subsequent request to
  725. // return the next page of results. This field will be empty if there
  726. // aren't any additional results.
  727. NextPageToken string `json:"nextPageToken,omitempty"`
  728. // ServerResponse contains the HTTP response code and headers from the
  729. // server.
  730. googleapi.ServerResponse `json:"-"`
  731. // ForceSendFields is a list of field names (e.g. "Datasets") to
  732. // unconditionally include in API requests. By default, fields with
  733. // empty values are omitted from API requests. However, any non-pointer,
  734. // non-interface field appearing in ForceSendFields will be sent to the
  735. // server regardless of whether the field is empty or not. This may be
  736. // used to include empty fields in Patch requests.
  737. ForceSendFields []string `json:"-"`
  738. }
  739. func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) {
  740. type noMethod ListDatasetsResponse
  741. raw := noMethod(*s)
  742. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  743. }
  744. // ListOperationsResponse: The response message for
  745. // Operations.ListOperations.
  746. type ListOperationsResponse struct {
  747. // NextPageToken: The standard List next-page token.
  748. NextPageToken string `json:"nextPageToken,omitempty"`
  749. // Operations: A list of operations that matches the specified filter in
  750. // the request.
  751. Operations []*Operation `json:"operations,omitempty"`
  752. // ServerResponse contains the HTTP response code and headers from the
  753. // server.
  754. googleapi.ServerResponse `json:"-"`
  755. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  756. // unconditionally include in API requests. By default, fields with
  757. // empty values are omitted from API requests. However, any non-pointer,
  758. // non-interface field appearing in ForceSendFields will be sent to the
  759. // server regardless of whether the field is empty or not. This may be
  760. // used to include empty fields in Patch requests.
  761. ForceSendFields []string `json:"-"`
  762. }
  763. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  764. type noMethod ListOperationsResponse
  765. raw := noMethod(*s)
  766. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  767. }
  768. // LogConfig: Specifies what kind of log the caller must write Increment
  769. // a streamz counter with the specified metric and field names. Metric
  770. // names should start with a '/', generally be lowercase-only, and end
  771. // in "_count". Field names should not contain an initial slash. The
  772. // actual exported metric names will have "/iam/policy" prepended. Field
  773. // names correspond to IAM request parameters and field values are their
  774. // respective values. At present only "iam_principal", corresponding to
  775. // IAMContext.principal, is supported. Examples: counter { metric:
  776. // "/debug_access_count" field: "iam_principal" } ==> increment counter
  777. // /iam/policy/backend_debug_access_count {iam_principal=[value of
  778. // IAMContext.principal]} At this time we do not support: * multiple
  779. // field names (though this may be supported in the future) *
  780. // decrementing the counter * incrementing it by anything other than 1
  781. type LogConfig struct {
  782. // CloudAudit: Cloud audit options.
  783. CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"`
  784. // Counter: Counter options.
  785. Counter *CounterOptions `json:"counter,omitempty"`
  786. // DataAccess: Data access options.
  787. DataAccess *DataAccessOptions `json:"dataAccess,omitempty"`
  788. // ForceSendFields is a list of field names (e.g. "CloudAudit") to
  789. // unconditionally include in API requests. By default, fields with
  790. // empty values are omitted from API requests. However, any non-pointer,
  791. // non-interface field appearing in ForceSendFields will be sent to the
  792. // server regardless of whether the field is empty or not. This may be
  793. // used to include empty fields in Patch requests.
  794. ForceSendFields []string `json:"-"`
  795. }
  796. func (s *LogConfig) MarshalJSON() ([]byte, error) {
  797. type noMethod LogConfig
  798. raw := noMethod(*s)
  799. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  800. }
  801. // Operation: This resource represents a long-running operation that is
  802. // the result of a network API call.
  803. type Operation struct {
  804. // Done: If the value is `false`, it means the operation is still in
  805. // progress. If true, the operation is completed, and either `error` or
  806. // `response` is available.
  807. Done bool `json:"done,omitempty"`
  808. // Error: The error result of the operation in case of failure.
  809. Error *Status `json:"error,omitempty"`
  810. // Metadata: An OperationMetadata object. This will always be returned
  811. // with the Operation.
  812. Metadata OperationMetadata `json:"metadata,omitempty"`
  813. // Name: The server-assigned name, which is only unique within the same
  814. // service that originally returns it. For example:
  815. // `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
  816. Name string `json:"name,omitempty"`
  817. // Response: If importing ReadGroupSets, an ImportReadGroupSetsResponse
  818. // is returned. If importing Variants, an ImportVariantsResponse is
  819. // returned. For exports, an empty response is returned.
  820. Response OperationResponse `json:"response,omitempty"`
  821. // ServerResponse contains the HTTP response code and headers from the
  822. // server.
  823. googleapi.ServerResponse `json:"-"`
  824. // ForceSendFields is a list of field names (e.g. "Done") to
  825. // unconditionally include in API requests. By default, fields with
  826. // empty values are omitted from API requests. However, any non-pointer,
  827. // non-interface field appearing in ForceSendFields will be sent to the
  828. // server regardless of whether the field is empty or not. This may be
  829. // used to include empty fields in Patch requests.
  830. ForceSendFields []string `json:"-"`
  831. }
  832. func (s *Operation) MarshalJSON() ([]byte, error) {
  833. type noMethod Operation
  834. raw := noMethod(*s)
  835. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  836. }
  837. type OperationMetadata interface{}
  838. type OperationResponse interface{}
  839. // OperationEvent: An event that occurred during an Operation.
  840. type OperationEvent struct {
  841. // Description: Required description of event.
  842. Description string `json:"description,omitempty"`
  843. // ForceSendFields is a list of field names (e.g. "Description") to
  844. // unconditionally include in API requests. By default, fields with
  845. // empty values are omitted from API requests. However, any non-pointer,
  846. // non-interface field appearing in ForceSendFields will be sent to the
  847. // server regardless of whether the field is empty or not. This may be
  848. // used to include empty fields in Patch requests.
  849. ForceSendFields []string `json:"-"`
  850. }
  851. func (s *OperationEvent) MarshalJSON() ([]byte, error) {
  852. type noMethod OperationEvent
  853. raw := noMethod(*s)
  854. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  855. }
  856. // OperationMetadata1: Metadata describing an Operation.
  857. type OperationMetadata1 struct {
  858. // CreateTime: The time at which the job was submitted to the Genomics
  859. // service.
  860. CreateTime string `json:"createTime,omitempty"`
  861. // Events: Optional event messages that were generated during the job's
  862. // execution. This also contains any warnings that were generated during
  863. // import or export.
  864. Events []*OperationEvent `json:"events,omitempty"`
  865. // ProjectId: The Google Cloud Project in which the job is scoped.
  866. ProjectId string `json:"projectId,omitempty"`
  867. // Request: The original request that started the operation. Note that
  868. // this will be in current version of the API. If the operation was
  869. // started with v1beta2 API and a GetOperation is performed on v1 API, a
  870. // v1 request will be returned.
  871. Request OperationMetadataRequest `json:"request,omitempty"`
  872. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  873. // unconditionally include in API requests. By default, fields with
  874. // empty values are omitted from API requests. However, any non-pointer,
  875. // non-interface field appearing in ForceSendFields will be sent to the
  876. // server regardless of whether the field is empty or not. This may be
  877. // used to include empty fields in Patch requests.
  878. ForceSendFields []string `json:"-"`
  879. }
  880. func (s *OperationMetadata1) MarshalJSON() ([]byte, error) {
  881. type noMethod OperationMetadata1
  882. raw := noMethod(*s)
  883. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  884. }
  885. type OperationMetadataRequest interface{}
  886. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  887. // used to specify access control policies for Cloud Platform resources.
  888. // A `Policy` consists of a list of `bindings`. A `Binding` binds a list
  889. // of `members` to a `role`, where the members can be user accounts,
  890. // Google groups, Google domains, and service accounts. A `role` is a
  891. // named list of permissions defined by IAM. **Example** { "bindings": [
  892. // { "role": "roles/owner", "members": [ "user:mike@example.com",
  893. // "group:admins@example.com", "domain:google.com",
  894. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, {
  895. // "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
  896. // For a description of IAM and its features, see the [IAM developer's
  897. // guide](https://cloud.google.com/iam).
  898. type Policy struct {
  899. // Bindings: Associates a list of `members` to a `role`. Multiple
  900. // `bindings` must not be specified for the same `role`. `bindings` with
  901. // no members will result in an error.
  902. Bindings []*Binding `json:"bindings,omitempty"`
  903. // Etag: `etag` is used for optimistic concurrency control as a way to
  904. // help prevent simultaneous updates of a policy from overwriting each
  905. // other. It is strongly suggested that systems make use of the `etag`
  906. // in the read-modify-write cycle to perform policy updates in order to
  907. // avoid race conditions: An `etag` is returned in the response to
  908. // `getIamPolicy`, and systems are expected to put that etag in the
  909. // request to `setIamPolicy` to ensure that their change will be applied
  910. // to the same version of the policy. If no `etag` is provided in the
  911. // call to `setIamPolicy`, then the existing policy is overwritten
  912. // blindly.
  913. Etag string `json:"etag,omitempty"`
  914. Rules []*Rule `json:"rules,omitempty"`
  915. // Version: Version of the `Policy`. The default version is 0.
  916. Version int64 `json:"version,omitempty"`
  917. // ServerResponse contains the HTTP response code and headers from the
  918. // server.
  919. googleapi.ServerResponse `json:"-"`
  920. // ForceSendFields is a list of field names (e.g. "Bindings") to
  921. // unconditionally include in API requests. By default, fields with
  922. // empty values are omitted from API requests. However, any non-pointer,
  923. // non-interface field appearing in ForceSendFields will be sent to the
  924. // server regardless of whether the field is empty or not. This may be
  925. // used to include empty fields in Patch requests.
  926. ForceSendFields []string `json:"-"`
  927. }
  928. func (s *Policy) MarshalJSON() ([]byte, error) {
  929. type noMethod Policy
  930. raw := noMethod(*s)
  931. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  932. }
  933. // Position: An abstraction for referring to a genomic position, in
  934. // relation to some already known reference. For now, represents a
  935. // genomic position as a reference name, a base number on that reference
  936. // (0-based), and a determination of forward or reverse strand.
  937. type Position struct {
  938. // Position: The 0-based offset from the start of the forward strand for
  939. // that reference.
  940. Position int64 `json:"position,omitempty,string"`
  941. // ReferenceName: The name of the reference in whatever reference set is
  942. // being used.
  943. ReferenceName string `json:"referenceName,omitempty"`
  944. // ReverseStrand: Whether this position is on the reverse strand, as
  945. // opposed to the forward strand.
  946. ReverseStrand bool `json:"reverseStrand,omitempty"`
  947. // ForceSendFields is a list of field names (e.g. "Position") to
  948. // unconditionally include in API requests. By default, fields with
  949. // empty values are omitted from API requests. However, any non-pointer,
  950. // non-interface field appearing in ForceSendFields will be sent to the
  951. // server regardless of whether the field is empty or not. This may be
  952. // used to include empty fields in Patch requests.
  953. ForceSendFields []string `json:"-"`
  954. }
  955. func (s *Position) MarshalJSON() ([]byte, error) {
  956. type noMethod Position
  957. raw := noMethod(*s)
  958. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  959. }
  960. type Program struct {
  961. // CommandLine: The command line used to run this program.
  962. CommandLine string `json:"commandLine,omitempty"`
  963. // Id: The user specified locally unique ID of the program. Used along
  964. // with `prevProgramId` to define an ordering between programs.
  965. Id string `json:"id,omitempty"`
  966. // Name: The display name of the program. This is typically the
  967. // colloquial name of the tool used, for example 'bwa' or 'picard'.
  968. Name string `json:"name,omitempty"`
  969. // PrevProgramId: The ID of the program run before this one.
  970. PrevProgramId string `json:"prevProgramId,omitempty"`
  971. // Version: The version of the program run.
  972. Version string `json:"version,omitempty"`
  973. // ForceSendFields is a list of field names (e.g. "CommandLine") to
  974. // unconditionally include in API requests. By default, fields with
  975. // empty values are omitted from API requests. However, any non-pointer,
  976. // non-interface field appearing in ForceSendFields will be sent to the
  977. // server regardless of whether the field is empty or not. This may be
  978. // used to include empty fields in Patch requests.
  979. ForceSendFields []string `json:"-"`
  980. }
  981. func (s *Program) MarshalJSON() ([]byte, error) {
  982. type noMethod Program
  983. raw := noMethod(*s)
  984. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  985. }
  986. // Range: A 0-based half-open genomic coordinate range for search
  987. // requests.
  988. type Range struct {
  989. // End: The end position of the range on the reference, 0-based
  990. // exclusive.
  991. End int64 `json:"end,omitempty,string"`
  992. // ReferenceName: The reference sequence name, for example `chr1`, `1`,
  993. // or `chrX`.
  994. ReferenceName string `json:"referenceName,omitempty"`
  995. // Start: The start position of the range on the reference, 0-based
  996. // inclusive.
  997. Start int64 `json:"start,omitempty,string"`
  998. // ForceSendFields is a list of field names (e.g. "End") to
  999. // unconditionally include in API requests. By default, fields with
  1000. // empty values are omitted from API requests. However, any non-pointer,
  1001. // non-interface field appearing in ForceSendFields will be sent to the
  1002. // server regardless of whether the field is empty or not. This may be
  1003. // used to include empty fields in Patch requests.
  1004. ForceSendFields []string `json:"-"`
  1005. }
  1006. func (s *Range) MarshalJSON() ([]byte, error) {
  1007. type noMethod Range
  1008. raw := noMethod(*s)
  1009. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1010. }
  1011. // Read: A read alignment describes a linear alignment of a string of
  1012. // DNA to a reference sequence, in addition to metadata about the
  1013. // fragment (the molecule of DNA sequenced) and the read (the bases
  1014. // which were read by the sequencer). A read is equivalent to a line in
  1015. // a SAM file. A read belongs to exactly one read group and exactly one
  1016. // read group set. For more genomics resource definitions, see
  1017. // [Fundamentals of Google
  1018. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  1019. // omics) ### Reverse-stranded reads Mapped reads (reads having a
  1020. // non-null `alignment`) can be aligned to either the forward or the
  1021. // reverse strand of their associated reference. Strandedness of a
  1022. // mapped read is encoded by `alignment.position.reverseStrand`. If we
  1023. // consider the reference to be a forward-stranded coordinate space of
  1024. // `[0, reference.length)` with `0` as the left-most position and
  1025. // `reference.length` as the right-most position, reads are always
  1026. // aligned left to right. That is, `alignment.position.position` always
  1027. // refers to the left-most reference coordinate and `alignment.cigar`
  1028. // describes the alignment of this read to the reference from left to
  1029. // right. All per-base fields such as `alignedSequence` and
  1030. // `alignedQuality` share this same left-to-right orientation; this is
  1031. // true of reads which are aligned to either strand. For
  1032. // reverse-stranded reads, this means that `alignedSequence` is the
  1033. // reverse complement of the bases that were originally reported by the
  1034. // sequencing machine. ### Generating a reference-aligned sequence
  1035. // string When interacting with mapped reads, it's often useful to
  1036. // produce a string representing the local alignment of the read to
  1037. // reference. The following pseudocode demonstrates one way of doing
  1038. // this: out = "" offset = 0 for c in read.alignment.cigar { switch
  1039. // c.operation { case "ALIGNMENT_MATCH", "SEQUENCE_MATCH",
  1040. // "SEQUENCE_MISMATCH": out +=
  1041. // read.alignedSequence[offset:offset+c.operationLength] offset +=
  1042. // c.operationLength break case "CLIP_SOFT", "INSERT": offset +=
  1043. // c.operationLength break case "PAD": out += repeat("*",
  1044. // c.operationLength) break case "DELETE": out += repeat("-",
  1045. // c.operationLength) break case "SKIP": out += repeat(" ",
  1046. // c.operationLength) break case "CLIP_HARD": break } } return out ###
  1047. // Converting to SAM's CIGAR string The following pseudocode generates a
  1048. // SAM CIGAR string from the `cigar` field. Note that this is a lossy
  1049. // conversion (`cigar.referenceSequence` is lost). cigarMap = {
  1050. // "ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N",
  1051. // "CLIP_SOFT": "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH":
  1052. // "=", "SEQUENCE_MISMATCH": "X", } cigarStr = "" for c in
  1053. // read.alignment.cigar { cigarStr += c.operationLength +
  1054. // cigarMap[c.operation] } return cigarStr
  1055. type Read struct {
  1056. // AlignedQuality: The quality of the read sequence contained in this
  1057. // alignment record (equivalent to QUAL in SAM). `alignedSequence` and
  1058. // `alignedQuality` may be shorter than the full read sequence and
  1059. // quality. This will occur if the alignment is part of a chimeric
  1060. // alignment, or if the read was trimmed. When this occurs, the CIGAR
  1061. // for this read will begin/end with a hard clip operator that will
  1062. // indicate the length of the excised sequence.
  1063. AlignedQuality []int64 `json:"alignedQuality,omitempty"`
  1064. // AlignedSequence: The bases of the read sequence contained in this
  1065. // alignment record, **without CIGAR operations applied** (equivalent to
  1066. // SEQ in SAM). `alignedSequence` and `alignedQuality` may be shorter
  1067. // than the full read sequence and quality. This will occur if the
  1068. // alignment is part of a chimeric alignment, or if the read was
  1069. // trimmed. When this occurs, the CIGAR for this read will begin/end
  1070. // with a hard clip operator that will indicate the length of the
  1071. // excised sequence.
  1072. AlignedSequence string `json:"alignedSequence,omitempty"`
  1073. // Alignment: The linear alignment for this alignment record. This field
  1074. // is null for unmapped reads.
  1075. Alignment *LinearAlignment `json:"alignment,omitempty"`
  1076. // DuplicateFragment: The fragment is a PCR or optical duplicate (SAM
  1077. // flag 0x400).
  1078. DuplicateFragment bool `json:"duplicateFragment,omitempty"`
  1079. // FailedVendorQualityChecks: Whether this read did not pass filters,
  1080. // such as platform or vendor quality controls (SAM flag 0x200).
  1081. FailedVendorQualityChecks bool `json:"failedVendorQualityChecks,omitempty"`
  1082. // FragmentLength: The observed length of the fragment, equivalent to
  1083. // TLEN in SAM.
  1084. FragmentLength int64 `json:"fragmentLength,omitempty"`
  1085. // FragmentName: The fragment name. Equivalent to QNAME (query template
  1086. // name) in SAM.
  1087. FragmentName string `json:"fragmentName,omitempty"`
  1088. // Id: The server-generated read ID, unique across all reads. This is
  1089. // different from the `fragmentName`.
  1090. Id string `json:"id,omitempty"`
  1091. // Info: A map of additional read alignment information. This must be of
  1092. // the form map (string key mapping to a list of string values).
  1093. Info *ReadInfo `json:"info,omitempty"`
  1094. // NextMatePosition: The mapping of the primary alignment of the
  1095. // `(readNumber+1)%numberReads` read in the fragment. It replaces mate
  1096. // position and mate strand in SAM.
  1097. NextMatePosition *Position `json:"nextMatePosition,omitempty"`
  1098. // NumberReads: The number of reads in the fragment (extension to SAM
  1099. // flag 0x1).
  1100. NumberReads int64 `json:"numberReads,omitempty"`
  1101. // ProperPlacement: The orientation and the distance between reads from
  1102. // the fragment are consistent with the sequencing protocol (SAM flag
  1103. // 0x2).
  1104. ProperPlacement bool `json:"properPlacement,omitempty"`
  1105. // ReadGroupId: The ID of the read group this read belongs to. A read
  1106. // belongs to exactly one read group. This is a server-generated ID
  1107. // which is distinct from SAM's RG tag (for that value, see
  1108. // ReadGroup.name).
  1109. ReadGroupId string `json:"readGroupId,omitempty"`
  1110. // ReadGroupSetId: The ID of the read group set this read belongs to. A
  1111. // read belongs to exactly one read group set.
  1112. ReadGroupSetId string `json:"readGroupSetId,omitempty"`
  1113. // ReadNumber: The read number in sequencing. 0-based and less than
  1114. // numberReads. This field replaces SAM flag 0x40 and 0x80.
  1115. ReadNumber int64 `json:"readNumber,omitempty"`
  1116. // SecondaryAlignment: Whether this alignment is secondary. Equivalent
  1117. // to SAM flag 0x100. A secondary alignment represents an alternative to
  1118. // the primary alignment for this read. Aligners may return secondary
  1119. // alignments if a read can map ambiguously to multiple coordinates in
  1120. // the genome. By convention, each read has one and only one alignment
  1121. // where both `secondaryAlignment` and `supplementaryAlignment` are
  1122. // false.
  1123. SecondaryAlignment bool `json:"secondaryAlignment,omitempty"`
  1124. // SupplementaryAlignment: Whether this alignment is supplementary.
  1125. // Equivalent to SAM flag 0x800. Supplementary alignments are used in
  1126. // the representation of a chimeric alignment. In a chimeric alignment,
  1127. // a read is split into multiple linear alignments that map to different
  1128. // reference contigs. The first linear alignment in the read will be
  1129. // designated as the representative alignment; the remaining linear
  1130. // alignments will be designated as supplementary alignments. These
  1131. // alignments may have different mapping quality scores. In each linear
  1132. // alignment in a chimeric alignment, the read will be hard clipped. The
  1133. // `alignedSequence` and `alignedQuality` fields in the alignment record
  1134. // will only represent the bases for its respective linear alignment.
  1135. SupplementaryAlignment bool `json:"supplementaryAlignment,omitempty"`
  1136. // ForceSendFields is a list of field names (e.g. "AlignedQuality") to
  1137. // unconditionally include in API requests. By default, fields with
  1138. // empty values are omitted from API requests. However, any non-pointer,
  1139. // non-interface field appearing in ForceSendFields will be sent to the
  1140. // server regardless of whether the field is empty or not. This may be
  1141. // used to include empty fields in Patch requests.
  1142. ForceSendFields []string `json:"-"`
  1143. }
  1144. func (s *Read) MarshalJSON() ([]byte, error) {
  1145. type noMethod Read
  1146. raw := noMethod(*s)
  1147. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1148. }
  1149. // ReadInfo: A map of additional read alignment information. This must
  1150. // be of the form map (string key mapping to a list of string values).
  1151. type ReadInfo struct {
  1152. }
  1153. // ReadGroup: A read group is all the data that's processed the same way
  1154. // by the sequencer.
  1155. type ReadGroup struct {
  1156. // DatasetId: The dataset to which this read group belongs.
  1157. DatasetId string `json:"datasetId,omitempty"`
  1158. // Description: A free-form text description of this read group.
  1159. Description string `json:"description,omitempty"`
  1160. // Experiment: The experiment used to generate this read group.
  1161. Experiment *Experiment `json:"experiment,omitempty"`
  1162. // Id: The server-generated read group ID, unique for all read groups.
  1163. // Note: This is different than the @RG ID field in the SAM spec. For
  1164. // that value, see name.
  1165. Id string `json:"id,omitempty"`
  1166. // Info: A map of additional read group information. This must be of the
  1167. // form map (string key mapping to a list of string values).
  1168. Info *ReadGroupInfo `json:"info,omitempty"`
  1169. // Name: The read group name. This corresponds to the @RG ID field in
  1170. // the SAM spec.
  1171. Name string `json:"name,omitempty"`
  1172. // PredictedInsertSize: The predicted insert size of this read group.
  1173. // The insert size is the length the sequenced DNA fragment from
  1174. // end-to-end, not including the adapters.
  1175. PredictedInsertSize int64 `json:"predictedInsertSize,omitempty"`
  1176. // Programs: The programs used to generate this read group. Programs are
  1177. // always identical for all read groups within a read group set. For
  1178. // this reason, only the first read group in a returned set will have
  1179. // this field populated.
  1180. Programs []*Program `json:"programs,omitempty"`
  1181. // ReferenceSetId: The reference set the reads in this read group are
  1182. // aligned to.
  1183. ReferenceSetId string `json:"referenceSetId,omitempty"`
  1184. // SampleId: A client-supplied sample identifier for the reads in this
  1185. // read group.
  1186. SampleId string `json:"sampleId,omitempty"`
  1187. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  1188. // unconditionally include in API requests. By default, fields with
  1189. // empty values are omitted from API requests. However, any non-pointer,
  1190. // non-interface field appearing in ForceSendFields will be sent to the
  1191. // server regardless of whether the field is empty or not. This may be
  1192. // used to include empty fields in Patch requests.
  1193. ForceSendFields []string `json:"-"`
  1194. }
  1195. func (s *ReadGroup) MarshalJSON() ([]byte, error) {
  1196. type noMethod ReadGroup
  1197. raw := noMethod(*s)
  1198. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1199. }
  1200. // ReadGroupInfo: A map of additional read group information. This must
  1201. // be of the form map (string key mapping to a list of string values).
  1202. type ReadGroupInfo struct {
  1203. }
  1204. // ReadGroupSet: A read group set is a logical collection of read
  1205. // groups, which are collections of reads produced by a sequencer. A
  1206. // read group set typically models reads corresponding to one sample,
  1207. // sequenced one way, and aligned one way. * A read group set belongs to
  1208. // one dataset. * A read group belongs to one read group set. * A read
  1209. // belongs to one read group. For more genomics resource definitions,
  1210. // see [Fundamentals of Google
  1211. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  1212. // omics)
  1213. type ReadGroupSet struct {
  1214. // DatasetId: The dataset to which this read group set belongs.
  1215. DatasetId string `json:"datasetId,omitempty"`
  1216. // Filename: The filename of the original source file for this read
  1217. // group set, if any.
  1218. Filename string `json:"filename,omitempty"`
  1219. // Id: The server-generated read group set ID, unique for all read group
  1220. // sets.
  1221. Id string `json:"id,omitempty"`
  1222. // Info: A map of additional read group set information.
  1223. Info *ReadGroupSetInfo `json:"info,omitempty"`
  1224. // Name: The read group set name. By default this will be initialized to
  1225. // the sample name of the sequenced data contained in this set.
  1226. Name string `json:"name,omitempty"`
  1227. // ReadGroups: The read groups in this set. There are typically 1-10
  1228. // read groups in a read group set.
  1229. ReadGroups []*ReadGroup `json:"readGroups,omitempty"`
  1230. // ReferenceSetId: The reference set to which the reads in this read
  1231. // group set are aligned.
  1232. ReferenceSetId string `json:"referenceSetId,omitempty"`
  1233. // ServerResponse contains the HTTP response code and headers from the
  1234. // server.
  1235. googleapi.ServerResponse `json:"-"`
  1236. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  1237. // unconditionally include in API requests. By default, fields with
  1238. // empty values are omitted from API requests. However, any non-pointer,
  1239. // non-interface field appearing in ForceSendFields will be sent to the
  1240. // server regardless of whether the field is empty or not. This may be
  1241. // used to include empty fields in Patch requests.
  1242. ForceSendFields []string `json:"-"`
  1243. }
  1244. func (s *ReadGroupSet) MarshalJSON() ([]byte, error) {
  1245. type noMethod ReadGroupSet
  1246. raw := noMethod(*s)
  1247. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1248. }
  1249. // ReadGroupSetInfo: A map of additional read group set information.
  1250. type ReadGroupSetInfo struct {
  1251. }
  1252. // Reference: A reference is a canonical assembled DNA sequence,
  1253. // intended to act as a reference coordinate space for other genomic
  1254. // annotations. A single reference might represent the human chromosome
  1255. // 1 or mitochandrial DNA, for instance. A reference belongs to one or
  1256. // more reference sets. For more genomics resource definitions, see
  1257. // [Fundamentals of Google
  1258. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  1259. // omics)
  1260. type Reference struct {
  1261. // Id: The server-generated reference ID, unique across all references.
  1262. Id string `json:"id,omitempty"`
  1263. // Length: The length of this reference's sequence.
  1264. Length int64 `json:"length,omitempty,string"`
  1265. // Md5checksum: MD5 of the upper-case sequence excluding all whitespace
  1266. // characters (this is equivalent to SQ:M5 in SAM). This value is
  1267. // represented in lower case hexadecimal format.
  1268. Md5checksum string `json:"md5checksum,omitempty"`
  1269. // Name: The name of this reference, for example `22`.
  1270. Name string `json:"name,omitempty"`
  1271. // NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy. For
  1272. // example, 9606 for human.
  1273. NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
  1274. // SourceAccessions: All known corresponding accession IDs in INSDC
  1275. // (GenBank/ENA/DDBJ) ideally with a version number, for example
  1276. // `GCF_000001405.26`.
  1277. SourceAccessions []string `json:"sourceAccessions,omitempty"`
  1278. // SourceUri: The URI from which the sequence was obtained. Typically
  1279. // specifies a FASTA format file.
  1280. SourceUri string `json:"sourceUri,omitempty"`
  1281. // ServerResponse contains the HTTP response code and headers from the
  1282. // server.
  1283. googleapi.ServerResponse `json:"-"`
  1284. // ForceSendFields is a list of field names (e.g. "Id") to
  1285. // unconditionally include in API requests. By default, fields with
  1286. // empty values are omitted from API requests. However, any non-pointer,
  1287. // non-interface field appearing in ForceSendFields will be sent to the
  1288. // server regardless of whether the field is empty or not. This may be
  1289. // used to include empty fields in Patch requests.
  1290. ForceSendFields []string `json:"-"`
  1291. }
  1292. func (s *Reference) MarshalJSON() ([]byte, error) {
  1293. type noMethod Reference
  1294. raw := noMethod(*s)
  1295. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1296. }
  1297. // ReferenceBound: ReferenceBound records an upper bound for the
  1298. // starting coordinate of variants in a particular reference.
  1299. type ReferenceBound struct {
  1300. // ReferenceName: The name of the reference associated with this
  1301. // ReferenceBound.
  1302. ReferenceName string `json:"referenceName,omitempty"`
  1303. // UpperBound: An upper bound (inclusive) on the starting coordinate of
  1304. // any variant in the reference sequence.
  1305. UpperBound int64 `json:"upperBound,omitempty,string"`
  1306. // ForceSendFields is a list of field names (e.g. "ReferenceName") to
  1307. // unconditionally include in API requests. By default, fields with
  1308. // empty values are omitted from API requests. However, any non-pointer,
  1309. // non-interface field appearing in ForceSendFields will be sent to the
  1310. // server regardless of whether the field is empty or not. This may be
  1311. // used to include empty fields in Patch requests.
  1312. ForceSendFields []string `json:"-"`
  1313. }
  1314. func (s *ReferenceBound) MarshalJSON() ([]byte, error) {
  1315. type noMethod ReferenceBound
  1316. raw := noMethod(*s)
  1317. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1318. }
  1319. // ReferenceSet: A reference set is a set of references which typically
  1320. // comprise a reference assembly for a species, such as `GRCh38` which
  1321. // is representative of the human genome. A reference set defines a
  1322. // common coordinate space for comparing reference-aligned experimental
  1323. // data. A reference set contains 1 or more references. For more
  1324. // genomics resource definitions, see [Fundamentals of Google
  1325. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  1326. // omics)
  1327. type ReferenceSet struct {
  1328. // AssemblyId: Public id of this reference set, such as `GRCh37`.
  1329. AssemblyId string `json:"assemblyId,omitempty"`
  1330. // Description: Free text description of this reference set.
  1331. Description string `json:"description,omitempty"`
  1332. // Id: The server-generated reference set ID, unique across all
  1333. // reference sets.
  1334. Id string `json:"id,omitempty"`
  1335. // Md5checksum: Order-independent MD5 checksum which identifies this
  1336. // reference set. The checksum is computed by sorting all lower case
  1337. // hexidecimal string `reference.md5checksum` (for all reference in this
  1338. // set) in ascending lexicographic order, concatenating, and taking the
  1339. // MD5 of that value. The resulting value is represented in lower case
  1340. // hexadecimal format.
  1341. Md5checksum string `json:"md5checksum,omitempty"`
  1342. // NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy (for
  1343. // example, 9606 for human) indicating the species which this reference
  1344. // set is intended to model. Note that contained references may specify
  1345. // a different `ncbiTaxonId`, as assemblies may contain reference
  1346. // sequences which do not belong to the modeled species, for example EBV
  1347. // in a human reference genome.
  1348. NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
  1349. // ReferenceIds: The IDs of the reference objects that are part of this
  1350. // set. `Reference.md5checksum` must be unique within this set.
  1351. ReferenceIds []string `json:"referenceIds,omitempty"`
  1352. // SourceAccessions: All known corresponding accession IDs in INSDC
  1353. // (GenBank/ENA/DDBJ) ideally with a version number, for example
  1354. // `NC_000001.11`.
  1355. SourceAccessions []string `json:"sourceAccessions,omitempty"`
  1356. // SourceUri: The URI from which the references were obtained.
  1357. SourceUri string `json:"sourceUri,omitempty"`
  1358. // ServerResponse contains the HTTP response code and headers from the
  1359. // server.
  1360. googleapi.ServerResponse `json:"-"`
  1361. // ForceSendFields is a list of field names (e.g. "AssemblyId") to
  1362. // unconditionally include in API requests. By default, fields with
  1363. // empty values are omitted from API requests. However, any non-pointer,
  1364. // non-interface field appearing in ForceSendFields will be sent to the
  1365. // server regardless of whether the field is empty or not. This may be
  1366. // used to include empty fields in Patch requests.
  1367. ForceSendFields []string `json:"-"`
  1368. }
  1369. func (s *ReferenceSet) MarshalJSON() ([]byte, error) {
  1370. type noMethod ReferenceSet
  1371. raw := noMethod(*s)
  1372. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1373. }
  1374. // Rule: A rule to be applied in a Policy.
  1375. type Rule struct {
  1376. // Action: Required
  1377. //
  1378. // Possible values:
  1379. // "NO_ACTION"
  1380. // "ALLOW"
  1381. // "ALLOW_WITH_LOG"
  1382. // "DENY"
  1383. // "DENY_WITH_LOG"
  1384. // "LOG"
  1385. Action string `json:"action,omitempty"`
  1386. // Conditions: Additional restrictions that must be met
  1387. Conditions []*Condition `json:"conditions,omitempty"`
  1388. // Description: Human-readable description of the rule.
  1389. Description string `json:"description,omitempty"`
  1390. // In: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this
  1391. // set of entries.
  1392. In []string `json:"in,omitempty"`
  1393. // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy
  1394. // for any entries that match the LOG action.
  1395. LogConfig []*LogConfig `json:"logConfig,omitempty"`
  1396. // NotIn: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in
  1397. // this set of entries. The format for in and not_in entries is the same
  1398. // as for members in a Binding (see google/iam/v1/policy.proto).
  1399. NotIn []string `json:"notIn,omitempty"`
  1400. // Permissions: A permission is a string of form '..' (e.g.,
  1401. // 'storage.buckets.list'). A value of '*' matches all permissions, and
  1402. // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
  1403. Permissions []string `json:"permissions,omitempty"`
  1404. // ForceSendFields is a list of field names (e.g. "Action") to
  1405. // unconditionally include in API requests. By default, fields with
  1406. // empty values are omitted from API requests. However, any non-pointer,
  1407. // non-interface field appearing in ForceSendFields will be sent to the
  1408. // server regardless of whether the field is empty or not. This may be
  1409. // used to include empty fields in Patch requests.
  1410. ForceSendFields []string `json:"-"`
  1411. }
  1412. func (s *Rule) MarshalJSON() ([]byte, error) {
  1413. type noMethod Rule
  1414. raw := noMethod(*s)
  1415. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1416. }
  1417. // SearchCallSetsRequest: The call set search request.
  1418. type SearchCallSetsRequest struct {
  1419. // Name: Only return call sets for which a substring of the name matches
  1420. // this string.
  1421. Name string `json:"name,omitempty"`
  1422. // PageSize: The maximum number of results to return in a single page.
  1423. // If unspecified, defaults to 1024.
  1424. PageSize int64 `json:"pageSize,omitempty"`
  1425. // PageToken: The continuation token, which is used to page through
  1426. // large result sets. To get the next page of results, set this
  1427. // parameter to the value of `nextPageToken` from the previous response.
  1428. PageToken string `json:"pageToken,omitempty"`
  1429. // VariantSetIds: Restrict the query to call sets within the given
  1430. // variant sets. At least one ID must be provided.
  1431. VariantSetIds []string `json:"variantSetIds,omitempty"`
  1432. // ForceSendFields is a list of field names (e.g. "Name") to
  1433. // unconditionally include in API requests. By default, fields with
  1434. // empty values are omitted from API requests. However, any non-pointer,
  1435. // non-interface field appearing in ForceSendFields will be sent to the
  1436. // server regardless of whether the field is empty or not. This may be
  1437. // used to include empty fields in Patch requests.
  1438. ForceSendFields []string `json:"-"`
  1439. }
  1440. func (s *SearchCallSetsRequest) MarshalJSON() ([]byte, error) {
  1441. type noMethod SearchCallSetsRequest
  1442. raw := noMethod(*s)
  1443. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1444. }
  1445. // SearchCallSetsResponse: The call set search response.
  1446. type SearchCallSetsResponse struct {
  1447. // CallSets: The list of matching call sets.
  1448. CallSets []*CallSet `json:"callSets,omitempty"`
  1449. // NextPageToken: The continuation token, which is used to page through
  1450. // large result sets. Provide this value in a subsequent request to
  1451. // return the next page of results. This field will be empty if there
  1452. // aren't any additional results.
  1453. NextPageToken string `json:"nextPageToken,omitempty"`
  1454. // ServerResponse contains the HTTP response code and headers from the
  1455. // server.
  1456. googleapi.ServerResponse `json:"-"`
  1457. // ForceSendFields is a list of field names (e.g. "CallSets") to
  1458. // unconditionally include in API requests. By default, fields with
  1459. // empty values are omitted from API requests. However, any non-pointer,
  1460. // non-interface field appearing in ForceSendFields will be sent to the
  1461. // server regardless of whether the field is empty or not. This may be
  1462. // used to include empty fields in Patch requests.
  1463. ForceSendFields []string `json:"-"`
  1464. }
  1465. func (s *SearchCallSetsResponse) MarshalJSON() ([]byte, error) {
  1466. type noMethod SearchCallSetsResponse
  1467. raw := noMethod(*s)
  1468. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1469. }
  1470. // SearchReadGroupSetsRequest: The read group set search request.
  1471. type SearchReadGroupSetsRequest struct {
  1472. // DatasetIds: Restricts this query to read group sets within the given
  1473. // datasets. At least one ID must be provided.
  1474. DatasetIds []string `json:"datasetIds,omitempty"`
  1475. // Name: Only return read group sets for which a substring of the name
  1476. // matches this string.
  1477. Name string `json:"name,omitempty"`
  1478. // PageSize: The maximum number of results to return in a single page.
  1479. // If unspecified, defaults to 256. The maximum value is 1024.
  1480. PageSize int64 `json:"pageSize,omitempty"`
  1481. // PageToken: The continuation token, which is used to page through
  1482. // large result sets. To get the next page of results, set this
  1483. // parameter to the value of `nextPageToken` from the previous response.
  1484. PageToken string `json:"pageToken,omitempty"`
  1485. // ForceSendFields is a list of field names (e.g. "DatasetIds") to
  1486. // unconditionally include in API requests. By default, fields with
  1487. // empty values are omitted from API requests. However, any non-pointer,
  1488. // non-interface field appearing in ForceSendFields will be sent to the
  1489. // server regardless of whether the field is empty or not. This may be
  1490. // used to include empty fields in Patch requests.
  1491. ForceSendFields []string `json:"-"`
  1492. }
  1493. func (s *SearchReadGroupSetsRequest) MarshalJSON() ([]byte, error) {
  1494. type noMethod SearchReadGroupSetsRequest
  1495. raw := noMethod(*s)
  1496. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1497. }
  1498. // SearchReadGroupSetsResponse: The read group set search response.
  1499. type SearchReadGroupSetsResponse struct {
  1500. // NextPageToken: The continuation token, which is used to page through
  1501. // large result sets. Provide this value in a subsequent request to
  1502. // return the next page of results. This field will be empty if there
  1503. // aren't any additional results.
  1504. NextPageToken string `json:"nextPageToken,omitempty"`
  1505. // ReadGroupSets: The list of matching read group sets.
  1506. ReadGroupSets []*ReadGroupSet `json:"readGroupSets,omitempty"`
  1507. // ServerResponse contains the HTTP response code and headers from the
  1508. // server.
  1509. googleapi.ServerResponse `json:"-"`
  1510. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1511. // unconditionally include in API requests. By default, fields with
  1512. // empty values are omitted from API requests. However, any non-pointer,
  1513. // non-interface field appearing in ForceSendFields will be sent to the
  1514. // server regardless of whether the field is empty or not. This may be
  1515. // used to include empty fields in Patch requests.
  1516. ForceSendFields []string `json:"-"`
  1517. }
  1518. func (s *SearchReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  1519. type noMethod SearchReadGroupSetsResponse
  1520. raw := noMethod(*s)
  1521. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1522. }
  1523. // SearchReadsRequest: The read search request.
  1524. type SearchReadsRequest struct {
  1525. // End: The end position of the range on the reference, 0-based
  1526. // exclusive. If specified, `referenceName` must also be specified.
  1527. End int64 `json:"end,omitempty,string"`
  1528. // PageSize: The maximum number of results to return in a single page.
  1529. // If unspecified, defaults to 256. The maximum value is 2048.
  1530. PageSize int64 `json:"pageSize,omitempty"`
  1531. // PageToken: The continuation token, which is used to page through
  1532. // large result sets. To get the next page of results, set this
  1533. // parameter to the value of `nextPageToken` from the previous response.
  1534. PageToken string `json:"pageToken,omitempty"`
  1535. // ReadGroupIds: The IDs of the read groups within which to search for
  1536. // reads. All specified read groups must belong to the same read group
  1537. // sets. Must specify one of `readGroupSetIds` or `readGroupIds`.
  1538. ReadGroupIds []string `json:"readGroupIds,omitempty"`
  1539. // ReadGroupSetIds: The IDs of the read groups sets within which to
  1540. // search for reads. All specified read group sets must be aligned
  1541. // against a common set of reference sequences; this defines the genomic
  1542. // coordinates for the query. Must specify one of `readGroupSetIds` or
  1543. // `readGroupIds`.
  1544. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  1545. // ReferenceName: The reference sequence name, for example `chr1`, `1`,
  1546. // or `chrX`. If set to `*`, only unmapped reads are returned. If
  1547. // unspecified, all reads (mapped and unmapped) are returned.
  1548. ReferenceName string `json:"referenceName,omitempty"`
  1549. // Start: The start position of the range on the reference, 0-based
  1550. // inclusive. If specified, `referenceName` must also be specified.
  1551. Start int64 `json:"start,omitempty,string"`
  1552. // ForceSendFields is a list of field names (e.g. "End") to
  1553. // unconditionally include in API requests. By default, fields with
  1554. // empty values are omitted from API requests. However, any non-pointer,
  1555. // non-interface field appearing in ForceSendFields will be sent to the
  1556. // server regardless of whether the field is empty or not. This may be
  1557. // used to include empty fields in Patch requests.
  1558. ForceSendFields []string `json:"-"`
  1559. }
  1560. func (s *SearchReadsRequest) MarshalJSON() ([]byte, error) {
  1561. type noMethod SearchReadsRequest
  1562. raw := noMethod(*s)
  1563. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1564. }
  1565. // SearchReadsResponse: The read search response.
  1566. type SearchReadsResponse struct {
  1567. // Alignments: The list of matching alignments sorted by mapped genomic
  1568. // coordinate, if any, ascending in position within the same reference.
  1569. // Unmapped reads, which have no position, are returned contiguously and
  1570. // are sorted in ascending lexicographic order by fragment name.
  1571. Alignments []*Read `json:"alignments,omitempty"`
  1572. // NextPageToken: The continuation token, which is used to page through
  1573. // large result sets. Provide this value in a subsequent request to
  1574. // return the next page of results. This field will be empty if there
  1575. // aren't any additional results.
  1576. NextPageToken string `json:"nextPageToken,omitempty"`
  1577. // ServerResponse contains the HTTP response code and headers from the
  1578. // server.
  1579. googleapi.ServerResponse `json:"-"`
  1580. // ForceSendFields is a list of field names (e.g. "Alignments") to
  1581. // unconditionally include in API requests. By default, fields with
  1582. // empty values are omitted from API requests. However, any non-pointer,
  1583. // non-interface field appearing in ForceSendFields will be sent to the
  1584. // server regardless of whether the field is empty or not. This may be
  1585. // used to include empty fields in Patch requests.
  1586. ForceSendFields []string `json:"-"`
  1587. }
  1588. func (s *SearchReadsResponse) MarshalJSON() ([]byte, error) {
  1589. type noMethod SearchReadsResponse
  1590. raw := noMethod(*s)
  1591. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1592. }
  1593. type SearchReferenceSetsRequest struct {
  1594. // Accessions: If present, return reference sets for which a prefix of
  1595. // any of sourceAccessions match any of these strings. Accession numbers
  1596. // typically have a main number and a version, for example
  1597. // `NC_000001.11`.
  1598. Accessions []string `json:"accessions,omitempty"`
  1599. // AssemblyId: If present, return reference sets for which a substring
  1600. // of their `assemblyId` matches this string (case insensitive).
  1601. AssemblyId string `json:"assemblyId,omitempty"`
  1602. // Md5checksums: If present, return reference sets for which the
  1603. // md5checksum matches exactly.
  1604. Md5checksums []string `json:"md5checksums,omitempty"`
  1605. // PageSize: The maximum number of results to return in a single page.
  1606. // If unspecified, defaults to 1024. The maximum value is 4096.
  1607. PageSize int64 `json:"pageSize,omitempty"`
  1608. // PageToken: The continuation token, which is used to page through
  1609. // large result sets. To get the next page of results, set this
  1610. // parameter to the value of `nextPageToken` from the previous response.
  1611. PageToken string `json:"pageToken,omitempty"`
  1612. // ForceSendFields is a list of field names (e.g. "Accessions") to
  1613. // unconditionally include in API requests. By default, fields with
  1614. // empty values are omitted from API requests. However, any non-pointer,
  1615. // non-interface field appearing in ForceSendFields will be sent to the
  1616. // server regardless of whether the field is empty or not. This may be
  1617. // used to include empty fields in Patch requests.
  1618. ForceSendFields []string `json:"-"`
  1619. }
  1620. func (s *SearchReferenceSetsRequest) MarshalJSON() ([]byte, error) {
  1621. type noMethod SearchReferenceSetsRequest
  1622. raw := noMethod(*s)
  1623. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1624. }
  1625. type SearchReferenceSetsResponse struct {
  1626. // NextPageToken: The continuation token, which is used to page through
  1627. // large result sets. Provide this value in a subsequent request to
  1628. // return the next page of results. This field will be empty if there
  1629. // aren't any additional results.
  1630. NextPageToken string `json:"nextPageToken,omitempty"`
  1631. // ReferenceSets: The matching references sets.
  1632. ReferenceSets []*ReferenceSet `json:"referenceSets,omitempty"`
  1633. // ServerResponse contains the HTTP response code and headers from the
  1634. // server.
  1635. googleapi.ServerResponse `json:"-"`
  1636. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1637. // unconditionally include in API requests. By default, fields with
  1638. // empty values are omitted from API requests. However, any non-pointer,
  1639. // non-interface field appearing in ForceSendFields will be sent to the
  1640. // server regardless of whether the field is empty or not. This may be
  1641. // used to include empty fields in Patch requests.
  1642. ForceSendFields []string `json:"-"`
  1643. }
  1644. func (s *SearchReferenceSetsResponse) MarshalJSON() ([]byte, error) {
  1645. type noMethod SearchReferenceSetsResponse
  1646. raw := noMethod(*s)
  1647. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1648. }
  1649. type SearchReferencesRequest struct {
  1650. // Accessions: If present, return references for which a prefix of any
  1651. // of sourceAccessions match any of these strings. Accession numbers
  1652. // typically have a main number and a version, for example
  1653. // `GCF_000001405.26`.
  1654. Accessions []string `json:"accessions,omitempty"`
  1655. // Md5checksums: If present, return references for which the md5checksum
  1656. // matches exactly.
  1657. Md5checksums []string `json:"md5checksums,omitempty"`
  1658. // PageSize: The maximum number of results to return in a single page.
  1659. // If unspecified, defaults to 1024. The maximum value is 4096.
  1660. PageSize int64 `json:"pageSize,omitempty"`
  1661. // PageToken: The continuation token, which is used to page through
  1662. // large result sets. To get the next page of results, set this
  1663. // parameter to the value of `nextPageToken` from the previous response.
  1664. PageToken string `json:"pageToken,omitempty"`
  1665. // ReferenceSetId: If present, return only references which belong to
  1666. // this reference set.
  1667. ReferenceSetId string `json:"referenceSetId,omitempty"`
  1668. // ForceSendFields is a list of field names (e.g. "Accessions") to
  1669. // unconditionally include in API requests. By default, fields with
  1670. // empty values are omitted from API requests. However, any non-pointer,
  1671. // non-interface field appearing in ForceSendFields will be sent to the
  1672. // server regardless of whether the field is empty or not. This may be
  1673. // used to include empty fields in Patch requests.
  1674. ForceSendFields []string `json:"-"`
  1675. }
  1676. func (s *SearchReferencesRequest) MarshalJSON() ([]byte, error) {
  1677. type noMethod SearchReferencesRequest
  1678. raw := noMethod(*s)
  1679. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1680. }
  1681. type SearchReferencesResponse struct {
  1682. // NextPageToken: The continuation token, which is used to page through
  1683. // large result sets. Provide this value in a subsequent request to
  1684. // return the next page of results. This field will be empty if there
  1685. // aren't any additional results.
  1686. NextPageToken string `json:"nextPageToken,omitempty"`
  1687. // References: The matching references.
  1688. References []*Reference `json:"references,omitempty"`
  1689. // ServerResponse contains the HTTP response code and headers from the
  1690. // server.
  1691. googleapi.ServerResponse `json:"-"`
  1692. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1693. // unconditionally include in API requests. By default, fields with
  1694. // empty values are omitted from API requests. However, any non-pointer,
  1695. // non-interface field appearing in ForceSendFields will be sent to the
  1696. // server regardless of whether the field is empty or not. This may be
  1697. // used to include empty fields in Patch requests.
  1698. ForceSendFields []string `json:"-"`
  1699. }
  1700. func (s *SearchReferencesResponse) MarshalJSON() ([]byte, error) {
  1701. type noMethod SearchReferencesResponse
  1702. raw := noMethod(*s)
  1703. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1704. }
  1705. // SearchVariantSetsRequest: The search variant sets request.
  1706. type SearchVariantSetsRequest struct {
  1707. // DatasetIds: Exactly one dataset ID must be provided here. Only
  1708. // variant sets which belong to this dataset will be returned.
  1709. DatasetIds []string `json:"datasetIds,omitempty"`
  1710. // PageSize: The maximum number of results to return in a single page.
  1711. // If unspecified, defaults to 1024.
  1712. PageSize int64 `json:"pageSize,omitempty"`
  1713. // PageToken: The continuation token, which is used to page through
  1714. // large result sets. To get the next page of results, set this
  1715. // parameter to the value of `nextPageToken` from the previous response.
  1716. PageToken string `json:"pageToken,omitempty"`
  1717. // ForceSendFields is a list of field names (e.g. "DatasetIds") to
  1718. // unconditionally include in API requests. By default, fields with
  1719. // empty values are omitted from API requests. However, any non-pointer,
  1720. // non-interface field appearing in ForceSendFields will be sent to the
  1721. // server regardless of whether the field is empty or not. This may be
  1722. // used to include empty fields in Patch requests.
  1723. ForceSendFields []string `json:"-"`
  1724. }
  1725. func (s *SearchVariantSetsRequest) MarshalJSON() ([]byte, error) {
  1726. type noMethod SearchVariantSetsRequest
  1727. raw := noMethod(*s)
  1728. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1729. }
  1730. // SearchVariantSetsResponse: The search variant sets response.
  1731. type SearchVariantSetsResponse struct {
  1732. // NextPageToken: The continuation token, which is used to page through
  1733. // large result sets. Provide this value in a subsequent request to
  1734. // return the next page of results. This field will be empty if there
  1735. // aren't any additional results.
  1736. NextPageToken string `json:"nextPageToken,omitempty"`
  1737. // VariantSets: The variant sets belonging to the requested dataset.
  1738. VariantSets []*VariantSet `json:"variantSets,omitempty"`
  1739. // ServerResponse contains the HTTP response code and headers from the
  1740. // server.
  1741. googleapi.ServerResponse `json:"-"`
  1742. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1743. // unconditionally include in API requests. By default, fields with
  1744. // empty values are omitted from API requests. However, any non-pointer,
  1745. // non-interface field appearing in ForceSendFields will be sent to the
  1746. // server regardless of whether the field is empty or not. This may be
  1747. // used to include empty fields in Patch requests.
  1748. ForceSendFields []string `json:"-"`
  1749. }
  1750. func (s *SearchVariantSetsResponse) MarshalJSON() ([]byte, error) {
  1751. type noMethod SearchVariantSetsResponse
  1752. raw := noMethod(*s)
  1753. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1754. }
  1755. // SearchVariantsRequest: The variant search request.
  1756. type SearchVariantsRequest struct {
  1757. // CallSetIds: Only return variant calls which belong to call sets with
  1758. // these ids. Leaving this blank returns all variant calls. If a variant
  1759. // has no calls belonging to any of these call sets, it won't be
  1760. // returned at all. Currently, variants with no calls from any call set
  1761. // will never be returned.
  1762. CallSetIds []string `json:"callSetIds,omitempty"`
  1763. // End: The end of the window, 0-based exclusive. If unspecified or 0,
  1764. // defaults to the length of the reference.
  1765. End int64 `json:"end,omitempty,string"`
  1766. // MaxCalls: The maximum number of calls to return in a single page.
  1767. // Note that this limit may be exceeded; at least one variant is always
  1768. // returned per page, even if it has more calls than this limit. If
  1769. // unspecified, defaults to 5000. The maximum value is 10000.
  1770. MaxCalls int64 `json:"maxCalls,omitempty"`
  1771. // PageSize: The maximum number of variants to return in a single page.
  1772. // If unspecified, defaults to 5000. The maximum value is 10000.
  1773. PageSize int64 `json:"pageSize,omitempty"`
  1774. // PageToken: The continuation token, which is used to page through
  1775. // large result sets. To get the next page of results, set this
  1776. // parameter to the value of `nextPageToken` from the previous response.
  1777. PageToken string `json:"pageToken,omitempty"`
  1778. // ReferenceName: Required. Only return variants in this reference
  1779. // sequence.
  1780. ReferenceName string `json:"referenceName,omitempty"`
  1781. // Start: The beginning of the window (0-based, inclusive) for which
  1782. // overlapping variants should be returned. If unspecified, defaults to
  1783. // 0.
  1784. Start int64 `json:"start,omitempty,string"`
  1785. // VariantName: Only return variants which have exactly this name.
  1786. VariantName string `json:"variantName,omitempty"`
  1787. // VariantSetIds: At most one variant set ID must be provided. Only
  1788. // variants from this variant set will be returned. If omitted, a call
  1789. // set id must be included in the request.
  1790. VariantSetIds []string `json:"variantSetIds,omitempty"`
  1791. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  1792. // unconditionally include in API requests. By default, fields with
  1793. // empty values are omitted from API requests. However, any non-pointer,
  1794. // non-interface field appearing in ForceSendFields will be sent to the
  1795. // server regardless of whether the field is empty or not. This may be
  1796. // used to include empty fields in Patch requests.
  1797. ForceSendFields []string `json:"-"`
  1798. }
  1799. func (s *SearchVariantsRequest) MarshalJSON() ([]byte, error) {
  1800. type noMethod SearchVariantsRequest
  1801. raw := noMethod(*s)
  1802. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1803. }
  1804. // SearchVariantsResponse: The variant search response.
  1805. type SearchVariantsResponse struct {
  1806. // NextPageToken: The continuation token, which is used to page through
  1807. // large result sets. Provide this value in a subsequent request to
  1808. // return the next page of results. This field will be empty if there
  1809. // aren't any additional results.
  1810. NextPageToken string `json:"nextPageToken,omitempty"`
  1811. // Variants: The list of matching Variants.
  1812. Variants []*Variant `json:"variants,omitempty"`
  1813. // ServerResponse contains the HTTP response code and headers from the
  1814. // server.
  1815. googleapi.ServerResponse `json:"-"`
  1816. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1817. // unconditionally include in API requests. By default, fields with
  1818. // empty values are omitted from API requests. However, any non-pointer,
  1819. // non-interface field appearing in ForceSendFields will be sent to the
  1820. // server regardless of whether the field is empty or not. This may be
  1821. // used to include empty fields in Patch requests.
  1822. ForceSendFields []string `json:"-"`
  1823. }
  1824. func (s *SearchVariantsResponse) MarshalJSON() ([]byte, error) {
  1825. type noMethod SearchVariantsResponse
  1826. raw := noMethod(*s)
  1827. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1828. }
  1829. // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1830. type SetIamPolicyRequest struct {
  1831. // Policy: REQUIRED: The complete policy to be applied to the
  1832. // `resource`. The size of the policy is limited to a few 10s of KB. An
  1833. // empty policy is a valid policy but certain Cloud Platform services
  1834. // (such as Projects) might reject them.
  1835. Policy *Policy `json:"policy,omitempty"`
  1836. // ForceSendFields is a list of field names (e.g. "Policy") to
  1837. // unconditionally include in API requests. By default, fields with
  1838. // empty values are omitted from API requests. However, any non-pointer,
  1839. // non-interface field appearing in ForceSendFields will be sent to the
  1840. // server regardless of whether the field is empty or not. This may be
  1841. // used to include empty fields in Patch requests.
  1842. ForceSendFields []string `json:"-"`
  1843. }
  1844. func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1845. type noMethod SetIamPolicyRequest
  1846. raw := noMethod(*s)
  1847. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1848. }
  1849. // Status: The `Status` type defines a logical error model that is
  1850. // suitable for different programming environments, including REST APIs
  1851. // and RPC APIs. It is used by [gRPC](https://github.com/grpc). The
  1852. // error model is designed to be: - Simple to use and understand for
  1853. // most users - Flexible enough to meet unexpected needs # Overview The
  1854. // `Status` message contains three pieces of data: error code, error
  1855. // message, and error details. The error code should be an enum value of
  1856. // google.rpc.Code, but it may accept additional error codes if needed.
  1857. // The error message should be a developer-facing English message that
  1858. // helps developers *understand* and *resolve* the error. If a localized
  1859. // user-facing error message is needed, put the localized message in the
  1860. // error details or localize it in the client. The optional error
  1861. // details may contain arbitrary information about the error. There is a
  1862. // predefined set of error detail types in the package `google.rpc`
  1863. // which can be used for common error conditions. # Language mapping The
  1864. // `Status` message is the logical representation of the error model,
  1865. // but it is not necessarily the actual wire format. When the `Status`
  1866. // message is exposed in different client libraries and different wire
  1867. // protocols, it can be mapped differently. For example, it will likely
  1868. // be mapped to some exceptions in Java, but more likely mapped to some
  1869. // error codes in C. # Other uses The error model and the `Status`
  1870. // message can be used in a variety of environments, either with or
  1871. // without APIs, to provide a consistent developer experience across
  1872. // different environments. Example uses of this error model include: -
  1873. // Partial errors. If a service needs to return partial errors to the
  1874. // client, it may embed the `Status` in the normal response to indicate
  1875. // the partial errors. - Workflow errors. A typical workflow has
  1876. // multiple steps. Each step may have a `Status` message for error
  1877. // reporting purpose. - Batch operations. If a client uses batch request
  1878. // and batch response, the `Status` message should be used directly
  1879. // inside batch response, one for each error sub-response. -
  1880. // Asynchronous operations. If an API call embeds asynchronous operation
  1881. // results in its response, the status of those operations should be
  1882. // represented directly using the `Status` message. - Logging. If some
  1883. // API errors are stored in logs, the message `Status` could be used
  1884. // directly after any stripping needed for security/privacy reasons.
  1885. type Status struct {
  1886. // Code: The status code, which should be an enum value of
  1887. // google.rpc.Code.
  1888. Code int64 `json:"code,omitempty"`
  1889. // Details: A list of messages that carry the error details. There will
  1890. // be a common set of message types for APIs to use.
  1891. Details []StatusDetails `json:"details,omitempty"`
  1892. // Message: A developer-facing error message, which should be in
  1893. // English. Any user-facing error message should be localized and sent
  1894. // in the google.rpc.Status.details field, or localized by the client.
  1895. Message string `json:"message,omitempty"`
  1896. // ForceSendFields is a list of field names (e.g. "Code") to
  1897. // unconditionally include in API requests. By default, fields with
  1898. // empty values are omitted from API requests. However, any non-pointer,
  1899. // non-interface field appearing in ForceSendFields will be sent to the
  1900. // server regardless of whether the field is empty or not. This may be
  1901. // used to include empty fields in Patch requests.
  1902. ForceSendFields []string `json:"-"`
  1903. }
  1904. func (s *Status) MarshalJSON() ([]byte, error) {
  1905. type noMethod Status
  1906. raw := noMethod(*s)
  1907. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1908. }
  1909. type StatusDetails interface{}
  1910. // StreamReadsRequest: The stream reads request.
  1911. type StreamReadsRequest struct {
  1912. // End: The end position of the range on the reference, 0-based
  1913. // exclusive. If specified, `referenceName` must also be specified.
  1914. End int64 `json:"end,omitempty,string"`
  1915. // ProjectId: The Google Developers Console project ID or number which
  1916. // will be billed for this access. The caller must have WRITE access to
  1917. // this project. Required.
  1918. ProjectId string `json:"projectId,omitempty"`
  1919. // ReadGroupSetId: The ID of the read group set from which to stream
  1920. // reads.
  1921. ReadGroupSetId string `json:"readGroupSetId,omitempty"`
  1922. // ReferenceName: The reference sequence name, for example `chr1`, `1`,
  1923. // or `chrX`. If set to *, only unmapped reads are returned.
  1924. ReferenceName string `json:"referenceName,omitempty"`
  1925. // Start: The start position of the range on the reference, 0-based
  1926. // inclusive. If specified, `referenceName` must also be specified.
  1927. Start int64 `json:"start,omitempty,string"`
  1928. // ForceSendFields is a list of field names (e.g. "End") to
  1929. // unconditionally include in API requests. By default, fields with
  1930. // empty values are omitted from API requests. However, any non-pointer,
  1931. // non-interface field appearing in ForceSendFields will be sent to the
  1932. // server regardless of whether the field is empty or not. This may be
  1933. // used to include empty fields in Patch requests.
  1934. ForceSendFields []string `json:"-"`
  1935. }
  1936. func (s *StreamReadsRequest) MarshalJSON() ([]byte, error) {
  1937. type noMethod StreamReadsRequest
  1938. raw := noMethod(*s)
  1939. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1940. }
  1941. type StreamReadsResponse struct {
  1942. Alignments []*Read `json:"alignments,omitempty"`
  1943. // ServerResponse contains the HTTP response code and headers from the
  1944. // server.
  1945. googleapi.ServerResponse `json:"-"`
  1946. // ForceSendFields is a list of field names (e.g. "Alignments") to
  1947. // unconditionally include in API requests. By default, fields with
  1948. // empty values are omitted from API requests. However, any non-pointer,
  1949. // non-interface field appearing in ForceSendFields will be sent to the
  1950. // server regardless of whether the field is empty or not. This may be
  1951. // used to include empty fields in Patch requests.
  1952. ForceSendFields []string `json:"-"`
  1953. }
  1954. func (s *StreamReadsResponse) MarshalJSON() ([]byte, error) {
  1955. type noMethod StreamReadsResponse
  1956. raw := noMethod(*s)
  1957. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1958. }
  1959. // StreamVariantsRequest: The stream variants request.
  1960. type StreamVariantsRequest struct {
  1961. // CallSetIds: Only return variant calls which belong to call sets with
  1962. // these IDs. Leaving this blank returns all variant calls.
  1963. CallSetIds []string `json:"callSetIds,omitempty"`
  1964. // End: The end of the window (0-based, exclusive) for which overlapping
  1965. // variants should be returned.
  1966. End int64 `json:"end,omitempty,string"`
  1967. // ProjectId: The Google Developers Console project ID or number which
  1968. // will be billed for this access. The caller must have WRITE access to
  1969. // this project. Required.
  1970. ProjectId string `json:"projectId,omitempty"`
  1971. // ReferenceName: Required. Only return variants in this reference
  1972. // sequence.
  1973. ReferenceName string `json:"referenceName,omitempty"`
  1974. // Start: The beginning of the window (0-based, inclusive) for which
  1975. // overlapping variants should be returned.
  1976. Start int64 `json:"start,omitempty,string"`
  1977. // VariantSetId: The variant set ID from which to stream variants.
  1978. VariantSetId string `json:"variantSetId,omitempty"`
  1979. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  1980. // unconditionally include in API requests. By default, fields with
  1981. // empty values are omitted from API requests. However, any non-pointer,
  1982. // non-interface field appearing in ForceSendFields will be sent to the
  1983. // server regardless of whether the field is empty or not. This may be
  1984. // used to include empty fields in Patch requests.
  1985. ForceSendFields []string `json:"-"`
  1986. }
  1987. func (s *StreamVariantsRequest) MarshalJSON() ([]byte, error) {
  1988. type noMethod StreamVariantsRequest
  1989. raw := noMethod(*s)
  1990. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1991. }
  1992. type StreamVariantsResponse struct {
  1993. Variants []*Variant `json:"variants,omitempty"`
  1994. // ServerResponse contains the HTTP response code and headers from the
  1995. // server.
  1996. googleapi.ServerResponse `json:"-"`
  1997. // ForceSendFields is a list of field names (e.g. "Variants") to
  1998. // unconditionally include in API requests. By default, fields with
  1999. // empty values are omitted from API requests. However, any non-pointer,
  2000. // non-interface field appearing in ForceSendFields will be sent to the
  2001. // server regardless of whether the field is empty or not. This may be
  2002. // used to include empty fields in Patch requests.
  2003. ForceSendFields []string `json:"-"`
  2004. }
  2005. func (s *StreamVariantsResponse) MarshalJSON() ([]byte, error) {
  2006. type noMethod StreamVariantsResponse
  2007. raw := noMethod(*s)
  2008. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2009. }
  2010. // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  2011. // method.
  2012. type TestIamPermissionsRequest struct {
  2013. // Permissions: REQUIRED: The set of permissions to check for the
  2014. // 'resource'. Permissions with wildcards (such as '*' or 'storage.*')
  2015. // are not allowed. Allowed permissions are: *
  2016. // `genomics.datasets.create` * `genomics.datasets.delete` *
  2017. // `genomics.datasets.get` * `genomics.datasets.list` *
  2018. // `genomics.datasets.update` * `genomics.datasets.getIamPolicy` *
  2019. // `genomics.datasets.setIamPolicy`
  2020. Permissions []string `json:"permissions,omitempty"`
  2021. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2022. // unconditionally include in API requests. By default, fields with
  2023. // empty values are omitted from API requests. However, any non-pointer,
  2024. // non-interface field appearing in ForceSendFields will be sent to the
  2025. // server regardless of whether the field is empty or not. This may be
  2026. // used to include empty fields in Patch requests.
  2027. ForceSendFields []string `json:"-"`
  2028. }
  2029. func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2030. type noMethod TestIamPermissionsRequest
  2031. raw := noMethod(*s)
  2032. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2033. }
  2034. // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2035. // method.
  2036. type TestIamPermissionsResponse struct {
  2037. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2038. // the caller is allowed.
  2039. Permissions []string `json:"permissions,omitempty"`
  2040. // ServerResponse contains the HTTP response code and headers from the
  2041. // server.
  2042. googleapi.ServerResponse `json:"-"`
  2043. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2044. // unconditionally include in API requests. By default, fields with
  2045. // empty values are omitted from API requests. However, any non-pointer,
  2046. // non-interface field appearing in ForceSendFields will be sent to the
  2047. // server regardless of whether the field is empty or not. This may be
  2048. // used to include empty fields in Patch requests.
  2049. ForceSendFields []string `json:"-"`
  2050. }
  2051. func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2052. type noMethod TestIamPermissionsResponse
  2053. raw := noMethod(*s)
  2054. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2055. }
  2056. type UndeleteDatasetRequest struct {
  2057. }
  2058. // Variant: A variant represents a change in DNA sequence relative to a
  2059. // reference sequence. For example, a variant could represent a SNP or
  2060. // an insertion. Variants belong to a variant set. For more genomics
  2061. // resource definitions, see [Fundamentals of Google
  2062. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2063. // omics) Each of the calls on a variant represent a determination of
  2064. // genotype with respect to that variant. For example, a call might
  2065. // assign probability of 0.32 to the occurrence of a SNP named rs1234 in
  2066. // a sample named NA12345. A call belongs to a call set, which contains
  2067. // related calls typically from one sample.
  2068. type Variant struct {
  2069. // AlternateBases: The bases that appear instead of the reference bases.
  2070. AlternateBases []string `json:"alternateBases,omitempty"`
  2071. // Calls: The variant calls for this particular variant. Each one
  2072. // represents the determination of genotype with respect to this
  2073. // variant.
  2074. Calls []*VariantCall `json:"calls,omitempty"`
  2075. // Created: The date this variant was created, in milliseconds from the
  2076. // epoch.
  2077. Created int64 `json:"created,omitempty,string"`
  2078. // End: The end position (0-based) of this variant. This corresponds to
  2079. // the first base after the last base in the reference allele. So, the
  2080. // length of the reference allele is (end - start). This is useful for
  2081. // variants that don't explicitly give alternate bases, for example
  2082. // large deletions.
  2083. End int64 `json:"end,omitempty,string"`
  2084. // Filter: A list of filters (normally quality filters) this variant has
  2085. // failed. `PASS` indicates this variant has passed all filters.
  2086. Filter []string `json:"filter,omitempty"`
  2087. // Id: The server-generated variant ID, unique across all variants.
  2088. Id string `json:"id,omitempty"`
  2089. // Info: A map of additional variant information. This must be of the
  2090. // form map (string key mapping to a list of string values).
  2091. Info *VariantInfo `json:"info,omitempty"`
  2092. // Names: Names for the variant, for example a RefSNP ID.
  2093. Names []string `json:"names,omitempty"`
  2094. // Quality: A measure of how likely this variant is to be real. A higher
  2095. // value is better.
  2096. Quality float64 `json:"quality,omitempty"`
  2097. // ReferenceBases: The reference bases for this variant. They start at
  2098. // the given position.
  2099. ReferenceBases string `json:"referenceBases,omitempty"`
  2100. // ReferenceName: The reference on which this variant occurs. (such as
  2101. // `chr20` or `X`)
  2102. ReferenceName string `json:"referenceName,omitempty"`
  2103. // Start: The position at which this variant occurs (0-based). This
  2104. // corresponds to the first base of the string of reference bases.
  2105. Start int64 `json:"start,omitempty,string"`
  2106. // VariantSetId: The ID of the variant set this variant belongs to.
  2107. VariantSetId string `json:"variantSetId,omitempty"`
  2108. // ServerResponse contains the HTTP response code and headers from the
  2109. // server.
  2110. googleapi.ServerResponse `json:"-"`
  2111. // ForceSendFields is a list of field names (e.g. "AlternateBases") to
  2112. // unconditionally include in API requests. By default, fields with
  2113. // empty values are omitted from API requests. However, any non-pointer,
  2114. // non-interface field appearing in ForceSendFields will be sent to the
  2115. // server regardless of whether the field is empty or not. This may be
  2116. // used to include empty fields in Patch requests.
  2117. ForceSendFields []string `json:"-"`
  2118. }
  2119. func (s *Variant) MarshalJSON() ([]byte, error) {
  2120. type noMethod Variant
  2121. raw := noMethod(*s)
  2122. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2123. }
  2124. // VariantInfo: A map of additional variant information. This must be of
  2125. // the form map (string key mapping to a list of string values).
  2126. type VariantInfo struct {
  2127. }
  2128. // VariantCall: A call represents the determination of genotype with
  2129. // respect to a particular variant. It may include associated
  2130. // information such as quality and phasing. For example, a call might
  2131. // assign a probability of 0.32 to the occurrence of a SNP named rs1234
  2132. // in a call set with the name NA12345.
  2133. type VariantCall struct {
  2134. // CallSetId: The ID of the call set this variant call belongs to.
  2135. CallSetId string `json:"callSetId,omitempty"`
  2136. // CallSetName: The name of the call set this variant call belongs to.
  2137. CallSetName string `json:"callSetName,omitempty"`
  2138. // Genotype: The genotype of this variant call. Each value represents
  2139. // either the value of the `referenceBases` field or a 1-based index
  2140. // into `alternateBases`. If a variant had a `referenceBases` value of
  2141. // `T` and an `alternateBases` value of `["A", "C"]`, and the `genotype`
  2142. // was `[2, 1]`, that would mean the call represented the heterozygous
  2143. // value `CA` for this variant. If the `genotype` was instead `[0, 1]`,
  2144. // the represented value would be `TA`. Ordering of the genotype values
  2145. // is important if the `phaseset` is present. If a genotype is not
  2146. // called (that is, a `.` is present in the GT string) -1 is returned.
  2147. Genotype []int64 `json:"genotype,omitempty"`
  2148. // GenotypeLikelihood: The genotype likelihoods for this variant call.
  2149. // Each array entry represents how likely a specific genotype is for
  2150. // this call. The value ordering is defined by the GL tag in the VCF
  2151. // spec. If Phred-scaled genotype likelihood scores (PL) are available
  2152. // and log10(P) genotype likelihood scores (GL) are not, PL scores are
  2153. // converted to GL scores. If both are available, PL scores are stored
  2154. // in `info`.
  2155. GenotypeLikelihood []float64 `json:"genotypeLikelihood,omitempty"`
  2156. // Info: A map of additional variant call information. This must be of
  2157. // the form map (string key mapping to a list of string values).
  2158. Info *VariantCallInfo `json:"info,omitempty"`
  2159. // Phaseset: If this field is present, this variant call's genotype
  2160. // ordering implies the phase of the bases and is consistent with any
  2161. // other variant calls in the same reference sequence which have the
  2162. // same phaseset value. When importing data from VCF, if the genotype
  2163. // data was phased but no phase set was specified this field will be set
  2164. // to `*`.
  2165. Phaseset string `json:"phaseset,omitempty"`
  2166. // ForceSendFields is a list of field names (e.g. "CallSetId") to
  2167. // unconditionally include in API requests. By default, fields with
  2168. // empty values are omitted from API requests. However, any non-pointer,
  2169. // non-interface field appearing in ForceSendFields will be sent to the
  2170. // server regardless of whether the field is empty or not. This may be
  2171. // used to include empty fields in Patch requests.
  2172. ForceSendFields []string `json:"-"`
  2173. }
  2174. func (s *VariantCall) MarshalJSON() ([]byte, error) {
  2175. type noMethod VariantCall
  2176. raw := noMethod(*s)
  2177. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2178. }
  2179. // VariantCallInfo: A map of additional variant call information. This
  2180. // must be of the form map (string key mapping to a list of string
  2181. // values).
  2182. type VariantCallInfo struct {
  2183. }
  2184. // VariantSet: A variant set is a collection of call sets and variants.
  2185. // It contains summary statistics of those contents. A variant set
  2186. // belongs to a dataset. For more genomics resource definitions, see
  2187. // [Fundamentals of Google
  2188. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2189. // omics)
  2190. type VariantSet struct {
  2191. // DatasetId: The dataset to which this variant set belongs.
  2192. DatasetId string `json:"datasetId,omitempty"`
  2193. // Id: The server-generated variant set ID, unique across all variant
  2194. // sets.
  2195. Id string `json:"id,omitempty"`
  2196. // Metadata: The metadata associated with this variant set.
  2197. Metadata []*VariantSetMetadata `json:"metadata,omitempty"`
  2198. // ReferenceBounds: A list of all references used by the variants in a
  2199. // variant set with associated coordinate upper bounds for each one.
  2200. ReferenceBounds []*ReferenceBound `json:"referenceBounds,omitempty"`
  2201. // ReferenceSetId: The reference set to which the variant set is mapped.
  2202. // The reference set describes the alignment provenance of the variant
  2203. // set, while the `referenceBounds` describe the shape of the actual
  2204. // variant data. The reference set's reference names are a superset of
  2205. // those found in the `referenceBounds`. For example, given a variant
  2206. // set that is mapped to the GRCh38 reference set and contains a single
  2207. // variant on reference 'X', `referenceBounds` would contain only an
  2208. // entry for 'X', while the associated reference set enumerates all
  2209. // possible references: '1', '2', 'X', 'Y', 'MT', etc.
  2210. ReferenceSetId string `json:"referenceSetId,omitempty"`
  2211. // ServerResponse contains the HTTP response code and headers from the
  2212. // server.
  2213. googleapi.ServerResponse `json:"-"`
  2214. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  2215. // unconditionally include in API requests. By default, fields with
  2216. // empty values are omitted from API requests. However, any non-pointer,
  2217. // non-interface field appearing in ForceSendFields will be sent to the
  2218. // server regardless of whether the field is empty or not. This may be
  2219. // used to include empty fields in Patch requests.
  2220. ForceSendFields []string `json:"-"`
  2221. }
  2222. func (s *VariantSet) MarshalJSON() ([]byte, error) {
  2223. type noMethod VariantSet
  2224. raw := noMethod(*s)
  2225. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2226. }
  2227. // VariantSetMetadata: Metadata describes a single piece of variant call
  2228. // metadata. These data include a top level key and either a single
  2229. // value string (value) or a list of key-value pairs (info.) Value and
  2230. // info are mutually exclusive.
  2231. type VariantSetMetadata struct {
  2232. // Description: A textual description of this metadata.
  2233. Description string `json:"description,omitempty"`
  2234. // Id: User-provided ID field, not enforced by this API. Two or more
  2235. // pieces of structured metadata with identical id and key fields are
  2236. // considered equivalent.
  2237. Id string `json:"id,omitempty"`
  2238. // Info: Remaining structured metadata key-value pairs. This must be of
  2239. // the form map (string key mapping to a list of string values).
  2240. Info *VariantSetMetadataInfo `json:"info,omitempty"`
  2241. // Key: The top-level key.
  2242. Key string `json:"key,omitempty"`
  2243. // Number: The number of values that can be included in a field
  2244. // described by this metadata.
  2245. Number string `json:"number,omitempty"`
  2246. // Type: The type of data. Possible types include: Integer, Float, Flag,
  2247. // Character, and String.
  2248. //
  2249. // Possible values:
  2250. // "TYPE_UNSPECIFIED"
  2251. // "INTEGER"
  2252. // "FLOAT"
  2253. // "FLAG"
  2254. // "CHARACTER"
  2255. // "STRING"
  2256. Type string `json:"type,omitempty"`
  2257. // Value: The value field for simple metadata
  2258. Value string `json:"value,omitempty"`
  2259. // ForceSendFields is a list of field names (e.g. "Description") to
  2260. // unconditionally include in API requests. By default, fields with
  2261. // empty values are omitted from API requests. However, any non-pointer,
  2262. // non-interface field appearing in ForceSendFields will be sent to the
  2263. // server regardless of whether the field is empty or not. This may be
  2264. // used to include empty fields in Patch requests.
  2265. ForceSendFields []string `json:"-"`
  2266. }
  2267. func (s *VariantSetMetadata) MarshalJSON() ([]byte, error) {
  2268. type noMethod VariantSetMetadata
  2269. raw := noMethod(*s)
  2270. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  2271. }
  2272. // VariantSetMetadataInfo: Remaining structured metadata key-value
  2273. // pairs. This must be of the form map (string key mapping to a list of
  2274. // string values).
  2275. type VariantSetMetadataInfo struct {
  2276. }
  2277. // method id "genomics.callsets.create":
  2278. type CallsetsCreateCall struct {
  2279. s *Service
  2280. callset *CallSet
  2281. urlParams_ gensupport.URLParams
  2282. ctx_ context.Context
  2283. }
  2284. // Create: Creates a new call set. For the definitions of call sets and
  2285. // other genomics resources, see [Fundamentals of Google
  2286. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2287. // omics)
  2288. func (r *CallsetsService) Create(callset *CallSet) *CallsetsCreateCall {
  2289. c := &CallsetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2290. c.callset = callset
  2291. return c
  2292. }
  2293. // Fields allows partial responses to be retrieved. See
  2294. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2295. // for more information.
  2296. func (c *CallsetsCreateCall) Fields(s ...googleapi.Field) *CallsetsCreateCall {
  2297. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2298. return c
  2299. }
  2300. // Context sets the context to be used in this call's Do method. Any
  2301. // pending HTTP request will be aborted if the provided context is
  2302. // canceled.
  2303. func (c *CallsetsCreateCall) Context(ctx context.Context) *CallsetsCreateCall {
  2304. c.ctx_ = ctx
  2305. return c
  2306. }
  2307. func (c *CallsetsCreateCall) doRequest(alt string) (*http.Response, error) {
  2308. var body io.Reader = nil
  2309. body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
  2310. if err != nil {
  2311. return nil, err
  2312. }
  2313. ctype := "application/json"
  2314. c.urlParams_.Set("alt", alt)
  2315. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets")
  2316. urls += "?" + c.urlParams_.Encode()
  2317. req, _ := http.NewRequest("POST", urls, body)
  2318. googleapi.SetOpaque(req.URL)
  2319. req.Header.Set("Content-Type", ctype)
  2320. req.Header.Set("User-Agent", c.s.userAgent())
  2321. if c.ctx_ != nil {
  2322. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2323. }
  2324. return c.s.client.Do(req)
  2325. }
  2326. // Do executes the "genomics.callsets.create" call.
  2327. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  2328. // code is an error. Response headers are in either
  2329. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  2330. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2331. // check whether the returned error was because http.StatusNotModified
  2332. // was returned.
  2333. func (c *CallsetsCreateCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  2334. gensupport.SetOptions(c.urlParams_, opts...)
  2335. res, err := c.doRequest("json")
  2336. if res != nil && res.StatusCode == http.StatusNotModified {
  2337. if res.Body != nil {
  2338. res.Body.Close()
  2339. }
  2340. return nil, &googleapi.Error{
  2341. Code: res.StatusCode,
  2342. Header: res.Header,
  2343. }
  2344. }
  2345. if err != nil {
  2346. return nil, err
  2347. }
  2348. defer googleapi.CloseBody(res)
  2349. if err := googleapi.CheckResponse(res); err != nil {
  2350. return nil, err
  2351. }
  2352. ret := &CallSet{
  2353. ServerResponse: googleapi.ServerResponse{
  2354. Header: res.Header,
  2355. HTTPStatusCode: res.StatusCode,
  2356. },
  2357. }
  2358. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2359. return nil, err
  2360. }
  2361. return ret, nil
  2362. // {
  2363. // "description": "Creates a new call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  2364. // "httpMethod": "POST",
  2365. // "id": "genomics.callsets.create",
  2366. // "path": "v1/callsets",
  2367. // "request": {
  2368. // "$ref": "CallSet"
  2369. // },
  2370. // "response": {
  2371. // "$ref": "CallSet"
  2372. // },
  2373. // "scopes": [
  2374. // "https://www.googleapis.com/auth/cloud-platform",
  2375. // "https://www.googleapis.com/auth/genomics"
  2376. // ]
  2377. // }
  2378. }
  2379. // method id "genomics.callsets.delete":
  2380. type CallsetsDeleteCall struct {
  2381. s *Service
  2382. callSetId string
  2383. urlParams_ gensupport.URLParams
  2384. ctx_ context.Context
  2385. }
  2386. // Delete: Deletes a call set. For the definitions of call sets and
  2387. // other genomics resources, see [Fundamentals of Google
  2388. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2389. // omics)
  2390. func (r *CallsetsService) Delete(callSetId string) *CallsetsDeleteCall {
  2391. c := &CallsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2392. c.callSetId = callSetId
  2393. return c
  2394. }
  2395. // Fields allows partial responses to be retrieved. See
  2396. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2397. // for more information.
  2398. func (c *CallsetsDeleteCall) Fields(s ...googleapi.Field) *CallsetsDeleteCall {
  2399. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2400. return c
  2401. }
  2402. // Context sets the context to be used in this call's Do method. Any
  2403. // pending HTTP request will be aborted if the provided context is
  2404. // canceled.
  2405. func (c *CallsetsDeleteCall) Context(ctx context.Context) *CallsetsDeleteCall {
  2406. c.ctx_ = ctx
  2407. return c
  2408. }
  2409. func (c *CallsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2410. var body io.Reader = nil
  2411. c.urlParams_.Set("alt", alt)
  2412. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  2413. urls += "?" + c.urlParams_.Encode()
  2414. req, _ := http.NewRequest("DELETE", urls, body)
  2415. googleapi.Expand(req.URL, map[string]string{
  2416. "callSetId": c.callSetId,
  2417. })
  2418. req.Header.Set("User-Agent", c.s.userAgent())
  2419. if c.ctx_ != nil {
  2420. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2421. }
  2422. return c.s.client.Do(req)
  2423. }
  2424. // Do executes the "genomics.callsets.delete" call.
  2425. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2426. // code is an error. Response headers are in either
  2427. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2428. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2429. // check whether the returned error was because http.StatusNotModified
  2430. // was returned.
  2431. func (c *CallsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2432. gensupport.SetOptions(c.urlParams_, opts...)
  2433. res, err := c.doRequest("json")
  2434. if res != nil && res.StatusCode == http.StatusNotModified {
  2435. if res.Body != nil {
  2436. res.Body.Close()
  2437. }
  2438. return nil, &googleapi.Error{
  2439. Code: res.StatusCode,
  2440. Header: res.Header,
  2441. }
  2442. }
  2443. if err != nil {
  2444. return nil, err
  2445. }
  2446. defer googleapi.CloseBody(res)
  2447. if err := googleapi.CheckResponse(res); err != nil {
  2448. return nil, err
  2449. }
  2450. ret := &Empty{
  2451. ServerResponse: googleapi.ServerResponse{
  2452. Header: res.Header,
  2453. HTTPStatusCode: res.StatusCode,
  2454. },
  2455. }
  2456. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2457. return nil, err
  2458. }
  2459. return ret, nil
  2460. // {
  2461. // "description": "Deletes a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  2462. // "httpMethod": "DELETE",
  2463. // "id": "genomics.callsets.delete",
  2464. // "parameterOrder": [
  2465. // "callSetId"
  2466. // ],
  2467. // "parameters": {
  2468. // "callSetId": {
  2469. // "description": "The ID of the call set to be deleted.",
  2470. // "location": "path",
  2471. // "required": true,
  2472. // "type": "string"
  2473. // }
  2474. // },
  2475. // "path": "v1/callsets/{callSetId}",
  2476. // "response": {
  2477. // "$ref": "Empty"
  2478. // },
  2479. // "scopes": [
  2480. // "https://www.googleapis.com/auth/cloud-platform",
  2481. // "https://www.googleapis.com/auth/genomics"
  2482. // ]
  2483. // }
  2484. }
  2485. // method id "genomics.callsets.get":
  2486. type CallsetsGetCall struct {
  2487. s *Service
  2488. callSetId string
  2489. urlParams_ gensupport.URLParams
  2490. ifNoneMatch_ string
  2491. ctx_ context.Context
  2492. }
  2493. // Get: Gets a call set by ID. For the definitions of call sets and
  2494. // other genomics resources, see [Fundamentals of Google
  2495. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2496. // omics)
  2497. func (r *CallsetsService) Get(callSetId string) *CallsetsGetCall {
  2498. c := &CallsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2499. c.callSetId = callSetId
  2500. return c
  2501. }
  2502. // Fields allows partial responses to be retrieved. See
  2503. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2504. // for more information.
  2505. func (c *CallsetsGetCall) Fields(s ...googleapi.Field) *CallsetsGetCall {
  2506. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2507. return c
  2508. }
  2509. // IfNoneMatch sets the optional parameter which makes the operation
  2510. // fail if the object's ETag matches the given value. This is useful for
  2511. // getting updates only after the object has changed since the last
  2512. // request. Use googleapi.IsNotModified to check whether the response
  2513. // error from Do is the result of In-None-Match.
  2514. func (c *CallsetsGetCall) IfNoneMatch(entityTag string) *CallsetsGetCall {
  2515. c.ifNoneMatch_ = entityTag
  2516. return c
  2517. }
  2518. // Context sets the context to be used in this call's Do method. Any
  2519. // pending HTTP request will be aborted if the provided context is
  2520. // canceled.
  2521. func (c *CallsetsGetCall) Context(ctx context.Context) *CallsetsGetCall {
  2522. c.ctx_ = ctx
  2523. return c
  2524. }
  2525. func (c *CallsetsGetCall) doRequest(alt string) (*http.Response, error) {
  2526. var body io.Reader = nil
  2527. c.urlParams_.Set("alt", alt)
  2528. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  2529. urls += "?" + c.urlParams_.Encode()
  2530. req, _ := http.NewRequest("GET", urls, body)
  2531. googleapi.Expand(req.URL, map[string]string{
  2532. "callSetId": c.callSetId,
  2533. })
  2534. req.Header.Set("User-Agent", c.s.userAgent())
  2535. if c.ifNoneMatch_ != "" {
  2536. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  2537. }
  2538. if c.ctx_ != nil {
  2539. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2540. }
  2541. return c.s.client.Do(req)
  2542. }
  2543. // Do executes the "genomics.callsets.get" call.
  2544. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  2545. // code is an error. Response headers are in either
  2546. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  2547. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2548. // check whether the returned error was because http.StatusNotModified
  2549. // was returned.
  2550. func (c *CallsetsGetCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  2551. gensupport.SetOptions(c.urlParams_, opts...)
  2552. res, err := c.doRequest("json")
  2553. if res != nil && res.StatusCode == http.StatusNotModified {
  2554. if res.Body != nil {
  2555. res.Body.Close()
  2556. }
  2557. return nil, &googleapi.Error{
  2558. Code: res.StatusCode,
  2559. Header: res.Header,
  2560. }
  2561. }
  2562. if err != nil {
  2563. return nil, err
  2564. }
  2565. defer googleapi.CloseBody(res)
  2566. if err := googleapi.CheckResponse(res); err != nil {
  2567. return nil, err
  2568. }
  2569. ret := &CallSet{
  2570. ServerResponse: googleapi.ServerResponse{
  2571. Header: res.Header,
  2572. HTTPStatusCode: res.StatusCode,
  2573. },
  2574. }
  2575. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2576. return nil, err
  2577. }
  2578. return ret, nil
  2579. // {
  2580. // "description": "Gets a call set by ID. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  2581. // "httpMethod": "GET",
  2582. // "id": "genomics.callsets.get",
  2583. // "parameterOrder": [
  2584. // "callSetId"
  2585. // ],
  2586. // "parameters": {
  2587. // "callSetId": {
  2588. // "description": "The ID of the call set.",
  2589. // "location": "path",
  2590. // "required": true,
  2591. // "type": "string"
  2592. // }
  2593. // },
  2594. // "path": "v1/callsets/{callSetId}",
  2595. // "response": {
  2596. // "$ref": "CallSet"
  2597. // },
  2598. // "scopes": [
  2599. // "https://www.googleapis.com/auth/cloud-platform",
  2600. // "https://www.googleapis.com/auth/genomics",
  2601. // "https://www.googleapis.com/auth/genomics.readonly"
  2602. // ]
  2603. // }
  2604. }
  2605. // method id "genomics.callsets.patch":
  2606. type CallsetsPatchCall struct {
  2607. s *Service
  2608. callSetId string
  2609. callset *CallSet
  2610. urlParams_ gensupport.URLParams
  2611. ctx_ context.Context
  2612. }
  2613. // Patch: Updates a call set. For the definitions of call sets and other
  2614. // genomics resources, see [Fundamentals of Google
  2615. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2616. // omics) This method supports patch semantics.
  2617. func (r *CallsetsService) Patch(callSetId string, callset *CallSet) *CallsetsPatchCall {
  2618. c := &CallsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2619. c.callSetId = callSetId
  2620. c.callset = callset
  2621. return c
  2622. }
  2623. // UpdateMask sets the optional parameter "updateMask": An optional mask
  2624. // specifying which fields to update. At this time, the only mutable
  2625. // field is name. The only acceptable value is "name". If unspecified,
  2626. // all mutable fields will be updated.
  2627. func (c *CallsetsPatchCall) UpdateMask(updateMask string) *CallsetsPatchCall {
  2628. c.urlParams_.Set("updateMask", updateMask)
  2629. return c
  2630. }
  2631. // Fields allows partial responses to be retrieved. See
  2632. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2633. // for more information.
  2634. func (c *CallsetsPatchCall) Fields(s ...googleapi.Field) *CallsetsPatchCall {
  2635. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2636. return c
  2637. }
  2638. // Context sets the context to be used in this call's Do method. Any
  2639. // pending HTTP request will be aborted if the provided context is
  2640. // canceled.
  2641. func (c *CallsetsPatchCall) Context(ctx context.Context) *CallsetsPatchCall {
  2642. c.ctx_ = ctx
  2643. return c
  2644. }
  2645. func (c *CallsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  2646. var body io.Reader = nil
  2647. body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
  2648. if err != nil {
  2649. return nil, err
  2650. }
  2651. ctype := "application/json"
  2652. c.urlParams_.Set("alt", alt)
  2653. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  2654. urls += "?" + c.urlParams_.Encode()
  2655. req, _ := http.NewRequest("PATCH", urls, body)
  2656. googleapi.Expand(req.URL, map[string]string{
  2657. "callSetId": c.callSetId,
  2658. })
  2659. req.Header.Set("Content-Type", ctype)
  2660. req.Header.Set("User-Agent", c.s.userAgent())
  2661. if c.ctx_ != nil {
  2662. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2663. }
  2664. return c.s.client.Do(req)
  2665. }
  2666. // Do executes the "genomics.callsets.patch" call.
  2667. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  2668. // code is an error. Response headers are in either
  2669. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  2670. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2671. // check whether the returned error was because http.StatusNotModified
  2672. // was returned.
  2673. func (c *CallsetsPatchCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  2674. gensupport.SetOptions(c.urlParams_, opts...)
  2675. res, err := c.doRequest("json")
  2676. if res != nil && res.StatusCode == http.StatusNotModified {
  2677. if res.Body != nil {
  2678. res.Body.Close()
  2679. }
  2680. return nil, &googleapi.Error{
  2681. Code: res.StatusCode,
  2682. Header: res.Header,
  2683. }
  2684. }
  2685. if err != nil {
  2686. return nil, err
  2687. }
  2688. defer googleapi.CloseBody(res)
  2689. if err := googleapi.CheckResponse(res); err != nil {
  2690. return nil, err
  2691. }
  2692. ret := &CallSet{
  2693. ServerResponse: googleapi.ServerResponse{
  2694. Header: res.Header,
  2695. HTTPStatusCode: res.StatusCode,
  2696. },
  2697. }
  2698. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2699. return nil, err
  2700. }
  2701. return ret, nil
  2702. // {
  2703. // "description": "Updates a call set. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.",
  2704. // "httpMethod": "PATCH",
  2705. // "id": "genomics.callsets.patch",
  2706. // "parameterOrder": [
  2707. // "callSetId"
  2708. // ],
  2709. // "parameters": {
  2710. // "callSetId": {
  2711. // "description": "The ID of the call set to be updated.",
  2712. // "location": "path",
  2713. // "required": true,
  2714. // "type": "string"
  2715. // },
  2716. // "updateMask": {
  2717. // "description": "An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is \"name\". If unspecified, all mutable fields will be updated.",
  2718. // "location": "query",
  2719. // "type": "string"
  2720. // }
  2721. // },
  2722. // "path": "v1/callsets/{callSetId}",
  2723. // "request": {
  2724. // "$ref": "CallSet"
  2725. // },
  2726. // "response": {
  2727. // "$ref": "CallSet"
  2728. // },
  2729. // "scopes": [
  2730. // "https://www.googleapis.com/auth/cloud-platform",
  2731. // "https://www.googleapis.com/auth/genomics"
  2732. // ]
  2733. // }
  2734. }
  2735. // method id "genomics.callsets.search":
  2736. type CallsetsSearchCall struct {
  2737. s *Service
  2738. searchcallsetsrequest *SearchCallSetsRequest
  2739. urlParams_ gensupport.URLParams
  2740. ctx_ context.Context
  2741. }
  2742. // Search: Gets a list of call sets matching the criteria. For the
  2743. // definitions of call sets and other genomics resources, see
  2744. // [Fundamentals of Google
  2745. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2746. // omics) Implements
  2747. // [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/bl
  2748. // ob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).
  2749. func (r *CallsetsService) Search(searchcallsetsrequest *SearchCallSetsRequest) *CallsetsSearchCall {
  2750. c := &CallsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2751. c.searchcallsetsrequest = searchcallsetsrequest
  2752. return c
  2753. }
  2754. // Fields allows partial responses to be retrieved. See
  2755. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2756. // for more information.
  2757. func (c *CallsetsSearchCall) Fields(s ...googleapi.Field) *CallsetsSearchCall {
  2758. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2759. return c
  2760. }
  2761. // Context sets the context to be used in this call's Do method. Any
  2762. // pending HTTP request will be aborted if the provided context is
  2763. // canceled.
  2764. func (c *CallsetsSearchCall) Context(ctx context.Context) *CallsetsSearchCall {
  2765. c.ctx_ = ctx
  2766. return c
  2767. }
  2768. func (c *CallsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  2769. var body io.Reader = nil
  2770. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchcallsetsrequest)
  2771. if err != nil {
  2772. return nil, err
  2773. }
  2774. ctype := "application/json"
  2775. c.urlParams_.Set("alt", alt)
  2776. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/search")
  2777. urls += "?" + c.urlParams_.Encode()
  2778. req, _ := http.NewRequest("POST", urls, body)
  2779. googleapi.SetOpaque(req.URL)
  2780. req.Header.Set("Content-Type", ctype)
  2781. req.Header.Set("User-Agent", c.s.userAgent())
  2782. if c.ctx_ != nil {
  2783. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2784. }
  2785. return c.s.client.Do(req)
  2786. }
  2787. // Do executes the "genomics.callsets.search" call.
  2788. // Exactly one of *SearchCallSetsResponse or error will be non-nil. Any
  2789. // non-2xx status code is an error. Response headers are in either
  2790. // *SearchCallSetsResponse.ServerResponse.Header or (if a response was
  2791. // returned at all) in error.(*googleapi.Error).Header. Use
  2792. // googleapi.IsNotModified to check whether the returned error was
  2793. // because http.StatusNotModified was returned.
  2794. func (c *CallsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCallSetsResponse, error) {
  2795. gensupport.SetOptions(c.urlParams_, opts...)
  2796. res, err := c.doRequest("json")
  2797. if res != nil && res.StatusCode == http.StatusNotModified {
  2798. if res.Body != nil {
  2799. res.Body.Close()
  2800. }
  2801. return nil, &googleapi.Error{
  2802. Code: res.StatusCode,
  2803. Header: res.Header,
  2804. }
  2805. }
  2806. if err != nil {
  2807. return nil, err
  2808. }
  2809. defer googleapi.CloseBody(res)
  2810. if err := googleapi.CheckResponse(res); err != nil {
  2811. return nil, err
  2812. }
  2813. ret := &SearchCallSetsResponse{
  2814. ServerResponse: googleapi.ServerResponse{
  2815. Header: res.Header,
  2816. HTTPStatusCode: res.StatusCode,
  2817. },
  2818. }
  2819. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2820. return nil, err
  2821. }
  2822. return ret, nil
  2823. // {
  2824. // "description": "Gets a list of call sets matching the criteria. For the definitions of call sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).",
  2825. // "httpMethod": "POST",
  2826. // "id": "genomics.callsets.search",
  2827. // "path": "v1/callsets/search",
  2828. // "request": {
  2829. // "$ref": "SearchCallSetsRequest"
  2830. // },
  2831. // "response": {
  2832. // "$ref": "SearchCallSetsResponse"
  2833. // },
  2834. // "scopes": [
  2835. // "https://www.googleapis.com/auth/cloud-platform",
  2836. // "https://www.googleapis.com/auth/genomics",
  2837. // "https://www.googleapis.com/auth/genomics.readonly"
  2838. // ]
  2839. // }
  2840. }
  2841. // method id "genomics.datasets.create":
  2842. type DatasetsCreateCall struct {
  2843. s *Service
  2844. dataset *Dataset
  2845. urlParams_ gensupport.URLParams
  2846. ctx_ context.Context
  2847. }
  2848. // Create: Creates a new dataset. For the definitions of datasets and
  2849. // other genomics resources, see [Fundamentals of Google
  2850. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2851. // omics)
  2852. func (r *DatasetsService) Create(dataset *Dataset) *DatasetsCreateCall {
  2853. c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2854. c.dataset = dataset
  2855. return c
  2856. }
  2857. // Fields allows partial responses to be retrieved. See
  2858. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2859. // for more information.
  2860. func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall {
  2861. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2862. return c
  2863. }
  2864. // Context sets the context to be used in this call's Do method. Any
  2865. // pending HTTP request will be aborted if the provided context is
  2866. // canceled.
  2867. func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall {
  2868. c.ctx_ = ctx
  2869. return c
  2870. }
  2871. func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
  2872. var body io.Reader = nil
  2873. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  2874. if err != nil {
  2875. return nil, err
  2876. }
  2877. ctype := "application/json"
  2878. c.urlParams_.Set("alt", alt)
  2879. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets")
  2880. urls += "?" + c.urlParams_.Encode()
  2881. req, _ := http.NewRequest("POST", urls, body)
  2882. googleapi.SetOpaque(req.URL)
  2883. req.Header.Set("Content-Type", ctype)
  2884. req.Header.Set("User-Agent", c.s.userAgent())
  2885. if c.ctx_ != nil {
  2886. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2887. }
  2888. return c.s.client.Do(req)
  2889. }
  2890. // Do executes the "genomics.datasets.create" call.
  2891. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  2892. // code is an error. Response headers are in either
  2893. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  2894. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2895. // check whether the returned error was because http.StatusNotModified
  2896. // was returned.
  2897. func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  2898. gensupport.SetOptions(c.urlParams_, opts...)
  2899. res, err := c.doRequest("json")
  2900. if res != nil && res.StatusCode == http.StatusNotModified {
  2901. if res.Body != nil {
  2902. res.Body.Close()
  2903. }
  2904. return nil, &googleapi.Error{
  2905. Code: res.StatusCode,
  2906. Header: res.Header,
  2907. }
  2908. }
  2909. if err != nil {
  2910. return nil, err
  2911. }
  2912. defer googleapi.CloseBody(res)
  2913. if err := googleapi.CheckResponse(res); err != nil {
  2914. return nil, err
  2915. }
  2916. ret := &Dataset{
  2917. ServerResponse: googleapi.ServerResponse{
  2918. Header: res.Header,
  2919. HTTPStatusCode: res.StatusCode,
  2920. },
  2921. }
  2922. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  2923. return nil, err
  2924. }
  2925. return ret, nil
  2926. // {
  2927. // "description": "Creates a new dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  2928. // "httpMethod": "POST",
  2929. // "id": "genomics.datasets.create",
  2930. // "path": "v1/datasets",
  2931. // "request": {
  2932. // "$ref": "Dataset"
  2933. // },
  2934. // "response": {
  2935. // "$ref": "Dataset"
  2936. // },
  2937. // "scopes": [
  2938. // "https://www.googleapis.com/auth/cloud-platform",
  2939. // "https://www.googleapis.com/auth/genomics"
  2940. // ]
  2941. // }
  2942. }
  2943. // method id "genomics.datasets.delete":
  2944. type DatasetsDeleteCall struct {
  2945. s *Service
  2946. datasetId string
  2947. urlParams_ gensupport.URLParams
  2948. ctx_ context.Context
  2949. }
  2950. // Delete: Deletes a dataset. For the definitions of datasets and other
  2951. // genomics resources, see [Fundamentals of Google
  2952. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  2953. // omics)
  2954. func (r *DatasetsService) Delete(datasetId string) *DatasetsDeleteCall {
  2955. c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2956. c.datasetId = datasetId
  2957. return c
  2958. }
  2959. // Fields allows partial responses to be retrieved. See
  2960. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2961. // for more information.
  2962. func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall {
  2963. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2964. return c
  2965. }
  2966. // Context sets the context to be used in this call's Do method. Any
  2967. // pending HTTP request will be aborted if the provided context is
  2968. // canceled.
  2969. func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall {
  2970. c.ctx_ = ctx
  2971. return c
  2972. }
  2973. func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2974. var body io.Reader = nil
  2975. c.urlParams_.Set("alt", alt)
  2976. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  2977. urls += "?" + c.urlParams_.Encode()
  2978. req, _ := http.NewRequest("DELETE", urls, body)
  2979. googleapi.Expand(req.URL, map[string]string{
  2980. "datasetId": c.datasetId,
  2981. })
  2982. req.Header.Set("User-Agent", c.s.userAgent())
  2983. if c.ctx_ != nil {
  2984. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2985. }
  2986. return c.s.client.Do(req)
  2987. }
  2988. // Do executes the "genomics.datasets.delete" call.
  2989. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2990. // code is an error. Response headers are in either
  2991. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2992. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2993. // check whether the returned error was because http.StatusNotModified
  2994. // was returned.
  2995. func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2996. gensupport.SetOptions(c.urlParams_, opts...)
  2997. res, err := c.doRequest("json")
  2998. if res != nil && res.StatusCode == http.StatusNotModified {
  2999. if res.Body != nil {
  3000. res.Body.Close()
  3001. }
  3002. return nil, &googleapi.Error{
  3003. Code: res.StatusCode,
  3004. Header: res.Header,
  3005. }
  3006. }
  3007. if err != nil {
  3008. return nil, err
  3009. }
  3010. defer googleapi.CloseBody(res)
  3011. if err := googleapi.CheckResponse(res); err != nil {
  3012. return nil, err
  3013. }
  3014. ret := &Empty{
  3015. ServerResponse: googleapi.ServerResponse{
  3016. Header: res.Header,
  3017. HTTPStatusCode: res.StatusCode,
  3018. },
  3019. }
  3020. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3021. return nil, err
  3022. }
  3023. return ret, nil
  3024. // {
  3025. // "description": "Deletes a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  3026. // "httpMethod": "DELETE",
  3027. // "id": "genomics.datasets.delete",
  3028. // "parameterOrder": [
  3029. // "datasetId"
  3030. // ],
  3031. // "parameters": {
  3032. // "datasetId": {
  3033. // "description": "The ID of the dataset to be deleted.",
  3034. // "location": "path",
  3035. // "required": true,
  3036. // "type": "string"
  3037. // }
  3038. // },
  3039. // "path": "v1/datasets/{datasetId}",
  3040. // "response": {
  3041. // "$ref": "Empty"
  3042. // },
  3043. // "scopes": [
  3044. // "https://www.googleapis.com/auth/cloud-platform",
  3045. // "https://www.googleapis.com/auth/genomics"
  3046. // ]
  3047. // }
  3048. }
  3049. // method id "genomics.datasets.get":
  3050. type DatasetsGetCall struct {
  3051. s *Service
  3052. datasetId string
  3053. urlParams_ gensupport.URLParams
  3054. ifNoneMatch_ string
  3055. ctx_ context.Context
  3056. }
  3057. // Get: Gets a dataset by ID. For the definitions of datasets and other
  3058. // genomics resources, see [Fundamentals of Google
  3059. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3060. // omics)
  3061. func (r *DatasetsService) Get(datasetId string) *DatasetsGetCall {
  3062. c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3063. c.datasetId = datasetId
  3064. return c
  3065. }
  3066. // Fields allows partial responses to be retrieved. See
  3067. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3068. // for more information.
  3069. func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall {
  3070. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3071. return c
  3072. }
  3073. // IfNoneMatch sets the optional parameter which makes the operation
  3074. // fail if the object's ETag matches the given value. This is useful for
  3075. // getting updates only after the object has changed since the last
  3076. // request. Use googleapi.IsNotModified to check whether the response
  3077. // error from Do is the result of In-None-Match.
  3078. func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall {
  3079. c.ifNoneMatch_ = entityTag
  3080. return c
  3081. }
  3082. // Context sets the context to be used in this call's Do method. Any
  3083. // pending HTTP request will be aborted if the provided context is
  3084. // canceled.
  3085. func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall {
  3086. c.ctx_ = ctx
  3087. return c
  3088. }
  3089. func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) {
  3090. var body io.Reader = nil
  3091. c.urlParams_.Set("alt", alt)
  3092. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  3093. urls += "?" + c.urlParams_.Encode()
  3094. req, _ := http.NewRequest("GET", urls, body)
  3095. googleapi.Expand(req.URL, map[string]string{
  3096. "datasetId": c.datasetId,
  3097. })
  3098. req.Header.Set("User-Agent", c.s.userAgent())
  3099. if c.ifNoneMatch_ != "" {
  3100. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  3101. }
  3102. if c.ctx_ != nil {
  3103. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3104. }
  3105. return c.s.client.Do(req)
  3106. }
  3107. // Do executes the "genomics.datasets.get" call.
  3108. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  3109. // code is an error. Response headers are in either
  3110. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  3111. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3112. // check whether the returned error was because http.StatusNotModified
  3113. // was returned.
  3114. func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  3115. gensupport.SetOptions(c.urlParams_, opts...)
  3116. res, err := c.doRequest("json")
  3117. if res != nil && res.StatusCode == http.StatusNotModified {
  3118. if res.Body != nil {
  3119. res.Body.Close()
  3120. }
  3121. return nil, &googleapi.Error{
  3122. Code: res.StatusCode,
  3123. Header: res.Header,
  3124. }
  3125. }
  3126. if err != nil {
  3127. return nil, err
  3128. }
  3129. defer googleapi.CloseBody(res)
  3130. if err := googleapi.CheckResponse(res); err != nil {
  3131. return nil, err
  3132. }
  3133. ret := &Dataset{
  3134. ServerResponse: googleapi.ServerResponse{
  3135. Header: res.Header,
  3136. HTTPStatusCode: res.StatusCode,
  3137. },
  3138. }
  3139. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3140. return nil, err
  3141. }
  3142. return ret, nil
  3143. // {
  3144. // "description": "Gets a dataset by ID. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  3145. // "httpMethod": "GET",
  3146. // "id": "genomics.datasets.get",
  3147. // "parameterOrder": [
  3148. // "datasetId"
  3149. // ],
  3150. // "parameters": {
  3151. // "datasetId": {
  3152. // "description": "The ID of the dataset.",
  3153. // "location": "path",
  3154. // "required": true,
  3155. // "type": "string"
  3156. // }
  3157. // },
  3158. // "path": "v1/datasets/{datasetId}",
  3159. // "response": {
  3160. // "$ref": "Dataset"
  3161. // },
  3162. // "scopes": [
  3163. // "https://www.googleapis.com/auth/cloud-platform",
  3164. // "https://www.googleapis.com/auth/genomics",
  3165. // "https://www.googleapis.com/auth/genomics.readonly"
  3166. // ]
  3167. // }
  3168. }
  3169. // method id "genomics.datasets.getIamPolicy":
  3170. type DatasetsGetIamPolicyCall struct {
  3171. s *Service
  3172. resource string
  3173. getiampolicyrequest *GetIamPolicyRequest
  3174. urlParams_ gensupport.URLParams
  3175. ctx_ context.Context
  3176. }
  3177. // GetIamPolicy: Gets the access control policy for the dataset. This is
  3178. // empty if the policy or resource does not exist. See Getting a Policy
  3179. // for more information. For the definitions of datasets and other
  3180. // genomics resources, see [Fundamentals of Google
  3181. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3182. // omics)
  3183. func (r *DatasetsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *DatasetsGetIamPolicyCall {
  3184. c := &DatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3185. c.resource = resource
  3186. c.getiampolicyrequest = getiampolicyrequest
  3187. return c
  3188. }
  3189. // Fields allows partial responses to be retrieved. See
  3190. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3191. // for more information.
  3192. func (c *DatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *DatasetsGetIamPolicyCall {
  3193. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3194. return c
  3195. }
  3196. // Context sets the context to be used in this call's Do method. Any
  3197. // pending HTTP request will be aborted if the provided context is
  3198. // canceled.
  3199. func (c *DatasetsGetIamPolicyCall) Context(ctx context.Context) *DatasetsGetIamPolicyCall {
  3200. c.ctx_ = ctx
  3201. return c
  3202. }
  3203. func (c *DatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3204. var body io.Reader = nil
  3205. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  3206. if err != nil {
  3207. return nil, err
  3208. }
  3209. ctype := "application/json"
  3210. c.urlParams_.Set("alt", alt)
  3211. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3212. urls += "?" + c.urlParams_.Encode()
  3213. req, _ := http.NewRequest("POST", urls, body)
  3214. googleapi.Expand(req.URL, map[string]string{
  3215. "resource": c.resource,
  3216. })
  3217. req.Header.Set("Content-Type", ctype)
  3218. req.Header.Set("User-Agent", c.s.userAgent())
  3219. if c.ctx_ != nil {
  3220. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3221. }
  3222. return c.s.client.Do(req)
  3223. }
  3224. // Do executes the "genomics.datasets.getIamPolicy" call.
  3225. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3226. // code is an error. Response headers are in either
  3227. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3228. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3229. // check whether the returned error was because http.StatusNotModified
  3230. // was returned.
  3231. func (c *DatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3232. gensupport.SetOptions(c.urlParams_, opts...)
  3233. res, err := c.doRequest("json")
  3234. if res != nil && res.StatusCode == http.StatusNotModified {
  3235. if res.Body != nil {
  3236. res.Body.Close()
  3237. }
  3238. return nil, &googleapi.Error{
  3239. Code: res.StatusCode,
  3240. Header: res.Header,
  3241. }
  3242. }
  3243. if err != nil {
  3244. return nil, err
  3245. }
  3246. defer googleapi.CloseBody(res)
  3247. if err := googleapi.CheckResponse(res); err != nil {
  3248. return nil, err
  3249. }
  3250. ret := &Policy{
  3251. ServerResponse: googleapi.ServerResponse{
  3252. Header: res.Header,
  3253. HTTPStatusCode: res.StatusCode,
  3254. },
  3255. }
  3256. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3257. return nil, err
  3258. }
  3259. return ret, nil
  3260. // {
  3261. // "description": "Gets the access control policy for the dataset. This is empty if the policy or resource does not exist. See Getting a Policy for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  3262. // "httpMethod": "POST",
  3263. // "id": "genomics.datasets.getIamPolicy",
  3264. // "parameterOrder": [
  3265. // "resource"
  3266. // ],
  3267. // "parameters": {
  3268. // "resource": {
  3269. // "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.",
  3270. // "location": "path",
  3271. // "pattern": "^datasets/[^/]*$",
  3272. // "required": true,
  3273. // "type": "string"
  3274. // }
  3275. // },
  3276. // "path": "v1/{+resource}:getIamPolicy",
  3277. // "request": {
  3278. // "$ref": "GetIamPolicyRequest"
  3279. // },
  3280. // "response": {
  3281. // "$ref": "Policy"
  3282. // },
  3283. // "scopes": [
  3284. // "https://www.googleapis.com/auth/cloud-platform",
  3285. // "https://www.googleapis.com/auth/genomics"
  3286. // ]
  3287. // }
  3288. }
  3289. // method id "genomics.datasets.list":
  3290. type DatasetsListCall struct {
  3291. s *Service
  3292. urlParams_ gensupport.URLParams
  3293. ifNoneMatch_ string
  3294. ctx_ context.Context
  3295. }
  3296. // List: Lists datasets within a project. For the definitions of
  3297. // datasets and other genomics resources, see [Fundamentals of Google
  3298. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3299. // omics)
  3300. func (r *DatasetsService) List() *DatasetsListCall {
  3301. c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3302. return c
  3303. }
  3304. // PageSize sets the optional parameter "pageSize": The maximum number
  3305. // of results to return in a single page. If unspecified, defaults to
  3306. // 50. The maximum value is 1024.
  3307. func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall {
  3308. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3309. return c
  3310. }
  3311. // PageToken sets the optional parameter "pageToken": The continuation
  3312. // token, which is used to page through large result sets. To get the
  3313. // next page of results, set this parameter to the value of
  3314. // `nextPageToken` from the previous response.
  3315. func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall {
  3316. c.urlParams_.Set("pageToken", pageToken)
  3317. return c
  3318. }
  3319. // ProjectId sets the optional parameter "projectId": Required. The
  3320. // project to list datasets for.
  3321. func (c *DatasetsListCall) ProjectId(projectId string) *DatasetsListCall {
  3322. c.urlParams_.Set("projectId", projectId)
  3323. return c
  3324. }
  3325. // Fields allows partial responses to be retrieved. See
  3326. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3327. // for more information.
  3328. func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall {
  3329. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3330. return c
  3331. }
  3332. // IfNoneMatch sets the optional parameter which makes the operation
  3333. // fail if the object's ETag matches the given value. This is useful for
  3334. // getting updates only after the object has changed since the last
  3335. // request. Use googleapi.IsNotModified to check whether the response
  3336. // error from Do is the result of In-None-Match.
  3337. func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall {
  3338. c.ifNoneMatch_ = entityTag
  3339. return c
  3340. }
  3341. // Context sets the context to be used in this call's Do method. Any
  3342. // pending HTTP request will be aborted if the provided context is
  3343. // canceled.
  3344. func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall {
  3345. c.ctx_ = ctx
  3346. return c
  3347. }
  3348. func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) {
  3349. var body io.Reader = nil
  3350. c.urlParams_.Set("alt", alt)
  3351. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets")
  3352. urls += "?" + c.urlParams_.Encode()
  3353. req, _ := http.NewRequest("GET", urls, body)
  3354. googleapi.SetOpaque(req.URL)
  3355. req.Header.Set("User-Agent", c.s.userAgent())
  3356. if c.ifNoneMatch_ != "" {
  3357. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  3358. }
  3359. if c.ctx_ != nil {
  3360. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3361. }
  3362. return c.s.client.Do(req)
  3363. }
  3364. // Do executes the "genomics.datasets.list" call.
  3365. // Exactly one of *ListDatasetsResponse or error will be non-nil. Any
  3366. // non-2xx status code is an error. Response headers are in either
  3367. // *ListDatasetsResponse.ServerResponse.Header or (if a response was
  3368. // returned at all) in error.(*googleapi.Error).Header. Use
  3369. // googleapi.IsNotModified to check whether the returned error was
  3370. // because http.StatusNotModified was returned.
  3371. func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
  3372. gensupport.SetOptions(c.urlParams_, opts...)
  3373. res, err := c.doRequest("json")
  3374. if res != nil && res.StatusCode == http.StatusNotModified {
  3375. if res.Body != nil {
  3376. res.Body.Close()
  3377. }
  3378. return nil, &googleapi.Error{
  3379. Code: res.StatusCode,
  3380. Header: res.Header,
  3381. }
  3382. }
  3383. if err != nil {
  3384. return nil, err
  3385. }
  3386. defer googleapi.CloseBody(res)
  3387. if err := googleapi.CheckResponse(res); err != nil {
  3388. return nil, err
  3389. }
  3390. ret := &ListDatasetsResponse{
  3391. ServerResponse: googleapi.ServerResponse{
  3392. Header: res.Header,
  3393. HTTPStatusCode: res.StatusCode,
  3394. },
  3395. }
  3396. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3397. return nil, err
  3398. }
  3399. return ret, nil
  3400. // {
  3401. // "description": "Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  3402. // "httpMethod": "GET",
  3403. // "id": "genomics.datasets.list",
  3404. // "parameters": {
  3405. // "pageSize": {
  3406. // "description": "The maximum number of results to return in a single page. If unspecified, defaults to 50. The maximum value is 1024.",
  3407. // "format": "int32",
  3408. // "location": "query",
  3409. // "type": "integer"
  3410. // },
  3411. // "pageToken": {
  3412. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.",
  3413. // "location": "query",
  3414. // "type": "string"
  3415. // },
  3416. // "projectId": {
  3417. // "description": "Required. The project to list datasets for.",
  3418. // "location": "query",
  3419. // "type": "string"
  3420. // }
  3421. // },
  3422. // "path": "v1/datasets",
  3423. // "response": {
  3424. // "$ref": "ListDatasetsResponse"
  3425. // },
  3426. // "scopes": [
  3427. // "https://www.googleapis.com/auth/cloud-platform",
  3428. // "https://www.googleapis.com/auth/genomics",
  3429. // "https://www.googleapis.com/auth/genomics.readonly"
  3430. // ]
  3431. // }
  3432. }
  3433. // Pages invokes f for each page of results.
  3434. // A non-nil error returned from f will halt the iteration.
  3435. // The provided context supersedes any context provided to the Context method.
  3436. func (c *DatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
  3437. c.ctx_ = ctx
  3438. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3439. for {
  3440. x, err := c.Do()
  3441. if err != nil {
  3442. return err
  3443. }
  3444. if err := f(x); err != nil {
  3445. return err
  3446. }
  3447. if x.NextPageToken == "" {
  3448. return nil
  3449. }
  3450. c.PageToken(x.NextPageToken)
  3451. }
  3452. }
  3453. // method id "genomics.datasets.patch":
  3454. type DatasetsPatchCall struct {
  3455. s *Service
  3456. datasetId string
  3457. dataset *Dataset
  3458. urlParams_ gensupport.URLParams
  3459. ctx_ context.Context
  3460. }
  3461. // Patch: Updates a dataset. For the definitions of datasets and other
  3462. // genomics resources, see [Fundamentals of Google
  3463. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3464. // omics) This method supports patch semantics.
  3465. func (r *DatasetsService) Patch(datasetId string, dataset *Dataset) *DatasetsPatchCall {
  3466. c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3467. c.datasetId = datasetId
  3468. c.dataset = dataset
  3469. return c
  3470. }
  3471. // UpdateMask sets the optional parameter "updateMask": An optional mask
  3472. // specifying which fields to update. At this time, the only mutable
  3473. // field is name. The only acceptable value is "name". If unspecified,
  3474. // all mutable fields will be updated.
  3475. func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall {
  3476. c.urlParams_.Set("updateMask", updateMask)
  3477. return c
  3478. }
  3479. // Fields allows partial responses to be retrieved. See
  3480. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3481. // for more information.
  3482. func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall {
  3483. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3484. return c
  3485. }
  3486. // Context sets the context to be used in this call's Do method. Any
  3487. // pending HTTP request will be aborted if the provided context is
  3488. // canceled.
  3489. func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall {
  3490. c.ctx_ = ctx
  3491. return c
  3492. }
  3493. func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
  3494. var body io.Reader = nil
  3495. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  3496. if err != nil {
  3497. return nil, err
  3498. }
  3499. ctype := "application/json"
  3500. c.urlParams_.Set("alt", alt)
  3501. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  3502. urls += "?" + c.urlParams_.Encode()
  3503. req, _ := http.NewRequest("PATCH", urls, body)
  3504. googleapi.Expand(req.URL, map[string]string{
  3505. "datasetId": c.datasetId,
  3506. })
  3507. req.Header.Set("Content-Type", ctype)
  3508. req.Header.Set("User-Agent", c.s.userAgent())
  3509. if c.ctx_ != nil {
  3510. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3511. }
  3512. return c.s.client.Do(req)
  3513. }
  3514. // Do executes the "genomics.datasets.patch" call.
  3515. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  3516. // code is an error. Response headers are in either
  3517. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  3518. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3519. // check whether the returned error was because http.StatusNotModified
  3520. // was returned.
  3521. func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  3522. gensupport.SetOptions(c.urlParams_, opts...)
  3523. res, err := c.doRequest("json")
  3524. if res != nil && res.StatusCode == http.StatusNotModified {
  3525. if res.Body != nil {
  3526. res.Body.Close()
  3527. }
  3528. return nil, &googleapi.Error{
  3529. Code: res.StatusCode,
  3530. Header: res.Header,
  3531. }
  3532. }
  3533. if err != nil {
  3534. return nil, err
  3535. }
  3536. defer googleapi.CloseBody(res)
  3537. if err := googleapi.CheckResponse(res); err != nil {
  3538. return nil, err
  3539. }
  3540. ret := &Dataset{
  3541. ServerResponse: googleapi.ServerResponse{
  3542. Header: res.Header,
  3543. HTTPStatusCode: res.StatusCode,
  3544. },
  3545. }
  3546. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3547. return nil, err
  3548. }
  3549. return ret, nil
  3550. // {
  3551. // "description": "Updates a dataset. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.",
  3552. // "httpMethod": "PATCH",
  3553. // "id": "genomics.datasets.patch",
  3554. // "parameterOrder": [
  3555. // "datasetId"
  3556. // ],
  3557. // "parameters": {
  3558. // "datasetId": {
  3559. // "description": "The ID of the dataset to be updated.",
  3560. // "location": "path",
  3561. // "required": true,
  3562. // "type": "string"
  3563. // },
  3564. // "updateMask": {
  3565. // "description": "An optional mask specifying which fields to update. At this time, the only mutable field is name. The only acceptable value is \"name\". If unspecified, all mutable fields will be updated.",
  3566. // "location": "query",
  3567. // "type": "string"
  3568. // }
  3569. // },
  3570. // "path": "v1/datasets/{datasetId}",
  3571. // "request": {
  3572. // "$ref": "Dataset"
  3573. // },
  3574. // "response": {
  3575. // "$ref": "Dataset"
  3576. // },
  3577. // "scopes": [
  3578. // "https://www.googleapis.com/auth/cloud-platform",
  3579. // "https://www.googleapis.com/auth/genomics"
  3580. // ]
  3581. // }
  3582. }
  3583. // method id "genomics.datasets.setIamPolicy":
  3584. type DatasetsSetIamPolicyCall struct {
  3585. s *Service
  3586. resource string
  3587. setiampolicyrequest *SetIamPolicyRequest
  3588. urlParams_ gensupport.URLParams
  3589. ctx_ context.Context
  3590. }
  3591. // SetIamPolicy: Sets the access control policy on the specified
  3592. // dataset. Replaces any existing policy. For the definitions of
  3593. // datasets and other genomics resources, see [Fundamentals of Google
  3594. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3595. // omics) See Setting a Policy for more information.
  3596. func (r *DatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *DatasetsSetIamPolicyCall {
  3597. c := &DatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3598. c.resource = resource
  3599. c.setiampolicyrequest = setiampolicyrequest
  3600. return c
  3601. }
  3602. // Fields allows partial responses to be retrieved. See
  3603. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3604. // for more information.
  3605. func (c *DatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *DatasetsSetIamPolicyCall {
  3606. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3607. return c
  3608. }
  3609. // Context sets the context to be used in this call's Do method. Any
  3610. // pending HTTP request will be aborted if the provided context is
  3611. // canceled.
  3612. func (c *DatasetsSetIamPolicyCall) Context(ctx context.Context) *DatasetsSetIamPolicyCall {
  3613. c.ctx_ = ctx
  3614. return c
  3615. }
  3616. func (c *DatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3617. var body io.Reader = nil
  3618. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3619. if err != nil {
  3620. return nil, err
  3621. }
  3622. ctype := "application/json"
  3623. c.urlParams_.Set("alt", alt)
  3624. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3625. urls += "?" + c.urlParams_.Encode()
  3626. req, _ := http.NewRequest("POST", urls, body)
  3627. googleapi.Expand(req.URL, map[string]string{
  3628. "resource": c.resource,
  3629. })
  3630. req.Header.Set("Content-Type", ctype)
  3631. req.Header.Set("User-Agent", c.s.userAgent())
  3632. if c.ctx_ != nil {
  3633. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3634. }
  3635. return c.s.client.Do(req)
  3636. }
  3637. // Do executes the "genomics.datasets.setIamPolicy" call.
  3638. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3639. // code is an error. Response headers are in either
  3640. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3641. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3642. // check whether the returned error was because http.StatusNotModified
  3643. // was returned.
  3644. func (c *DatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3645. gensupport.SetOptions(c.urlParams_, opts...)
  3646. res, err := c.doRequest("json")
  3647. if res != nil && res.StatusCode == http.StatusNotModified {
  3648. if res.Body != nil {
  3649. res.Body.Close()
  3650. }
  3651. return nil, &googleapi.Error{
  3652. Code: res.StatusCode,
  3653. Header: res.Header,
  3654. }
  3655. }
  3656. if err != nil {
  3657. return nil, err
  3658. }
  3659. defer googleapi.CloseBody(res)
  3660. if err := googleapi.CheckResponse(res); err != nil {
  3661. return nil, err
  3662. }
  3663. ret := &Policy{
  3664. ServerResponse: googleapi.ServerResponse{
  3665. Header: res.Header,
  3666. HTTPStatusCode: res.StatusCode,
  3667. },
  3668. }
  3669. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3670. return nil, err
  3671. }
  3672. return ret, nil
  3673. // {
  3674. // "description": "Sets the access control policy on the specified dataset. Replaces any existing policy. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) See Setting a Policy for more information.",
  3675. // "httpMethod": "POST",
  3676. // "id": "genomics.datasets.setIamPolicy",
  3677. // "parameterOrder": [
  3678. // "resource"
  3679. // ],
  3680. // "parameters": {
  3681. // "resource": {
  3682. // "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.",
  3683. // "location": "path",
  3684. // "pattern": "^datasets/[^/]*$",
  3685. // "required": true,
  3686. // "type": "string"
  3687. // }
  3688. // },
  3689. // "path": "v1/{+resource}:setIamPolicy",
  3690. // "request": {
  3691. // "$ref": "SetIamPolicyRequest"
  3692. // },
  3693. // "response": {
  3694. // "$ref": "Policy"
  3695. // },
  3696. // "scopes": [
  3697. // "https://www.googleapis.com/auth/cloud-platform",
  3698. // "https://www.googleapis.com/auth/genomics"
  3699. // ]
  3700. // }
  3701. }
  3702. // method id "genomics.datasets.testIamPermissions":
  3703. type DatasetsTestIamPermissionsCall struct {
  3704. s *Service
  3705. resource string
  3706. testiampermissionsrequest *TestIamPermissionsRequest
  3707. urlParams_ gensupport.URLParams
  3708. ctx_ context.Context
  3709. }
  3710. // TestIamPermissions: Returns permissions that a caller has on the
  3711. // specified resource. See Testing Permissions for more information. For
  3712. // the definitions of datasets and other genomics resources, see
  3713. // [Fundamentals of Google
  3714. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3715. // omics)
  3716. func (r *DatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *DatasetsTestIamPermissionsCall {
  3717. c := &DatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3718. c.resource = resource
  3719. c.testiampermissionsrequest = testiampermissionsrequest
  3720. return c
  3721. }
  3722. // Fields allows partial responses to be retrieved. See
  3723. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3724. // for more information.
  3725. func (c *DatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DatasetsTestIamPermissionsCall {
  3726. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3727. return c
  3728. }
  3729. // Context sets the context to be used in this call's Do method. Any
  3730. // pending HTTP request will be aborted if the provided context is
  3731. // canceled.
  3732. func (c *DatasetsTestIamPermissionsCall) Context(ctx context.Context) *DatasetsTestIamPermissionsCall {
  3733. c.ctx_ = ctx
  3734. return c
  3735. }
  3736. func (c *DatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3737. var body io.Reader = nil
  3738. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3739. if err != nil {
  3740. return nil, err
  3741. }
  3742. ctype := "application/json"
  3743. c.urlParams_.Set("alt", alt)
  3744. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  3745. urls += "?" + c.urlParams_.Encode()
  3746. req, _ := http.NewRequest("POST", urls, body)
  3747. googleapi.Expand(req.URL, map[string]string{
  3748. "resource": c.resource,
  3749. })
  3750. req.Header.Set("Content-Type", ctype)
  3751. req.Header.Set("User-Agent", c.s.userAgent())
  3752. if c.ctx_ != nil {
  3753. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3754. }
  3755. return c.s.client.Do(req)
  3756. }
  3757. // Do executes the "genomics.datasets.testIamPermissions" call.
  3758. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  3759. // Any non-2xx status code is an error. Response headers are in either
  3760. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  3761. // was returned at all) in error.(*googleapi.Error).Header. Use
  3762. // googleapi.IsNotModified to check whether the returned error was
  3763. // because http.StatusNotModified was returned.
  3764. func (c *DatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3765. gensupport.SetOptions(c.urlParams_, opts...)
  3766. res, err := c.doRequest("json")
  3767. if res != nil && res.StatusCode == http.StatusNotModified {
  3768. if res.Body != nil {
  3769. res.Body.Close()
  3770. }
  3771. return nil, &googleapi.Error{
  3772. Code: res.StatusCode,
  3773. Header: res.Header,
  3774. }
  3775. }
  3776. if err != nil {
  3777. return nil, err
  3778. }
  3779. defer googleapi.CloseBody(res)
  3780. if err := googleapi.CheckResponse(res); err != nil {
  3781. return nil, err
  3782. }
  3783. ret := &TestIamPermissionsResponse{
  3784. ServerResponse: googleapi.ServerResponse{
  3785. Header: res.Header,
  3786. HTTPStatusCode: res.StatusCode,
  3787. },
  3788. }
  3789. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3790. return nil, err
  3791. }
  3792. return ret, nil
  3793. // {
  3794. // "description": "Returns permissions that a caller has on the specified resource. See Testing Permissions for more information. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  3795. // "httpMethod": "POST",
  3796. // "id": "genomics.datasets.testIamPermissions",
  3797. // "parameterOrder": [
  3798. // "resource"
  3799. // ],
  3800. // "parameters": {
  3801. // "resource": {
  3802. // "description": "REQUIRED: The resource for which policy is being specified. Format is `datasets/`.",
  3803. // "location": "path",
  3804. // "pattern": "^datasets/[^/]*$",
  3805. // "required": true,
  3806. // "type": "string"
  3807. // }
  3808. // },
  3809. // "path": "v1/{+resource}:testIamPermissions",
  3810. // "request": {
  3811. // "$ref": "TestIamPermissionsRequest"
  3812. // },
  3813. // "response": {
  3814. // "$ref": "TestIamPermissionsResponse"
  3815. // },
  3816. // "scopes": [
  3817. // "https://www.googleapis.com/auth/cloud-platform",
  3818. // "https://www.googleapis.com/auth/genomics"
  3819. // ]
  3820. // }
  3821. }
  3822. // method id "genomics.datasets.undelete":
  3823. type DatasetsUndeleteCall struct {
  3824. s *Service
  3825. datasetId string
  3826. undeletedatasetrequest *UndeleteDatasetRequest
  3827. urlParams_ gensupport.URLParams
  3828. ctx_ context.Context
  3829. }
  3830. // Undelete: Undeletes a dataset by restoring a dataset which was
  3831. // deleted via this API. For the definitions of datasets and other
  3832. // genomics resources, see [Fundamentals of Google
  3833. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  3834. // omics) This operation is only possible for a week after the deletion
  3835. // occurred.
  3836. func (r *DatasetsService) Undelete(datasetId string, undeletedatasetrequest *UndeleteDatasetRequest) *DatasetsUndeleteCall {
  3837. c := &DatasetsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3838. c.datasetId = datasetId
  3839. c.undeletedatasetrequest = undeletedatasetrequest
  3840. return c
  3841. }
  3842. // Fields allows partial responses to be retrieved. See
  3843. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3844. // for more information.
  3845. func (c *DatasetsUndeleteCall) Fields(s ...googleapi.Field) *DatasetsUndeleteCall {
  3846. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3847. return c
  3848. }
  3849. // Context sets the context to be used in this call's Do method. Any
  3850. // pending HTTP request will be aborted if the provided context is
  3851. // canceled.
  3852. func (c *DatasetsUndeleteCall) Context(ctx context.Context) *DatasetsUndeleteCall {
  3853. c.ctx_ = ctx
  3854. return c
  3855. }
  3856. func (c *DatasetsUndeleteCall) doRequest(alt string) (*http.Response, error) {
  3857. var body io.Reader = nil
  3858. body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletedatasetrequest)
  3859. if err != nil {
  3860. return nil, err
  3861. }
  3862. ctype := "application/json"
  3863. c.urlParams_.Set("alt", alt)
  3864. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}:undelete")
  3865. urls += "?" + c.urlParams_.Encode()
  3866. req, _ := http.NewRequest("POST", urls, body)
  3867. googleapi.Expand(req.URL, map[string]string{
  3868. "datasetId": c.datasetId,
  3869. })
  3870. req.Header.Set("Content-Type", ctype)
  3871. req.Header.Set("User-Agent", c.s.userAgent())
  3872. if c.ctx_ != nil {
  3873. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3874. }
  3875. return c.s.client.Do(req)
  3876. }
  3877. // Do executes the "genomics.datasets.undelete" call.
  3878. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  3879. // code is an error. Response headers are in either
  3880. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  3881. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3882. // check whether the returned error was because http.StatusNotModified
  3883. // was returned.
  3884. func (c *DatasetsUndeleteCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  3885. gensupport.SetOptions(c.urlParams_, opts...)
  3886. res, err := c.doRequest("json")
  3887. if res != nil && res.StatusCode == http.StatusNotModified {
  3888. if res.Body != nil {
  3889. res.Body.Close()
  3890. }
  3891. return nil, &googleapi.Error{
  3892. Code: res.StatusCode,
  3893. Header: res.Header,
  3894. }
  3895. }
  3896. if err != nil {
  3897. return nil, err
  3898. }
  3899. defer googleapi.CloseBody(res)
  3900. if err := googleapi.CheckResponse(res); err != nil {
  3901. return nil, err
  3902. }
  3903. ret := &Dataset{
  3904. ServerResponse: googleapi.ServerResponse{
  3905. Header: res.Header,
  3906. HTTPStatusCode: res.StatusCode,
  3907. },
  3908. }
  3909. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  3910. return nil, err
  3911. }
  3912. return ret, nil
  3913. // {
  3914. // "description": "Undeletes a dataset by restoring a dataset which was deleted via this API. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This operation is only possible for a week after the deletion occurred.",
  3915. // "httpMethod": "POST",
  3916. // "id": "genomics.datasets.undelete",
  3917. // "parameterOrder": [
  3918. // "datasetId"
  3919. // ],
  3920. // "parameters": {
  3921. // "datasetId": {
  3922. // "description": "The ID of the dataset to be undeleted.",
  3923. // "location": "path",
  3924. // "required": true,
  3925. // "type": "string"
  3926. // }
  3927. // },
  3928. // "path": "v1/datasets/{datasetId}:undelete",
  3929. // "request": {
  3930. // "$ref": "UndeleteDatasetRequest"
  3931. // },
  3932. // "response": {
  3933. // "$ref": "Dataset"
  3934. // },
  3935. // "scopes": [
  3936. // "https://www.googleapis.com/auth/cloud-platform",
  3937. // "https://www.googleapis.com/auth/genomics"
  3938. // ]
  3939. // }
  3940. }
  3941. // method id "genomics.operations.cancel":
  3942. type OperationsCancelCall struct {
  3943. s *Service
  3944. name string
  3945. canceloperationrequest *CancelOperationRequest
  3946. urlParams_ gensupport.URLParams
  3947. ctx_ context.Context
  3948. }
  3949. // Cancel: Starts asynchronous cancellation on a long-running operation.
  3950. // The server makes a best effort to cancel the operation, but success
  3951. // is not guaranteed. Clients may use Operations.GetOperation or
  3952. // Operations.ListOperations to check whether the cancellation succeeded
  3953. // or the operation completed despite cancellation.
  3954. func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
  3955. c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3956. c.name = name
  3957. c.canceloperationrequest = canceloperationrequest
  3958. return c
  3959. }
  3960. // Fields allows partial responses to be retrieved. See
  3961. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3962. // for more information.
  3963. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  3964. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3965. return c
  3966. }
  3967. // Context sets the context to be used in this call's Do method. Any
  3968. // pending HTTP request will be aborted if the provided context is
  3969. // canceled.
  3970. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  3971. c.ctx_ = ctx
  3972. return c
  3973. }
  3974. func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  3975. var body io.Reader = nil
  3976. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  3977. if err != nil {
  3978. return nil, err
  3979. }
  3980. ctype := "application/json"
  3981. c.urlParams_.Set("alt", alt)
  3982. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  3983. urls += "?" + c.urlParams_.Encode()
  3984. req, _ := http.NewRequest("POST", urls, body)
  3985. googleapi.Expand(req.URL, map[string]string{
  3986. "name": c.name,
  3987. })
  3988. req.Header.Set("Content-Type", ctype)
  3989. req.Header.Set("User-Agent", c.s.userAgent())
  3990. if c.ctx_ != nil {
  3991. return ctxhttp.Do(c.ctx_, c.s.client, req)
  3992. }
  3993. return c.s.client.Do(req)
  3994. }
  3995. // Do executes the "genomics.operations.cancel" call.
  3996. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3997. // code is an error. Response headers are in either
  3998. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3999. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4000. // check whether the returned error was because http.StatusNotModified
  4001. // was returned.
  4002. func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4003. gensupport.SetOptions(c.urlParams_, opts...)
  4004. res, err := c.doRequest("json")
  4005. if res != nil && res.StatusCode == http.StatusNotModified {
  4006. if res.Body != nil {
  4007. res.Body.Close()
  4008. }
  4009. return nil, &googleapi.Error{
  4010. Code: res.StatusCode,
  4011. Header: res.Header,
  4012. }
  4013. }
  4014. if err != nil {
  4015. return nil, err
  4016. }
  4017. defer googleapi.CloseBody(res)
  4018. if err := googleapi.CheckResponse(res); err != nil {
  4019. return nil, err
  4020. }
  4021. ret := &Empty{
  4022. ServerResponse: googleapi.ServerResponse{
  4023. Header: res.Header,
  4024. HTTPStatusCode: res.StatusCode,
  4025. },
  4026. }
  4027. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4028. return nil, err
  4029. }
  4030. return ret, nil
  4031. // {
  4032. // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.",
  4033. // "httpMethod": "POST",
  4034. // "id": "genomics.operations.cancel",
  4035. // "parameterOrder": [
  4036. // "name"
  4037. // ],
  4038. // "parameters": {
  4039. // "name": {
  4040. // "description": "The name of the operation resource to be cancelled.",
  4041. // "location": "path",
  4042. // "pattern": "^operations/.*$",
  4043. // "required": true,
  4044. // "type": "string"
  4045. // }
  4046. // },
  4047. // "path": "v1/{+name}:cancel",
  4048. // "request": {
  4049. // "$ref": "CancelOperationRequest"
  4050. // },
  4051. // "response": {
  4052. // "$ref": "Empty"
  4053. // },
  4054. // "scopes": [
  4055. // "https://www.googleapis.com/auth/cloud-platform",
  4056. // "https://www.googleapis.com/auth/genomics"
  4057. // ]
  4058. // }
  4059. }
  4060. // method id "genomics.operations.get":
  4061. type OperationsGetCall struct {
  4062. s *Service
  4063. name string
  4064. urlParams_ gensupport.URLParams
  4065. ifNoneMatch_ string
  4066. ctx_ context.Context
  4067. }
  4068. // Get: Gets the latest state of a long-running operation. Clients can
  4069. // use this method to poll the operation result at intervals as
  4070. // recommended by the API service.
  4071. func (r *OperationsService) Get(name string) *OperationsGetCall {
  4072. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4073. c.name = name
  4074. return c
  4075. }
  4076. // Fields allows partial responses to be retrieved. See
  4077. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4078. // for more information.
  4079. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  4080. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4081. return c
  4082. }
  4083. // IfNoneMatch sets the optional parameter which makes the operation
  4084. // fail if the object's ETag matches the given value. This is useful for
  4085. // getting updates only after the object has changed since the last
  4086. // request. Use googleapi.IsNotModified to check whether the response
  4087. // error from Do is the result of In-None-Match.
  4088. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  4089. c.ifNoneMatch_ = entityTag
  4090. return c
  4091. }
  4092. // Context sets the context to be used in this call's Do method. Any
  4093. // pending HTTP request will be aborted if the provided context is
  4094. // canceled.
  4095. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  4096. c.ctx_ = ctx
  4097. return c
  4098. }
  4099. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4100. var body io.Reader = nil
  4101. c.urlParams_.Set("alt", alt)
  4102. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4103. urls += "?" + c.urlParams_.Encode()
  4104. req, _ := http.NewRequest("GET", urls, body)
  4105. googleapi.Expand(req.URL, map[string]string{
  4106. "name": c.name,
  4107. })
  4108. req.Header.Set("User-Agent", c.s.userAgent())
  4109. if c.ifNoneMatch_ != "" {
  4110. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  4111. }
  4112. if c.ctx_ != nil {
  4113. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4114. }
  4115. return c.s.client.Do(req)
  4116. }
  4117. // Do executes the "genomics.operations.get" call.
  4118. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4119. // status code is an error. Response headers are in either
  4120. // *Operation.ServerResponse.Header or (if a response was returned at
  4121. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4122. // to check whether the returned error was because
  4123. // http.StatusNotModified was returned.
  4124. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4125. gensupport.SetOptions(c.urlParams_, opts...)
  4126. res, err := c.doRequest("json")
  4127. if res != nil && res.StatusCode == http.StatusNotModified {
  4128. if res.Body != nil {
  4129. res.Body.Close()
  4130. }
  4131. return nil, &googleapi.Error{
  4132. Code: res.StatusCode,
  4133. Header: res.Header,
  4134. }
  4135. }
  4136. if err != nil {
  4137. return nil, err
  4138. }
  4139. defer googleapi.CloseBody(res)
  4140. if err := googleapi.CheckResponse(res); err != nil {
  4141. return nil, err
  4142. }
  4143. ret := &Operation{
  4144. ServerResponse: googleapi.ServerResponse{
  4145. Header: res.Header,
  4146. HTTPStatusCode: res.StatusCode,
  4147. },
  4148. }
  4149. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4150. return nil, err
  4151. }
  4152. return ret, nil
  4153. // {
  4154. // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
  4155. // "httpMethod": "GET",
  4156. // "id": "genomics.operations.get",
  4157. // "parameterOrder": [
  4158. // "name"
  4159. // ],
  4160. // "parameters": {
  4161. // "name": {
  4162. // "description": "The name of the operation resource.",
  4163. // "location": "path",
  4164. // "pattern": "^operations/.*$",
  4165. // "required": true,
  4166. // "type": "string"
  4167. // }
  4168. // },
  4169. // "path": "v1/{+name}",
  4170. // "response": {
  4171. // "$ref": "Operation"
  4172. // },
  4173. // "scopes": [
  4174. // "https://www.googleapis.com/auth/cloud-platform",
  4175. // "https://www.googleapis.com/auth/genomics"
  4176. // ]
  4177. // }
  4178. }
  4179. // method id "genomics.operations.list":
  4180. type OperationsListCall struct {
  4181. s *Service
  4182. name string
  4183. urlParams_ gensupport.URLParams
  4184. ifNoneMatch_ string
  4185. ctx_ context.Context
  4186. }
  4187. // List: Lists operations that match the specified filter in the
  4188. // request.
  4189. func (r *OperationsService) List(name string) *OperationsListCall {
  4190. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4191. c.name = name
  4192. return c
  4193. }
  4194. // Filter sets the optional parameter "filter": A string for filtering
  4195. // Operations. The following filter fields are supported: * projectId:
  4196. // Required. Corresponds to OperationMetadata.projectId. * createTime:
  4197. // The time this job was created, in seconds from the
  4198. // [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or
  4199. // `= 1432140000` * `projectId = my-project AND createTime >= 1432140000
  4200. // AND createTime <= 1432150000 AND status = RUNNING`
  4201. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  4202. c.urlParams_.Set("filter", filter)
  4203. return c
  4204. }
  4205. // PageSize sets the optional parameter "pageSize": The maximum number
  4206. // of results to return. If unspecified, defaults to 256. The maximum
  4207. // value is 2048.
  4208. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  4209. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4210. return c
  4211. }
  4212. // PageToken sets the optional parameter "pageToken": The standard list
  4213. // page token.
  4214. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  4215. c.urlParams_.Set("pageToken", pageToken)
  4216. return c
  4217. }
  4218. // Fields allows partial responses to be retrieved. See
  4219. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4220. // for more information.
  4221. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  4222. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4223. return c
  4224. }
  4225. // IfNoneMatch sets the optional parameter which makes the operation
  4226. // fail if the object's ETag matches the given value. This is useful for
  4227. // getting updates only after the object has changed since the last
  4228. // request. Use googleapi.IsNotModified to check whether the response
  4229. // error from Do is the result of In-None-Match.
  4230. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  4231. c.ifNoneMatch_ = entityTag
  4232. return c
  4233. }
  4234. // Context sets the context to be used in this call's Do method. Any
  4235. // pending HTTP request will be aborted if the provided context is
  4236. // canceled.
  4237. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  4238. c.ctx_ = ctx
  4239. return c
  4240. }
  4241. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  4242. var body io.Reader = nil
  4243. c.urlParams_.Set("alt", alt)
  4244. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4245. urls += "?" + c.urlParams_.Encode()
  4246. req, _ := http.NewRequest("GET", urls, body)
  4247. googleapi.Expand(req.URL, map[string]string{
  4248. "name": c.name,
  4249. })
  4250. req.Header.Set("User-Agent", c.s.userAgent())
  4251. if c.ifNoneMatch_ != "" {
  4252. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  4253. }
  4254. if c.ctx_ != nil {
  4255. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4256. }
  4257. return c.s.client.Do(req)
  4258. }
  4259. // Do executes the "genomics.operations.list" call.
  4260. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  4261. // non-2xx status code is an error. Response headers are in either
  4262. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  4263. // returned at all) in error.(*googleapi.Error).Header. Use
  4264. // googleapi.IsNotModified to check whether the returned error was
  4265. // because http.StatusNotModified was returned.
  4266. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  4267. gensupport.SetOptions(c.urlParams_, opts...)
  4268. res, err := c.doRequest("json")
  4269. if res != nil && res.StatusCode == http.StatusNotModified {
  4270. if res.Body != nil {
  4271. res.Body.Close()
  4272. }
  4273. return nil, &googleapi.Error{
  4274. Code: res.StatusCode,
  4275. Header: res.Header,
  4276. }
  4277. }
  4278. if err != nil {
  4279. return nil, err
  4280. }
  4281. defer googleapi.CloseBody(res)
  4282. if err := googleapi.CheckResponse(res); err != nil {
  4283. return nil, err
  4284. }
  4285. ret := &ListOperationsResponse{
  4286. ServerResponse: googleapi.ServerResponse{
  4287. Header: res.Header,
  4288. HTTPStatusCode: res.StatusCode,
  4289. },
  4290. }
  4291. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4292. return nil, err
  4293. }
  4294. return ret, nil
  4295. // {
  4296. // "description": "Lists operations that match the specified filter in the request.",
  4297. // "httpMethod": "GET",
  4298. // "id": "genomics.operations.list",
  4299. // "parameterOrder": [
  4300. // "name"
  4301. // ],
  4302. // "parameters": {
  4303. // "filter": {
  4304. // "description": "A string for filtering Operations. The following filter fields are supported: * projectId: Required. Corresponds to OperationMetadata.projectId. * createTime: The time this job was created, in seconds from the [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `= 1432140000` * `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`",
  4305. // "location": "query",
  4306. // "type": "string"
  4307. // },
  4308. // "name": {
  4309. // "description": "The name of the operation collection.",
  4310. // "location": "path",
  4311. // "pattern": "^operations$",
  4312. // "required": true,
  4313. // "type": "string"
  4314. // },
  4315. // "pageSize": {
  4316. // "description": "The maximum number of results to return. If unspecified, defaults to 256. The maximum value is 2048.",
  4317. // "format": "int32",
  4318. // "location": "query",
  4319. // "type": "integer"
  4320. // },
  4321. // "pageToken": {
  4322. // "description": "The standard list page token.",
  4323. // "location": "query",
  4324. // "type": "string"
  4325. // }
  4326. // },
  4327. // "path": "v1/{+name}",
  4328. // "response": {
  4329. // "$ref": "ListOperationsResponse"
  4330. // },
  4331. // "scopes": [
  4332. // "https://www.googleapis.com/auth/cloud-platform",
  4333. // "https://www.googleapis.com/auth/genomics"
  4334. // ]
  4335. // }
  4336. }
  4337. // Pages invokes f for each page of results.
  4338. // A non-nil error returned from f will halt the iteration.
  4339. // The provided context supersedes any context provided to the Context method.
  4340. func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  4341. c.ctx_ = ctx
  4342. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4343. for {
  4344. x, err := c.Do()
  4345. if err != nil {
  4346. return err
  4347. }
  4348. if err := f(x); err != nil {
  4349. return err
  4350. }
  4351. if x.NextPageToken == "" {
  4352. return nil
  4353. }
  4354. c.PageToken(x.NextPageToken)
  4355. }
  4356. }
  4357. // method id "genomics.readgroupsets.delete":
  4358. type ReadgroupsetsDeleteCall struct {
  4359. s *Service
  4360. readGroupSetId string
  4361. urlParams_ gensupport.URLParams
  4362. ctx_ context.Context
  4363. }
  4364. // Delete: Deletes a read group set. For the definitions of read group
  4365. // sets and other genomics resources, see [Fundamentals of Google
  4366. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4367. // omics)
  4368. func (r *ReadgroupsetsService) Delete(readGroupSetId string) *ReadgroupsetsDeleteCall {
  4369. c := &ReadgroupsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4370. c.readGroupSetId = readGroupSetId
  4371. return c
  4372. }
  4373. // Fields allows partial responses to be retrieved. See
  4374. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4375. // for more information.
  4376. func (c *ReadgroupsetsDeleteCall) Fields(s ...googleapi.Field) *ReadgroupsetsDeleteCall {
  4377. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4378. return c
  4379. }
  4380. // Context sets the context to be used in this call's Do method. Any
  4381. // pending HTTP request will be aborted if the provided context is
  4382. // canceled.
  4383. func (c *ReadgroupsetsDeleteCall) Context(ctx context.Context) *ReadgroupsetsDeleteCall {
  4384. c.ctx_ = ctx
  4385. return c
  4386. }
  4387. func (c *ReadgroupsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4388. var body io.Reader = nil
  4389. c.urlParams_.Set("alt", alt)
  4390. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  4391. urls += "?" + c.urlParams_.Encode()
  4392. req, _ := http.NewRequest("DELETE", urls, body)
  4393. googleapi.Expand(req.URL, map[string]string{
  4394. "readGroupSetId": c.readGroupSetId,
  4395. })
  4396. req.Header.Set("User-Agent", c.s.userAgent())
  4397. if c.ctx_ != nil {
  4398. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4399. }
  4400. return c.s.client.Do(req)
  4401. }
  4402. // Do executes the "genomics.readgroupsets.delete" call.
  4403. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4404. // code is an error. Response headers are in either
  4405. // *Empty.ServerResponse.Header or (if a response was returned at all)
  4406. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4407. // check whether the returned error was because http.StatusNotModified
  4408. // was returned.
  4409. func (c *ReadgroupsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4410. gensupport.SetOptions(c.urlParams_, opts...)
  4411. res, err := c.doRequest("json")
  4412. if res != nil && res.StatusCode == http.StatusNotModified {
  4413. if res.Body != nil {
  4414. res.Body.Close()
  4415. }
  4416. return nil, &googleapi.Error{
  4417. Code: res.StatusCode,
  4418. Header: res.Header,
  4419. }
  4420. }
  4421. if err != nil {
  4422. return nil, err
  4423. }
  4424. defer googleapi.CloseBody(res)
  4425. if err := googleapi.CheckResponse(res); err != nil {
  4426. return nil, err
  4427. }
  4428. ret := &Empty{
  4429. ServerResponse: googleapi.ServerResponse{
  4430. Header: res.Header,
  4431. HTTPStatusCode: res.StatusCode,
  4432. },
  4433. }
  4434. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4435. return nil, err
  4436. }
  4437. return ret, nil
  4438. // {
  4439. // "description": "Deletes a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  4440. // "httpMethod": "DELETE",
  4441. // "id": "genomics.readgroupsets.delete",
  4442. // "parameterOrder": [
  4443. // "readGroupSetId"
  4444. // ],
  4445. // "parameters": {
  4446. // "readGroupSetId": {
  4447. // "description": "The ID of the read group set to be deleted. The caller must have WRITE permissions to the dataset associated with this read group set.",
  4448. // "location": "path",
  4449. // "required": true,
  4450. // "type": "string"
  4451. // }
  4452. // },
  4453. // "path": "v1/readgroupsets/{readGroupSetId}",
  4454. // "response": {
  4455. // "$ref": "Empty"
  4456. // },
  4457. // "scopes": [
  4458. // "https://www.googleapis.com/auth/cloud-platform",
  4459. // "https://www.googleapis.com/auth/genomics"
  4460. // ]
  4461. // }
  4462. }
  4463. // method id "genomics.readgroupsets.export":
  4464. type ReadgroupsetsExportCall struct {
  4465. s *Service
  4466. readGroupSetId string
  4467. exportreadgroupsetrequest *ExportReadGroupSetRequest
  4468. urlParams_ gensupport.URLParams
  4469. ctx_ context.Context
  4470. }
  4471. // Export: Exports a read group set to a BAM file in Google Cloud
  4472. // Storage. For the definitions of read group sets and other genomics
  4473. // resources, see [Fundamentals of Google
  4474. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4475. // omics) Note that currently there may be some differences between
  4476. // exported BAM files and the original BAM file at the time of import.
  4477. // See
  4478. // [ImportReadGroupSets](google.genomics.v1.ReadServiceV1.ImportReadGroup
  4479. // Sets) for caveats.
  4480. func (r *ReadgroupsetsService) Export(readGroupSetId string, exportreadgroupsetrequest *ExportReadGroupSetRequest) *ReadgroupsetsExportCall {
  4481. c := &ReadgroupsetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4482. c.readGroupSetId = readGroupSetId
  4483. c.exportreadgroupsetrequest = exportreadgroupsetrequest
  4484. return c
  4485. }
  4486. // Fields allows partial responses to be retrieved. See
  4487. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4488. // for more information.
  4489. func (c *ReadgroupsetsExportCall) Fields(s ...googleapi.Field) *ReadgroupsetsExportCall {
  4490. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4491. return c
  4492. }
  4493. // Context sets the context to be used in this call's Do method. Any
  4494. // pending HTTP request will be aborted if the provided context is
  4495. // canceled.
  4496. func (c *ReadgroupsetsExportCall) Context(ctx context.Context) *ReadgroupsetsExportCall {
  4497. c.ctx_ = ctx
  4498. return c
  4499. }
  4500. func (c *ReadgroupsetsExportCall) doRequest(alt string) (*http.Response, error) {
  4501. var body io.Reader = nil
  4502. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportreadgroupsetrequest)
  4503. if err != nil {
  4504. return nil, err
  4505. }
  4506. ctype := "application/json"
  4507. c.urlParams_.Set("alt", alt)
  4508. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}:export")
  4509. urls += "?" + c.urlParams_.Encode()
  4510. req, _ := http.NewRequest("POST", urls, body)
  4511. googleapi.Expand(req.URL, map[string]string{
  4512. "readGroupSetId": c.readGroupSetId,
  4513. })
  4514. req.Header.Set("Content-Type", ctype)
  4515. req.Header.Set("User-Agent", c.s.userAgent())
  4516. if c.ctx_ != nil {
  4517. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4518. }
  4519. return c.s.client.Do(req)
  4520. }
  4521. // Do executes the "genomics.readgroupsets.export" call.
  4522. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4523. // status code is an error. Response headers are in either
  4524. // *Operation.ServerResponse.Header or (if a response was returned at
  4525. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4526. // to check whether the returned error was because
  4527. // http.StatusNotModified was returned.
  4528. func (c *ReadgroupsetsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4529. gensupport.SetOptions(c.urlParams_, opts...)
  4530. res, err := c.doRequest("json")
  4531. if res != nil && res.StatusCode == http.StatusNotModified {
  4532. if res.Body != nil {
  4533. res.Body.Close()
  4534. }
  4535. return nil, &googleapi.Error{
  4536. Code: res.StatusCode,
  4537. Header: res.Header,
  4538. }
  4539. }
  4540. if err != nil {
  4541. return nil, err
  4542. }
  4543. defer googleapi.CloseBody(res)
  4544. if err := googleapi.CheckResponse(res); err != nil {
  4545. return nil, err
  4546. }
  4547. ret := &Operation{
  4548. ServerResponse: googleapi.ServerResponse{
  4549. Header: res.Header,
  4550. HTTPStatusCode: res.StatusCode,
  4551. },
  4552. }
  4553. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4554. return nil, err
  4555. }
  4556. return ret, nil
  4557. // {
  4558. // "description": "Exports a read group set to a BAM file in Google Cloud Storage. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Note that currently there may be some differences between exported BAM files and the original BAM file at the time of import. See [ImportReadGroupSets](google.genomics.v1.ReadServiceV1.ImportReadGroupSets) for caveats.",
  4559. // "httpMethod": "POST",
  4560. // "id": "genomics.readgroupsets.export",
  4561. // "parameterOrder": [
  4562. // "readGroupSetId"
  4563. // ],
  4564. // "parameters": {
  4565. // "readGroupSetId": {
  4566. // "description": "Required. The ID of the read group set to export. The caller must have READ access to this read group set.",
  4567. // "location": "path",
  4568. // "required": true,
  4569. // "type": "string"
  4570. // }
  4571. // },
  4572. // "path": "v1/readgroupsets/{readGroupSetId}:export",
  4573. // "request": {
  4574. // "$ref": "ExportReadGroupSetRequest"
  4575. // },
  4576. // "response": {
  4577. // "$ref": "Operation"
  4578. // },
  4579. // "scopes": [
  4580. // "https://www.googleapis.com/auth/cloud-platform",
  4581. // "https://www.googleapis.com/auth/devstorage.read_write",
  4582. // "https://www.googleapis.com/auth/genomics"
  4583. // ]
  4584. // }
  4585. }
  4586. // method id "genomics.readgroupsets.get":
  4587. type ReadgroupsetsGetCall struct {
  4588. s *Service
  4589. readGroupSetId string
  4590. urlParams_ gensupport.URLParams
  4591. ifNoneMatch_ string
  4592. ctx_ context.Context
  4593. }
  4594. // Get: Gets a read group set by ID. For the definitions of read group
  4595. // sets and other genomics resources, see [Fundamentals of Google
  4596. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4597. // omics)
  4598. func (r *ReadgroupsetsService) Get(readGroupSetId string) *ReadgroupsetsGetCall {
  4599. c := &ReadgroupsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4600. c.readGroupSetId = readGroupSetId
  4601. return c
  4602. }
  4603. // Fields allows partial responses to be retrieved. See
  4604. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4605. // for more information.
  4606. func (c *ReadgroupsetsGetCall) Fields(s ...googleapi.Field) *ReadgroupsetsGetCall {
  4607. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4608. return c
  4609. }
  4610. // IfNoneMatch sets the optional parameter which makes the operation
  4611. // fail if the object's ETag matches the given value. This is useful for
  4612. // getting updates only after the object has changed since the last
  4613. // request. Use googleapi.IsNotModified to check whether the response
  4614. // error from Do is the result of In-None-Match.
  4615. func (c *ReadgroupsetsGetCall) IfNoneMatch(entityTag string) *ReadgroupsetsGetCall {
  4616. c.ifNoneMatch_ = entityTag
  4617. return c
  4618. }
  4619. // Context sets the context to be used in this call's Do method. Any
  4620. // pending HTTP request will be aborted if the provided context is
  4621. // canceled.
  4622. func (c *ReadgroupsetsGetCall) Context(ctx context.Context) *ReadgroupsetsGetCall {
  4623. c.ctx_ = ctx
  4624. return c
  4625. }
  4626. func (c *ReadgroupsetsGetCall) doRequest(alt string) (*http.Response, error) {
  4627. var body io.Reader = nil
  4628. c.urlParams_.Set("alt", alt)
  4629. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  4630. urls += "?" + c.urlParams_.Encode()
  4631. req, _ := http.NewRequest("GET", urls, body)
  4632. googleapi.Expand(req.URL, map[string]string{
  4633. "readGroupSetId": c.readGroupSetId,
  4634. })
  4635. req.Header.Set("User-Agent", c.s.userAgent())
  4636. if c.ifNoneMatch_ != "" {
  4637. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  4638. }
  4639. if c.ctx_ != nil {
  4640. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4641. }
  4642. return c.s.client.Do(req)
  4643. }
  4644. // Do executes the "genomics.readgroupsets.get" call.
  4645. // Exactly one of *ReadGroupSet or error will be non-nil. Any non-2xx
  4646. // status code is an error. Response headers are in either
  4647. // *ReadGroupSet.ServerResponse.Header or (if a response was returned at
  4648. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4649. // to check whether the returned error was because
  4650. // http.StatusNotModified was returned.
  4651. func (c *ReadgroupsetsGetCall) Do(opts ...googleapi.CallOption) (*ReadGroupSet, error) {
  4652. gensupport.SetOptions(c.urlParams_, opts...)
  4653. res, err := c.doRequest("json")
  4654. if res != nil && res.StatusCode == http.StatusNotModified {
  4655. if res.Body != nil {
  4656. res.Body.Close()
  4657. }
  4658. return nil, &googleapi.Error{
  4659. Code: res.StatusCode,
  4660. Header: res.Header,
  4661. }
  4662. }
  4663. if err != nil {
  4664. return nil, err
  4665. }
  4666. defer googleapi.CloseBody(res)
  4667. if err := googleapi.CheckResponse(res); err != nil {
  4668. return nil, err
  4669. }
  4670. ret := &ReadGroupSet{
  4671. ServerResponse: googleapi.ServerResponse{
  4672. Header: res.Header,
  4673. HTTPStatusCode: res.StatusCode,
  4674. },
  4675. }
  4676. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4677. return nil, err
  4678. }
  4679. return ret, nil
  4680. // {
  4681. // "description": "Gets a read group set by ID. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  4682. // "httpMethod": "GET",
  4683. // "id": "genomics.readgroupsets.get",
  4684. // "parameterOrder": [
  4685. // "readGroupSetId"
  4686. // ],
  4687. // "parameters": {
  4688. // "readGroupSetId": {
  4689. // "description": "The ID of the read group set.",
  4690. // "location": "path",
  4691. // "required": true,
  4692. // "type": "string"
  4693. // }
  4694. // },
  4695. // "path": "v1/readgroupsets/{readGroupSetId}",
  4696. // "response": {
  4697. // "$ref": "ReadGroupSet"
  4698. // },
  4699. // "scopes": [
  4700. // "https://www.googleapis.com/auth/cloud-platform",
  4701. // "https://www.googleapis.com/auth/genomics",
  4702. // "https://www.googleapis.com/auth/genomics.readonly"
  4703. // ]
  4704. // }
  4705. }
  4706. // method id "genomics.readgroupsets.import":
  4707. type ReadgroupsetsImportCall struct {
  4708. s *Service
  4709. importreadgroupsetsrequest *ImportReadGroupSetsRequest
  4710. urlParams_ gensupport.URLParams
  4711. ctx_ context.Context
  4712. }
  4713. // Import: Creates read group sets by asynchronously importing the
  4714. // provided information. For the definitions of read group sets and
  4715. // other genomics resources, see [Fundamentals of Google
  4716. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4717. // omics) The caller must have WRITE permissions to the dataset. ##
  4718. // Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import
  4719. // - Tags will be converted to strings - tag types are not preserved -
  4720. // Comments (`@CO`) in the input file header will not be preserved -
  4721. // Original header order of references (`@SQ`) will not be preserved -
  4722. // Any reverse stranded unmapped reads will be reverse complemented, and
  4723. // their qualities (also the "BQ" and "OQ" tags, if any) will be
  4724. // reversed - Unmapped reads will be stripped of positional information
  4725. // (reference name and position)
  4726. func (r *ReadgroupsetsService) Import(importreadgroupsetsrequest *ImportReadGroupSetsRequest) *ReadgroupsetsImportCall {
  4727. c := &ReadgroupsetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4728. c.importreadgroupsetsrequest = importreadgroupsetsrequest
  4729. return c
  4730. }
  4731. // Fields allows partial responses to be retrieved. See
  4732. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4733. // for more information.
  4734. func (c *ReadgroupsetsImportCall) Fields(s ...googleapi.Field) *ReadgroupsetsImportCall {
  4735. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4736. return c
  4737. }
  4738. // Context sets the context to be used in this call's Do method. Any
  4739. // pending HTTP request will be aborted if the provided context is
  4740. // canceled.
  4741. func (c *ReadgroupsetsImportCall) Context(ctx context.Context) *ReadgroupsetsImportCall {
  4742. c.ctx_ = ctx
  4743. return c
  4744. }
  4745. func (c *ReadgroupsetsImportCall) doRequest(alt string) (*http.Response, error) {
  4746. var body io.Reader = nil
  4747. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importreadgroupsetsrequest)
  4748. if err != nil {
  4749. return nil, err
  4750. }
  4751. ctype := "application/json"
  4752. c.urlParams_.Set("alt", alt)
  4753. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets:import")
  4754. urls += "?" + c.urlParams_.Encode()
  4755. req, _ := http.NewRequest("POST", urls, body)
  4756. googleapi.SetOpaque(req.URL)
  4757. req.Header.Set("Content-Type", ctype)
  4758. req.Header.Set("User-Agent", c.s.userAgent())
  4759. if c.ctx_ != nil {
  4760. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4761. }
  4762. return c.s.client.Do(req)
  4763. }
  4764. // Do executes the "genomics.readgroupsets.import" call.
  4765. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  4766. // status code is an error. Response headers are in either
  4767. // *Operation.ServerResponse.Header or (if a response was returned at
  4768. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4769. // to check whether the returned error was because
  4770. // http.StatusNotModified was returned.
  4771. func (c *ReadgroupsetsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4772. gensupport.SetOptions(c.urlParams_, opts...)
  4773. res, err := c.doRequest("json")
  4774. if res != nil && res.StatusCode == http.StatusNotModified {
  4775. if res.Body != nil {
  4776. res.Body.Close()
  4777. }
  4778. return nil, &googleapi.Error{
  4779. Code: res.StatusCode,
  4780. Header: res.Header,
  4781. }
  4782. }
  4783. if err != nil {
  4784. return nil, err
  4785. }
  4786. defer googleapi.CloseBody(res)
  4787. if err := googleapi.CheckResponse(res); err != nil {
  4788. return nil, err
  4789. }
  4790. ret := &Operation{
  4791. ServerResponse: googleapi.ServerResponse{
  4792. Header: res.Header,
  4793. HTTPStatusCode: res.StatusCode,
  4794. },
  4795. }
  4796. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4797. return nil, err
  4798. }
  4799. return ret, nil
  4800. // {
  4801. // "description": "Creates read group sets by asynchronously importing the provided information. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The caller must have WRITE permissions to the dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - Tags will be converted to strings - tag types are not preserved - Comments (`@CO`) in the input file header will not be preserved - Original header order of references (`@SQ`) will not be preserved - Any reverse stranded unmapped reads will be reverse complemented, and their qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed - Unmapped reads will be stripped of positional information (reference name and position)",
  4802. // "httpMethod": "POST",
  4803. // "id": "genomics.readgroupsets.import",
  4804. // "path": "v1/readgroupsets:import",
  4805. // "request": {
  4806. // "$ref": "ImportReadGroupSetsRequest"
  4807. // },
  4808. // "response": {
  4809. // "$ref": "Operation"
  4810. // },
  4811. // "scopes": [
  4812. // "https://www.googleapis.com/auth/cloud-platform",
  4813. // "https://www.googleapis.com/auth/devstorage.read_write",
  4814. // "https://www.googleapis.com/auth/genomics"
  4815. // ]
  4816. // }
  4817. }
  4818. // method id "genomics.readgroupsets.patch":
  4819. type ReadgroupsetsPatchCall struct {
  4820. s *Service
  4821. readGroupSetId string
  4822. readgroupset *ReadGroupSet
  4823. urlParams_ gensupport.URLParams
  4824. ctx_ context.Context
  4825. }
  4826. // Patch: Updates a read group set. For the definitions of read group
  4827. // sets and other genomics resources, see [Fundamentals of Google
  4828. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4829. // omics) This method supports patch semantics.
  4830. func (r *ReadgroupsetsService) Patch(readGroupSetId string, readgroupset *ReadGroupSet) *ReadgroupsetsPatchCall {
  4831. c := &ReadgroupsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4832. c.readGroupSetId = readGroupSetId
  4833. c.readgroupset = readgroupset
  4834. return c
  4835. }
  4836. // UpdateMask sets the optional parameter "updateMask": An optional mask
  4837. // specifying which fields to update. Supported fields: * name. *
  4838. // referenceSetId. Leaving `updateMask` unset is equivalent to
  4839. // specifying all mutable fields.
  4840. func (c *ReadgroupsetsPatchCall) UpdateMask(updateMask string) *ReadgroupsetsPatchCall {
  4841. c.urlParams_.Set("updateMask", updateMask)
  4842. return c
  4843. }
  4844. // Fields allows partial responses to be retrieved. See
  4845. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4846. // for more information.
  4847. func (c *ReadgroupsetsPatchCall) Fields(s ...googleapi.Field) *ReadgroupsetsPatchCall {
  4848. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4849. return c
  4850. }
  4851. // Context sets the context to be used in this call's Do method. Any
  4852. // pending HTTP request will be aborted if the provided context is
  4853. // canceled.
  4854. func (c *ReadgroupsetsPatchCall) Context(ctx context.Context) *ReadgroupsetsPatchCall {
  4855. c.ctx_ = ctx
  4856. return c
  4857. }
  4858. func (c *ReadgroupsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  4859. var body io.Reader = nil
  4860. body, err := googleapi.WithoutDataWrapper.JSONReader(c.readgroupset)
  4861. if err != nil {
  4862. return nil, err
  4863. }
  4864. ctype := "application/json"
  4865. c.urlParams_.Set("alt", alt)
  4866. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  4867. urls += "?" + c.urlParams_.Encode()
  4868. req, _ := http.NewRequest("PATCH", urls, body)
  4869. googleapi.Expand(req.URL, map[string]string{
  4870. "readGroupSetId": c.readGroupSetId,
  4871. })
  4872. req.Header.Set("Content-Type", ctype)
  4873. req.Header.Set("User-Agent", c.s.userAgent())
  4874. if c.ctx_ != nil {
  4875. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4876. }
  4877. return c.s.client.Do(req)
  4878. }
  4879. // Do executes the "genomics.readgroupsets.patch" call.
  4880. // Exactly one of *ReadGroupSet or error will be non-nil. Any non-2xx
  4881. // status code is an error. Response headers are in either
  4882. // *ReadGroupSet.ServerResponse.Header or (if a response was returned at
  4883. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4884. // to check whether the returned error was because
  4885. // http.StatusNotModified was returned.
  4886. func (c *ReadgroupsetsPatchCall) Do(opts ...googleapi.CallOption) (*ReadGroupSet, error) {
  4887. gensupport.SetOptions(c.urlParams_, opts...)
  4888. res, err := c.doRequest("json")
  4889. if res != nil && res.StatusCode == http.StatusNotModified {
  4890. if res.Body != nil {
  4891. res.Body.Close()
  4892. }
  4893. return nil, &googleapi.Error{
  4894. Code: res.StatusCode,
  4895. Header: res.Header,
  4896. }
  4897. }
  4898. if err != nil {
  4899. return nil, err
  4900. }
  4901. defer googleapi.CloseBody(res)
  4902. if err := googleapi.CheckResponse(res); err != nil {
  4903. return nil, err
  4904. }
  4905. ret := &ReadGroupSet{
  4906. ServerResponse: googleapi.ServerResponse{
  4907. Header: res.Header,
  4908. HTTPStatusCode: res.StatusCode,
  4909. },
  4910. }
  4911. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  4912. return nil, err
  4913. }
  4914. return ret, nil
  4915. // {
  4916. // "description": "Updates a read group set. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics.",
  4917. // "httpMethod": "PATCH",
  4918. // "id": "genomics.readgroupsets.patch",
  4919. // "parameterOrder": [
  4920. // "readGroupSetId"
  4921. // ],
  4922. // "parameters": {
  4923. // "readGroupSetId": {
  4924. // "description": "The ID of the read group set to be updated. The caller must have WRITE permissions to the dataset associated with this read group set.",
  4925. // "location": "path",
  4926. // "required": true,
  4927. // "type": "string"
  4928. // },
  4929. // "updateMask": {
  4930. // "description": "An optional mask specifying which fields to update. Supported fields: * name. * referenceSetId. Leaving `updateMask` unset is equivalent to specifying all mutable fields.",
  4931. // "location": "query",
  4932. // "type": "string"
  4933. // }
  4934. // },
  4935. // "path": "v1/readgroupsets/{readGroupSetId}",
  4936. // "request": {
  4937. // "$ref": "ReadGroupSet"
  4938. // },
  4939. // "response": {
  4940. // "$ref": "ReadGroupSet"
  4941. // },
  4942. // "scopes": [
  4943. // "https://www.googleapis.com/auth/cloud-platform",
  4944. // "https://www.googleapis.com/auth/genomics"
  4945. // ]
  4946. // }
  4947. }
  4948. // method id "genomics.readgroupsets.search":
  4949. type ReadgroupsetsSearchCall struct {
  4950. s *Service
  4951. searchreadgroupsetsrequest *SearchReadGroupSetsRequest
  4952. urlParams_ gensupport.URLParams
  4953. ctx_ context.Context
  4954. }
  4955. // Search: Searches for read group sets matching the criteria. For the
  4956. // definitions of read group sets and other genomics resources, see
  4957. // [Fundamentals of Google
  4958. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  4959. // omics) Implements
  4960. // [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schem
  4961. // as/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).
  4962. func (r *ReadgroupsetsService) Search(searchreadgroupsetsrequest *SearchReadGroupSetsRequest) *ReadgroupsetsSearchCall {
  4963. c := &ReadgroupsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4964. c.searchreadgroupsetsrequest = searchreadgroupsetsrequest
  4965. return c
  4966. }
  4967. // Fields allows partial responses to be retrieved. See
  4968. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4969. // for more information.
  4970. func (c *ReadgroupsetsSearchCall) Fields(s ...googleapi.Field) *ReadgroupsetsSearchCall {
  4971. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4972. return c
  4973. }
  4974. // Context sets the context to be used in this call's Do method. Any
  4975. // pending HTTP request will be aborted if the provided context is
  4976. // canceled.
  4977. func (c *ReadgroupsetsSearchCall) Context(ctx context.Context) *ReadgroupsetsSearchCall {
  4978. c.ctx_ = ctx
  4979. return c
  4980. }
  4981. func (c *ReadgroupsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  4982. var body io.Reader = nil
  4983. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadgroupsetsrequest)
  4984. if err != nil {
  4985. return nil, err
  4986. }
  4987. ctype := "application/json"
  4988. c.urlParams_.Set("alt", alt)
  4989. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/search")
  4990. urls += "?" + c.urlParams_.Encode()
  4991. req, _ := http.NewRequest("POST", urls, body)
  4992. googleapi.SetOpaque(req.URL)
  4993. req.Header.Set("Content-Type", ctype)
  4994. req.Header.Set("User-Agent", c.s.userAgent())
  4995. if c.ctx_ != nil {
  4996. return ctxhttp.Do(c.ctx_, c.s.client, req)
  4997. }
  4998. return c.s.client.Do(req)
  4999. }
  5000. // Do executes the "genomics.readgroupsets.search" call.
  5001. // Exactly one of *SearchReadGroupSetsResponse or error will be non-nil.
  5002. // Any non-2xx status code is an error. Response headers are in either
  5003. // *SearchReadGroupSetsResponse.ServerResponse.Header or (if a response
  5004. // was returned at all) in error.(*googleapi.Error).Header. Use
  5005. // googleapi.IsNotModified to check whether the returned error was
  5006. // because http.StatusNotModified was returned.
  5007. func (c *ReadgroupsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReadGroupSetsResponse, error) {
  5008. gensupport.SetOptions(c.urlParams_, opts...)
  5009. res, err := c.doRequest("json")
  5010. if res != nil && res.StatusCode == http.StatusNotModified {
  5011. if res.Body != nil {
  5012. res.Body.Close()
  5013. }
  5014. return nil, &googleapi.Error{
  5015. Code: res.StatusCode,
  5016. Header: res.Header,
  5017. }
  5018. }
  5019. if err != nil {
  5020. return nil, err
  5021. }
  5022. defer googleapi.CloseBody(res)
  5023. if err := googleapi.CheckResponse(res); err != nil {
  5024. return nil, err
  5025. }
  5026. ret := &SearchReadGroupSetsResponse{
  5027. ServerResponse: googleapi.ServerResponse{
  5028. Header: res.Header,
  5029. HTTPStatusCode: res.StatusCode,
  5030. },
  5031. }
  5032. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5033. return nil, err
  5034. }
  5035. return ret, nil
  5036. // {
  5037. // "description": "Searches for read group sets matching the criteria. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).",
  5038. // "httpMethod": "POST",
  5039. // "id": "genomics.readgroupsets.search",
  5040. // "path": "v1/readgroupsets/search",
  5041. // "request": {
  5042. // "$ref": "SearchReadGroupSetsRequest"
  5043. // },
  5044. // "response": {
  5045. // "$ref": "SearchReadGroupSetsResponse"
  5046. // },
  5047. // "scopes": [
  5048. // "https://www.googleapis.com/auth/cloud-platform",
  5049. // "https://www.googleapis.com/auth/genomics",
  5050. // "https://www.googleapis.com/auth/genomics.readonly"
  5051. // ]
  5052. // }
  5053. }
  5054. // method id "genomics.readgroupsets.coveragebuckets.list":
  5055. type ReadgroupsetsCoveragebucketsListCall struct {
  5056. s *Service
  5057. readGroupSetId string
  5058. urlParams_ gensupport.URLParams
  5059. ifNoneMatch_ string
  5060. ctx_ context.Context
  5061. }
  5062. // List: Lists fixed width coverage buckets for a read group set, each
  5063. // of which correspond to a range of a reference sequence. Each bucket
  5064. // summarizes coverage information across its corresponding genomic
  5065. // range. For the definitions of read group sets and other genomics
  5066. // resources, see [Fundamentals of Google
  5067. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5068. // omics) Coverage is defined as the number of reads which are aligned
  5069. // to a given base in the reference sequence. Coverage buckets are
  5070. // available at several precomputed bucket widths, enabling retrieval of
  5071. // various coverage 'zoom levels'. The caller must have READ permissions
  5072. // for the target read group set.
  5073. func (r *ReadgroupsetsCoveragebucketsService) List(readGroupSetId string) *ReadgroupsetsCoveragebucketsListCall {
  5074. c := &ReadgroupsetsCoveragebucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5075. c.readGroupSetId = readGroupSetId
  5076. return c
  5077. }
  5078. // End sets the optional parameter "end": The end position of the range
  5079. // on the reference, 0-based exclusive. If specified, `referenceName`
  5080. // must also be specified. If unset or 0, defaults to the length of the
  5081. // reference.
  5082. func (c *ReadgroupsetsCoveragebucketsListCall) End(end int64) *ReadgroupsetsCoveragebucketsListCall {
  5083. c.urlParams_.Set("end", fmt.Sprint(end))
  5084. return c
  5085. }
  5086. // PageSize sets the optional parameter "pageSize": The maximum number
  5087. // of results to return in a single page. If unspecified, defaults to
  5088. // 1024. The maximum value is 2048.
  5089. func (c *ReadgroupsetsCoveragebucketsListCall) PageSize(pageSize int64) *ReadgroupsetsCoveragebucketsListCall {
  5090. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5091. return c
  5092. }
  5093. // PageToken sets the optional parameter "pageToken": The continuation
  5094. // token, which is used to page through large result sets. To get the
  5095. // next page of results, set this parameter to the value of
  5096. // `nextPageToken` from the previous response.
  5097. func (c *ReadgroupsetsCoveragebucketsListCall) PageToken(pageToken string) *ReadgroupsetsCoveragebucketsListCall {
  5098. c.urlParams_.Set("pageToken", pageToken)
  5099. return c
  5100. }
  5101. // ReferenceName sets the optional parameter "referenceName": The name
  5102. // of the reference to query, within the reference set associated with
  5103. // this query.
  5104. func (c *ReadgroupsetsCoveragebucketsListCall) ReferenceName(referenceName string) *ReadgroupsetsCoveragebucketsListCall {
  5105. c.urlParams_.Set("referenceName", referenceName)
  5106. return c
  5107. }
  5108. // Start sets the optional parameter "start": The start position of the
  5109. // range on the reference, 0-based inclusive. If specified,
  5110. // `referenceName` must also be specified. Defaults to 0.
  5111. func (c *ReadgroupsetsCoveragebucketsListCall) Start(start int64) *ReadgroupsetsCoveragebucketsListCall {
  5112. c.urlParams_.Set("start", fmt.Sprint(start))
  5113. return c
  5114. }
  5115. // TargetBucketWidth sets the optional parameter "targetBucketWidth":
  5116. // The desired width of each reported coverage bucket in base pairs.
  5117. // This will be rounded down to the nearest precomputed bucket width;
  5118. // the value of which is returned as `bucketWidth` in the response.
  5119. // Defaults to infinity (each bucket spans an entire reference sequence)
  5120. // or the length of the target range, if specified. The smallest
  5121. // precomputed `bucketWidth` is currently 2048 base pairs; this is
  5122. // subject to change.
  5123. func (c *ReadgroupsetsCoveragebucketsListCall) TargetBucketWidth(targetBucketWidth int64) *ReadgroupsetsCoveragebucketsListCall {
  5124. c.urlParams_.Set("targetBucketWidth", fmt.Sprint(targetBucketWidth))
  5125. return c
  5126. }
  5127. // Fields allows partial responses to be retrieved. See
  5128. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5129. // for more information.
  5130. func (c *ReadgroupsetsCoveragebucketsListCall) Fields(s ...googleapi.Field) *ReadgroupsetsCoveragebucketsListCall {
  5131. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5132. return c
  5133. }
  5134. // IfNoneMatch sets the optional parameter which makes the operation
  5135. // fail if the object's ETag matches the given value. This is useful for
  5136. // getting updates only after the object has changed since the last
  5137. // request. Use googleapi.IsNotModified to check whether the response
  5138. // error from Do is the result of In-None-Match.
  5139. func (c *ReadgroupsetsCoveragebucketsListCall) IfNoneMatch(entityTag string) *ReadgroupsetsCoveragebucketsListCall {
  5140. c.ifNoneMatch_ = entityTag
  5141. return c
  5142. }
  5143. // Context sets the context to be used in this call's Do method. Any
  5144. // pending HTTP request will be aborted if the provided context is
  5145. // canceled.
  5146. func (c *ReadgroupsetsCoveragebucketsListCall) Context(ctx context.Context) *ReadgroupsetsCoveragebucketsListCall {
  5147. c.ctx_ = ctx
  5148. return c
  5149. }
  5150. func (c *ReadgroupsetsCoveragebucketsListCall) doRequest(alt string) (*http.Response, error) {
  5151. var body io.Reader = nil
  5152. c.urlParams_.Set("alt", alt)
  5153. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}/coveragebuckets")
  5154. urls += "?" + c.urlParams_.Encode()
  5155. req, _ := http.NewRequest("GET", urls, body)
  5156. googleapi.Expand(req.URL, map[string]string{
  5157. "readGroupSetId": c.readGroupSetId,
  5158. })
  5159. req.Header.Set("User-Agent", c.s.userAgent())
  5160. if c.ifNoneMatch_ != "" {
  5161. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  5162. }
  5163. if c.ctx_ != nil {
  5164. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5165. }
  5166. return c.s.client.Do(req)
  5167. }
  5168. // Do executes the "genomics.readgroupsets.coveragebuckets.list" call.
  5169. // Exactly one of *ListCoverageBucketsResponse or error will be non-nil.
  5170. // Any non-2xx status code is an error. Response headers are in either
  5171. // *ListCoverageBucketsResponse.ServerResponse.Header or (if a response
  5172. // was returned at all) in error.(*googleapi.Error).Header. Use
  5173. // googleapi.IsNotModified to check whether the returned error was
  5174. // because http.StatusNotModified was returned.
  5175. func (c *ReadgroupsetsCoveragebucketsListCall) Do(opts ...googleapi.CallOption) (*ListCoverageBucketsResponse, error) {
  5176. gensupport.SetOptions(c.urlParams_, opts...)
  5177. res, err := c.doRequest("json")
  5178. if res != nil && res.StatusCode == http.StatusNotModified {
  5179. if res.Body != nil {
  5180. res.Body.Close()
  5181. }
  5182. return nil, &googleapi.Error{
  5183. Code: res.StatusCode,
  5184. Header: res.Header,
  5185. }
  5186. }
  5187. if err != nil {
  5188. return nil, err
  5189. }
  5190. defer googleapi.CloseBody(res)
  5191. if err := googleapi.CheckResponse(res); err != nil {
  5192. return nil, err
  5193. }
  5194. ret := &ListCoverageBucketsResponse{
  5195. ServerResponse: googleapi.ServerResponse{
  5196. Header: res.Header,
  5197. HTTPStatusCode: res.StatusCode,
  5198. },
  5199. }
  5200. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5201. return nil, err
  5202. }
  5203. return ret, nil
  5204. // {
  5205. // "description": "Lists fixed width coverage buckets for a read group set, each of which correspond to a range of a reference sequence. Each bucket summarizes coverage information across its corresponding genomic range. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Coverage is defined as the number of reads which are aligned to a given base in the reference sequence. Coverage buckets are available at several precomputed bucket widths, enabling retrieval of various coverage 'zoom levels'. The caller must have READ permissions for the target read group set.",
  5206. // "httpMethod": "GET",
  5207. // "id": "genomics.readgroupsets.coveragebuckets.list",
  5208. // "parameterOrder": [
  5209. // "readGroupSetId"
  5210. // ],
  5211. // "parameters": {
  5212. // "end": {
  5213. // "description": "The end position of the range on the reference, 0-based exclusive. If specified, `referenceName` must also be specified. If unset or 0, defaults to the length of the reference.",
  5214. // "format": "int64",
  5215. // "location": "query",
  5216. // "type": "string"
  5217. // },
  5218. // "pageSize": {
  5219. // "description": "The maximum number of results to return in a single page. If unspecified, defaults to 1024. The maximum value is 2048.",
  5220. // "format": "int32",
  5221. // "location": "query",
  5222. // "type": "integer"
  5223. // },
  5224. // "pageToken": {
  5225. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.",
  5226. // "location": "query",
  5227. // "type": "string"
  5228. // },
  5229. // "readGroupSetId": {
  5230. // "description": "Required. The ID of the read group set over which coverage is requested.",
  5231. // "location": "path",
  5232. // "required": true,
  5233. // "type": "string"
  5234. // },
  5235. // "referenceName": {
  5236. // "description": "The name of the reference to query, within the reference set associated with this query. Optional.",
  5237. // "location": "query",
  5238. // "type": "string"
  5239. // },
  5240. // "start": {
  5241. // "description": "The start position of the range on the reference, 0-based inclusive. If specified, `referenceName` must also be specified. Defaults to 0.",
  5242. // "format": "int64",
  5243. // "location": "query",
  5244. // "type": "string"
  5245. // },
  5246. // "targetBucketWidth": {
  5247. // "description": "The desired width of each reported coverage bucket in base pairs. This will be rounded down to the nearest precomputed bucket width; the value of which is returned as `bucketWidth` in the response. Defaults to infinity (each bucket spans an entire reference sequence) or the length of the target range, if specified. The smallest precomputed `bucketWidth` is currently 2048 base pairs; this is subject to change.",
  5248. // "format": "int64",
  5249. // "location": "query",
  5250. // "type": "string"
  5251. // }
  5252. // },
  5253. // "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets",
  5254. // "response": {
  5255. // "$ref": "ListCoverageBucketsResponse"
  5256. // },
  5257. // "scopes": [
  5258. // "https://www.googleapis.com/auth/cloud-platform",
  5259. // "https://www.googleapis.com/auth/genomics",
  5260. // "https://www.googleapis.com/auth/genomics.readonly"
  5261. // ]
  5262. // }
  5263. }
  5264. // Pages invokes f for each page of results.
  5265. // A non-nil error returned from f will halt the iteration.
  5266. // The provided context supersedes any context provided to the Context method.
  5267. func (c *ReadgroupsetsCoveragebucketsListCall) Pages(ctx context.Context, f func(*ListCoverageBucketsResponse) error) error {
  5268. c.ctx_ = ctx
  5269. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5270. for {
  5271. x, err := c.Do()
  5272. if err != nil {
  5273. return err
  5274. }
  5275. if err := f(x); err != nil {
  5276. return err
  5277. }
  5278. if x.NextPageToken == "" {
  5279. return nil
  5280. }
  5281. c.PageToken(x.NextPageToken)
  5282. }
  5283. }
  5284. // method id "genomics.reads.search":
  5285. type ReadsSearchCall struct {
  5286. s *Service
  5287. searchreadsrequest *SearchReadsRequest
  5288. urlParams_ gensupport.URLParams
  5289. ctx_ context.Context
  5290. }
  5291. // Search: Gets a list of reads for one or more read group sets. For the
  5292. // definitions of read group sets and other genomics resources, see
  5293. // [Fundamentals of Google
  5294. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5295. // omics) Reads search operates over a genomic coordinate space of
  5296. // reference sequence & position defined over the reference sequences to
  5297. // which the requested read group sets are aligned. If a target
  5298. // positional range is specified, search returns all reads whose
  5299. // alignment to the reference genome overlap the range. A query which
  5300. // specifies only read group set IDs yields all reads in those read
  5301. // group sets, including unmapped reads. All reads returned (including
  5302. // reads on subsequent pages) are ordered by genomic coordinate (by
  5303. // reference sequence, then position). Reads with equivalent genomic
  5304. // coordinates are returned in an unspecified order. This order is
  5305. // consistent, such that two queries for the same content (regardless of
  5306. // page size) yield reads in the same order across their respective
  5307. // streams of paginated responses. Implements
  5308. // [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/
  5309. // v0.5.1/src/main/resources/avro/readmethods.avdl#L85).
  5310. func (r *ReadsService) Search(searchreadsrequest *SearchReadsRequest) *ReadsSearchCall {
  5311. c := &ReadsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5312. c.searchreadsrequest = searchreadsrequest
  5313. return c
  5314. }
  5315. // Fields allows partial responses to be retrieved. See
  5316. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5317. // for more information.
  5318. func (c *ReadsSearchCall) Fields(s ...googleapi.Field) *ReadsSearchCall {
  5319. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5320. return c
  5321. }
  5322. // Context sets the context to be used in this call's Do method. Any
  5323. // pending HTTP request will be aborted if the provided context is
  5324. // canceled.
  5325. func (c *ReadsSearchCall) Context(ctx context.Context) *ReadsSearchCall {
  5326. c.ctx_ = ctx
  5327. return c
  5328. }
  5329. func (c *ReadsSearchCall) doRequest(alt string) (*http.Response, error) {
  5330. var body io.Reader = nil
  5331. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadsrequest)
  5332. if err != nil {
  5333. return nil, err
  5334. }
  5335. ctype := "application/json"
  5336. c.urlParams_.Set("alt", alt)
  5337. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/reads/search")
  5338. urls += "?" + c.urlParams_.Encode()
  5339. req, _ := http.NewRequest("POST", urls, body)
  5340. googleapi.SetOpaque(req.URL)
  5341. req.Header.Set("Content-Type", ctype)
  5342. req.Header.Set("User-Agent", c.s.userAgent())
  5343. if c.ctx_ != nil {
  5344. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5345. }
  5346. return c.s.client.Do(req)
  5347. }
  5348. // Do executes the "genomics.reads.search" call.
  5349. // Exactly one of *SearchReadsResponse or error will be non-nil. Any
  5350. // non-2xx status code is an error. Response headers are in either
  5351. // *SearchReadsResponse.ServerResponse.Header or (if a response was
  5352. // returned at all) in error.(*googleapi.Error).Header. Use
  5353. // googleapi.IsNotModified to check whether the returned error was
  5354. // because http.StatusNotModified was returned.
  5355. func (c *ReadsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReadsResponse, error) {
  5356. gensupport.SetOptions(c.urlParams_, opts...)
  5357. res, err := c.doRequest("json")
  5358. if res != nil && res.StatusCode == http.StatusNotModified {
  5359. if res.Body != nil {
  5360. res.Body.Close()
  5361. }
  5362. return nil, &googleapi.Error{
  5363. Code: res.StatusCode,
  5364. Header: res.Header,
  5365. }
  5366. }
  5367. if err != nil {
  5368. return nil, err
  5369. }
  5370. defer googleapi.CloseBody(res)
  5371. if err := googleapi.CheckResponse(res); err != nil {
  5372. return nil, err
  5373. }
  5374. ret := &SearchReadsResponse{
  5375. ServerResponse: googleapi.ServerResponse{
  5376. Header: res.Header,
  5377. HTTPStatusCode: res.StatusCode,
  5378. },
  5379. }
  5380. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5381. return nil, err
  5382. }
  5383. return ret, nil
  5384. // {
  5385. // "description": "Gets a list of reads for one or more read group sets. For the definitions of read group sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Reads search operates over a genomic coordinate space of reference sequence \u0026 position defined over the reference sequences to which the requested read group sets are aligned. If a target positional range is specified, search returns all reads whose alignment to the reference genome overlap the range. A query which specifies only read group set IDs yields all reads in those read group sets, including unmapped reads. All reads returned (including reads on subsequent pages) are ordered by genomic coordinate (by reference sequence, then position). Reads with equivalent genomic coordinates are returned in an unspecified order. This order is consistent, such that two queries for the same content (regardless of page size) yield reads in the same order across their respective streams of paginated responses. Implements [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).",
  5386. // "httpMethod": "POST",
  5387. // "id": "genomics.reads.search",
  5388. // "path": "v1/reads/search",
  5389. // "request": {
  5390. // "$ref": "SearchReadsRequest"
  5391. // },
  5392. // "response": {
  5393. // "$ref": "SearchReadsResponse"
  5394. // },
  5395. // "scopes": [
  5396. // "https://www.googleapis.com/auth/cloud-platform",
  5397. // "https://www.googleapis.com/auth/genomics",
  5398. // "https://www.googleapis.com/auth/genomics.readonly"
  5399. // ]
  5400. // }
  5401. }
  5402. // method id "genomics.reads.stream":
  5403. type ReadsStreamCall struct {
  5404. s *Service
  5405. streamreadsrequest *StreamReadsRequest
  5406. urlParams_ gensupport.URLParams
  5407. ctx_ context.Context
  5408. }
  5409. // Stream: Returns a stream of all the reads matching the search
  5410. // request, ordered by reference name, position, and ID.
  5411. func (r *ReadsService) Stream(streamreadsrequest *StreamReadsRequest) *ReadsStreamCall {
  5412. c := &ReadsStreamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5413. c.streamreadsrequest = streamreadsrequest
  5414. return c
  5415. }
  5416. // Fields allows partial responses to be retrieved. See
  5417. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5418. // for more information.
  5419. func (c *ReadsStreamCall) Fields(s ...googleapi.Field) *ReadsStreamCall {
  5420. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5421. return c
  5422. }
  5423. // Context sets the context to be used in this call's Do method. Any
  5424. // pending HTTP request will be aborted if the provided context is
  5425. // canceled.
  5426. func (c *ReadsStreamCall) Context(ctx context.Context) *ReadsStreamCall {
  5427. c.ctx_ = ctx
  5428. return c
  5429. }
  5430. func (c *ReadsStreamCall) doRequest(alt string) (*http.Response, error) {
  5431. var body io.Reader = nil
  5432. body, err := googleapi.WithoutDataWrapper.JSONReader(c.streamreadsrequest)
  5433. if err != nil {
  5434. return nil, err
  5435. }
  5436. ctype := "application/json"
  5437. c.urlParams_.Set("alt", alt)
  5438. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/reads:stream")
  5439. urls += "?" + c.urlParams_.Encode()
  5440. req, _ := http.NewRequest("POST", urls, body)
  5441. googleapi.SetOpaque(req.URL)
  5442. req.Header.Set("Content-Type", ctype)
  5443. req.Header.Set("User-Agent", c.s.userAgent())
  5444. if c.ctx_ != nil {
  5445. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5446. }
  5447. return c.s.client.Do(req)
  5448. }
  5449. // Do executes the "genomics.reads.stream" call.
  5450. // Exactly one of *StreamReadsResponse or error will be non-nil. Any
  5451. // non-2xx status code is an error. Response headers are in either
  5452. // *StreamReadsResponse.ServerResponse.Header or (if a response was
  5453. // returned at all) in error.(*googleapi.Error).Header. Use
  5454. // googleapi.IsNotModified to check whether the returned error was
  5455. // because http.StatusNotModified was returned.
  5456. func (c *ReadsStreamCall) Do(opts ...googleapi.CallOption) (*StreamReadsResponse, error) {
  5457. gensupport.SetOptions(c.urlParams_, opts...)
  5458. res, err := c.doRequest("json")
  5459. if res != nil && res.StatusCode == http.StatusNotModified {
  5460. if res.Body != nil {
  5461. res.Body.Close()
  5462. }
  5463. return nil, &googleapi.Error{
  5464. Code: res.StatusCode,
  5465. Header: res.Header,
  5466. }
  5467. }
  5468. if err != nil {
  5469. return nil, err
  5470. }
  5471. defer googleapi.CloseBody(res)
  5472. if err := googleapi.CheckResponse(res); err != nil {
  5473. return nil, err
  5474. }
  5475. ret := &StreamReadsResponse{
  5476. ServerResponse: googleapi.ServerResponse{
  5477. Header: res.Header,
  5478. HTTPStatusCode: res.StatusCode,
  5479. },
  5480. }
  5481. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5482. return nil, err
  5483. }
  5484. return ret, nil
  5485. // {
  5486. // "description": "Returns a stream of all the reads matching the search request, ordered by reference name, position, and ID.",
  5487. // "httpMethod": "POST",
  5488. // "id": "genomics.reads.stream",
  5489. // "path": "v1/reads:stream",
  5490. // "request": {
  5491. // "$ref": "StreamReadsRequest"
  5492. // },
  5493. // "response": {
  5494. // "$ref": "StreamReadsResponse"
  5495. // },
  5496. // "scopes": [
  5497. // "https://www.googleapis.com/auth/cloud-platform",
  5498. // "https://www.googleapis.com/auth/genomics"
  5499. // ]
  5500. // }
  5501. }
  5502. // method id "genomics.references.get":
  5503. type ReferencesGetCall struct {
  5504. s *Service
  5505. referenceId string
  5506. urlParams_ gensupport.URLParams
  5507. ifNoneMatch_ string
  5508. ctx_ context.Context
  5509. }
  5510. // Get: Gets a reference. For the definitions of references and other
  5511. // genomics resources, see [Fundamentals of Google
  5512. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5513. // omics) Implements
  5514. // [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob
  5515. // /v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).
  5516. func (r *ReferencesService) Get(referenceId string) *ReferencesGetCall {
  5517. c := &ReferencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5518. c.referenceId = referenceId
  5519. return c
  5520. }
  5521. // Fields allows partial responses to be retrieved. See
  5522. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5523. // for more information.
  5524. func (c *ReferencesGetCall) Fields(s ...googleapi.Field) *ReferencesGetCall {
  5525. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5526. return c
  5527. }
  5528. // IfNoneMatch sets the optional parameter which makes the operation
  5529. // fail if the object's ETag matches the given value. This is useful for
  5530. // getting updates only after the object has changed since the last
  5531. // request. Use googleapi.IsNotModified to check whether the response
  5532. // error from Do is the result of In-None-Match.
  5533. func (c *ReferencesGetCall) IfNoneMatch(entityTag string) *ReferencesGetCall {
  5534. c.ifNoneMatch_ = entityTag
  5535. return c
  5536. }
  5537. // Context sets the context to be used in this call's Do method. Any
  5538. // pending HTTP request will be aborted if the provided context is
  5539. // canceled.
  5540. func (c *ReferencesGetCall) Context(ctx context.Context) *ReferencesGetCall {
  5541. c.ctx_ = ctx
  5542. return c
  5543. }
  5544. func (c *ReferencesGetCall) doRequest(alt string) (*http.Response, error) {
  5545. var body io.Reader = nil
  5546. c.urlParams_.Set("alt", alt)
  5547. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/{referenceId}")
  5548. urls += "?" + c.urlParams_.Encode()
  5549. req, _ := http.NewRequest("GET", urls, body)
  5550. googleapi.Expand(req.URL, map[string]string{
  5551. "referenceId": c.referenceId,
  5552. })
  5553. req.Header.Set("User-Agent", c.s.userAgent())
  5554. if c.ifNoneMatch_ != "" {
  5555. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  5556. }
  5557. if c.ctx_ != nil {
  5558. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5559. }
  5560. return c.s.client.Do(req)
  5561. }
  5562. // Do executes the "genomics.references.get" call.
  5563. // Exactly one of *Reference or error will be non-nil. Any non-2xx
  5564. // status code is an error. Response headers are in either
  5565. // *Reference.ServerResponse.Header or (if a response was returned at
  5566. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5567. // to check whether the returned error was because
  5568. // http.StatusNotModified was returned.
  5569. func (c *ReferencesGetCall) Do(opts ...googleapi.CallOption) (*Reference, error) {
  5570. gensupport.SetOptions(c.urlParams_, opts...)
  5571. res, err := c.doRequest("json")
  5572. if res != nil && res.StatusCode == http.StatusNotModified {
  5573. if res.Body != nil {
  5574. res.Body.Close()
  5575. }
  5576. return nil, &googleapi.Error{
  5577. Code: res.StatusCode,
  5578. Header: res.Header,
  5579. }
  5580. }
  5581. if err != nil {
  5582. return nil, err
  5583. }
  5584. defer googleapi.CloseBody(res)
  5585. if err := googleapi.CheckResponse(res); err != nil {
  5586. return nil, err
  5587. }
  5588. ret := &Reference{
  5589. ServerResponse: googleapi.ServerResponse{
  5590. Header: res.Header,
  5591. HTTPStatusCode: res.StatusCode,
  5592. },
  5593. }
  5594. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5595. return nil, err
  5596. }
  5597. return ret, nil
  5598. // {
  5599. // "description": "Gets a reference. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).",
  5600. // "httpMethod": "GET",
  5601. // "id": "genomics.references.get",
  5602. // "parameterOrder": [
  5603. // "referenceId"
  5604. // ],
  5605. // "parameters": {
  5606. // "referenceId": {
  5607. // "description": "The ID of the reference.",
  5608. // "location": "path",
  5609. // "required": true,
  5610. // "type": "string"
  5611. // }
  5612. // },
  5613. // "path": "v1/references/{referenceId}",
  5614. // "response": {
  5615. // "$ref": "Reference"
  5616. // },
  5617. // "scopes": [
  5618. // "https://www.googleapis.com/auth/cloud-platform",
  5619. // "https://www.googleapis.com/auth/genomics",
  5620. // "https://www.googleapis.com/auth/genomics.readonly"
  5621. // ]
  5622. // }
  5623. }
  5624. // method id "genomics.references.search":
  5625. type ReferencesSearchCall struct {
  5626. s *Service
  5627. searchreferencesrequest *SearchReferencesRequest
  5628. urlParams_ gensupport.URLParams
  5629. ctx_ context.Context
  5630. }
  5631. // Search: Searches for references which match the given criteria. For
  5632. // the definitions of references and other genomics resources, see
  5633. // [Fundamentals of Google
  5634. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5635. // omics) Implements
  5636. // [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/
  5637. // blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).
  5638. func (r *ReferencesService) Search(searchreferencesrequest *SearchReferencesRequest) *ReferencesSearchCall {
  5639. c := &ReferencesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5640. c.searchreferencesrequest = searchreferencesrequest
  5641. return c
  5642. }
  5643. // Fields allows partial responses to be retrieved. See
  5644. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5645. // for more information.
  5646. func (c *ReferencesSearchCall) Fields(s ...googleapi.Field) *ReferencesSearchCall {
  5647. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5648. return c
  5649. }
  5650. // Context sets the context to be used in this call's Do method. Any
  5651. // pending HTTP request will be aborted if the provided context is
  5652. // canceled.
  5653. func (c *ReferencesSearchCall) Context(ctx context.Context) *ReferencesSearchCall {
  5654. c.ctx_ = ctx
  5655. return c
  5656. }
  5657. func (c *ReferencesSearchCall) doRequest(alt string) (*http.Response, error) {
  5658. var body io.Reader = nil
  5659. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesrequest)
  5660. if err != nil {
  5661. return nil, err
  5662. }
  5663. ctype := "application/json"
  5664. c.urlParams_.Set("alt", alt)
  5665. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/search")
  5666. urls += "?" + c.urlParams_.Encode()
  5667. req, _ := http.NewRequest("POST", urls, body)
  5668. googleapi.SetOpaque(req.URL)
  5669. req.Header.Set("Content-Type", ctype)
  5670. req.Header.Set("User-Agent", c.s.userAgent())
  5671. if c.ctx_ != nil {
  5672. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5673. }
  5674. return c.s.client.Do(req)
  5675. }
  5676. // Do executes the "genomics.references.search" call.
  5677. // Exactly one of *SearchReferencesResponse or error will be non-nil.
  5678. // Any non-2xx status code is an error. Response headers are in either
  5679. // *SearchReferencesResponse.ServerResponse.Header or (if a response was
  5680. // returned at all) in error.(*googleapi.Error).Header. Use
  5681. // googleapi.IsNotModified to check whether the returned error was
  5682. // because http.StatusNotModified was returned.
  5683. func (c *ReferencesSearchCall) Do(opts ...googleapi.CallOption) (*SearchReferencesResponse, error) {
  5684. gensupport.SetOptions(c.urlParams_, opts...)
  5685. res, err := c.doRequest("json")
  5686. if res != nil && res.StatusCode == http.StatusNotModified {
  5687. if res.Body != nil {
  5688. res.Body.Close()
  5689. }
  5690. return nil, &googleapi.Error{
  5691. Code: res.StatusCode,
  5692. Header: res.Header,
  5693. }
  5694. }
  5695. if err != nil {
  5696. return nil, err
  5697. }
  5698. defer googleapi.CloseBody(res)
  5699. if err := googleapi.CheckResponse(res); err != nil {
  5700. return nil, err
  5701. }
  5702. ret := &SearchReferencesResponse{
  5703. ServerResponse: googleapi.ServerResponse{
  5704. Header: res.Header,
  5705. HTTPStatusCode: res.StatusCode,
  5706. },
  5707. }
  5708. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5709. return nil, err
  5710. }
  5711. return ret, nil
  5712. // {
  5713. // "description": "Searches for references which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).",
  5714. // "httpMethod": "POST",
  5715. // "id": "genomics.references.search",
  5716. // "path": "v1/references/search",
  5717. // "request": {
  5718. // "$ref": "SearchReferencesRequest"
  5719. // },
  5720. // "response": {
  5721. // "$ref": "SearchReferencesResponse"
  5722. // },
  5723. // "scopes": [
  5724. // "https://www.googleapis.com/auth/cloud-platform",
  5725. // "https://www.googleapis.com/auth/genomics",
  5726. // "https://www.googleapis.com/auth/genomics.readonly"
  5727. // ]
  5728. // }
  5729. }
  5730. // method id "genomics.references.bases.list":
  5731. type ReferencesBasesListCall struct {
  5732. s *Service
  5733. referenceId string
  5734. urlParams_ gensupport.URLParams
  5735. ifNoneMatch_ string
  5736. ctx_ context.Context
  5737. }
  5738. // List: Lists the bases in a reference, optionally restricted to a
  5739. // range. For the definitions of references and other genomics
  5740. // resources, see [Fundamentals of Google
  5741. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5742. // omics) Implements
  5743. // [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas
  5744. // /blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).
  5745. func (r *ReferencesBasesService) List(referenceId string) *ReferencesBasesListCall {
  5746. c := &ReferencesBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5747. c.referenceId = referenceId
  5748. return c
  5749. }
  5750. // End sets the optional parameter "end": The end position (0-based,
  5751. // exclusive) of this query. Defaults to the length of this reference.
  5752. func (c *ReferencesBasesListCall) End(end int64) *ReferencesBasesListCall {
  5753. c.urlParams_.Set("end", fmt.Sprint(end))
  5754. return c
  5755. }
  5756. // PageSize sets the optional parameter "pageSize": The maximum number
  5757. // of bases to return in a single page. If unspecified, defaults to
  5758. // 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base
  5759. // pairs).
  5760. func (c *ReferencesBasesListCall) PageSize(pageSize int64) *ReferencesBasesListCall {
  5761. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5762. return c
  5763. }
  5764. // PageToken sets the optional parameter "pageToken": The continuation
  5765. // token, which is used to page through large result sets. To get the
  5766. // next page of results, set this parameter to the value of
  5767. // `nextPageToken` from the previous response.
  5768. func (c *ReferencesBasesListCall) PageToken(pageToken string) *ReferencesBasesListCall {
  5769. c.urlParams_.Set("pageToken", pageToken)
  5770. return c
  5771. }
  5772. // Start sets the optional parameter "start": The start position
  5773. // (0-based) of this query. Defaults to 0.
  5774. func (c *ReferencesBasesListCall) Start(start int64) *ReferencesBasesListCall {
  5775. c.urlParams_.Set("start", fmt.Sprint(start))
  5776. return c
  5777. }
  5778. // Fields allows partial responses to be retrieved. See
  5779. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5780. // for more information.
  5781. func (c *ReferencesBasesListCall) Fields(s ...googleapi.Field) *ReferencesBasesListCall {
  5782. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5783. return c
  5784. }
  5785. // IfNoneMatch sets the optional parameter which makes the operation
  5786. // fail if the object's ETag matches the given value. This is useful for
  5787. // getting updates only after the object has changed since the last
  5788. // request. Use googleapi.IsNotModified to check whether the response
  5789. // error from Do is the result of In-None-Match.
  5790. func (c *ReferencesBasesListCall) IfNoneMatch(entityTag string) *ReferencesBasesListCall {
  5791. c.ifNoneMatch_ = entityTag
  5792. return c
  5793. }
  5794. // Context sets the context to be used in this call's Do method. Any
  5795. // pending HTTP request will be aborted if the provided context is
  5796. // canceled.
  5797. func (c *ReferencesBasesListCall) Context(ctx context.Context) *ReferencesBasesListCall {
  5798. c.ctx_ = ctx
  5799. return c
  5800. }
  5801. func (c *ReferencesBasesListCall) doRequest(alt string) (*http.Response, error) {
  5802. var body io.Reader = nil
  5803. c.urlParams_.Set("alt", alt)
  5804. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/{referenceId}/bases")
  5805. urls += "?" + c.urlParams_.Encode()
  5806. req, _ := http.NewRequest("GET", urls, body)
  5807. googleapi.Expand(req.URL, map[string]string{
  5808. "referenceId": c.referenceId,
  5809. })
  5810. req.Header.Set("User-Agent", c.s.userAgent())
  5811. if c.ifNoneMatch_ != "" {
  5812. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  5813. }
  5814. if c.ctx_ != nil {
  5815. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5816. }
  5817. return c.s.client.Do(req)
  5818. }
  5819. // Do executes the "genomics.references.bases.list" call.
  5820. // Exactly one of *ListBasesResponse or error will be non-nil. Any
  5821. // non-2xx status code is an error. Response headers are in either
  5822. // *ListBasesResponse.ServerResponse.Header or (if a response was
  5823. // returned at all) in error.(*googleapi.Error).Header. Use
  5824. // googleapi.IsNotModified to check whether the returned error was
  5825. // because http.StatusNotModified was returned.
  5826. func (c *ReferencesBasesListCall) Do(opts ...googleapi.CallOption) (*ListBasesResponse, error) {
  5827. gensupport.SetOptions(c.urlParams_, opts...)
  5828. res, err := c.doRequest("json")
  5829. if res != nil && res.StatusCode == http.StatusNotModified {
  5830. if res.Body != nil {
  5831. res.Body.Close()
  5832. }
  5833. return nil, &googleapi.Error{
  5834. Code: res.StatusCode,
  5835. Header: res.Header,
  5836. }
  5837. }
  5838. if err != nil {
  5839. return nil, err
  5840. }
  5841. defer googleapi.CloseBody(res)
  5842. if err := googleapi.CheckResponse(res); err != nil {
  5843. return nil, err
  5844. }
  5845. ret := &ListBasesResponse{
  5846. ServerResponse: googleapi.ServerResponse{
  5847. Header: res.Header,
  5848. HTTPStatusCode: res.StatusCode,
  5849. },
  5850. }
  5851. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  5852. return nil, err
  5853. }
  5854. return ret, nil
  5855. // {
  5856. // "description": "Lists the bases in a reference, optionally restricted to a range. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).",
  5857. // "httpMethod": "GET",
  5858. // "id": "genomics.references.bases.list",
  5859. // "parameterOrder": [
  5860. // "referenceId"
  5861. // ],
  5862. // "parameters": {
  5863. // "end": {
  5864. // "description": "The end position (0-based, exclusive) of this query. Defaults to the length of this reference.",
  5865. // "format": "int64",
  5866. // "location": "query",
  5867. // "type": "string"
  5868. // },
  5869. // "pageSize": {
  5870. // "description": "The maximum number of bases to return in a single page. If unspecified, defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base pairs).",
  5871. // "format": "int32",
  5872. // "location": "query",
  5873. // "type": "integer"
  5874. // },
  5875. // "pageToken": {
  5876. // "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.",
  5877. // "location": "query",
  5878. // "type": "string"
  5879. // },
  5880. // "referenceId": {
  5881. // "description": "The ID of the reference.",
  5882. // "location": "path",
  5883. // "required": true,
  5884. // "type": "string"
  5885. // },
  5886. // "start": {
  5887. // "description": "The start position (0-based) of this query. Defaults to 0.",
  5888. // "format": "int64",
  5889. // "location": "query",
  5890. // "type": "string"
  5891. // }
  5892. // },
  5893. // "path": "v1/references/{referenceId}/bases",
  5894. // "response": {
  5895. // "$ref": "ListBasesResponse"
  5896. // },
  5897. // "scopes": [
  5898. // "https://www.googleapis.com/auth/cloud-platform",
  5899. // "https://www.googleapis.com/auth/genomics",
  5900. // "https://www.googleapis.com/auth/genomics.readonly"
  5901. // ]
  5902. // }
  5903. }
  5904. // Pages invokes f for each page of results.
  5905. // A non-nil error returned from f will halt the iteration.
  5906. // The provided context supersedes any context provided to the Context method.
  5907. func (c *ReferencesBasesListCall) Pages(ctx context.Context, f func(*ListBasesResponse) error) error {
  5908. c.ctx_ = ctx
  5909. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5910. for {
  5911. x, err := c.Do()
  5912. if err != nil {
  5913. return err
  5914. }
  5915. if err := f(x); err != nil {
  5916. return err
  5917. }
  5918. if x.NextPageToken == "" {
  5919. return nil
  5920. }
  5921. c.PageToken(x.NextPageToken)
  5922. }
  5923. }
  5924. // method id "genomics.referencesets.get":
  5925. type ReferencesetsGetCall struct {
  5926. s *Service
  5927. referenceSetId string
  5928. urlParams_ gensupport.URLParams
  5929. ifNoneMatch_ string
  5930. ctx_ context.Context
  5931. }
  5932. // Get: Gets a reference set. For the definitions of references and
  5933. // other genomics resources, see [Fundamentals of Google
  5934. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  5935. // omics) Implements
  5936. // [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/b
  5937. // lob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).
  5938. func (r *ReferencesetsService) Get(referenceSetId string) *ReferencesetsGetCall {
  5939. c := &ReferencesetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5940. c.referenceSetId = referenceSetId
  5941. return c
  5942. }
  5943. // Fields allows partial responses to be retrieved. See
  5944. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5945. // for more information.
  5946. func (c *ReferencesetsGetCall) Fields(s ...googleapi.Field) *ReferencesetsGetCall {
  5947. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5948. return c
  5949. }
  5950. // IfNoneMatch sets the optional parameter which makes the operation
  5951. // fail if the object's ETag matches the given value. This is useful for
  5952. // getting updates only after the object has changed since the last
  5953. // request. Use googleapi.IsNotModified to check whether the response
  5954. // error from Do is the result of In-None-Match.
  5955. func (c *ReferencesetsGetCall) IfNoneMatch(entityTag string) *ReferencesetsGetCall {
  5956. c.ifNoneMatch_ = entityTag
  5957. return c
  5958. }
  5959. // Context sets the context to be used in this call's Do method. Any
  5960. // pending HTTP request will be aborted if the provided context is
  5961. // canceled.
  5962. func (c *ReferencesetsGetCall) Context(ctx context.Context) *ReferencesetsGetCall {
  5963. c.ctx_ = ctx
  5964. return c
  5965. }
  5966. func (c *ReferencesetsGetCall) doRequest(alt string) (*http.Response, error) {
  5967. var body io.Reader = nil
  5968. c.urlParams_.Set("alt", alt)
  5969. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/referencesets/{referenceSetId}")
  5970. urls += "?" + c.urlParams_.Encode()
  5971. req, _ := http.NewRequest("GET", urls, body)
  5972. googleapi.Expand(req.URL, map[string]string{
  5973. "referenceSetId": c.referenceSetId,
  5974. })
  5975. req.Header.Set("User-Agent", c.s.userAgent())
  5976. if c.ifNoneMatch_ != "" {
  5977. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  5978. }
  5979. if c.ctx_ != nil {
  5980. return ctxhttp.Do(c.ctx_, c.s.client, req)
  5981. }
  5982. return c.s.client.Do(req)
  5983. }
  5984. // Do executes the "genomics.referencesets.get" call.
  5985. // Exactly one of *ReferenceSet or error will be non-nil. Any non-2xx
  5986. // status code is an error. Response headers are in either
  5987. // *ReferenceSet.ServerResponse.Header or (if a response was returned at
  5988. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5989. // to check whether the returned error was because
  5990. // http.StatusNotModified was returned.
  5991. func (c *ReferencesetsGetCall) Do(opts ...googleapi.CallOption) (*ReferenceSet, error) {
  5992. gensupport.SetOptions(c.urlParams_, opts...)
  5993. res, err := c.doRequest("json")
  5994. if res != nil && res.StatusCode == http.StatusNotModified {
  5995. if res.Body != nil {
  5996. res.Body.Close()
  5997. }
  5998. return nil, &googleapi.Error{
  5999. Code: res.StatusCode,
  6000. Header: res.Header,
  6001. }
  6002. }
  6003. if err != nil {
  6004. return nil, err
  6005. }
  6006. defer googleapi.CloseBody(res)
  6007. if err := googleapi.CheckResponse(res); err != nil {
  6008. return nil, err
  6009. }
  6010. ret := &ReferenceSet{
  6011. ServerResponse: googleapi.ServerResponse{
  6012. Header: res.Header,
  6013. HTTPStatusCode: res.StatusCode,
  6014. },
  6015. }
  6016. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6017. return nil, err
  6018. }
  6019. return ret, nil
  6020. // {
  6021. // "description": "Gets a reference set. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).",
  6022. // "httpMethod": "GET",
  6023. // "id": "genomics.referencesets.get",
  6024. // "parameterOrder": [
  6025. // "referenceSetId"
  6026. // ],
  6027. // "parameters": {
  6028. // "referenceSetId": {
  6029. // "description": "The ID of the reference set.",
  6030. // "location": "path",
  6031. // "required": true,
  6032. // "type": "string"
  6033. // }
  6034. // },
  6035. // "path": "v1/referencesets/{referenceSetId}",
  6036. // "response": {
  6037. // "$ref": "ReferenceSet"
  6038. // },
  6039. // "scopes": [
  6040. // "https://www.googleapis.com/auth/cloud-platform",
  6041. // "https://www.googleapis.com/auth/genomics",
  6042. // "https://www.googleapis.com/auth/genomics.readonly"
  6043. // ]
  6044. // }
  6045. }
  6046. // method id "genomics.referencesets.search":
  6047. type ReferencesetsSearchCall struct {
  6048. s *Service
  6049. searchreferencesetsrequest *SearchReferenceSetsRequest
  6050. urlParams_ gensupport.URLParams
  6051. ctx_ context.Context
  6052. }
  6053. // Search: Searches for reference sets which match the given criteria.
  6054. // For the definitions of references and other genomics resources, see
  6055. // [Fundamentals of Google
  6056. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6057. // omics) Implements
  6058. // [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schem
  6059. // as/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)
  6060. func (r *ReferencesetsService) Search(searchreferencesetsrequest *SearchReferenceSetsRequest) *ReferencesetsSearchCall {
  6061. c := &ReferencesetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6062. c.searchreferencesetsrequest = searchreferencesetsrequest
  6063. return c
  6064. }
  6065. // Fields allows partial responses to be retrieved. See
  6066. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6067. // for more information.
  6068. func (c *ReferencesetsSearchCall) Fields(s ...googleapi.Field) *ReferencesetsSearchCall {
  6069. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6070. return c
  6071. }
  6072. // Context sets the context to be used in this call's Do method. Any
  6073. // pending HTTP request will be aborted if the provided context is
  6074. // canceled.
  6075. func (c *ReferencesetsSearchCall) Context(ctx context.Context) *ReferencesetsSearchCall {
  6076. c.ctx_ = ctx
  6077. return c
  6078. }
  6079. func (c *ReferencesetsSearchCall) doRequest(alt string) (*http.Response, error) {
  6080. var body io.Reader = nil
  6081. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesetsrequest)
  6082. if err != nil {
  6083. return nil, err
  6084. }
  6085. ctype := "application/json"
  6086. c.urlParams_.Set("alt", alt)
  6087. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/referencesets/search")
  6088. urls += "?" + c.urlParams_.Encode()
  6089. req, _ := http.NewRequest("POST", urls, body)
  6090. googleapi.SetOpaque(req.URL)
  6091. req.Header.Set("Content-Type", ctype)
  6092. req.Header.Set("User-Agent", c.s.userAgent())
  6093. if c.ctx_ != nil {
  6094. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6095. }
  6096. return c.s.client.Do(req)
  6097. }
  6098. // Do executes the "genomics.referencesets.search" call.
  6099. // Exactly one of *SearchReferenceSetsResponse or error will be non-nil.
  6100. // Any non-2xx status code is an error. Response headers are in either
  6101. // *SearchReferenceSetsResponse.ServerResponse.Header or (if a response
  6102. // was returned at all) in error.(*googleapi.Error).Header. Use
  6103. // googleapi.IsNotModified to check whether the returned error was
  6104. // because http.StatusNotModified was returned.
  6105. func (c *ReferencesetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReferenceSetsResponse, error) {
  6106. gensupport.SetOptions(c.urlParams_, opts...)
  6107. res, err := c.doRequest("json")
  6108. if res != nil && res.StatusCode == http.StatusNotModified {
  6109. if res.Body != nil {
  6110. res.Body.Close()
  6111. }
  6112. return nil, &googleapi.Error{
  6113. Code: res.StatusCode,
  6114. Header: res.Header,
  6115. }
  6116. }
  6117. if err != nil {
  6118. return nil, err
  6119. }
  6120. defer googleapi.CloseBody(res)
  6121. if err := googleapi.CheckResponse(res); err != nil {
  6122. return nil, err
  6123. }
  6124. ret := &SearchReferenceSetsResponse{
  6125. ServerResponse: googleapi.ServerResponse{
  6126. Header: res.Header,
  6127. HTTPStatusCode: res.StatusCode,
  6128. },
  6129. }
  6130. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6131. return nil, err
  6132. }
  6133. return ret, nil
  6134. // {
  6135. // "description": "Searches for reference sets which match the given criteria. For the definitions of references and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)",
  6136. // "httpMethod": "POST",
  6137. // "id": "genomics.referencesets.search",
  6138. // "path": "v1/referencesets/search",
  6139. // "request": {
  6140. // "$ref": "SearchReferenceSetsRequest"
  6141. // },
  6142. // "response": {
  6143. // "$ref": "SearchReferenceSetsResponse"
  6144. // },
  6145. // "scopes": [
  6146. // "https://www.googleapis.com/auth/cloud-platform",
  6147. // "https://www.googleapis.com/auth/genomics",
  6148. // "https://www.googleapis.com/auth/genomics.readonly"
  6149. // ]
  6150. // }
  6151. }
  6152. // method id "genomics.variants.create":
  6153. type VariantsCreateCall struct {
  6154. s *Service
  6155. variant *Variant
  6156. urlParams_ gensupport.URLParams
  6157. ctx_ context.Context
  6158. }
  6159. // Create: Creates a new variant. For the definitions of variants and
  6160. // other genomics resources, see [Fundamentals of Google
  6161. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6162. // omics)
  6163. func (r *VariantsService) Create(variant *Variant) *VariantsCreateCall {
  6164. c := &VariantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6165. c.variant = variant
  6166. return c
  6167. }
  6168. // Fields allows partial responses to be retrieved. See
  6169. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6170. // for more information.
  6171. func (c *VariantsCreateCall) Fields(s ...googleapi.Field) *VariantsCreateCall {
  6172. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6173. return c
  6174. }
  6175. // Context sets the context to be used in this call's Do method. Any
  6176. // pending HTTP request will be aborted if the provided context is
  6177. // canceled.
  6178. func (c *VariantsCreateCall) Context(ctx context.Context) *VariantsCreateCall {
  6179. c.ctx_ = ctx
  6180. return c
  6181. }
  6182. func (c *VariantsCreateCall) doRequest(alt string) (*http.Response, error) {
  6183. var body io.Reader = nil
  6184. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
  6185. if err != nil {
  6186. return nil, err
  6187. }
  6188. ctype := "application/json"
  6189. c.urlParams_.Set("alt", alt)
  6190. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants")
  6191. urls += "?" + c.urlParams_.Encode()
  6192. req, _ := http.NewRequest("POST", urls, body)
  6193. googleapi.SetOpaque(req.URL)
  6194. req.Header.Set("Content-Type", ctype)
  6195. req.Header.Set("User-Agent", c.s.userAgent())
  6196. if c.ctx_ != nil {
  6197. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6198. }
  6199. return c.s.client.Do(req)
  6200. }
  6201. // Do executes the "genomics.variants.create" call.
  6202. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  6203. // code is an error. Response headers are in either
  6204. // *Variant.ServerResponse.Header or (if a response was returned at all)
  6205. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6206. // check whether the returned error was because http.StatusNotModified
  6207. // was returned.
  6208. func (c *VariantsCreateCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  6209. gensupport.SetOptions(c.urlParams_, opts...)
  6210. res, err := c.doRequest("json")
  6211. if res != nil && res.StatusCode == http.StatusNotModified {
  6212. if res.Body != nil {
  6213. res.Body.Close()
  6214. }
  6215. return nil, &googleapi.Error{
  6216. Code: res.StatusCode,
  6217. Header: res.Header,
  6218. }
  6219. }
  6220. if err != nil {
  6221. return nil, err
  6222. }
  6223. defer googleapi.CloseBody(res)
  6224. if err := googleapi.CheckResponse(res); err != nil {
  6225. return nil, err
  6226. }
  6227. ret := &Variant{
  6228. ServerResponse: googleapi.ServerResponse{
  6229. Header: res.Header,
  6230. HTTPStatusCode: res.StatusCode,
  6231. },
  6232. }
  6233. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6234. return nil, err
  6235. }
  6236. return ret, nil
  6237. // {
  6238. // "description": "Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  6239. // "httpMethod": "POST",
  6240. // "id": "genomics.variants.create",
  6241. // "path": "v1/variants",
  6242. // "request": {
  6243. // "$ref": "Variant"
  6244. // },
  6245. // "response": {
  6246. // "$ref": "Variant"
  6247. // },
  6248. // "scopes": [
  6249. // "https://www.googleapis.com/auth/cloud-platform",
  6250. // "https://www.googleapis.com/auth/genomics"
  6251. // ]
  6252. // }
  6253. }
  6254. // method id "genomics.variants.delete":
  6255. type VariantsDeleteCall struct {
  6256. s *Service
  6257. variantId string
  6258. urlParams_ gensupport.URLParams
  6259. ctx_ context.Context
  6260. }
  6261. // Delete: Deletes a variant. For the definitions of variants and other
  6262. // genomics resources, see [Fundamentals of Google
  6263. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6264. // omics)
  6265. func (r *VariantsService) Delete(variantId string) *VariantsDeleteCall {
  6266. c := &VariantsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6267. c.variantId = variantId
  6268. return c
  6269. }
  6270. // Fields allows partial responses to be retrieved. See
  6271. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6272. // for more information.
  6273. func (c *VariantsDeleteCall) Fields(s ...googleapi.Field) *VariantsDeleteCall {
  6274. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6275. return c
  6276. }
  6277. // Context sets the context to be used in this call's Do method. Any
  6278. // pending HTTP request will be aborted if the provided context is
  6279. // canceled.
  6280. func (c *VariantsDeleteCall) Context(ctx context.Context) *VariantsDeleteCall {
  6281. c.ctx_ = ctx
  6282. return c
  6283. }
  6284. func (c *VariantsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6285. var body io.Reader = nil
  6286. c.urlParams_.Set("alt", alt)
  6287. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  6288. urls += "?" + c.urlParams_.Encode()
  6289. req, _ := http.NewRequest("DELETE", urls, body)
  6290. googleapi.Expand(req.URL, map[string]string{
  6291. "variantId": c.variantId,
  6292. })
  6293. req.Header.Set("User-Agent", c.s.userAgent())
  6294. if c.ctx_ != nil {
  6295. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6296. }
  6297. return c.s.client.Do(req)
  6298. }
  6299. // Do executes the "genomics.variants.delete" call.
  6300. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6301. // code is an error. Response headers are in either
  6302. // *Empty.ServerResponse.Header or (if a response was returned at all)
  6303. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6304. // check whether the returned error was because http.StatusNotModified
  6305. // was returned.
  6306. func (c *VariantsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6307. gensupport.SetOptions(c.urlParams_, opts...)
  6308. res, err := c.doRequest("json")
  6309. if res != nil && res.StatusCode == http.StatusNotModified {
  6310. if res.Body != nil {
  6311. res.Body.Close()
  6312. }
  6313. return nil, &googleapi.Error{
  6314. Code: res.StatusCode,
  6315. Header: res.Header,
  6316. }
  6317. }
  6318. if err != nil {
  6319. return nil, err
  6320. }
  6321. defer googleapi.CloseBody(res)
  6322. if err := googleapi.CheckResponse(res); err != nil {
  6323. return nil, err
  6324. }
  6325. ret := &Empty{
  6326. ServerResponse: googleapi.ServerResponse{
  6327. Header: res.Header,
  6328. HTTPStatusCode: res.StatusCode,
  6329. },
  6330. }
  6331. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6332. return nil, err
  6333. }
  6334. return ret, nil
  6335. // {
  6336. // "description": "Deletes a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  6337. // "httpMethod": "DELETE",
  6338. // "id": "genomics.variants.delete",
  6339. // "parameterOrder": [
  6340. // "variantId"
  6341. // ],
  6342. // "parameters": {
  6343. // "variantId": {
  6344. // "description": "The ID of the variant to be deleted.",
  6345. // "location": "path",
  6346. // "required": true,
  6347. // "type": "string"
  6348. // }
  6349. // },
  6350. // "path": "v1/variants/{variantId}",
  6351. // "response": {
  6352. // "$ref": "Empty"
  6353. // },
  6354. // "scopes": [
  6355. // "https://www.googleapis.com/auth/cloud-platform",
  6356. // "https://www.googleapis.com/auth/genomics"
  6357. // ]
  6358. // }
  6359. }
  6360. // method id "genomics.variants.get":
  6361. type VariantsGetCall struct {
  6362. s *Service
  6363. variantId string
  6364. urlParams_ gensupport.URLParams
  6365. ifNoneMatch_ string
  6366. ctx_ context.Context
  6367. }
  6368. // Get: Gets a variant by ID. For the definitions of variants and other
  6369. // genomics resources, see [Fundamentals of Google
  6370. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6371. // omics)
  6372. func (r *VariantsService) Get(variantId string) *VariantsGetCall {
  6373. c := &VariantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6374. c.variantId = variantId
  6375. return c
  6376. }
  6377. // Fields allows partial responses to be retrieved. See
  6378. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6379. // for more information.
  6380. func (c *VariantsGetCall) Fields(s ...googleapi.Field) *VariantsGetCall {
  6381. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6382. return c
  6383. }
  6384. // IfNoneMatch sets the optional parameter which makes the operation
  6385. // fail if the object's ETag matches the given value. This is useful for
  6386. // getting updates only after the object has changed since the last
  6387. // request. Use googleapi.IsNotModified to check whether the response
  6388. // error from Do is the result of In-None-Match.
  6389. func (c *VariantsGetCall) IfNoneMatch(entityTag string) *VariantsGetCall {
  6390. c.ifNoneMatch_ = entityTag
  6391. return c
  6392. }
  6393. // Context sets the context to be used in this call's Do method. Any
  6394. // pending HTTP request will be aborted if the provided context is
  6395. // canceled.
  6396. func (c *VariantsGetCall) Context(ctx context.Context) *VariantsGetCall {
  6397. c.ctx_ = ctx
  6398. return c
  6399. }
  6400. func (c *VariantsGetCall) doRequest(alt string) (*http.Response, error) {
  6401. var body io.Reader = nil
  6402. c.urlParams_.Set("alt", alt)
  6403. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  6404. urls += "?" + c.urlParams_.Encode()
  6405. req, _ := http.NewRequest("GET", urls, body)
  6406. googleapi.Expand(req.URL, map[string]string{
  6407. "variantId": c.variantId,
  6408. })
  6409. req.Header.Set("User-Agent", c.s.userAgent())
  6410. if c.ifNoneMatch_ != "" {
  6411. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  6412. }
  6413. if c.ctx_ != nil {
  6414. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6415. }
  6416. return c.s.client.Do(req)
  6417. }
  6418. // Do executes the "genomics.variants.get" call.
  6419. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  6420. // code is an error. Response headers are in either
  6421. // *Variant.ServerResponse.Header or (if a response was returned at all)
  6422. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6423. // check whether the returned error was because http.StatusNotModified
  6424. // was returned.
  6425. func (c *VariantsGetCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  6426. gensupport.SetOptions(c.urlParams_, opts...)
  6427. res, err := c.doRequest("json")
  6428. if res != nil && res.StatusCode == http.StatusNotModified {
  6429. if res.Body != nil {
  6430. res.Body.Close()
  6431. }
  6432. return nil, &googleapi.Error{
  6433. Code: res.StatusCode,
  6434. Header: res.Header,
  6435. }
  6436. }
  6437. if err != nil {
  6438. return nil, err
  6439. }
  6440. defer googleapi.CloseBody(res)
  6441. if err := googleapi.CheckResponse(res); err != nil {
  6442. return nil, err
  6443. }
  6444. ret := &Variant{
  6445. ServerResponse: googleapi.ServerResponse{
  6446. Header: res.Header,
  6447. HTTPStatusCode: res.StatusCode,
  6448. },
  6449. }
  6450. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6451. return nil, err
  6452. }
  6453. return ret, nil
  6454. // {
  6455. // "description": "Gets a variant by ID. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  6456. // "httpMethod": "GET",
  6457. // "id": "genomics.variants.get",
  6458. // "parameterOrder": [
  6459. // "variantId"
  6460. // ],
  6461. // "parameters": {
  6462. // "variantId": {
  6463. // "description": "The ID of the variant.",
  6464. // "location": "path",
  6465. // "required": true,
  6466. // "type": "string"
  6467. // }
  6468. // },
  6469. // "path": "v1/variants/{variantId}",
  6470. // "response": {
  6471. // "$ref": "Variant"
  6472. // },
  6473. // "scopes": [
  6474. // "https://www.googleapis.com/auth/cloud-platform",
  6475. // "https://www.googleapis.com/auth/genomics",
  6476. // "https://www.googleapis.com/auth/genomics.readonly"
  6477. // ]
  6478. // }
  6479. }
  6480. // method id "genomics.variants.import":
  6481. type VariantsImportCall struct {
  6482. s *Service
  6483. importvariantsrequest *ImportVariantsRequest
  6484. urlParams_ gensupport.URLParams
  6485. ctx_ context.Context
  6486. }
  6487. // Import: Creates variant data by asynchronously importing the provided
  6488. // information. For the definitions of variant sets and other genomics
  6489. // resources, see [Fundamentals of Google
  6490. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6491. // omics) The variants for import will be merged with any existing
  6492. // variant that matches its reference sequence, start, end, reference
  6493. // bases, and alternative bases. If no such variant exists, a new one
  6494. // will be created. When variants are merged, the call information from
  6495. // the new variant is added to the existing variant, and other fields
  6496. // (such as key/value pairs) are discarded. In particular, this means
  6497. // for merged VCF variants that have conflicting INFO fields, some data
  6498. // will be arbitrarily discarded. As a special case, for single-sample
  6499. // VCF files, QUAL and FILTER fields will be moved to the call level;
  6500. // these are sometimes interpreted in a call-specific context. Imported
  6501. // VCF headers are appended to the metadata already in a variant set.
  6502. func (r *VariantsService) Import(importvariantsrequest *ImportVariantsRequest) *VariantsImportCall {
  6503. c := &VariantsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6504. c.importvariantsrequest = importvariantsrequest
  6505. return c
  6506. }
  6507. // Fields allows partial responses to be retrieved. See
  6508. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6509. // for more information.
  6510. func (c *VariantsImportCall) Fields(s ...googleapi.Field) *VariantsImportCall {
  6511. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6512. return c
  6513. }
  6514. // Context sets the context to be used in this call's Do method. Any
  6515. // pending HTTP request will be aborted if the provided context is
  6516. // canceled.
  6517. func (c *VariantsImportCall) Context(ctx context.Context) *VariantsImportCall {
  6518. c.ctx_ = ctx
  6519. return c
  6520. }
  6521. func (c *VariantsImportCall) doRequest(alt string) (*http.Response, error) {
  6522. var body io.Reader = nil
  6523. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importvariantsrequest)
  6524. if err != nil {
  6525. return nil, err
  6526. }
  6527. ctype := "application/json"
  6528. c.urlParams_.Set("alt", alt)
  6529. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants:import")
  6530. urls += "?" + c.urlParams_.Encode()
  6531. req, _ := http.NewRequest("POST", urls, body)
  6532. googleapi.SetOpaque(req.URL)
  6533. req.Header.Set("Content-Type", ctype)
  6534. req.Header.Set("User-Agent", c.s.userAgent())
  6535. if c.ctx_ != nil {
  6536. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6537. }
  6538. return c.s.client.Do(req)
  6539. }
  6540. // Do executes the "genomics.variants.import" call.
  6541. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6542. // status code is an error. Response headers are in either
  6543. // *Operation.ServerResponse.Header or (if a response was returned at
  6544. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6545. // to check whether the returned error was because
  6546. // http.StatusNotModified was returned.
  6547. func (c *VariantsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6548. gensupport.SetOptions(c.urlParams_, opts...)
  6549. res, err := c.doRequest("json")
  6550. if res != nil && res.StatusCode == http.StatusNotModified {
  6551. if res.Body != nil {
  6552. res.Body.Close()
  6553. }
  6554. return nil, &googleapi.Error{
  6555. Code: res.StatusCode,
  6556. Header: res.Header,
  6557. }
  6558. }
  6559. if err != nil {
  6560. return nil, err
  6561. }
  6562. defer googleapi.CloseBody(res)
  6563. if err := googleapi.CheckResponse(res); err != nil {
  6564. return nil, err
  6565. }
  6566. ret := &Operation{
  6567. ServerResponse: googleapi.ServerResponse{
  6568. Header: res.Header,
  6569. HTTPStatusCode: res.StatusCode,
  6570. },
  6571. }
  6572. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6573. return nil, err
  6574. }
  6575. return ret, nil
  6576. // {
  6577. // "description": "Creates variant data by asynchronously importing the provided information. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The variants for import will be merged with any existing variant that matches its reference sequence, start, end, reference bases, and alternative bases. If no such variant exists, a new one will be created. When variants are merged, the call information from the new variant is added to the existing variant, and other fields (such as key/value pairs) are discarded. In particular, this means for merged VCF variants that have conflicting INFO fields, some data will be arbitrarily discarded. As a special case, for single-sample VCF files, QUAL and FILTER fields will be moved to the call level; these are sometimes interpreted in a call-specific context. Imported VCF headers are appended to the metadata already in a variant set.",
  6578. // "httpMethod": "POST",
  6579. // "id": "genomics.variants.import",
  6580. // "path": "v1/variants:import",
  6581. // "request": {
  6582. // "$ref": "ImportVariantsRequest"
  6583. // },
  6584. // "response": {
  6585. // "$ref": "Operation"
  6586. // },
  6587. // "scopes": [
  6588. // "https://www.googleapis.com/auth/cloud-platform",
  6589. // "https://www.googleapis.com/auth/devstorage.read_write",
  6590. // "https://www.googleapis.com/auth/genomics"
  6591. // ]
  6592. // }
  6593. }
  6594. // method id "genomics.variants.patch":
  6595. type VariantsPatchCall struct {
  6596. s *Service
  6597. variantId string
  6598. variant *Variant
  6599. urlParams_ gensupport.URLParams
  6600. ctx_ context.Context
  6601. }
  6602. // Patch: Updates a variant. For the definitions of variants and other
  6603. // genomics resources, see [Fundamentals of Google
  6604. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6605. // omics) This method supports patch semantics. Returns the modified
  6606. // variant without its calls.
  6607. func (r *VariantsService) Patch(variantId string, variant *Variant) *VariantsPatchCall {
  6608. c := &VariantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6609. c.variantId = variantId
  6610. c.variant = variant
  6611. return c
  6612. }
  6613. // UpdateMask sets the optional parameter "updateMask": An optional mask
  6614. // specifying which fields to update. At this time, mutable fields are
  6615. // names and info. Acceptable values are "names" and "info". If
  6616. // unspecified, all mutable fields will be updated.
  6617. func (c *VariantsPatchCall) UpdateMask(updateMask string) *VariantsPatchCall {
  6618. c.urlParams_.Set("updateMask", updateMask)
  6619. return c
  6620. }
  6621. // Fields allows partial responses to be retrieved. See
  6622. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6623. // for more information.
  6624. func (c *VariantsPatchCall) Fields(s ...googleapi.Field) *VariantsPatchCall {
  6625. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6626. return c
  6627. }
  6628. // Context sets the context to be used in this call's Do method. Any
  6629. // pending HTTP request will be aborted if the provided context is
  6630. // canceled.
  6631. func (c *VariantsPatchCall) Context(ctx context.Context) *VariantsPatchCall {
  6632. c.ctx_ = ctx
  6633. return c
  6634. }
  6635. func (c *VariantsPatchCall) doRequest(alt string) (*http.Response, error) {
  6636. var body io.Reader = nil
  6637. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
  6638. if err != nil {
  6639. return nil, err
  6640. }
  6641. ctype := "application/json"
  6642. c.urlParams_.Set("alt", alt)
  6643. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  6644. urls += "?" + c.urlParams_.Encode()
  6645. req, _ := http.NewRequest("PATCH", urls, body)
  6646. googleapi.Expand(req.URL, map[string]string{
  6647. "variantId": c.variantId,
  6648. })
  6649. req.Header.Set("Content-Type", ctype)
  6650. req.Header.Set("User-Agent", c.s.userAgent())
  6651. if c.ctx_ != nil {
  6652. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6653. }
  6654. return c.s.client.Do(req)
  6655. }
  6656. // Do executes the "genomics.variants.patch" call.
  6657. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  6658. // code is an error. Response headers are in either
  6659. // *Variant.ServerResponse.Header or (if a response was returned at all)
  6660. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6661. // check whether the returned error was because http.StatusNotModified
  6662. // was returned.
  6663. func (c *VariantsPatchCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  6664. gensupport.SetOptions(c.urlParams_, opts...)
  6665. res, err := c.doRequest("json")
  6666. if res != nil && res.StatusCode == http.StatusNotModified {
  6667. if res.Body != nil {
  6668. res.Body.Close()
  6669. }
  6670. return nil, &googleapi.Error{
  6671. Code: res.StatusCode,
  6672. Header: res.Header,
  6673. }
  6674. }
  6675. if err != nil {
  6676. return nil, err
  6677. }
  6678. defer googleapi.CloseBody(res)
  6679. if err := googleapi.CheckResponse(res); err != nil {
  6680. return nil, err
  6681. }
  6682. ret := &Variant{
  6683. ServerResponse: googleapi.ServerResponse{
  6684. Header: res.Header,
  6685. HTTPStatusCode: res.StatusCode,
  6686. },
  6687. }
  6688. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6689. return nil, err
  6690. }
  6691. return ret, nil
  6692. // {
  6693. // "description": "Updates a variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) This method supports patch semantics. Returns the modified variant without its calls.",
  6694. // "httpMethod": "PATCH",
  6695. // "id": "genomics.variants.patch",
  6696. // "parameterOrder": [
  6697. // "variantId"
  6698. // ],
  6699. // "parameters": {
  6700. // "updateMask": {
  6701. // "description": "An optional mask specifying which fields to update. At this time, mutable fields are names and info. Acceptable values are \"names\" and \"info\". If unspecified, all mutable fields will be updated.",
  6702. // "location": "query",
  6703. // "type": "string"
  6704. // },
  6705. // "variantId": {
  6706. // "description": "The ID of the variant to be updated.",
  6707. // "location": "path",
  6708. // "required": true,
  6709. // "type": "string"
  6710. // }
  6711. // },
  6712. // "path": "v1/variants/{variantId}",
  6713. // "request": {
  6714. // "$ref": "Variant"
  6715. // },
  6716. // "response": {
  6717. // "$ref": "Variant"
  6718. // },
  6719. // "scopes": [
  6720. // "https://www.googleapis.com/auth/cloud-platform",
  6721. // "https://www.googleapis.com/auth/genomics"
  6722. // ]
  6723. // }
  6724. }
  6725. // method id "genomics.variants.search":
  6726. type VariantsSearchCall struct {
  6727. s *Service
  6728. searchvariantsrequest *SearchVariantsRequest
  6729. urlParams_ gensupport.URLParams
  6730. ctx_ context.Context
  6731. }
  6732. // Search: Gets a list of variants matching the criteria. For the
  6733. // definitions of variants and other genomics resources, see
  6734. // [Fundamentals of Google
  6735. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6736. // omics) Implements
  6737. // [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/bl
  6738. // ob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).
  6739. func (r *VariantsService) Search(searchvariantsrequest *SearchVariantsRequest) *VariantsSearchCall {
  6740. c := &VariantsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6741. c.searchvariantsrequest = searchvariantsrequest
  6742. return c
  6743. }
  6744. // Fields allows partial responses to be retrieved. See
  6745. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6746. // for more information.
  6747. func (c *VariantsSearchCall) Fields(s ...googleapi.Field) *VariantsSearchCall {
  6748. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6749. return c
  6750. }
  6751. // Context sets the context to be used in this call's Do method. Any
  6752. // pending HTTP request will be aborted if the provided context is
  6753. // canceled.
  6754. func (c *VariantsSearchCall) Context(ctx context.Context) *VariantsSearchCall {
  6755. c.ctx_ = ctx
  6756. return c
  6757. }
  6758. func (c *VariantsSearchCall) doRequest(alt string) (*http.Response, error) {
  6759. var body io.Reader = nil
  6760. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsrequest)
  6761. if err != nil {
  6762. return nil, err
  6763. }
  6764. ctype := "application/json"
  6765. c.urlParams_.Set("alt", alt)
  6766. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/search")
  6767. urls += "?" + c.urlParams_.Encode()
  6768. req, _ := http.NewRequest("POST", urls, body)
  6769. googleapi.SetOpaque(req.URL)
  6770. req.Header.Set("Content-Type", ctype)
  6771. req.Header.Set("User-Agent", c.s.userAgent())
  6772. if c.ctx_ != nil {
  6773. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6774. }
  6775. return c.s.client.Do(req)
  6776. }
  6777. // Do executes the "genomics.variants.search" call.
  6778. // Exactly one of *SearchVariantsResponse or error will be non-nil. Any
  6779. // non-2xx status code is an error. Response headers are in either
  6780. // *SearchVariantsResponse.ServerResponse.Header or (if a response was
  6781. // returned at all) in error.(*googleapi.Error).Header. Use
  6782. // googleapi.IsNotModified to check whether the returned error was
  6783. // because http.StatusNotModified was returned.
  6784. func (c *VariantsSearchCall) Do(opts ...googleapi.CallOption) (*SearchVariantsResponse, error) {
  6785. gensupport.SetOptions(c.urlParams_, opts...)
  6786. res, err := c.doRequest("json")
  6787. if res != nil && res.StatusCode == http.StatusNotModified {
  6788. if res.Body != nil {
  6789. res.Body.Close()
  6790. }
  6791. return nil, &googleapi.Error{
  6792. Code: res.StatusCode,
  6793. Header: res.Header,
  6794. }
  6795. }
  6796. if err != nil {
  6797. return nil, err
  6798. }
  6799. defer googleapi.CloseBody(res)
  6800. if err := googleapi.CheckResponse(res); err != nil {
  6801. return nil, err
  6802. }
  6803. ret := &SearchVariantsResponse{
  6804. ServerResponse: googleapi.ServerResponse{
  6805. Header: res.Header,
  6806. HTTPStatusCode: res.StatusCode,
  6807. },
  6808. }
  6809. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6810. return nil, err
  6811. }
  6812. return ret, nil
  6813. // {
  6814. // "description": "Gets a list of variants matching the criteria. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).",
  6815. // "httpMethod": "POST",
  6816. // "id": "genomics.variants.search",
  6817. // "path": "v1/variants/search",
  6818. // "request": {
  6819. // "$ref": "SearchVariantsRequest"
  6820. // },
  6821. // "response": {
  6822. // "$ref": "SearchVariantsResponse"
  6823. // },
  6824. // "scopes": [
  6825. // "https://www.googleapis.com/auth/cloud-platform",
  6826. // "https://www.googleapis.com/auth/genomics",
  6827. // "https://www.googleapis.com/auth/genomics.readonly"
  6828. // ]
  6829. // }
  6830. }
  6831. // method id "genomics.variants.stream":
  6832. type VariantsStreamCall struct {
  6833. s *Service
  6834. streamvariantsrequest *StreamVariantsRequest
  6835. urlParams_ gensupport.URLParams
  6836. ctx_ context.Context
  6837. }
  6838. // Stream: Returns a stream of all the variants matching the search
  6839. // request, ordered by reference name, position, and ID.
  6840. func (r *VariantsService) Stream(streamvariantsrequest *StreamVariantsRequest) *VariantsStreamCall {
  6841. c := &VariantsStreamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6842. c.streamvariantsrequest = streamvariantsrequest
  6843. return c
  6844. }
  6845. // Fields allows partial responses to be retrieved. See
  6846. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6847. // for more information.
  6848. func (c *VariantsStreamCall) Fields(s ...googleapi.Field) *VariantsStreamCall {
  6849. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6850. return c
  6851. }
  6852. // Context sets the context to be used in this call's Do method. Any
  6853. // pending HTTP request will be aborted if the provided context is
  6854. // canceled.
  6855. func (c *VariantsStreamCall) Context(ctx context.Context) *VariantsStreamCall {
  6856. c.ctx_ = ctx
  6857. return c
  6858. }
  6859. func (c *VariantsStreamCall) doRequest(alt string) (*http.Response, error) {
  6860. var body io.Reader = nil
  6861. body, err := googleapi.WithoutDataWrapper.JSONReader(c.streamvariantsrequest)
  6862. if err != nil {
  6863. return nil, err
  6864. }
  6865. ctype := "application/json"
  6866. c.urlParams_.Set("alt", alt)
  6867. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants:stream")
  6868. urls += "?" + c.urlParams_.Encode()
  6869. req, _ := http.NewRequest("POST", urls, body)
  6870. googleapi.SetOpaque(req.URL)
  6871. req.Header.Set("Content-Type", ctype)
  6872. req.Header.Set("User-Agent", c.s.userAgent())
  6873. if c.ctx_ != nil {
  6874. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6875. }
  6876. return c.s.client.Do(req)
  6877. }
  6878. // Do executes the "genomics.variants.stream" call.
  6879. // Exactly one of *StreamVariantsResponse or error will be non-nil. Any
  6880. // non-2xx status code is an error. Response headers are in either
  6881. // *StreamVariantsResponse.ServerResponse.Header or (if a response was
  6882. // returned at all) in error.(*googleapi.Error).Header. Use
  6883. // googleapi.IsNotModified to check whether the returned error was
  6884. // because http.StatusNotModified was returned.
  6885. func (c *VariantsStreamCall) Do(opts ...googleapi.CallOption) (*StreamVariantsResponse, error) {
  6886. gensupport.SetOptions(c.urlParams_, opts...)
  6887. res, err := c.doRequest("json")
  6888. if res != nil && res.StatusCode == http.StatusNotModified {
  6889. if res.Body != nil {
  6890. res.Body.Close()
  6891. }
  6892. return nil, &googleapi.Error{
  6893. Code: res.StatusCode,
  6894. Header: res.Header,
  6895. }
  6896. }
  6897. if err != nil {
  6898. return nil, err
  6899. }
  6900. defer googleapi.CloseBody(res)
  6901. if err := googleapi.CheckResponse(res); err != nil {
  6902. return nil, err
  6903. }
  6904. ret := &StreamVariantsResponse{
  6905. ServerResponse: googleapi.ServerResponse{
  6906. Header: res.Header,
  6907. HTTPStatusCode: res.StatusCode,
  6908. },
  6909. }
  6910. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  6911. return nil, err
  6912. }
  6913. return ret, nil
  6914. // {
  6915. // "description": "Returns a stream of all the variants matching the search request, ordered by reference name, position, and ID.",
  6916. // "httpMethod": "POST",
  6917. // "id": "genomics.variants.stream",
  6918. // "path": "v1/variants:stream",
  6919. // "request": {
  6920. // "$ref": "StreamVariantsRequest"
  6921. // },
  6922. // "response": {
  6923. // "$ref": "StreamVariantsResponse"
  6924. // },
  6925. // "scopes": [
  6926. // "https://www.googleapis.com/auth/cloud-platform",
  6927. // "https://www.googleapis.com/auth/genomics"
  6928. // ]
  6929. // }
  6930. }
  6931. // method id "genomics.variantsets.create":
  6932. type VariantsetsCreateCall struct {
  6933. s *Service
  6934. variantset *VariantSet
  6935. urlParams_ gensupport.URLParams
  6936. ctx_ context.Context
  6937. }
  6938. // Create: Creates a new variant set. For the definitions of variant
  6939. // sets and other genomics resources, see [Fundamentals of Google
  6940. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  6941. // omics) The provided variant set must have a valid `datasetId` set -
  6942. // all other fields are optional. Note that the `id` field will be
  6943. // ignored, as this is assigned by the server.
  6944. func (r *VariantsetsService) Create(variantset *VariantSet) *VariantsetsCreateCall {
  6945. c := &VariantsetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6946. c.variantset = variantset
  6947. return c
  6948. }
  6949. // Fields allows partial responses to be retrieved. See
  6950. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6951. // for more information.
  6952. func (c *VariantsetsCreateCall) Fields(s ...googleapi.Field) *VariantsetsCreateCall {
  6953. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6954. return c
  6955. }
  6956. // Context sets the context to be used in this call's Do method. Any
  6957. // pending HTTP request will be aborted if the provided context is
  6958. // canceled.
  6959. func (c *VariantsetsCreateCall) Context(ctx context.Context) *VariantsetsCreateCall {
  6960. c.ctx_ = ctx
  6961. return c
  6962. }
  6963. func (c *VariantsetsCreateCall) doRequest(alt string) (*http.Response, error) {
  6964. var body io.Reader = nil
  6965. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
  6966. if err != nil {
  6967. return nil, err
  6968. }
  6969. ctype := "application/json"
  6970. c.urlParams_.Set("alt", alt)
  6971. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets")
  6972. urls += "?" + c.urlParams_.Encode()
  6973. req, _ := http.NewRequest("POST", urls, body)
  6974. googleapi.SetOpaque(req.URL)
  6975. req.Header.Set("Content-Type", ctype)
  6976. req.Header.Set("User-Agent", c.s.userAgent())
  6977. if c.ctx_ != nil {
  6978. return ctxhttp.Do(c.ctx_, c.s.client, req)
  6979. }
  6980. return c.s.client.Do(req)
  6981. }
  6982. // Do executes the "genomics.variantsets.create" call.
  6983. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  6984. // status code is an error. Response headers are in either
  6985. // *VariantSet.ServerResponse.Header or (if a response was returned at
  6986. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6987. // to check whether the returned error was because
  6988. // http.StatusNotModified was returned.
  6989. func (c *VariantsetsCreateCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  6990. gensupport.SetOptions(c.urlParams_, opts...)
  6991. res, err := c.doRequest("json")
  6992. if res != nil && res.StatusCode == http.StatusNotModified {
  6993. if res.Body != nil {
  6994. res.Body.Close()
  6995. }
  6996. return nil, &googleapi.Error{
  6997. Code: res.StatusCode,
  6998. Header: res.Header,
  6999. }
  7000. }
  7001. if err != nil {
  7002. return nil, err
  7003. }
  7004. defer googleapi.CloseBody(res)
  7005. if err := googleapi.CheckResponse(res); err != nil {
  7006. return nil, err
  7007. }
  7008. ret := &VariantSet{
  7009. ServerResponse: googleapi.ServerResponse{
  7010. Header: res.Header,
  7011. HTTPStatusCode: res.StatusCode,
  7012. },
  7013. }
  7014. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7015. return nil, err
  7016. }
  7017. return ret, nil
  7018. // {
  7019. // "description": "Creates a new variant set. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) The provided variant set must have a valid `datasetId` set - all other fields are optional. Note that the `id` field will be ignored, as this is assigned by the server.",
  7020. // "httpMethod": "POST",
  7021. // "id": "genomics.variantsets.create",
  7022. // "path": "v1/variantsets",
  7023. // "request": {
  7024. // "$ref": "VariantSet"
  7025. // },
  7026. // "response": {
  7027. // "$ref": "VariantSet"
  7028. // },
  7029. // "scopes": [
  7030. // "https://www.googleapis.com/auth/cloud-platform",
  7031. // "https://www.googleapis.com/auth/genomics"
  7032. // ]
  7033. // }
  7034. }
  7035. // method id "genomics.variantsets.delete":
  7036. type VariantsetsDeleteCall struct {
  7037. s *Service
  7038. variantSetId string
  7039. urlParams_ gensupport.URLParams
  7040. ctx_ context.Context
  7041. }
  7042. // Delete: Deletes the contents of a variant set. The variant set object
  7043. // is not deleted. For the definitions of variant sets and other
  7044. // genomics resources, see [Fundamentals of Google
  7045. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  7046. // omics)
  7047. func (r *VariantsetsService) Delete(variantSetId string) *VariantsetsDeleteCall {
  7048. c := &VariantsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7049. c.variantSetId = variantSetId
  7050. return c
  7051. }
  7052. // Fields allows partial responses to be retrieved. See
  7053. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7054. // for more information.
  7055. func (c *VariantsetsDeleteCall) Fields(s ...googleapi.Field) *VariantsetsDeleteCall {
  7056. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7057. return c
  7058. }
  7059. // Context sets the context to be used in this call's Do method. Any
  7060. // pending HTTP request will be aborted if the provided context is
  7061. // canceled.
  7062. func (c *VariantsetsDeleteCall) Context(ctx context.Context) *VariantsetsDeleteCall {
  7063. c.ctx_ = ctx
  7064. return c
  7065. }
  7066. func (c *VariantsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7067. var body io.Reader = nil
  7068. c.urlParams_.Set("alt", alt)
  7069. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  7070. urls += "?" + c.urlParams_.Encode()
  7071. req, _ := http.NewRequest("DELETE", urls, body)
  7072. googleapi.Expand(req.URL, map[string]string{
  7073. "variantSetId": c.variantSetId,
  7074. })
  7075. req.Header.Set("User-Agent", c.s.userAgent())
  7076. if c.ctx_ != nil {
  7077. return ctxhttp.Do(c.ctx_, c.s.client, req)
  7078. }
  7079. return c.s.client.Do(req)
  7080. }
  7081. // Do executes the "genomics.variantsets.delete" call.
  7082. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  7083. // code is an error. Response headers are in either
  7084. // *Empty.ServerResponse.Header or (if a response was returned at all)
  7085. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7086. // check whether the returned error was because http.StatusNotModified
  7087. // was returned.
  7088. func (c *VariantsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7089. gensupport.SetOptions(c.urlParams_, opts...)
  7090. res, err := c.doRequest("json")
  7091. if res != nil && res.StatusCode == http.StatusNotModified {
  7092. if res.Body != nil {
  7093. res.Body.Close()
  7094. }
  7095. return nil, &googleapi.Error{
  7096. Code: res.StatusCode,
  7097. Header: res.Header,
  7098. }
  7099. }
  7100. if err != nil {
  7101. return nil, err
  7102. }
  7103. defer googleapi.CloseBody(res)
  7104. if err := googleapi.CheckResponse(res); err != nil {
  7105. return nil, err
  7106. }
  7107. ret := &Empty{
  7108. ServerResponse: googleapi.ServerResponse{
  7109. Header: res.Header,
  7110. HTTPStatusCode: res.StatusCode,
  7111. },
  7112. }
  7113. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7114. return nil, err
  7115. }
  7116. return ret, nil
  7117. // {
  7118. // "description": "Deletes the contents of a variant set. The variant set object is not deleted. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  7119. // "httpMethod": "DELETE",
  7120. // "id": "genomics.variantsets.delete",
  7121. // "parameterOrder": [
  7122. // "variantSetId"
  7123. // ],
  7124. // "parameters": {
  7125. // "variantSetId": {
  7126. // "description": "The ID of the variant set to be deleted.",
  7127. // "location": "path",
  7128. // "required": true,
  7129. // "type": "string"
  7130. // }
  7131. // },
  7132. // "path": "v1/variantsets/{variantSetId}",
  7133. // "response": {
  7134. // "$ref": "Empty"
  7135. // },
  7136. // "scopes": [
  7137. // "https://www.googleapis.com/auth/cloud-platform",
  7138. // "https://www.googleapis.com/auth/genomics"
  7139. // ]
  7140. // }
  7141. }
  7142. // method id "genomics.variantsets.export":
  7143. type VariantsetsExportCall struct {
  7144. s *Service
  7145. variantSetId string
  7146. exportvariantsetrequest *ExportVariantSetRequest
  7147. urlParams_ gensupport.URLParams
  7148. ctx_ context.Context
  7149. }
  7150. // Export: Exports variant set data to an external destination. For the
  7151. // definitions of variant sets and other genomics resources, see
  7152. // [Fundamentals of Google
  7153. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  7154. // omics)
  7155. func (r *VariantsetsService) Export(variantSetId string, exportvariantsetrequest *ExportVariantSetRequest) *VariantsetsExportCall {
  7156. c := &VariantsetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7157. c.variantSetId = variantSetId
  7158. c.exportvariantsetrequest = exportvariantsetrequest
  7159. return c
  7160. }
  7161. // Fields allows partial responses to be retrieved. See
  7162. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7163. // for more information.
  7164. func (c *VariantsetsExportCall) Fields(s ...googleapi.Field) *VariantsetsExportCall {
  7165. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7166. return c
  7167. }
  7168. // Context sets the context to be used in this call's Do method. Any
  7169. // pending HTTP request will be aborted if the provided context is
  7170. // canceled.
  7171. func (c *VariantsetsExportCall) Context(ctx context.Context) *VariantsetsExportCall {
  7172. c.ctx_ = ctx
  7173. return c
  7174. }
  7175. func (c *VariantsetsExportCall) doRequest(alt string) (*http.Response, error) {
  7176. var body io.Reader = nil
  7177. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportvariantsetrequest)
  7178. if err != nil {
  7179. return nil, err
  7180. }
  7181. ctype := "application/json"
  7182. c.urlParams_.Set("alt", alt)
  7183. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}:export")
  7184. urls += "?" + c.urlParams_.Encode()
  7185. req, _ := http.NewRequest("POST", urls, body)
  7186. googleapi.Expand(req.URL, map[string]string{
  7187. "variantSetId": c.variantSetId,
  7188. })
  7189. req.Header.Set("Content-Type", ctype)
  7190. req.Header.Set("User-Agent", c.s.userAgent())
  7191. if c.ctx_ != nil {
  7192. return ctxhttp.Do(c.ctx_, c.s.client, req)
  7193. }
  7194. return c.s.client.Do(req)
  7195. }
  7196. // Do executes the "genomics.variantsets.export" call.
  7197. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7198. // status code is an error. Response headers are in either
  7199. // *Operation.ServerResponse.Header or (if a response was returned at
  7200. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7201. // to check whether the returned error was because
  7202. // http.StatusNotModified was returned.
  7203. func (c *VariantsetsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7204. gensupport.SetOptions(c.urlParams_, opts...)
  7205. res, err := c.doRequest("json")
  7206. if res != nil && res.StatusCode == http.StatusNotModified {
  7207. if res.Body != nil {
  7208. res.Body.Close()
  7209. }
  7210. return nil, &googleapi.Error{
  7211. Code: res.StatusCode,
  7212. Header: res.Header,
  7213. }
  7214. }
  7215. if err != nil {
  7216. return nil, err
  7217. }
  7218. defer googleapi.CloseBody(res)
  7219. if err := googleapi.CheckResponse(res); err != nil {
  7220. return nil, err
  7221. }
  7222. ret := &Operation{
  7223. ServerResponse: googleapi.ServerResponse{
  7224. Header: res.Header,
  7225. HTTPStatusCode: res.StatusCode,
  7226. },
  7227. }
  7228. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7229. return nil, err
  7230. }
  7231. return ret, nil
  7232. // {
  7233. // "description": "Exports variant set data to an external destination. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  7234. // "httpMethod": "POST",
  7235. // "id": "genomics.variantsets.export",
  7236. // "parameterOrder": [
  7237. // "variantSetId"
  7238. // ],
  7239. // "parameters": {
  7240. // "variantSetId": {
  7241. // "description": "Required. The ID of the variant set that contains variant data which should be exported. The caller must have READ access to this variant set.",
  7242. // "location": "path",
  7243. // "required": true,
  7244. // "type": "string"
  7245. // }
  7246. // },
  7247. // "path": "v1/variantsets/{variantSetId}:export",
  7248. // "request": {
  7249. // "$ref": "ExportVariantSetRequest"
  7250. // },
  7251. // "response": {
  7252. // "$ref": "Operation"
  7253. // },
  7254. // "scopes": [
  7255. // "https://www.googleapis.com/auth/bigquery",
  7256. // "https://www.googleapis.com/auth/cloud-platform",
  7257. // "https://www.googleapis.com/auth/genomics"
  7258. // ]
  7259. // }
  7260. }
  7261. // method id "genomics.variantsets.get":
  7262. type VariantsetsGetCall struct {
  7263. s *Service
  7264. variantSetId string
  7265. urlParams_ gensupport.URLParams
  7266. ifNoneMatch_ string
  7267. ctx_ context.Context
  7268. }
  7269. // Get: Gets a variant set by ID. For the definitions of variant sets
  7270. // and other genomics resources, see [Fundamentals of Google
  7271. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  7272. // omics)
  7273. func (r *VariantsetsService) Get(variantSetId string) *VariantsetsGetCall {
  7274. c := &VariantsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7275. c.variantSetId = variantSetId
  7276. return c
  7277. }
  7278. // Fields allows partial responses to be retrieved. See
  7279. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7280. // for more information.
  7281. func (c *VariantsetsGetCall) Fields(s ...googleapi.Field) *VariantsetsGetCall {
  7282. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7283. return c
  7284. }
  7285. // IfNoneMatch sets the optional parameter which makes the operation
  7286. // fail if the object's ETag matches the given value. This is useful for
  7287. // getting updates only after the object has changed since the last
  7288. // request. Use googleapi.IsNotModified to check whether the response
  7289. // error from Do is the result of In-None-Match.
  7290. func (c *VariantsetsGetCall) IfNoneMatch(entityTag string) *VariantsetsGetCall {
  7291. c.ifNoneMatch_ = entityTag
  7292. return c
  7293. }
  7294. // Context sets the context to be used in this call's Do method. Any
  7295. // pending HTTP request will be aborted if the provided context is
  7296. // canceled.
  7297. func (c *VariantsetsGetCall) Context(ctx context.Context) *VariantsetsGetCall {
  7298. c.ctx_ = ctx
  7299. return c
  7300. }
  7301. func (c *VariantsetsGetCall) doRequest(alt string) (*http.Response, error) {
  7302. var body io.Reader = nil
  7303. c.urlParams_.Set("alt", alt)
  7304. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  7305. urls += "?" + c.urlParams_.Encode()
  7306. req, _ := http.NewRequest("GET", urls, body)
  7307. googleapi.Expand(req.URL, map[string]string{
  7308. "variantSetId": c.variantSetId,
  7309. })
  7310. req.Header.Set("User-Agent", c.s.userAgent())
  7311. if c.ifNoneMatch_ != "" {
  7312. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  7313. }
  7314. if c.ctx_ != nil {
  7315. return ctxhttp.Do(c.ctx_, c.s.client, req)
  7316. }
  7317. return c.s.client.Do(req)
  7318. }
  7319. // Do executes the "genomics.variantsets.get" call.
  7320. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  7321. // status code is an error. Response headers are in either
  7322. // *VariantSet.ServerResponse.Header or (if a response was returned at
  7323. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7324. // to check whether the returned error was because
  7325. // http.StatusNotModified was returned.
  7326. func (c *VariantsetsGetCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  7327. gensupport.SetOptions(c.urlParams_, opts...)
  7328. res, err := c.doRequest("json")
  7329. if res != nil && res.StatusCode == http.StatusNotModified {
  7330. if res.Body != nil {
  7331. res.Body.Close()
  7332. }
  7333. return nil, &googleapi.Error{
  7334. Code: res.StatusCode,
  7335. Header: res.Header,
  7336. }
  7337. }
  7338. if err != nil {
  7339. return nil, err
  7340. }
  7341. defer googleapi.CloseBody(res)
  7342. if err := googleapi.CheckResponse(res); err != nil {
  7343. return nil, err
  7344. }
  7345. ret := &VariantSet{
  7346. ServerResponse: googleapi.ServerResponse{
  7347. Header: res.Header,
  7348. HTTPStatusCode: res.StatusCode,
  7349. },
  7350. }
  7351. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7352. return nil, err
  7353. }
  7354. return ret, nil
  7355. // {
  7356. // "description": "Gets a variant set by ID. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  7357. // "httpMethod": "GET",
  7358. // "id": "genomics.variantsets.get",
  7359. // "parameterOrder": [
  7360. // "variantSetId"
  7361. // ],
  7362. // "parameters": {
  7363. // "variantSetId": {
  7364. // "description": "Required. The ID of the variant set.",
  7365. // "location": "path",
  7366. // "required": true,
  7367. // "type": "string"
  7368. // }
  7369. // },
  7370. // "path": "v1/variantsets/{variantSetId}",
  7371. // "response": {
  7372. // "$ref": "VariantSet"
  7373. // },
  7374. // "scopes": [
  7375. // "https://www.googleapis.com/auth/cloud-platform",
  7376. // "https://www.googleapis.com/auth/genomics",
  7377. // "https://www.googleapis.com/auth/genomics.readonly"
  7378. // ]
  7379. // }
  7380. }
  7381. // method id "genomics.variantsets.patch":
  7382. type VariantsetsPatchCall struct {
  7383. s *Service
  7384. variantSetId string
  7385. variantset *VariantSet
  7386. urlParams_ gensupport.URLParams
  7387. ctx_ context.Context
  7388. }
  7389. // Patch: Updates a variant set using patch semantics. For the
  7390. // definitions of variant sets and other genomics resources, see
  7391. // [Fundamentals of Google
  7392. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  7393. // omics)
  7394. func (r *VariantsetsService) Patch(variantSetId string, variantset *VariantSet) *VariantsetsPatchCall {
  7395. c := &VariantsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7396. c.variantSetId = variantSetId
  7397. c.variantset = variantset
  7398. return c
  7399. }
  7400. // UpdateMask sets the optional parameter "updateMask": An optional mask
  7401. // specifying which fields to update. Supported fields: * metadata.
  7402. // Leaving `updateMask` unset is equivalent to specifying all mutable
  7403. // fields.
  7404. func (c *VariantsetsPatchCall) UpdateMask(updateMask string) *VariantsetsPatchCall {
  7405. c.urlParams_.Set("updateMask", updateMask)
  7406. return c
  7407. }
  7408. // Fields allows partial responses to be retrieved. See
  7409. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7410. // for more information.
  7411. func (c *VariantsetsPatchCall) Fields(s ...googleapi.Field) *VariantsetsPatchCall {
  7412. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7413. return c
  7414. }
  7415. // Context sets the context to be used in this call's Do method. Any
  7416. // pending HTTP request will be aborted if the provided context is
  7417. // canceled.
  7418. func (c *VariantsetsPatchCall) Context(ctx context.Context) *VariantsetsPatchCall {
  7419. c.ctx_ = ctx
  7420. return c
  7421. }
  7422. func (c *VariantsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  7423. var body io.Reader = nil
  7424. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
  7425. if err != nil {
  7426. return nil, err
  7427. }
  7428. ctype := "application/json"
  7429. c.urlParams_.Set("alt", alt)
  7430. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  7431. urls += "?" + c.urlParams_.Encode()
  7432. req, _ := http.NewRequest("PATCH", urls, body)
  7433. googleapi.Expand(req.URL, map[string]string{
  7434. "variantSetId": c.variantSetId,
  7435. })
  7436. req.Header.Set("Content-Type", ctype)
  7437. req.Header.Set("User-Agent", c.s.userAgent())
  7438. if c.ctx_ != nil {
  7439. return ctxhttp.Do(c.ctx_, c.s.client, req)
  7440. }
  7441. return c.s.client.Do(req)
  7442. }
  7443. // Do executes the "genomics.variantsets.patch" call.
  7444. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  7445. // status code is an error. Response headers are in either
  7446. // *VariantSet.ServerResponse.Header or (if a response was returned at
  7447. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7448. // to check whether the returned error was because
  7449. // http.StatusNotModified was returned.
  7450. func (c *VariantsetsPatchCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  7451. gensupport.SetOptions(c.urlParams_, opts...)
  7452. res, err := c.doRequest("json")
  7453. if res != nil && res.StatusCode == http.StatusNotModified {
  7454. if res.Body != nil {
  7455. res.Body.Close()
  7456. }
  7457. return nil, &googleapi.Error{
  7458. Code: res.StatusCode,
  7459. Header: res.Header,
  7460. }
  7461. }
  7462. if err != nil {
  7463. return nil, err
  7464. }
  7465. defer googleapi.CloseBody(res)
  7466. if err := googleapi.CheckResponse(res); err != nil {
  7467. return nil, err
  7468. }
  7469. ret := &VariantSet{
  7470. ServerResponse: googleapi.ServerResponse{
  7471. Header: res.Header,
  7472. HTTPStatusCode: res.StatusCode,
  7473. },
  7474. }
  7475. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7476. return nil, err
  7477. }
  7478. return ret, nil
  7479. // {
  7480. // "description": "Updates a variant set using patch semantics. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)",
  7481. // "httpMethod": "PATCH",
  7482. // "id": "genomics.variantsets.patch",
  7483. // "parameterOrder": [
  7484. // "variantSetId"
  7485. // ],
  7486. // "parameters": {
  7487. // "updateMask": {
  7488. // "description": "An optional mask specifying which fields to update. Supported fields: * metadata. Leaving `updateMask` unset is equivalent to specifying all mutable fields.",
  7489. // "location": "query",
  7490. // "type": "string"
  7491. // },
  7492. // "variantSetId": {
  7493. // "description": "The ID of the variant to be updated (must already exist).",
  7494. // "location": "path",
  7495. // "required": true,
  7496. // "type": "string"
  7497. // }
  7498. // },
  7499. // "path": "v1/variantsets/{variantSetId}",
  7500. // "request": {
  7501. // "$ref": "VariantSet"
  7502. // },
  7503. // "response": {
  7504. // "$ref": "VariantSet"
  7505. // },
  7506. // "scopes": [
  7507. // "https://www.googleapis.com/auth/cloud-platform",
  7508. // "https://www.googleapis.com/auth/genomics"
  7509. // ]
  7510. // }
  7511. }
  7512. // method id "genomics.variantsets.search":
  7513. type VariantsetsSearchCall struct {
  7514. s *Service
  7515. searchvariantsetsrequest *SearchVariantSetsRequest
  7516. urlParams_ gensupport.URLParams
  7517. ctx_ context.Context
  7518. }
  7519. // Search: Returns a list of all variant sets matching search criteria.
  7520. // For the definitions of variant sets and other genomics resources, see
  7521. // [Fundamentals of Google
  7522. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-gen
  7523. // omics) Implements
  7524. // [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas
  7525. // /blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).
  7526. func (r *VariantsetsService) Search(searchvariantsetsrequest *SearchVariantSetsRequest) *VariantsetsSearchCall {
  7527. c := &VariantsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7528. c.searchvariantsetsrequest = searchvariantsetsrequest
  7529. return c
  7530. }
  7531. // Fields allows partial responses to be retrieved. See
  7532. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7533. // for more information.
  7534. func (c *VariantsetsSearchCall) Fields(s ...googleapi.Field) *VariantsetsSearchCall {
  7535. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7536. return c
  7537. }
  7538. // Context sets the context to be used in this call's Do method. Any
  7539. // pending HTTP request will be aborted if the provided context is
  7540. // canceled.
  7541. func (c *VariantsetsSearchCall) Context(ctx context.Context) *VariantsetsSearchCall {
  7542. c.ctx_ = ctx
  7543. return c
  7544. }
  7545. func (c *VariantsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  7546. var body io.Reader = nil
  7547. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsetsrequest)
  7548. if err != nil {
  7549. return nil, err
  7550. }
  7551. ctype := "application/json"
  7552. c.urlParams_.Set("alt", alt)
  7553. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/search")
  7554. urls += "?" + c.urlParams_.Encode()
  7555. req, _ := http.NewRequest("POST", urls, body)
  7556. googleapi.SetOpaque(req.URL)
  7557. req.Header.Set("Content-Type", ctype)
  7558. req.Header.Set("User-Agent", c.s.userAgent())
  7559. if c.ctx_ != nil {
  7560. return ctxhttp.Do(c.ctx_, c.s.client, req)
  7561. }
  7562. return c.s.client.Do(req)
  7563. }
  7564. // Do executes the "genomics.variantsets.search" call.
  7565. // Exactly one of *SearchVariantSetsResponse or error will be non-nil.
  7566. // Any non-2xx status code is an error. Response headers are in either
  7567. // *SearchVariantSetsResponse.ServerResponse.Header or (if a response
  7568. // was returned at all) in error.(*googleapi.Error).Header. Use
  7569. // googleapi.IsNotModified to check whether the returned error was
  7570. // because http.StatusNotModified was returned.
  7571. func (c *VariantsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchVariantSetsResponse, error) {
  7572. gensupport.SetOptions(c.urlParams_, opts...)
  7573. res, err := c.doRequest("json")
  7574. if res != nil && res.StatusCode == http.StatusNotModified {
  7575. if res.Body != nil {
  7576. res.Body.Close()
  7577. }
  7578. return nil, &googleapi.Error{
  7579. Code: res.StatusCode,
  7580. Header: res.Header,
  7581. }
  7582. }
  7583. if err != nil {
  7584. return nil, err
  7585. }
  7586. defer googleapi.CloseBody(res)
  7587. if err := googleapi.CheckResponse(res); err != nil {
  7588. return nil, err
  7589. }
  7590. ret := &SearchVariantSetsResponse{
  7591. ServerResponse: googleapi.ServerResponse{
  7592. Header: res.Header,
  7593. HTTPStatusCode: res.StatusCode,
  7594. },
  7595. }
  7596. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  7597. return nil, err
  7598. }
  7599. return ret, nil
  7600. // {
  7601. // "description": "Returns a list of all variant sets matching search criteria. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).",
  7602. // "httpMethod": "POST",
  7603. // "id": "genomics.variantsets.search",
  7604. // "path": "v1/variantsets/search",
  7605. // "request": {
  7606. // "$ref": "SearchVariantSetsRequest"
  7607. // },
  7608. // "response": {
  7609. // "$ref": "SearchVariantSetsResponse"
  7610. // },
  7611. // "scopes": [
  7612. // "https://www.googleapis.com/auth/cloud-platform",
  7613. // "https://www.googleapis.com/auth/genomics",
  7614. // "https://www.googleapis.com/auth/genomics.readonly"
  7615. // ]
  7616. // }
  7617. }