|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303 |
- // Copyright 2019 Google LLC.
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // Code generated file. DO NOT EDIT.
-
- // Package vault provides access to the G Suite Vault API.
- //
- // For product documentation, see: https://developers.google.com/vault
- //
- // Creating a client
- //
- // Usage example:
- //
- // import "google.golang.org/api/vault/v1"
- // ...
- // ctx := context.Background()
- // vaultService, err := vault.NewService(ctx)
- //
- // In this example, Google Application Default Credentials are used for authentication.
- //
- // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
- //
- // Other authentication options
- //
- // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
- //
- // vaultService, err := vault.NewService(ctx, option.WithScopes(vault.EdiscoveryReadonlyScope))
- //
- // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
- //
- // vaultService, err := vault.NewService(ctx, option.WithAPIKey("AIza..."))
- //
- // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
- //
- // config := &oauth2.Config{...}
- // // ...
- // token, err := config.Exchange(ctx, ...)
- // vaultService, err := vault.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
- //
- // See https://godoc.org/google.golang.org/api/option/ for details on options.
- package vault // import "google.golang.org/api/vault/v1"
-
- import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strconv"
- "strings"
-
- gensupport "google.golang.org/api/gensupport"
- googleapi "google.golang.org/api/googleapi"
- option "google.golang.org/api/option"
- htransport "google.golang.org/api/transport/http"
- )
-
- // Always reference these packages, just in case the auto-generated code
- // below doesn't.
- var _ = bytes.NewBuffer
- var _ = strconv.Itoa
- var _ = fmt.Sprintf
- var _ = json.NewDecoder
- var _ = io.Copy
- var _ = url.Parse
- var _ = gensupport.MarshalJSON
- var _ = googleapi.Version
- var _ = errors.New
- var _ = strings.Replace
- var _ = context.Canceled
-
- const apiId = "vault:v1"
- const apiName = "vault"
- const apiVersion = "v1"
- const basePath = "https://vault.googleapis.com/"
-
- // OAuth2 scopes used by this API.
- const (
- // Manage your eDiscovery data
- EdiscoveryScope = "https://www.googleapis.com/auth/ediscovery"
-
- // View your eDiscovery data
- EdiscoveryReadonlyScope = "https://www.googleapis.com/auth/ediscovery.readonly"
- )
-
- // NewService creates a new Service.
- func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
- scopesOption := option.WithScopes(
- "https://www.googleapis.com/auth/ediscovery",
- "https://www.googleapis.com/auth/ediscovery.readonly",
- )
- // NOTE: prepend, so we don't override user-specified scopes.
- opts = append([]option.ClientOption{scopesOption}, opts...)
- client, endpoint, err := htransport.NewClient(ctx, opts...)
- if err != nil {
- return nil, err
- }
- s, err := New(client)
- if err != nil {
- return nil, err
- }
- if endpoint != "" {
- s.BasePath = endpoint
- }
- return s, nil
- }
-
- // New creates a new Service. It uses the provided http.Client for requests.
- //
- // Deprecated: please use NewService instead.
- // To provide a custom HTTP client, use option.WithHTTPClient.
- // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
- func New(client *http.Client) (*Service, error) {
- if client == nil {
- return nil, errors.New("client is nil")
- }
- s := &Service{client: client, BasePath: basePath}
- s.Matters = NewMattersService(s)
- return s, nil
- }
-
- type Service struct {
- client *http.Client
- BasePath string // API endpoint base URL
- UserAgent string // optional additional User-Agent fragment
-
- Matters *MattersService
- }
-
- func (s *Service) userAgent() string {
- if s.UserAgent == "" {
- return googleapi.UserAgent
- }
- return googleapi.UserAgent + " " + s.UserAgent
- }
-
- func NewMattersService(s *Service) *MattersService {
- rs := &MattersService{s: s}
- rs.Exports = NewMattersExportsService(s)
- rs.Holds = NewMattersHoldsService(s)
- rs.SavedQueries = NewMattersSavedQueriesService(s)
- return rs
- }
-
- type MattersService struct {
- s *Service
-
- Exports *MattersExportsService
-
- Holds *MattersHoldsService
-
- SavedQueries *MattersSavedQueriesService
- }
-
- func NewMattersExportsService(s *Service) *MattersExportsService {
- rs := &MattersExportsService{s: s}
- return rs
- }
-
- type MattersExportsService struct {
- s *Service
- }
-
- func NewMattersHoldsService(s *Service) *MattersHoldsService {
- rs := &MattersHoldsService{s: s}
- rs.Accounts = NewMattersHoldsAccountsService(s)
- return rs
- }
-
- type MattersHoldsService struct {
- s *Service
-
- Accounts *MattersHoldsAccountsService
- }
-
- func NewMattersHoldsAccountsService(s *Service) *MattersHoldsAccountsService {
- rs := &MattersHoldsAccountsService{s: s}
- return rs
- }
-
- type MattersHoldsAccountsService struct {
- s *Service
- }
-
- func NewMattersSavedQueriesService(s *Service) *MattersSavedQueriesService {
- rs := &MattersSavedQueriesService{s: s}
- return rs
- }
-
- type MattersSavedQueriesService struct {
- s *Service
- }
-
- // AccountInfo: Accounts to search
- type AccountInfo struct {
- // Emails: A set of accounts to search.
- Emails []string `json:"emails,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Emails") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Emails") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AccountInfo) MarshalJSON() ([]byte, error) {
- type NoMethod AccountInfo
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AddHeldAccountResult: A status detailing the status of each account
- // creation, and the
- // HeldAccount, if successful.
- type AddHeldAccountResult struct {
- // Account: If present, this account was successfully created.
- Account *HeldAccount `json:"account,omitempty"`
-
- // Status: This represents the success status. If failed, check message.
- Status *Status `json:"status,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Account") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Account") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AddHeldAccountResult) MarshalJSON() ([]byte, error) {
- type NoMethod AddHeldAccountResult
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AddHeldAccountsRequest: Add a list of accounts to a hold.
- type AddHeldAccountsRequest struct {
- // AccountIds: Account ids to identify which accounts to add. Only
- // account_ids or only
- // emails should be specified, but not both.
- AccountIds []string `json:"accountIds,omitempty"`
-
- // Emails: Emails to identify which accounts to add. Only emails or only
- // account_ids
- // should be specified, but not both.
- Emails []string `json:"emails,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountIds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountIds") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AddHeldAccountsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod AddHeldAccountsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AddHeldAccountsResponse: Response for batch create held accounts.
- type AddHeldAccountsResponse struct {
- // Responses: The list of responses, in the same order as the batch
- // request.
- Responses []*AddHeldAccountResult `json:"responses,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Responses") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Responses") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AddHeldAccountsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod AddHeldAccountsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // AddMatterPermissionsRequest: Add an account with the permission
- // specified. The role cannot be owner.
- // If an account already has a role in the matter, it will
- // be
- // overwritten.
- type AddMatterPermissionsRequest struct {
- // CcMe: Only relevant if send_emails is true.
- // True to CC requestor in the email message.
- // False to not CC requestor.
- CcMe bool `json:"ccMe,omitempty"`
-
- // MatterPermission: The MatterPermission to add.
- MatterPermission *MatterPermission `json:"matterPermission,omitempty"`
-
- // SendEmails: True to send notification email to the added
- // account.
- // False to not send notification email.
- SendEmails bool `json:"sendEmails,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "CcMe") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CcMe") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *AddMatterPermissionsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod AddMatterPermissionsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CloseMatterRequest: Close a matter by ID.
- type CloseMatterRequest struct {
- }
-
- // CloseMatterResponse: Response to a CloseMatterRequest.
- type CloseMatterResponse struct {
- // Matter: The updated matter, with state CLOSED.
- Matter *Matter `json:"matter,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Matter") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Matter") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CloseMatterResponse) MarshalJSON() ([]byte, error) {
- type NoMethod CloseMatterResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CloudStorageFile: An export file on cloud storage
- type CloudStorageFile struct {
- // BucketName: The cloud storage bucket name of this export file.
- // Can be used in cloud storage JSON/XML API.
- BucketName string `json:"bucketName,omitempty"`
-
- // Md5Hash: The md5 hash of the file.
- Md5Hash string `json:"md5Hash,omitempty"`
-
- // ObjectName: The cloud storage object name of this export file.
- // Can be used in cloud storage JSON/XML API.
- ObjectName string `json:"objectName,omitempty"`
-
- // Size: The size of the export file.
- Size int64 `json:"size,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "BucketName") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "BucketName") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CloudStorageFile) MarshalJSON() ([]byte, error) {
- type NoMethod CloudStorageFile
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CloudStorageSink: Export sink for cloud storage files.
- type CloudStorageSink struct {
- // Files: Output only. The exported files on cloud storage.
- Files []*CloudStorageFile `json:"files,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Files") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Files") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CloudStorageSink) MarshalJSON() ([]byte, error) {
- type NoMethod CloudStorageSink
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // CorpusQuery: Corpus specific queries.
- type CorpusQuery struct {
- // DriveQuery: Details pertaining to Drive holds. If set, corpus must be
- // Drive.
- DriveQuery *HeldDriveQuery `json:"driveQuery,omitempty"`
-
- // GroupsQuery: Details pertaining to Groups holds. If set, corpus must
- // be Groups.
- GroupsQuery *HeldGroupsQuery `json:"groupsQuery,omitempty"`
-
- // HangoutsChatQuery: Details pertaining to Hangouts Chat holds. If set,
- // corpus must be
- // Hangouts Chat.
- HangoutsChatQuery *HeldHangoutsChatQuery `json:"hangoutsChatQuery,omitempty"`
-
- // MailQuery: Details pertaining to mail holds. If set, corpus must be
- // mail.
- MailQuery *HeldMailQuery `json:"mailQuery,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DriveQuery") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DriveQuery") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *CorpusQuery) MarshalJSON() ([]byte, error) {
- type NoMethod CorpusQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // DriveExportOptions: The options for Drive export.
- type DriveExportOptions struct {
- // IncludeAccessInfo: Set to true to include access level information
- // for users
- // with <a
- // href="https://support.google.com/vault/answer/6099459#metadata">indire
- // ct access</a>
- // to files.
- IncludeAccessInfo bool `json:"includeAccessInfo,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "IncludeAccessInfo")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IncludeAccessInfo") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DriveExportOptions) MarshalJSON() ([]byte, error) {
- type NoMethod DriveExportOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // DriveOptions: Drive search advanced options
- type DriveOptions struct {
- // IncludeTeamDrives: Set to true to include Team Drive.
- IncludeTeamDrives bool `json:"includeTeamDrives,omitempty"`
-
- // VersionDate: Search the versions of the Drive file
- // as of the reference date. These timestamps are in GMT and
- // rounded down to the given date.
- VersionDate string `json:"versionDate,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "IncludeTeamDrives")
- // to unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IncludeTeamDrives") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DriveOptions) MarshalJSON() ([]byte, error) {
- type NoMethod DriveOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Empty: A generic empty message that you can re-use to avoid defining
- // duplicated
- // empty messages in your APIs. A typical example is to use it as the
- // request
- // or the response type of an API method. For instance:
- //
- // service Foo {
- // rpc Bar(google.protobuf.Empty) returns
- // (google.protobuf.Empty);
- // }
- //
- // The JSON representation for `Empty` is empty JSON object `{}`.
- type Empty struct {
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
- }
-
- // Export: An export
- type Export struct {
- // CloudStorageSink: Output only. Export sink for cloud storage files.
- CloudStorageSink *CloudStorageSink `json:"cloudStorageSink,omitempty"`
-
- // CreateTime: Output only. The time when the export was created.
- CreateTime string `json:"createTime,omitempty"`
-
- // ExportOptions: Advanced options of the export.
- ExportOptions *ExportOptions `json:"exportOptions,omitempty"`
-
- // Id: Output only. The generated export ID.
- Id string `json:"id,omitempty"`
-
- // MatterId: Output only. The matter ID.
- MatterId string `json:"matterId,omitempty"`
-
- // Name: The export name.
- Name string `json:"name,omitempty"`
-
- // Query: The search query being exported.
- Query *Query `json:"query,omitempty"`
-
- // Requester: Output only. The requester of the export.
- Requester *UserInfo `json:"requester,omitempty"`
-
- // Stats: Output only. Export statistics.
- Stats *ExportStats `json:"stats,omitempty"`
-
- // Status: Output only. The export status.
- //
- // Possible values:
- // "EXPORT_STATUS_UNSPECIFIED" - The status is unspecified.
- // "COMPLETED" - The export completed.
- // "FAILED" - The export failed.
- // "IN_PROGRESS" - The export is still being executed.
- Status string `json:"status,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "CloudStorageSink") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CloudStorageSink") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Export) MarshalJSON() ([]byte, error) {
- type NoMethod Export
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ExportOptions: Export advanced options
- type ExportOptions struct {
- // DriveOptions: Option available for Drive export.
- DriveOptions *DriveExportOptions `json:"driveOptions,omitempty"`
-
- // GroupsOptions: Option available for groups export.
- GroupsOptions *GroupsExportOptions `json:"groupsOptions,omitempty"`
-
- // HangoutsChatOptions: Option available for hangouts chat export.
- HangoutsChatOptions *HangoutsChatExportOptions `json:"hangoutsChatOptions,omitempty"`
-
- // MailOptions: Option available for mail export.
- MailOptions *MailExportOptions `json:"mailOptions,omitempty"`
-
- // Region: The requested export location.
- //
- // Possible values:
- // "EXPORT_REGION_UNSPECIFIED" - The region is unspecified. Will be
- // treated the same as ANY.
- // "ANY" - Any region.
- // "US" - US region.
- // "EUROPE" - Europe region.
- Region string `json:"region,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DriveOptions") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DriveOptions") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ExportOptions) MarshalJSON() ([]byte, error) {
- type NoMethod ExportOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ExportStats: Stats of an export.
- type ExportStats struct {
- // ExportedArtifactCount: The number of documents already processed by
- // the export.
- ExportedArtifactCount int64 `json:"exportedArtifactCount,omitempty,string"`
-
- // SizeInBytes: The size of export in bytes.
- SizeInBytes int64 `json:"sizeInBytes,omitempty,string"`
-
- // TotalArtifactCount: The number of documents to be exported.
- TotalArtifactCount int64 `json:"totalArtifactCount,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g.
- // "ExportedArtifactCount") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExportedArtifactCount") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ExportStats) MarshalJSON() ([]byte, error) {
- type NoMethod ExportStats
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // GroupsExportOptions: The options for groups export.
- type GroupsExportOptions struct {
- // ExportFormat: The export format for groups export.
- //
- // Possible values:
- // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
- // "MBOX" - MBOX as export format.
- // "PST" - PST as export format
- ExportFormat string `json:"exportFormat,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ExportFormat") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExportFormat") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *GroupsExportOptions) MarshalJSON() ([]byte, error) {
- type NoMethod GroupsExportOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HangoutsChatExportOptions: The options for hangouts chat export.
- type HangoutsChatExportOptions struct {
- // ExportFormat: The export format for hangouts chat export.
- //
- // Possible values:
- // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
- // "MBOX" - MBOX as export format.
- // "PST" - PST as export format
- ExportFormat string `json:"exportFormat,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ExportFormat") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExportFormat") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HangoutsChatExportOptions) MarshalJSON() ([]byte, error) {
- type NoMethod HangoutsChatExportOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HangoutsChatInfo: Accounts to search
- type HangoutsChatInfo struct {
- // RoomId: A set of rooms to search.
- RoomId []string `json:"roomId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "RoomId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "RoomId") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HangoutsChatInfo) MarshalJSON() ([]byte, error) {
- type NoMethod HangoutsChatInfo
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HangoutsChatOptions: Hangouts chat search advanced options
- type HangoutsChatOptions struct {
- // IncludeRooms: Set to true to include rooms.
- IncludeRooms bool `json:"includeRooms,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "IncludeRooms") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IncludeRooms") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HangoutsChatOptions) MarshalJSON() ([]byte, error) {
- type NoMethod HangoutsChatOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldAccount: An account being held in a particular hold. This
- // structure is immutable.
- // This can be either a single user or a google group, depending on the
- // corpus.
- type HeldAccount struct {
- // AccountId: The account's ID as provided by the
- // <a href="https://developers.google.com/admin-sdk/">Admin SDK</a>.
- AccountId string `json:"accountId,omitempty"`
-
- // HoldTime: When the account was put on hold.
- HoldTime string `json:"holdTime,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldAccount) MarshalJSON() ([]byte, error) {
- type NoMethod HeldAccount
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldDriveQuery: Query options for Drive holds.
- type HeldDriveQuery struct {
- // IncludeTeamDriveFiles: If true, include files in Team Drives in the
- // hold.
- IncludeTeamDriveFiles bool `json:"includeTeamDriveFiles,omitempty"`
-
- // ForceSendFields is a list of field names (e.g.
- // "IncludeTeamDriveFiles") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IncludeTeamDriveFiles") to
- // include in API requests with the JSON null value. By default, fields
- // with empty values are omitted from API requests. However, any field
- // with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldDriveQuery) MarshalJSON() ([]byte, error) {
- type NoMethod HeldDriveQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldGroupsQuery: Query options for group holds.
- type HeldGroupsQuery struct {
- // EndTime: The end time range for the search query. These timestamps
- // are in GMT and
- // rounded down to the start of the given date.
- EndTime string `json:"endTime,omitempty"`
-
- // StartTime: The start time range for the search query. These
- // timestamps are in GMT and
- // rounded down to the start of the given date.
- StartTime string `json:"startTime,omitempty"`
-
- // Terms: The search terms for the hold.
- Terms string `json:"terms,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EndTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldGroupsQuery) MarshalJSON() ([]byte, error) {
- type NoMethod HeldGroupsQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldHangoutsChatQuery: Query options for hangouts chat holds.
- type HeldHangoutsChatQuery struct {
- // IncludeRooms: If true, include rooms the user has participated in.
- IncludeRooms bool `json:"includeRooms,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "IncludeRooms") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "IncludeRooms") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldHangoutsChatQuery) MarshalJSON() ([]byte, error) {
- type NoMethod HeldHangoutsChatQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldMailQuery: Query options for mail holds.
- type HeldMailQuery struct {
- // EndTime: The end time range for the search query. These timestamps
- // are in GMT and
- // rounded down to the start of the given date.
- EndTime string `json:"endTime,omitempty"`
-
- // StartTime: The start time range for the search query. These
- // timestamps are in GMT and
- // rounded down to the start of the given date.
- StartTime string `json:"startTime,omitempty"`
-
- // Terms: The search terms for the hold.
- Terms string `json:"terms,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EndTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldMailQuery) MarshalJSON() ([]byte, error) {
- type NoMethod HeldMailQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // HeldOrgUnit: A organizational unit being held in a particular
- // hold.
- // This structure is immutable.
- type HeldOrgUnit struct {
- // HoldTime: When the org unit was put on hold. This property is
- // immutable.
- HoldTime string `json:"holdTime,omitempty"`
-
- // OrgUnitId: The org unit's immutable ID as provided by the Admin SDK.
- OrgUnitId string `json:"orgUnitId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "HoldTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "HoldTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *HeldOrgUnit) MarshalJSON() ([]byte, error) {
- type NoMethod HeldOrgUnit
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Hold: Represents a hold within Vault. A hold restricts purging
- // of
- // artifacts based on the combination of the query and accounts
- // restrictions.
- // A hold can be configured to either apply to an explicitly configured
- // set
- // of accounts, or can be applied to all members of an organizational
- // unit.
- type Hold struct {
- // Accounts: If set, the hold applies to the enumerated accounts and
- // org_unit must be
- // empty.
- Accounts []*HeldAccount `json:"accounts,omitempty"`
-
- // Corpus: The corpus to be searched.
- //
- // Possible values:
- // "CORPUS_TYPE_UNSPECIFIED" - No corpus specified.
- // "DRIVE" - Drive.
- // "MAIL" - Mail.
- // "GROUPS" - Groups.
- // "HANGOUTS_CHAT" - Hangouts Chat.
- Corpus string `json:"corpus,omitempty"`
-
- // HoldId: The unique immutable ID of the hold. Assigned during
- // creation.
- HoldId string `json:"holdId,omitempty"`
-
- // Name: The name of the hold.
- Name string `json:"name,omitempty"`
-
- // OrgUnit: If set, the hold applies to all members of the
- // organizational unit and
- // accounts must be empty. This property is mutable. For groups
- // holds,
- // set the accounts field.
- OrgUnit *HeldOrgUnit `json:"orgUnit,omitempty"`
-
- // Query: The corpus-specific query. If set, the corpusQuery must match
- // corpus
- // type.
- Query *CorpusQuery `json:"query,omitempty"`
-
- // UpdateTime: The last time this hold was modified.
- UpdateTime string `json:"updateTime,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Accounts") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Accounts") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Hold) MarshalJSON() ([]byte, error) {
- type NoMethod Hold
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListExportsResponse: The holds for a matter.
- type ListExportsResponse struct {
- // Exports: The list of exports.
- Exports []*Export `json:"exports,omitempty"`
-
- // NextPageToken: Page token to retrieve the next page of results in the
- // list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Exports") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Exports") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListExportsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListExportsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListHeldAccountsResponse: Returns a list of held accounts for a hold.
- type ListHeldAccountsResponse struct {
- // Accounts: The held accounts on a hold.
- Accounts []*HeldAccount `json:"accounts,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Accounts") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Accounts") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListHeldAccountsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListHeldAccountsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListHoldsResponse: The holds for a matter.
- type ListHoldsResponse struct {
- // Holds: The list of holds.
- Holds []*Hold `json:"holds,omitempty"`
-
- // NextPageToken: Page token to retrieve the next page of results in the
- // list.
- // If this is empty, then there are no more holds to list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Holds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Holds") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListHoldsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListHoldsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListMattersResponse: Provides the list of matters.
- type ListMattersResponse struct {
- // Matters: List of matters.
- Matters []*Matter `json:"matters,omitempty"`
-
- // NextPageToken: Page token to retrieve the next page of results in the
- // list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Matters") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Matters") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListMattersResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListMattersResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListSavedQueriesResponse: Definition of the response for method
- // ListSaveQuery.
- type ListSavedQueriesResponse struct {
- // NextPageToken: Page token to retrieve the next page of results in the
- // list.
- // If this is empty, then there are no more saved queries to list.
- NextPageToken string `json:"nextPageToken,omitempty"`
-
- // SavedQueries: List of output saved queries.
- SavedQueries []*SavedQuery `json:"savedQueries,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "NextPageToken") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "NextPageToken") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListSavedQueriesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListSavedQueriesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // MailExportOptions: The options for mail export.
- type MailExportOptions struct {
- // ExportFormat: The export file format.
- //
- // Possible values:
- // "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
- // "MBOX" - MBOX as export format.
- // "PST" - PST as export format
- ExportFormat string `json:"exportFormat,omitempty"`
-
- // ShowConfidentialModeContent: Set to true to export confidential mode
- // content.
- ShowConfidentialModeContent bool `json:"showConfidentialModeContent,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ExportFormat") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExportFormat") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *MailExportOptions) MarshalJSON() ([]byte, error) {
- type NoMethod MailExportOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // MailOptions: Mail search advanced options
- type MailOptions struct {
- // ExcludeDrafts: Set to true to exclude drafts.
- ExcludeDrafts bool `json:"excludeDrafts,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ExcludeDrafts") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ExcludeDrafts") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *MailOptions) MarshalJSON() ([]byte, error) {
- type NoMethod MailOptions
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Matter: Represents a matter.
- type Matter struct {
- // Description: The description of the matter.
- Description string `json:"description,omitempty"`
-
- // MatterId: The matter ID which is generated by the server.
- // Should be blank when creating a new matter.
- MatterId string `json:"matterId,omitempty"`
-
- // MatterPermissions: List of users and access to the matter. Currently
- // there is no programmer
- // defined limit on the number of permissions a matter can have.
- MatterPermissions []*MatterPermission `json:"matterPermissions,omitempty"`
-
- // Name: The name of the matter.
- Name string `json:"name,omitempty"`
-
- // State: The state of the matter.
- //
- // Possible values:
- // "STATE_UNSPECIFIED" - The matter has no specified state.
- // "OPEN" - This matter is open.
- // "CLOSED" - This matter is closed.
- // "DELETED" - This matter is deleted.
- State string `json:"state,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Description") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Description") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Matter) MarshalJSON() ([]byte, error) {
- type NoMethod Matter
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // MatterPermission: Currently each matter only has one owner, and all
- // others are collaborators.
- // When an account is purged, its corresponding MatterPermission
- // resources
- // cease to exist.
- type MatterPermission struct {
- // AccountId: The account id, as provided by <a
- // href="https://developers.google.com/admin-sdk/">Admin SDK</a>.
- AccountId string `json:"accountId,omitempty"`
-
- // Role: The user's role in this matter.
- //
- // Possible values:
- // "ROLE_UNSPECIFIED" - No role assigned.
- // "COLLABORATOR" - A collaborator to the matter.
- // "OWNER" - The owner of the matter.
- Role string `json:"role,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *MatterPermission) MarshalJSON() ([]byte, error) {
- type NoMethod MatterPermission
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // OrgUnitInfo: Org Unit to search
- type OrgUnitInfo struct {
- // OrgUnitId: Org unit to search, as provided by the
- // <a href="https://developers.google.com/admin-sdk/directory/">Admin
- // SDK Directory API</a>.
- OrgUnitId string `json:"orgUnitId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "OrgUnitId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "OrgUnitId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *OrgUnitInfo) MarshalJSON() ([]byte, error) {
- type NoMethod OrgUnitInfo
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Query: A query definition relevant for search & export.
- type Query struct {
- // AccountInfo: When 'ACCOUNT' is chosen as search method,
- // account_info needs to be specified.
- AccountInfo *AccountInfo `json:"accountInfo,omitempty"`
-
- // Corpus: The corpus to search.
- //
- // Possible values:
- // "CORPUS_TYPE_UNSPECIFIED" - No corpus specified.
- // "DRIVE" - Drive.
- // "MAIL" - Mail.
- // "GROUPS" - Groups.
- // "HANGOUTS_CHAT" - Hangouts Chat.
- Corpus string `json:"corpus,omitempty"`
-
- // DataScope: The data source to search from.
- //
- // Possible values:
- // "DATA_SCOPE_UNSPECIFIED" - No data scope specified.
- // "ALL_DATA" - All available data.
- // "HELD_DATA" - Data on hold.
- // "UNPROCESSED_DATA" - Data not processed.
- DataScope string `json:"dataScope,omitempty"`
-
- // DriveOptions: For Drive search, specify more options in this field.
- DriveOptions *DriveOptions `json:"driveOptions,omitempty"`
-
- // EndTime: The end time range for the search query. These timestamps
- // are in GMT and
- // rounded down to the start of the given date.
- EndTime string `json:"endTime,omitempty"`
-
- // HangoutsChatInfo: When 'ROOM' is chosen as search method,
- // hangout_chats_info needs to be
- // specified. (read-only)
- HangoutsChatInfo *HangoutsChatInfo `json:"hangoutsChatInfo,omitempty"`
-
- // HangoutsChatOptions: For hangouts chat search, specify more options
- // in this field. (read-only)
- HangoutsChatOptions *HangoutsChatOptions `json:"hangoutsChatOptions,omitempty"`
-
- // MailOptions: For mail search, specify more options in this field.
- MailOptions *MailOptions `json:"mailOptions,omitempty"`
-
- // OrgUnitInfo: When 'ORG_UNIT' is chosen as as search method,
- // org_unit_info needs
- // to be specified.
- OrgUnitInfo *OrgUnitInfo `json:"orgUnitInfo,omitempty"`
-
- // SearchMethod: The search method to use.
- //
- // Possible values:
- // "SEARCH_METHOD_UNSPECIFIED" - A search method must be specified. If
- // a request does not specify a
- // search method, it will be rejected.
- // "ACCOUNT" - Will search all accounts provided in account_info.
- // "ORG_UNIT" - Will search all accounts in the OU specified in
- // org_unit_info.
- // "TEAM_DRIVE" - Will search for all accounts in the Team Drive
- // specified in
- // team_drive_info.
- // "ENTIRE_ORG" - Will search for all accounts in the organization.
- // No need to set account_info or org_unit_info.
- // "ROOM" - Will search in the Room specified in
- // hangout_chats_info. (read-only)
- SearchMethod string `json:"searchMethod,omitempty"`
-
- // StartTime: The start time range for the search query. These
- // timestamps are in GMT and
- // rounded down to the start of the given date.
- StartTime string `json:"startTime,omitempty"`
-
- // TeamDriveInfo: When 'TEAM_DRIVE' is chosen as search method,
- // team_drive_info needs to be
- // specified.
- TeamDriveInfo *TeamDriveInfo `json:"teamDriveInfo,omitempty"`
-
- // Terms: The corpus-specific
- // <a href="https://support.google.com/vault/answer/2474474">search
- // operators</a>
- // used to generate search results.
- Terms string `json:"terms,omitempty"`
-
- // TimeZone: The time zone name.
- // It should be an IANA TZ name, such as "America/Los_Angeles".
- // For more information, see
- // <a
- // href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">Ti
- // me
- // Zone</a>.
- TimeZone string `json:"timeZone,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountInfo") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountInfo") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Query) MarshalJSON() ([]byte, error) {
- type NoMethod Query
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RemoveHeldAccountsRequest: Remove a list of accounts from a hold.
- type RemoveHeldAccountsRequest struct {
- // AccountIds: Account ids to identify HeldAccounts to remove.
- AccountIds []string `json:"accountIds,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountIds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountIds") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RemoveHeldAccountsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RemoveHeldAccountsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RemoveHeldAccountsResponse: Response for batch delete held accounts.
- type RemoveHeldAccountsResponse struct {
- // Statuses: A list of statuses for deleted accounts. Results have
- // the
- // same order as the request.
- Statuses []*Status `json:"statuses,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Statuses") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Statuses") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RemoveHeldAccountsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod RemoveHeldAccountsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RemoveMatterPermissionsRequest: Remove an account as a matter
- // collaborator.
- type RemoveMatterPermissionsRequest struct {
- // AccountId: The account ID.
- AccountId string `json:"accountId,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "AccountId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AccountId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RemoveMatterPermissionsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RemoveMatterPermissionsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReopenMatterRequest: Reopen a matter by ID.
- type ReopenMatterRequest struct {
- }
-
- // ReopenMatterResponse: Response to a ReopenMatterRequest.
- type ReopenMatterResponse struct {
- // Matter: The updated matter, with state OPEN.
- Matter *Matter `json:"matter,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Matter") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Matter") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReopenMatterResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ReopenMatterResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // SavedQuery: Definition of the saved query.
- type SavedQuery struct {
- // CreateTime: Output only. The server generated timestamp at which
- // saved query was
- // created.
- CreateTime string `json:"createTime,omitempty"`
-
- // DisplayName: Name of the saved query.
- DisplayName string `json:"displayName,omitempty"`
-
- // MatterId: Output only. The matter id of the associated matter.
- // The server does not look at this field during create and always uses
- // matter
- // id in the URL.
- MatterId string `json:"matterId,omitempty"`
-
- // Query: The underlying Query object which contains all the information
- // of the saved
- // query.
- Query *Query `json:"query,omitempty"`
-
- // SavedQueryId: A unique identifier for the saved query.
- SavedQueryId string `json:"savedQueryId,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "CreateTime") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "CreateTime") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *SavedQuery) MarshalJSON() ([]byte, error) {
- type NoMethod SavedQuery
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Status: The `Status` type defines a logical error model that is
- // suitable for different
- // programming environments, including REST APIs and RPC APIs. It is
- // used by
- // [gRPC](https://github.com/grpc). The error model is designed to
- // be:
- //
- // - Simple to use and understand for most users
- // - Flexible enough to meet unexpected needs
- //
- // # Overview
- //
- // The `Status` message contains three pieces of data: error code, error
- // message,
- // and error details. The error code should be an enum value
- // of
- // google.rpc.Code, but it may accept additional error codes if needed.
- // The
- // error message should be a developer-facing English message that
- // helps
- // developers *understand* and *resolve* the error. If a localized
- // user-facing
- // error message is needed, put the localized message in the error
- // details or
- // localize it in the client. The optional error details may contain
- // arbitrary
- // information about the error. There is a predefined set of error
- // detail types
- // in the package `google.rpc` that can be used for common error
- // conditions.
- //
- // # Language mapping
- //
- // The `Status` message is the logical representation of the error
- // model, but it
- // is not necessarily the actual wire format. When the `Status` message
- // is
- // exposed in different client libraries and different wire protocols,
- // it can be
- // mapped differently. For example, it will likely be mapped to some
- // exceptions
- // in Java, but more likely mapped to some error codes in C.
- //
- // # Other uses
- //
- // The error model and the `Status` message can be used in a variety
- // of
- // environments, either with or without APIs, to provide a
- // consistent developer experience across different
- // environments.
- //
- // Example uses of this error model include:
- //
- // - Partial errors. If a service needs to return partial errors to the
- // client,
- // it may embed the `Status` in the normal response to indicate the
- // partial
- // errors.
- //
- // - Workflow errors. A typical workflow has multiple steps. Each step
- // may
- // have a `Status` message for error reporting.
- //
- // - Batch operations. If a client uses batch request and batch
- // response, the
- // `Status` message should be used directly inside batch response,
- // one for
- // each error sub-response.
- //
- // - Asynchronous operations. If an API call embeds asynchronous
- // operation
- // results in its response, the status of those operations should
- // be
- // represented directly using the `Status` message.
- //
- // - Logging. If some API errors are stored in logs, the message
- // `Status` could
- // be used directly after any stripping needed for security/privacy
- // reasons.
- type Status struct {
- // Code: The status code, which should be an enum value of
- // google.rpc.Code.
- Code int64 `json:"code,omitempty"`
-
- // Details: A list of messages that carry the error details. There is a
- // common set of
- // message types for APIs to use.
- Details []googleapi.RawMessage `json:"details,omitempty"`
-
- // Message: A developer-facing error message, which should be in
- // English. Any
- // user-facing error message should be localized and sent in
- // the
- // google.rpc.Status.details field, or localized by the client.
- Message string `json:"message,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Code") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Code") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Status) MarshalJSON() ([]byte, error) {
- type NoMethod Status
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // TeamDriveInfo: Team Drives to search
- type TeamDriveInfo struct {
- // TeamDriveIds: List of Team Drive ids, as provided by
- // <a
- // href="https://developers.google.com/drive">Drive API</a>.
- TeamDriveIds []string `json:"teamDriveIds,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "TeamDriveIds") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "TeamDriveIds") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *TeamDriveInfo) MarshalJSON() ([]byte, error) {
- type NoMethod TeamDriveInfo
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // UndeleteMatterRequest: Undelete a matter by ID.
- type UndeleteMatterRequest struct {
- }
-
- // UserInfo: User's information.
- type UserInfo struct {
- // DisplayName: The displayed name of the user.
- DisplayName string `json:"displayName,omitempty"`
-
- // Email: The email address of the user.
- Email string `json:"email,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DisplayName") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DisplayName") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *UserInfo) MarshalJSON() ([]byte, error) {
- type NoMethod UserInfo
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // method id "vault.matters.addPermissions":
-
- type MattersAddPermissionsCall struct {
- s *Service
- matterId string
- addmatterpermissionsrequest *AddMatterPermissionsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // AddPermissions: Adds an account as a matter collaborator.
- func (r *MattersService) AddPermissions(matterId string, addmatterpermissionsrequest *AddMatterPermissionsRequest) *MattersAddPermissionsCall {
- c := &MattersAddPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.addmatterpermissionsrequest = addmatterpermissionsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersAddPermissionsCall) Fields(s ...googleapi.Field) *MattersAddPermissionsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersAddPermissionsCall) Context(ctx context.Context) *MattersAddPermissionsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersAddPermissionsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersAddPermissionsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.addmatterpermissionsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:addPermissions")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.addPermissions" call.
- // Exactly one of *MatterPermission or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *MatterPermission.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersAddPermissionsCall) Do(opts ...googleapi.CallOption) (*MatterPermission, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &MatterPermission{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Adds an account as a matter collaborator.",
- // "flatPath": "v1/matters/{matterId}:addPermissions",
- // "httpMethod": "POST",
- // "id": "vault.matters.addPermissions",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}:addPermissions",
- // "request": {
- // "$ref": "AddMatterPermissionsRequest"
- // },
- // "response": {
- // "$ref": "MatterPermission"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.close":
-
- type MattersCloseCall struct {
- s *Service
- matterId string
- closematterrequest *CloseMatterRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Close: Closes the specified matter. Returns matter with updated
- // state.
- func (r *MattersService) Close(matterId string, closematterrequest *CloseMatterRequest) *MattersCloseCall {
- c := &MattersCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.closematterrequest = closematterrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersCloseCall) Fields(s ...googleapi.Field) *MattersCloseCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersCloseCall) Context(ctx context.Context) *MattersCloseCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersCloseCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersCloseCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.closematterrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:close")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.close" call.
- // Exactly one of *CloseMatterResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *CloseMatterResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersCloseCall) Do(opts ...googleapi.CallOption) (*CloseMatterResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &CloseMatterResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Closes the specified matter. Returns matter with updated state.",
- // "flatPath": "v1/matters/{matterId}:close",
- // "httpMethod": "POST",
- // "id": "vault.matters.close",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}:close",
- // "request": {
- // "$ref": "CloseMatterRequest"
- // },
- // "response": {
- // "$ref": "CloseMatterResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.create":
-
- type MattersCreateCall struct {
- s *Service
- matter *Matter
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a new matter with the given name and description. The
- // initial state
- // is open, and the owner is the method caller. Returns the created
- // matter
- // with default view.
- func (r *MattersService) Create(matter *Matter) *MattersCreateCall {
- c := &MattersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matter = matter
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersCreateCall) Fields(s ...googleapi.Field) *MattersCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersCreateCall) Context(ctx context.Context) *MattersCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.matter)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.create" call.
- // Exactly one of *Matter or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Matter.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersCreateCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Matter{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a new matter with the given name and description. The initial state\nis open, and the owner is the method caller. Returns the created matter\nwith default view.",
- // "flatPath": "v1/matters",
- // "httpMethod": "POST",
- // "id": "vault.matters.create",
- // "parameterOrder": [],
- // "parameters": {},
- // "path": "v1/matters",
- // "request": {
- // "$ref": "Matter"
- // },
- // "response": {
- // "$ref": "Matter"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.delete":
-
- type MattersDeleteCall struct {
- s *Service
- matterId string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes the specified matter. Returns matter with updated
- // state.
- func (r *MattersService) Delete(matterId string) *MattersDeleteCall {
- c := &MattersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersDeleteCall) Fields(s ...googleapi.Field) *MattersDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersDeleteCall) Context(ctx context.Context) *MattersDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.delete" call.
- // Exactly one of *Matter or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Matter.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersDeleteCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Matter{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Deletes the specified matter. Returns matter with updated state.",
- // "flatPath": "v1/matters/{matterId}",
- // "httpMethod": "DELETE",
- // "id": "vault.matters.delete",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}",
- // "response": {
- // "$ref": "Matter"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.get":
-
- type MattersGetCall struct {
- s *Service
- matterId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets the specified matter.
- func (r *MattersService) Get(matterId string) *MattersGetCall {
- c := &MattersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- return c
- }
-
- // View sets the optional parameter "view": Specifies which parts of the
- // Matter to return in the response.
- //
- // Possible values:
- // "VIEW_UNSPECIFIED"
- // "BASIC"
- // "FULL"
- func (c *MattersGetCall) View(view string) *MattersGetCall {
- c.urlParams_.Set("view", view)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersGetCall) Fields(s ...googleapi.Field) *MattersGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersGetCall) IfNoneMatch(entityTag string) *MattersGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersGetCall) Context(ctx context.Context) *MattersGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.get" call.
- // Exactly one of *Matter or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Matter.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersGetCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Matter{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets the specified matter.",
- // "flatPath": "v1/matters/{matterId}",
- // "httpMethod": "GET",
- // "id": "vault.matters.get",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "view": {
- // "description": "Specifies which parts of the Matter to return in the response.",
- // "enum": [
- // "VIEW_UNSPECIFIED",
- // "BASIC",
- // "FULL"
- // ],
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}",
- // "response": {
- // "$ref": "Matter"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // method id "vault.matters.list":
-
- type MattersListCall struct {
- s *Service
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists matters the user has access to.
- func (r *MattersService) List() *MattersListCall {
- c := &MattersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- return c
- }
-
- // PageSize sets the optional parameter "pageSize": The number of
- // matters to return in the response.
- // Default and maximum are 100.
- func (c *MattersListCall) PageSize(pageSize int64) *MattersListCall {
- c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": The pagination
- // token as returned in the response.
- func (c *MattersListCall) PageToken(pageToken string) *MattersListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // State sets the optional parameter "state": If set, list only matters
- // with that specific state. The default is listing
- // matters of all states.
- //
- // Possible values:
- // "STATE_UNSPECIFIED"
- // "OPEN"
- // "CLOSED"
- // "DELETED"
- func (c *MattersListCall) State(state string) *MattersListCall {
- c.urlParams_.Set("state", state)
- return c
- }
-
- // View sets the optional parameter "view": Specifies which parts of the
- // matter to return in response.
- //
- // Possible values:
- // "VIEW_UNSPECIFIED"
- // "BASIC"
- // "FULL"
- func (c *MattersListCall) View(view string) *MattersListCall {
- c.urlParams_.Set("view", view)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersListCall) Fields(s ...googleapi.Field) *MattersListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersListCall) IfNoneMatch(entityTag string) *MattersListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersListCall) Context(ctx context.Context) *MattersListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.list" call.
- // Exactly one of *ListMattersResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListMattersResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersListCall) Do(opts ...googleapi.CallOption) (*ListMattersResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListMattersResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists matters the user has access to.",
- // "flatPath": "v1/matters",
- // "httpMethod": "GET",
- // "id": "vault.matters.list",
- // "parameterOrder": [],
- // "parameters": {
- // "pageSize": {
- // "description": "The number of matters to return in the response.\nDefault and maximum are 100.",
- // "format": "int32",
- // "location": "query",
- // "type": "integer"
- // },
- // "pageToken": {
- // "description": "The pagination token as returned in the response.",
- // "location": "query",
- // "type": "string"
- // },
- // "state": {
- // "description": "If set, list only matters with that specific state. The default is listing\nmatters of all states.",
- // "enum": [
- // "STATE_UNSPECIFIED",
- // "OPEN",
- // "CLOSED",
- // "DELETED"
- // ],
- // "location": "query",
- // "type": "string"
- // },
- // "view": {
- // "description": "Specifies which parts of the matter to return in response.",
- // "enum": [
- // "VIEW_UNSPECIFIED",
- // "BASIC",
- // "FULL"
- // ],
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters",
- // "response": {
- // "$ref": "ListMattersResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *MattersListCall) Pages(ctx context.Context, f func(*ListMattersResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "vault.matters.removePermissions":
-
- type MattersRemovePermissionsCall struct {
- s *Service
- matterId string
- removematterpermissionsrequest *RemoveMatterPermissionsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // RemovePermissions: Removes an account as a matter collaborator.
- func (r *MattersService) RemovePermissions(matterId string, removematterpermissionsrequest *RemoveMatterPermissionsRequest) *MattersRemovePermissionsCall {
- c := &MattersRemovePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.removematterpermissionsrequest = removematterpermissionsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersRemovePermissionsCall) Fields(s ...googleapi.Field) *MattersRemovePermissionsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersRemovePermissionsCall) Context(ctx context.Context) *MattersRemovePermissionsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersRemovePermissionsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersRemovePermissionsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.removematterpermissionsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:removePermissions")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.removePermissions" call.
- // Exactly one of *Empty or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Empty.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersRemovePermissionsCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Empty{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Removes an account as a matter collaborator.",
- // "flatPath": "v1/matters/{matterId}:removePermissions",
- // "httpMethod": "POST",
- // "id": "vault.matters.removePermissions",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}:removePermissions",
- // "request": {
- // "$ref": "RemoveMatterPermissionsRequest"
- // },
- // "response": {
- // "$ref": "Empty"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.reopen":
-
- type MattersReopenCall struct {
- s *Service
- matterId string
- reopenmatterrequest *ReopenMatterRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Reopen: Reopens the specified matter. Returns matter with updated
- // state.
- func (r *MattersService) Reopen(matterId string, reopenmatterrequest *ReopenMatterRequest) *MattersReopenCall {
- c := &MattersReopenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.reopenmatterrequest = reopenmatterrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersReopenCall) Fields(s ...googleapi.Field) *MattersReopenCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersReopenCall) Context(ctx context.Context) *MattersReopenCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersReopenCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersReopenCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.reopenmatterrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:reopen")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.reopen" call.
- // Exactly one of *ReopenMatterResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ReopenMatterResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersReopenCall) Do(opts ...googleapi.CallOption) (*ReopenMatterResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ReopenMatterResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Reopens the specified matter. Returns matter with updated state.",
- // "flatPath": "v1/matters/{matterId}:reopen",
- // "httpMethod": "POST",
- // "id": "vault.matters.reopen",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}:reopen",
- // "request": {
- // "$ref": "ReopenMatterRequest"
- // },
- // "response": {
- // "$ref": "ReopenMatterResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.undelete":
-
- type MattersUndeleteCall struct {
- s *Service
- matterId string
- undeletematterrequest *UndeleteMatterRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Undelete: Undeletes the specified matter. Returns matter with updated
- // state.
- func (r *MattersService) Undelete(matterId string, undeletematterrequest *UndeleteMatterRequest) *MattersUndeleteCall {
- c := &MattersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.undeletematterrequest = undeletematterrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersUndeleteCall) Fields(s ...googleapi.Field) *MattersUndeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersUndeleteCall) Context(ctx context.Context) *MattersUndeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersUndeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersUndeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletematterrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:undelete")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.undelete" call.
- // Exactly one of *Matter or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Matter.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersUndeleteCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Matter{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Undeletes the specified matter. Returns matter with updated state.",
- // "flatPath": "v1/matters/{matterId}:undelete",
- // "httpMethod": "POST",
- // "id": "vault.matters.undelete",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}:undelete",
- // "request": {
- // "$ref": "UndeleteMatterRequest"
- // },
- // "response": {
- // "$ref": "Matter"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.update":
-
- type MattersUpdateCall struct {
- s *Service
- matterId string
- matter *Matter
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates the specified matter.
- // This updates only the name and description of the matter, identified
- // by
- // matter id. Changes to any other fields are ignored.
- // Returns the default view of the matter.
- func (r *MattersService) Update(matterId string, matter *Matter) *MattersUpdateCall {
- c := &MattersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.matter = matter
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersUpdateCall) Fields(s ...googleapi.Field) *MattersUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersUpdateCall) Context(ctx context.Context) *MattersUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.matter)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.update" call.
- // Exactly one of *Matter or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Matter.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersUpdateCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Matter{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates the specified matter.\nThis updates only the name and description of the matter, identified by\nmatter id. Changes to any other fields are ignored.\nReturns the default view of the matter.",
- // "flatPath": "v1/matters/{matterId}",
- // "httpMethod": "PUT",
- // "id": "vault.matters.update",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}",
- // "request": {
- // "$ref": "Matter"
- // },
- // "response": {
- // "$ref": "Matter"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.exports.create":
-
- type MattersExportsCreateCall struct {
- s *Service
- matterId string
- export *Export
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates an Export.
- func (r *MattersExportsService) Create(matterId string, export *Export) *MattersExportsCreateCall {
- c := &MattersExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.export = export
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersExportsCreateCall) Fields(s ...googleapi.Field) *MattersExportsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersExportsCreateCall) Context(ctx context.Context) *MattersExportsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersExportsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersExportsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.export)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.exports.create" call.
- // Exactly one of *Export or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Export.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersExportsCreateCall) Do(opts ...googleapi.CallOption) (*Export, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Export{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates an Export.",
- // "flatPath": "v1/matters/{matterId}/exports",
- // "httpMethod": "POST",
- // "id": "vault.matters.exports.create",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/exports",
- // "request": {
- // "$ref": "Export"
- // },
- // "response": {
- // "$ref": "Export"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.exports.delete":
-
- type MattersExportsDeleteCall struct {
- s *Service
- matterId string
- exportId string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes an Export.
- func (r *MattersExportsService) Delete(matterId string, exportId string) *MattersExportsDeleteCall {
- c := &MattersExportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.exportId = exportId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersExportsDeleteCall) Fields(s ...googleapi.Field) *MattersExportsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersExportsDeleteCall) Context(ctx context.Context) *MattersExportsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersExportsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersExportsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports/{exportId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "exportId": c.exportId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.exports.delete" call.
- // Exactly one of *Empty or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Empty.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Empty{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Deletes an Export.",
- // "flatPath": "v1/matters/{matterId}/exports/{exportId}",
- // "httpMethod": "DELETE",
- // "id": "vault.matters.exports.delete",
- // "parameterOrder": [
- // "matterId",
- // "exportId"
- // ],
- // "parameters": {
- // "exportId": {
- // "description": "The export ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/exports/{exportId}",
- // "response": {
- // "$ref": "Empty"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.exports.get":
-
- type MattersExportsGetCall struct {
- s *Service
- matterId string
- exportId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets an Export.
- func (r *MattersExportsService) Get(matterId string, exportId string) *MattersExportsGetCall {
- c := &MattersExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.exportId = exportId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersExportsGetCall) Fields(s ...googleapi.Field) *MattersExportsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersExportsGetCall) IfNoneMatch(entityTag string) *MattersExportsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersExportsGetCall) Context(ctx context.Context) *MattersExportsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersExportsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersExportsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports/{exportId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "exportId": c.exportId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.exports.get" call.
- // Exactly one of *Export or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Export.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersExportsGetCall) Do(opts ...googleapi.CallOption) (*Export, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Export{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets an Export.",
- // "flatPath": "v1/matters/{matterId}/exports/{exportId}",
- // "httpMethod": "GET",
- // "id": "vault.matters.exports.get",
- // "parameterOrder": [
- // "matterId",
- // "exportId"
- // ],
- // "parameters": {
- // "exportId": {
- // "description": "The export ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/exports/{exportId}",
- // "response": {
- // "$ref": "Export"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // method id "vault.matters.exports.list":
-
- type MattersExportsListCall struct {
- s *Service
- matterId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists Exports.
- func (r *MattersExportsService) List(matterId string) *MattersExportsListCall {
- c := &MattersExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- return c
- }
-
- // PageSize sets the optional parameter "pageSize": The number of
- // exports to return in the response.
- func (c *MattersExportsListCall) PageSize(pageSize int64) *MattersExportsListCall {
- c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": The pagination
- // token as returned in the response.
- func (c *MattersExportsListCall) PageToken(pageToken string) *MattersExportsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersExportsListCall) Fields(s ...googleapi.Field) *MattersExportsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersExportsListCall) IfNoneMatch(entityTag string) *MattersExportsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersExportsListCall) Context(ctx context.Context) *MattersExportsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersExportsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersExportsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.exports.list" call.
- // Exactly one of *ListExportsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListExportsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersExportsListCall) Do(opts ...googleapi.CallOption) (*ListExportsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListExportsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists Exports.",
- // "flatPath": "v1/matters/{matterId}/exports",
- // "httpMethod": "GET",
- // "id": "vault.matters.exports.list",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "pageSize": {
- // "description": "The number of exports to return in the response.",
- // "format": "int32",
- // "location": "query",
- // "type": "integer"
- // },
- // "pageToken": {
- // "description": "The pagination token as returned in the response.",
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/exports",
- // "response": {
- // "$ref": "ListExportsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *MattersExportsListCall) Pages(ctx context.Context, f func(*ListExportsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "vault.matters.holds.addHeldAccounts":
-
- type MattersHoldsAddHeldAccountsCall struct {
- s *Service
- matterId string
- holdId string
- addheldaccountsrequest *AddHeldAccountsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // AddHeldAccounts: Adds HeldAccounts to a hold. Returns a list of
- // accounts that have been
- // successfully added. Accounts can only be added to an existing
- // account-based
- // hold.
- func (r *MattersHoldsService) AddHeldAccounts(matterId string, holdId string, addheldaccountsrequest *AddHeldAccountsRequest) *MattersHoldsAddHeldAccountsCall {
- c := &MattersHoldsAddHeldAccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- c.addheldaccountsrequest = addheldaccountsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsAddHeldAccountsCall) Fields(s ...googleapi.Field) *MattersHoldsAddHeldAccountsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsAddHeldAccountsCall) Context(ctx context.Context) *MattersHoldsAddHeldAccountsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsAddHeldAccountsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsAddHeldAccountsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.addheldaccountsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.addHeldAccounts" call.
- // Exactly one of *AddHeldAccountsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *AddHeldAccountsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersHoldsAddHeldAccountsCall) Do(opts ...googleapi.CallOption) (*AddHeldAccountsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &AddHeldAccountsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Adds HeldAccounts to a hold. Returns a list of accounts that have been\nsuccessfully added. Accounts can only be added to an existing account-based\nhold.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts",
- // "httpMethod": "POST",
- // "id": "vault.matters.holds.addHeldAccounts",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts",
- // "request": {
- // "$ref": "AddHeldAccountsRequest"
- // },
- // "response": {
- // "$ref": "AddHeldAccountsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.create":
-
- type MattersHoldsCreateCall struct {
- s *Service
- matterId string
- hold *Hold
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a hold in the given matter.
- func (r *MattersHoldsService) Create(matterId string, hold *Hold) *MattersHoldsCreateCall {
- c := &MattersHoldsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.hold = hold
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsCreateCall) Fields(s ...googleapi.Field) *MattersHoldsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsCreateCall) Context(ctx context.Context) *MattersHoldsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.hold)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.create" call.
- // Exactly one of *Hold or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Hold.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *MattersHoldsCreateCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Hold{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a hold in the given matter.",
- // "flatPath": "v1/matters/{matterId}/holds",
- // "httpMethod": "POST",
- // "id": "vault.matters.holds.create",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds",
- // "request": {
- // "$ref": "Hold"
- // },
- // "response": {
- // "$ref": "Hold"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.delete":
-
- type MattersHoldsDeleteCall struct {
- s *Service
- matterId string
- holdId string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Removes a hold by ID. This will release any HeldAccounts on
- // this Hold.
- func (r *MattersHoldsService) Delete(matterId string, holdId string) *MattersHoldsDeleteCall {
- c := &MattersHoldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsDeleteCall) Fields(s ...googleapi.Field) *MattersHoldsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsDeleteCall) Context(ctx context.Context) *MattersHoldsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.delete" call.
- // Exactly one of *Empty or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Empty.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersHoldsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Empty{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Removes a hold by ID. This will release any HeldAccounts on this Hold.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}",
- // "httpMethod": "DELETE",
- // "id": "vault.matters.holds.delete",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}",
- // "response": {
- // "$ref": "Empty"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.get":
-
- type MattersHoldsGetCall struct {
- s *Service
- matterId string
- holdId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Gets a hold by ID.
- func (r *MattersHoldsService) Get(matterId string, holdId string) *MattersHoldsGetCall {
- c := &MattersHoldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- return c
- }
-
- // View sets the optional parameter "view": Specifies which parts of the
- // Hold to return.
- //
- // Possible values:
- // "HOLD_VIEW_UNSPECIFIED"
- // "BASIC_HOLD"
- // "FULL_HOLD"
- func (c *MattersHoldsGetCall) View(view string) *MattersHoldsGetCall {
- c.urlParams_.Set("view", view)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsGetCall) Fields(s ...googleapi.Field) *MattersHoldsGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersHoldsGetCall) IfNoneMatch(entityTag string) *MattersHoldsGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsGetCall) Context(ctx context.Context) *MattersHoldsGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.get" call.
- // Exactly one of *Hold or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Hold.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *MattersHoldsGetCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Hold{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Gets a hold by ID.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}",
- // "httpMethod": "GET",
- // "id": "vault.matters.holds.get",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "view": {
- // "description": "Specifies which parts of the Hold to return.",
- // "enum": [
- // "HOLD_VIEW_UNSPECIFIED",
- // "BASIC_HOLD",
- // "FULL_HOLD"
- // ],
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}",
- // "response": {
- // "$ref": "Hold"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.list":
-
- type MattersHoldsListCall struct {
- s *Service
- matterId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists holds within a matter. An empty page token in
- // ListHoldsResponse
- // denotes no more holds to list.
- func (r *MattersHoldsService) List(matterId string) *MattersHoldsListCall {
- c := &MattersHoldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- return c
- }
-
- // PageSize sets the optional parameter "pageSize": The number of holds
- // to return in the response, between 0 and 100 inclusive.
- // Leaving this empty, or as 0, is the same as page_size = 100.
- func (c *MattersHoldsListCall) PageSize(pageSize int64) *MattersHoldsListCall {
- c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": The pagination
- // token as returned in the response.
- // An empty token means start from the beginning.
- func (c *MattersHoldsListCall) PageToken(pageToken string) *MattersHoldsListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // View sets the optional parameter "view": Specifies which parts of the
- // Hold to return.
- //
- // Possible values:
- // "HOLD_VIEW_UNSPECIFIED"
- // "BASIC_HOLD"
- // "FULL_HOLD"
- func (c *MattersHoldsListCall) View(view string) *MattersHoldsListCall {
- c.urlParams_.Set("view", view)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsListCall) Fields(s ...googleapi.Field) *MattersHoldsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersHoldsListCall) IfNoneMatch(entityTag string) *MattersHoldsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsListCall) Context(ctx context.Context) *MattersHoldsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.list" call.
- // Exactly one of *ListHoldsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListHoldsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersHoldsListCall) Do(opts ...googleapi.CallOption) (*ListHoldsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListHoldsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists holds within a matter. An empty page token in ListHoldsResponse\ndenotes no more holds to list.",
- // "flatPath": "v1/matters/{matterId}/holds",
- // "httpMethod": "GET",
- // "id": "vault.matters.holds.list",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "pageSize": {
- // "description": "The number of holds to return in the response, between 0 and 100 inclusive.\nLeaving this empty, or as 0, is the same as page_size = 100.",
- // "format": "int32",
- // "location": "query",
- // "type": "integer"
- // },
- // "pageToken": {
- // "description": "The pagination token as returned in the response.\nAn empty token means start from the beginning.",
- // "location": "query",
- // "type": "string"
- // },
- // "view": {
- // "description": "Specifies which parts of the Hold to return.",
- // "enum": [
- // "HOLD_VIEW_UNSPECIFIED",
- // "BASIC_HOLD",
- // "FULL_HOLD"
- // ],
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds",
- // "response": {
- // "$ref": "ListHoldsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *MattersHoldsListCall) Pages(ctx context.Context, f func(*ListHoldsResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
-
- // method id "vault.matters.holds.removeHeldAccounts":
-
- type MattersHoldsRemoveHeldAccountsCall struct {
- s *Service
- matterId string
- holdId string
- removeheldaccountsrequest *RemoveHeldAccountsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // RemoveHeldAccounts: Removes HeldAccounts from a hold. Returns a list
- // of statuses in the same
- // order as the request. If this request leaves the hold with no
- // held
- // accounts, the hold will not apply to any accounts.
- func (r *MattersHoldsService) RemoveHeldAccounts(matterId string, holdId string, removeheldaccountsrequest *RemoveHeldAccountsRequest) *MattersHoldsRemoveHeldAccountsCall {
- c := &MattersHoldsRemoveHeldAccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- c.removeheldaccountsrequest = removeheldaccountsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsRemoveHeldAccountsCall) Fields(s ...googleapi.Field) *MattersHoldsRemoveHeldAccountsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsRemoveHeldAccountsCall) Context(ctx context.Context) *MattersHoldsRemoveHeldAccountsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsRemoveHeldAccountsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsRemoveHeldAccountsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeheldaccountsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.removeHeldAccounts" call.
- // Exactly one of *RemoveHeldAccountsResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *RemoveHeldAccountsResponse.ServerResponse.Header or (if a response
- // was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersHoldsRemoveHeldAccountsCall) Do(opts ...googleapi.CallOption) (*RemoveHeldAccountsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &RemoveHeldAccountsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Removes HeldAccounts from a hold. Returns a list of statuses in the same\norder as the request. If this request leaves the hold with no held\naccounts, the hold will not apply to any accounts.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts",
- // "httpMethod": "POST",
- // "id": "vault.matters.holds.removeHeldAccounts",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts",
- // "request": {
- // "$ref": "RemoveHeldAccountsRequest"
- // },
- // "response": {
- // "$ref": "RemoveHeldAccountsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.update":
-
- type MattersHoldsUpdateCall struct {
- s *Service
- matterId string
- holdId string
- hold *Hold
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Update: Updates the OU and/or query parameters of a hold. You cannot
- // add accounts
- // to a hold that covers an OU, nor can you add OUs to a hold that
- // covers
- // individual accounts. Accounts listed in the hold will be ignored.
- func (r *MattersHoldsService) Update(matterId string, holdId string, hold *Hold) *MattersHoldsUpdateCall {
- c := &MattersHoldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- c.hold = hold
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsUpdateCall) Fields(s ...googleapi.Field) *MattersHoldsUpdateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsUpdateCall) Context(ctx context.Context) *MattersHoldsUpdateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsUpdateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsUpdateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.hold)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("PUT", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.update" call.
- // Exactly one of *Hold or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Hold.ServerResponse.Header or (if a response was returned at all) in
- // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
- // whether the returned error was because http.StatusNotModified was
- // returned.
- func (c *MattersHoldsUpdateCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Hold{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Updates the OU and/or query parameters of a hold. You cannot add accounts\nto a hold that covers an OU, nor can you add OUs to a hold that covers\nindividual accounts. Accounts listed in the hold will be ignored.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}",
- // "httpMethod": "PUT",
- // "id": "vault.matters.holds.update",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The ID of the hold.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}",
- // "request": {
- // "$ref": "Hold"
- // },
- // "response": {
- // "$ref": "Hold"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.accounts.create":
-
- type MattersHoldsAccountsCreateCall struct {
- s *Service
- matterId string
- holdId string
- heldaccount *HeldAccount
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Adds a HeldAccount to a hold. Accounts can only be added to a
- // hold that
- // has no held_org_unit set. Attempting to add an account to an
- // OU-based
- // hold will result in an error.
- func (r *MattersHoldsAccountsService) Create(matterId string, holdId string, heldaccount *HeldAccount) *MattersHoldsAccountsCreateCall {
- c := &MattersHoldsAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- c.heldaccount = heldaccount
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsAccountsCreateCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsAccountsCreateCall) Context(ctx context.Context) *MattersHoldsAccountsCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsAccountsCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsAccountsCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.heldaccount)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.accounts.create" call.
- // Exactly one of *HeldAccount or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *HeldAccount.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *MattersHoldsAccountsCreateCall) Do(opts ...googleapi.CallOption) (*HeldAccount, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &HeldAccount{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Adds a HeldAccount to a hold. Accounts can only be added to a hold that\nhas no held_org_unit set. Attempting to add an account to an OU-based\nhold will result in an error.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts",
- // "httpMethod": "POST",
- // "id": "vault.matters.holds.accounts.create",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}/accounts",
- // "request": {
- // "$ref": "HeldAccount"
- // },
- // "response": {
- // "$ref": "HeldAccount"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.accounts.delete":
-
- type MattersHoldsAccountsDeleteCall struct {
- s *Service
- matterId string
- holdId string
- accountId string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Removes a HeldAccount from a hold. If this request leaves the
- // hold with
- // no held accounts, the hold will not apply to any accounts.
- func (r *MattersHoldsAccountsService) Delete(matterId string, holdId string, accountId string) *MattersHoldsAccountsDeleteCall {
- c := &MattersHoldsAccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- c.accountId = accountId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsAccountsDeleteCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsAccountsDeleteCall) Context(ctx context.Context) *MattersHoldsAccountsDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsAccountsDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsAccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- "accountId": c.accountId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.accounts.delete" call.
- // Exactly one of *Empty or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Empty.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersHoldsAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Empty{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Removes a HeldAccount from a hold. If this request leaves the hold with\nno held accounts, the hold will not apply to any accounts.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}",
- // "httpMethod": "DELETE",
- // "id": "vault.matters.holds.accounts.delete",
- // "parameterOrder": [
- // "matterId",
- // "holdId",
- // "accountId"
- // ],
- // "parameters": {
- // "accountId": {
- // "description": "The ID of the account to remove from the hold.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}",
- // "response": {
- // "$ref": "Empty"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.holds.accounts.list":
-
- type MattersHoldsAccountsListCall struct {
- s *Service
- matterId string
- holdId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists HeldAccounts for a hold. This will only list individually
- // specified
- // held accounts. If the hold is on an OU, then use
- // <a href="https://developers.google.com/admin-sdk/">Admin SDK</a>
- // to enumerate its members.
- func (r *MattersHoldsAccountsService) List(matterId string, holdId string) *MattersHoldsAccountsListCall {
- c := &MattersHoldsAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.holdId = holdId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersHoldsAccountsListCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersHoldsAccountsListCall) IfNoneMatch(entityTag string) *MattersHoldsAccountsListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersHoldsAccountsListCall) Context(ctx context.Context) *MattersHoldsAccountsListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersHoldsAccountsListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersHoldsAccountsListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "holdId": c.holdId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.holds.accounts.list" call.
- // Exactly one of *ListHeldAccountsResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *ListHeldAccountsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersHoldsAccountsListCall) Do(opts ...googleapi.CallOption) (*ListHeldAccountsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListHeldAccountsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.",
- // "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts",
- // "httpMethod": "GET",
- // "id": "vault.matters.holds.accounts.list",
- // "parameterOrder": [
- // "matterId",
- // "holdId"
- // ],
- // "parameters": {
- // "holdId": {
- // "description": "The hold ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "matterId": {
- // "description": "The matter ID.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/holds/{holdId}/accounts",
- // "response": {
- // "$ref": "ListHeldAccountsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // method id "vault.matters.savedQueries.create":
-
- type MattersSavedQueriesCreateCall struct {
- s *Service
- matterId string
- savedquery *SavedQuery
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Create: Creates a saved query.
- func (r *MattersSavedQueriesService) Create(matterId string, savedquery *SavedQuery) *MattersSavedQueriesCreateCall {
- c := &MattersSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.savedquery = savedquery
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersSavedQueriesCreateCall) Fields(s ...googleapi.Field) *MattersSavedQueriesCreateCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersSavedQueriesCreateCall) Context(ctx context.Context) *MattersSavedQueriesCreateCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersSavedQueriesCreateCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.savedQueries.create" call.
- // Exactly one of *SavedQuery or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *SavedQuery.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *MattersSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &SavedQuery{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a saved query.",
- // "flatPath": "v1/matters/{matterId}/savedQueries",
- // "httpMethod": "POST",
- // "id": "vault.matters.savedQueries.create",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter id of the parent matter for which the saved query is to be\ncreated.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/savedQueries",
- // "request": {
- // "$ref": "SavedQuery"
- // },
- // "response": {
- // "$ref": "SavedQuery"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.savedQueries.delete":
-
- type MattersSavedQueriesDeleteCall struct {
- s *Service
- matterId string
- savedQueryId string
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Delete: Deletes a saved query by Id.
- func (r *MattersSavedQueriesService) Delete(matterId string, savedQueryId string) *MattersSavedQueriesDeleteCall {
- c := &MattersSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.savedQueryId = savedQueryId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *MattersSavedQueriesDeleteCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersSavedQueriesDeleteCall) Context(ctx context.Context) *MattersSavedQueriesDeleteCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersSavedQueriesDeleteCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries/{savedQueryId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "savedQueryId": c.savedQueryId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.savedQueries.delete" call.
- // Exactly one of *Empty or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Empty.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *MattersSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Empty{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Deletes a saved query by Id.",
- // "flatPath": "v1/matters/{matterId}/savedQueries/{savedQueryId}",
- // "httpMethod": "DELETE",
- // "id": "vault.matters.savedQueries.delete",
- // "parameterOrder": [
- // "matterId",
- // "savedQueryId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter id of the parent matter for which the saved query is to be\ndeleted.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "savedQueryId": {
- // "description": "Id of the saved query to be deleted.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/savedQueries/{savedQueryId}",
- // "response": {
- // "$ref": "Empty"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery"
- // ]
- // }
-
- }
-
- // method id "vault.matters.savedQueries.get":
-
- type MattersSavedQueriesGetCall struct {
- s *Service
- matterId string
- savedQueryId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Get: Retrieves a saved query by Id.
- func (r *MattersSavedQueriesService) Get(matterId string, savedQueryId string) *MattersSavedQueriesGetCall {
- c := &MattersSavedQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- c.savedQueryId = savedQueryId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersSavedQueriesGetCall) Fields(s ...googleapi.Field) *MattersSavedQueriesGetCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersSavedQueriesGetCall) IfNoneMatch(entityTag string) *MattersSavedQueriesGetCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersSavedQueriesGetCall) Context(ctx context.Context) *MattersSavedQueriesGetCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersSavedQueriesGetCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries/{savedQueryId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- "savedQueryId": c.savedQueryId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.savedQueries.get" call.
- // Exactly one of *SavedQuery or error will be non-nil. Any non-2xx
- // status code is an error. Response headers are in either
- // *SavedQuery.ServerResponse.Header or (if a response was returned at
- // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
- // to check whether the returned error was because
- // http.StatusNotModified was returned.
- func (c *MattersSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &SavedQuery{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves a saved query by Id.",
- // "flatPath": "v1/matters/{matterId}/savedQueries/{savedQueryId}",
- // "httpMethod": "GET",
- // "id": "vault.matters.savedQueries.get",
- // "parameterOrder": [
- // "matterId",
- // "savedQueryId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter id of the parent matter for which the saved query is to be\nretrieved.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "savedQueryId": {
- // "description": "Id of the saved query to be retrieved.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/savedQueries/{savedQueryId}",
- // "response": {
- // "$ref": "SavedQuery"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // method id "vault.matters.savedQueries.list":
-
- type MattersSavedQueriesListCall struct {
- s *Service
- matterId string
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // List: Lists saved queries within a matter. An empty page token
- // in
- // ListSavedQueriesResponse denotes no more saved queries to list.
- func (r *MattersSavedQueriesService) List(matterId string) *MattersSavedQueriesListCall {
- c := &MattersSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.matterId = matterId
- return c
- }
-
- // PageSize sets the optional parameter "pageSize": The maximum number
- // of saved queries to return.
- func (c *MattersSavedQueriesListCall) PageSize(pageSize int64) *MattersSavedQueriesListCall {
- c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
- return c
- }
-
- // PageToken sets the optional parameter "pageToken": The pagination
- // token as returned in the previous response.
- // An empty token means start from the beginning.
- func (c *MattersSavedQueriesListCall) PageToken(pageToken string) *MattersSavedQueriesListCall {
- c.urlParams_.Set("pageToken", pageToken)
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *MattersSavedQueriesListCall) Fields(s ...googleapi.Field) *MattersSavedQueriesListCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *MattersSavedQueriesListCall) IfNoneMatch(entityTag string) *MattersSavedQueriesListCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *MattersSavedQueriesListCall) Context(ctx context.Context) *MattersSavedQueriesListCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *MattersSavedQueriesListCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *MattersSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "matterId": c.matterId,
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "vault.matters.savedQueries.list" call.
- // Exactly one of *ListSavedQueriesResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *MattersSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListSavedQueriesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Lists saved queries within a matter. An empty page token in\nListSavedQueriesResponse denotes no more saved queries to list.",
- // "flatPath": "v1/matters/{matterId}/savedQueries",
- // "httpMethod": "GET",
- // "id": "vault.matters.savedQueries.list",
- // "parameterOrder": [
- // "matterId"
- // ],
- // "parameters": {
- // "matterId": {
- // "description": "The matter id of the parent matter for which the saved queries are to be\nretrieved.",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // },
- // "pageSize": {
- // "description": "The maximum number of saved queries to return.",
- // "format": "int32",
- // "location": "query",
- // "type": "integer"
- // },
- // "pageToken": {
- // "description": "The pagination token as returned in the previous response.\nAn empty token means start from the beginning.",
- // "location": "query",
- // "type": "string"
- // }
- // },
- // "path": "v1/matters/{matterId}/savedQueries",
- // "response": {
- // "$ref": "ListSavedQueriesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/ediscovery",
- // "https://www.googleapis.com/auth/ediscovery.readonly"
- // ]
- // }
-
- }
-
- // Pages invokes f for each page of results.
- // A non-nil error returned from f will halt the iteration.
- // The provided context supersedes any context provided to the Context method.
- func (c *MattersSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
- c.ctx_ = ctx
- defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
- for {
- x, err := c.Do()
- if err != nil {
- return err
- }
- if err := f(x); err != nil {
- return err
- }
- if x.NextPageToken == "" {
- return nil
- }
- c.PageToken(x.NextPageToken)
- }
- }
|