api.go 349 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package workdocs
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opAbortDocumentVersionUpload = "AbortDocumentVersionUpload"
  13. // AbortDocumentVersionUploadRequest generates a "aws/request.Request" representing the
  14. // client's request for the AbortDocumentVersionUpload operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AbortDocumentVersionUpload for more information on using the AbortDocumentVersionUpload
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the AbortDocumentVersionUploadRequest method.
  29. // req, resp := client.AbortDocumentVersionUploadRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload
  37. func (c *WorkDocs) AbortDocumentVersionUploadRequest(input *AbortDocumentVersionUploadInput) (req *request.Request, output *AbortDocumentVersionUploadOutput) {
  38. op := &request.Operation{
  39. Name: opAbortDocumentVersionUpload,
  40. HTTPMethod: "DELETE",
  41. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
  42. }
  43. if input == nil {
  44. input = &AbortDocumentVersionUploadInput{}
  45. }
  46. output = &AbortDocumentVersionUploadOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // AbortDocumentVersionUpload API operation for Amazon WorkDocs.
  52. //
  53. // Aborts the upload of the specified document version that was previously initiated
  54. // by InitiateDocumentVersionUpload. The client should make this call only when
  55. // it no longer intends to upload the document version, or fails to do so.
  56. //
  57. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  58. // with awserr.Error's Code and Message methods to get detailed information about
  59. // the error.
  60. //
  61. // See the AWS API reference guide for Amazon WorkDocs's
  62. // API operation AbortDocumentVersionUpload for usage and error information.
  63. //
  64. // Returned Error Codes:
  65. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  66. // The resource does not exist.
  67. //
  68. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  69. // The specified document version is not in the INITIALIZED state.
  70. //
  71. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  72. // The operation is not permitted.
  73. //
  74. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  75. // The caller does not have access to perform the action on the resource.
  76. //
  77. // * ErrCodeFailedDependencyException "FailedDependencyException"
  78. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  79. // under the control of the organization is failing, such as a connected Active
  80. // Directory.
  81. //
  82. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  83. // One or more of the dependencies is unavailable.
  84. //
  85. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload
  86. func (c *WorkDocs) AbortDocumentVersionUpload(input *AbortDocumentVersionUploadInput) (*AbortDocumentVersionUploadOutput, error) {
  87. req, out := c.AbortDocumentVersionUploadRequest(input)
  88. return out, req.Send()
  89. }
  90. // AbortDocumentVersionUploadWithContext is the same as AbortDocumentVersionUpload with the addition of
  91. // the ability to pass a context and additional request options.
  92. //
  93. // See AbortDocumentVersionUpload for details on how to use this API operation.
  94. //
  95. // The context must be non-nil and will be used for request cancellation. If
  96. // the context is nil a panic will occur. In the future the SDK may create
  97. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  98. // for more information on using Contexts.
  99. func (c *WorkDocs) AbortDocumentVersionUploadWithContext(ctx aws.Context, input *AbortDocumentVersionUploadInput, opts ...request.Option) (*AbortDocumentVersionUploadOutput, error) {
  100. req, out := c.AbortDocumentVersionUploadRequest(input)
  101. req.SetContext(ctx)
  102. req.ApplyOptions(opts...)
  103. return out, req.Send()
  104. }
  105. const opActivateUser = "ActivateUser"
  106. // ActivateUserRequest generates a "aws/request.Request" representing the
  107. // client's request for the ActivateUser operation. The "output" return
  108. // value will be populated with the request's response once the request completes
  109. // successfully.
  110. //
  111. // Use "Send" method on the returned Request to send the API call to the service.
  112. // the "output" return value is not valid until after Send returns without error.
  113. //
  114. // See ActivateUser for more information on using the ActivateUser
  115. // API call, and error handling.
  116. //
  117. // This method is useful when you want to inject custom logic or configuration
  118. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  119. //
  120. //
  121. // // Example sending a request using the ActivateUserRequest method.
  122. // req, resp := client.ActivateUserRequest(params)
  123. //
  124. // err := req.Send()
  125. // if err == nil { // resp is now filled
  126. // fmt.Println(resp)
  127. // }
  128. //
  129. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser
  130. func (c *WorkDocs) ActivateUserRequest(input *ActivateUserInput) (req *request.Request, output *ActivateUserOutput) {
  131. op := &request.Operation{
  132. Name: opActivateUser,
  133. HTTPMethod: "POST",
  134. HTTPPath: "/api/v1/users/{UserId}/activation",
  135. }
  136. if input == nil {
  137. input = &ActivateUserInput{}
  138. }
  139. output = &ActivateUserOutput{}
  140. req = c.newRequest(op, input, output)
  141. return
  142. }
  143. // ActivateUser API operation for Amazon WorkDocs.
  144. //
  145. // Activates the specified user. Only active users can access Amazon WorkDocs.
  146. //
  147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  148. // with awserr.Error's Code and Message methods to get detailed information about
  149. // the error.
  150. //
  151. // See the AWS API reference guide for Amazon WorkDocs's
  152. // API operation ActivateUser for usage and error information.
  153. //
  154. // Returned Error Codes:
  155. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  156. // The resource does not exist.
  157. //
  158. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  159. // The operation is not permitted.
  160. //
  161. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  162. // The caller does not have access to perform the action on the resource.
  163. //
  164. // * ErrCodeFailedDependencyException "FailedDependencyException"
  165. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  166. // under the control of the organization is failing, such as a connected Active
  167. // Directory.
  168. //
  169. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  170. // One or more of the dependencies is unavailable.
  171. //
  172. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser
  173. func (c *WorkDocs) ActivateUser(input *ActivateUserInput) (*ActivateUserOutput, error) {
  174. req, out := c.ActivateUserRequest(input)
  175. return out, req.Send()
  176. }
  177. // ActivateUserWithContext is the same as ActivateUser with the addition of
  178. // the ability to pass a context and additional request options.
  179. //
  180. // See ActivateUser for details on how to use this API operation.
  181. //
  182. // The context must be non-nil and will be used for request cancellation. If
  183. // the context is nil a panic will occur. In the future the SDK may create
  184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  185. // for more information on using Contexts.
  186. func (c *WorkDocs) ActivateUserWithContext(ctx aws.Context, input *ActivateUserInput, opts ...request.Option) (*ActivateUserOutput, error) {
  187. req, out := c.ActivateUserRequest(input)
  188. req.SetContext(ctx)
  189. req.ApplyOptions(opts...)
  190. return out, req.Send()
  191. }
  192. const opAddResourcePermissions = "AddResourcePermissions"
  193. // AddResourcePermissionsRequest generates a "aws/request.Request" representing the
  194. // client's request for the AddResourcePermissions operation. The "output" return
  195. // value will be populated with the request's response once the request completes
  196. // successfully.
  197. //
  198. // Use "Send" method on the returned Request to send the API call to the service.
  199. // the "output" return value is not valid until after Send returns without error.
  200. //
  201. // See AddResourcePermissions for more information on using the AddResourcePermissions
  202. // API call, and error handling.
  203. //
  204. // This method is useful when you want to inject custom logic or configuration
  205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  206. //
  207. //
  208. // // Example sending a request using the AddResourcePermissionsRequest method.
  209. // req, resp := client.AddResourcePermissionsRequest(params)
  210. //
  211. // err := req.Send()
  212. // if err == nil { // resp is now filled
  213. // fmt.Println(resp)
  214. // }
  215. //
  216. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions
  217. func (c *WorkDocs) AddResourcePermissionsRequest(input *AddResourcePermissionsInput) (req *request.Request, output *AddResourcePermissionsOutput) {
  218. op := &request.Operation{
  219. Name: opAddResourcePermissions,
  220. HTTPMethod: "POST",
  221. HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
  222. }
  223. if input == nil {
  224. input = &AddResourcePermissionsInput{}
  225. }
  226. output = &AddResourcePermissionsOutput{}
  227. req = c.newRequest(op, input, output)
  228. return
  229. }
  230. // AddResourcePermissions API operation for Amazon WorkDocs.
  231. //
  232. // Creates a set of permissions for the specified folder or document. The resource
  233. // permissions are overwritten if the principals already have different permissions.
  234. //
  235. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  236. // with awserr.Error's Code and Message methods to get detailed information about
  237. // the error.
  238. //
  239. // See the AWS API reference guide for Amazon WorkDocs's
  240. // API operation AddResourcePermissions for usage and error information.
  241. //
  242. // Returned Error Codes:
  243. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  244. // The operation is not permitted.
  245. //
  246. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  247. // The caller does not have access to perform the action on the resource.
  248. //
  249. // * ErrCodeFailedDependencyException "FailedDependencyException"
  250. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  251. // under the control of the organization is failing, such as a connected Active
  252. // Directory.
  253. //
  254. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  255. // One or more of the dependencies is unavailable.
  256. //
  257. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions
  258. func (c *WorkDocs) AddResourcePermissions(input *AddResourcePermissionsInput) (*AddResourcePermissionsOutput, error) {
  259. req, out := c.AddResourcePermissionsRequest(input)
  260. return out, req.Send()
  261. }
  262. // AddResourcePermissionsWithContext is the same as AddResourcePermissions with the addition of
  263. // the ability to pass a context and additional request options.
  264. //
  265. // See AddResourcePermissions for details on how to use this API operation.
  266. //
  267. // The context must be non-nil and will be used for request cancellation. If
  268. // the context is nil a panic will occur. In the future the SDK may create
  269. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  270. // for more information on using Contexts.
  271. func (c *WorkDocs) AddResourcePermissionsWithContext(ctx aws.Context, input *AddResourcePermissionsInput, opts ...request.Option) (*AddResourcePermissionsOutput, error) {
  272. req, out := c.AddResourcePermissionsRequest(input)
  273. req.SetContext(ctx)
  274. req.ApplyOptions(opts...)
  275. return out, req.Send()
  276. }
  277. const opCreateComment = "CreateComment"
  278. // CreateCommentRequest generates a "aws/request.Request" representing the
  279. // client's request for the CreateComment operation. The "output" return
  280. // value will be populated with the request's response once the request completes
  281. // successfully.
  282. //
  283. // Use "Send" method on the returned Request to send the API call to the service.
  284. // the "output" return value is not valid until after Send returns without error.
  285. //
  286. // See CreateComment for more information on using the CreateComment
  287. // API call, and error handling.
  288. //
  289. // This method is useful when you want to inject custom logic or configuration
  290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  291. //
  292. //
  293. // // Example sending a request using the CreateCommentRequest method.
  294. // req, resp := client.CreateCommentRequest(params)
  295. //
  296. // err := req.Send()
  297. // if err == nil { // resp is now filled
  298. // fmt.Println(resp)
  299. // }
  300. //
  301. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment
  302. func (c *WorkDocs) CreateCommentRequest(input *CreateCommentInput) (req *request.Request, output *CreateCommentOutput) {
  303. op := &request.Operation{
  304. Name: opCreateComment,
  305. HTTPMethod: "POST",
  306. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment",
  307. }
  308. if input == nil {
  309. input = &CreateCommentInput{}
  310. }
  311. output = &CreateCommentOutput{}
  312. req = c.newRequest(op, input, output)
  313. return
  314. }
  315. // CreateComment API operation for Amazon WorkDocs.
  316. //
  317. // Adds a new comment to the specified document version.
  318. //
  319. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  320. // with awserr.Error's Code and Message methods to get detailed information about
  321. // the error.
  322. //
  323. // See the AWS API reference guide for Amazon WorkDocs's
  324. // API operation CreateComment for usage and error information.
  325. //
  326. // Returned Error Codes:
  327. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  328. // The resource does not exist.
  329. //
  330. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  331. // The specified document version is not in the INITIALIZED state.
  332. //
  333. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  334. // The operation is not permitted.
  335. //
  336. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  337. // The caller does not have access to perform the action on the resource.
  338. //
  339. // * ErrCodeFailedDependencyException "FailedDependencyException"
  340. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  341. // under the control of the organization is failing, such as a connected Active
  342. // Directory.
  343. //
  344. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  345. // One or more of the dependencies is unavailable.
  346. //
  347. // * ErrCodeDocumentLockedForCommentsException "DocumentLockedForCommentsException"
  348. // This exception is thrown when the document is locked for comments and user
  349. // tries to create or delete a comment on that document.
  350. //
  351. // * ErrCodeInvalidCommentOperationException "InvalidCommentOperationException"
  352. // The requested operation is not allowed on the specified comment object.
  353. //
  354. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment
  355. func (c *WorkDocs) CreateComment(input *CreateCommentInput) (*CreateCommentOutput, error) {
  356. req, out := c.CreateCommentRequest(input)
  357. return out, req.Send()
  358. }
  359. // CreateCommentWithContext is the same as CreateComment with the addition of
  360. // the ability to pass a context and additional request options.
  361. //
  362. // See CreateComment for details on how to use this API operation.
  363. //
  364. // The context must be non-nil and will be used for request cancellation. If
  365. // the context is nil a panic will occur. In the future the SDK may create
  366. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  367. // for more information on using Contexts.
  368. func (c *WorkDocs) CreateCommentWithContext(ctx aws.Context, input *CreateCommentInput, opts ...request.Option) (*CreateCommentOutput, error) {
  369. req, out := c.CreateCommentRequest(input)
  370. req.SetContext(ctx)
  371. req.ApplyOptions(opts...)
  372. return out, req.Send()
  373. }
  374. const opCreateCustomMetadata = "CreateCustomMetadata"
  375. // CreateCustomMetadataRequest generates a "aws/request.Request" representing the
  376. // client's request for the CreateCustomMetadata operation. The "output" return
  377. // value will be populated with the request's response once the request completes
  378. // successfully.
  379. //
  380. // Use "Send" method on the returned Request to send the API call to the service.
  381. // the "output" return value is not valid until after Send returns without error.
  382. //
  383. // See CreateCustomMetadata for more information on using the CreateCustomMetadata
  384. // API call, and error handling.
  385. //
  386. // This method is useful when you want to inject custom logic or configuration
  387. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  388. //
  389. //
  390. // // Example sending a request using the CreateCustomMetadataRequest method.
  391. // req, resp := client.CreateCustomMetadataRequest(params)
  392. //
  393. // err := req.Send()
  394. // if err == nil { // resp is now filled
  395. // fmt.Println(resp)
  396. // }
  397. //
  398. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata
  399. func (c *WorkDocs) CreateCustomMetadataRequest(input *CreateCustomMetadataInput) (req *request.Request, output *CreateCustomMetadataOutput) {
  400. op := &request.Operation{
  401. Name: opCreateCustomMetadata,
  402. HTTPMethod: "PUT",
  403. HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
  404. }
  405. if input == nil {
  406. input = &CreateCustomMetadataInput{}
  407. }
  408. output = &CreateCustomMetadataOutput{}
  409. req = c.newRequest(op, input, output)
  410. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  411. return
  412. }
  413. // CreateCustomMetadata API operation for Amazon WorkDocs.
  414. //
  415. // Adds one or more custom properties to the specified resource (a folder, document,
  416. // or version).
  417. //
  418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  419. // with awserr.Error's Code and Message methods to get detailed information about
  420. // the error.
  421. //
  422. // See the AWS API reference guide for Amazon WorkDocs's
  423. // API operation CreateCustomMetadata for usage and error information.
  424. //
  425. // Returned Error Codes:
  426. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  427. // The resource does not exist.
  428. //
  429. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  430. // The operation is not permitted.
  431. //
  432. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  433. // The caller does not have access to perform the action on the resource.
  434. //
  435. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  436. // The specified document version is not in the INITIALIZED state.
  437. //
  438. // * ErrCodeCustomMetadataLimitExceededException "CustomMetadataLimitExceededException"
  439. // The limit has been reached on the number of custom properties for the specified
  440. // resource.
  441. //
  442. // * ErrCodeFailedDependencyException "FailedDependencyException"
  443. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  444. // under the control of the organization is failing, such as a connected Active
  445. // Directory.
  446. //
  447. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  448. // One or more of the dependencies is unavailable.
  449. //
  450. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata
  451. func (c *WorkDocs) CreateCustomMetadata(input *CreateCustomMetadataInput) (*CreateCustomMetadataOutput, error) {
  452. req, out := c.CreateCustomMetadataRequest(input)
  453. return out, req.Send()
  454. }
  455. // CreateCustomMetadataWithContext is the same as CreateCustomMetadata with the addition of
  456. // the ability to pass a context and additional request options.
  457. //
  458. // See CreateCustomMetadata for details on how to use this API operation.
  459. //
  460. // The context must be non-nil and will be used for request cancellation. If
  461. // the context is nil a panic will occur. In the future the SDK may create
  462. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  463. // for more information on using Contexts.
  464. func (c *WorkDocs) CreateCustomMetadataWithContext(ctx aws.Context, input *CreateCustomMetadataInput, opts ...request.Option) (*CreateCustomMetadataOutput, error) {
  465. req, out := c.CreateCustomMetadataRequest(input)
  466. req.SetContext(ctx)
  467. req.ApplyOptions(opts...)
  468. return out, req.Send()
  469. }
  470. const opCreateFolder = "CreateFolder"
  471. // CreateFolderRequest generates a "aws/request.Request" representing the
  472. // client's request for the CreateFolder operation. The "output" return
  473. // value will be populated with the request's response once the request completes
  474. // successfully.
  475. //
  476. // Use "Send" method on the returned Request to send the API call to the service.
  477. // the "output" return value is not valid until after Send returns without error.
  478. //
  479. // See CreateFolder for more information on using the CreateFolder
  480. // API call, and error handling.
  481. //
  482. // This method is useful when you want to inject custom logic or configuration
  483. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  484. //
  485. //
  486. // // Example sending a request using the CreateFolderRequest method.
  487. // req, resp := client.CreateFolderRequest(params)
  488. //
  489. // err := req.Send()
  490. // if err == nil { // resp is now filled
  491. // fmt.Println(resp)
  492. // }
  493. //
  494. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder
  495. func (c *WorkDocs) CreateFolderRequest(input *CreateFolderInput) (req *request.Request, output *CreateFolderOutput) {
  496. op := &request.Operation{
  497. Name: opCreateFolder,
  498. HTTPMethod: "POST",
  499. HTTPPath: "/api/v1/folders",
  500. }
  501. if input == nil {
  502. input = &CreateFolderInput{}
  503. }
  504. output = &CreateFolderOutput{}
  505. req = c.newRequest(op, input, output)
  506. return
  507. }
  508. // CreateFolder API operation for Amazon WorkDocs.
  509. //
  510. // Creates a folder with the specified name and parent folder.
  511. //
  512. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  513. // with awserr.Error's Code and Message methods to get detailed information about
  514. // the error.
  515. //
  516. // See the AWS API reference guide for Amazon WorkDocs's
  517. // API operation CreateFolder for usage and error information.
  518. //
  519. // Returned Error Codes:
  520. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  521. // The resource does not exist.
  522. //
  523. // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
  524. // The resource already exists.
  525. //
  526. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  527. // The specified document version is not in the INITIALIZED state.
  528. //
  529. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  530. // Another operation is in progress on the resource that conflicts with the
  531. // current operation.
  532. //
  533. // * ErrCodeLimitExceededException "LimitExceededException"
  534. // The maximum of 100,000 folders under the parent folder has been exceeded.
  535. //
  536. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  537. // The operation is not permitted.
  538. //
  539. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  540. // The caller does not have access to perform the action on the resource.
  541. //
  542. // * ErrCodeFailedDependencyException "FailedDependencyException"
  543. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  544. // under the control of the organization is failing, such as a connected Active
  545. // Directory.
  546. //
  547. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  548. // One or more of the dependencies is unavailable.
  549. //
  550. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder
  551. func (c *WorkDocs) CreateFolder(input *CreateFolderInput) (*CreateFolderOutput, error) {
  552. req, out := c.CreateFolderRequest(input)
  553. return out, req.Send()
  554. }
  555. // CreateFolderWithContext is the same as CreateFolder with the addition of
  556. // the ability to pass a context and additional request options.
  557. //
  558. // See CreateFolder for details on how to use this API operation.
  559. //
  560. // The context must be non-nil and will be used for request cancellation. If
  561. // the context is nil a panic will occur. In the future the SDK may create
  562. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  563. // for more information on using Contexts.
  564. func (c *WorkDocs) CreateFolderWithContext(ctx aws.Context, input *CreateFolderInput, opts ...request.Option) (*CreateFolderOutput, error) {
  565. req, out := c.CreateFolderRequest(input)
  566. req.SetContext(ctx)
  567. req.ApplyOptions(opts...)
  568. return out, req.Send()
  569. }
  570. const opCreateLabels = "CreateLabels"
  571. // CreateLabelsRequest generates a "aws/request.Request" representing the
  572. // client's request for the CreateLabels operation. The "output" return
  573. // value will be populated with the request's response once the request completes
  574. // successfully.
  575. //
  576. // Use "Send" method on the returned Request to send the API call to the service.
  577. // the "output" return value is not valid until after Send returns without error.
  578. //
  579. // See CreateLabels for more information on using the CreateLabels
  580. // API call, and error handling.
  581. //
  582. // This method is useful when you want to inject custom logic or configuration
  583. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  584. //
  585. //
  586. // // Example sending a request using the CreateLabelsRequest method.
  587. // req, resp := client.CreateLabelsRequest(params)
  588. //
  589. // err := req.Send()
  590. // if err == nil { // resp is now filled
  591. // fmt.Println(resp)
  592. // }
  593. //
  594. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels
  595. func (c *WorkDocs) CreateLabelsRequest(input *CreateLabelsInput) (req *request.Request, output *CreateLabelsOutput) {
  596. op := &request.Operation{
  597. Name: opCreateLabels,
  598. HTTPMethod: "PUT",
  599. HTTPPath: "/api/v1/resources/{ResourceId}/labels",
  600. }
  601. if input == nil {
  602. input = &CreateLabelsInput{}
  603. }
  604. output = &CreateLabelsOutput{}
  605. req = c.newRequest(op, input, output)
  606. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  607. return
  608. }
  609. // CreateLabels API operation for Amazon WorkDocs.
  610. //
  611. // Adds the specified list of labels to the given resource (a document or folder)
  612. //
  613. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  614. // with awserr.Error's Code and Message methods to get detailed information about
  615. // the error.
  616. //
  617. // See the AWS API reference guide for Amazon WorkDocs's
  618. // API operation CreateLabels for usage and error information.
  619. //
  620. // Returned Error Codes:
  621. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  622. // The resource does not exist.
  623. //
  624. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  625. // The operation is not permitted.
  626. //
  627. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  628. // The caller does not have access to perform the action on the resource.
  629. //
  630. // * ErrCodeFailedDependencyException "FailedDependencyException"
  631. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  632. // under the control of the organization is failing, such as a connected Active
  633. // Directory.
  634. //
  635. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  636. // One or more of the dependencies is unavailable.
  637. //
  638. // * ErrCodeTooManyLabelsException "TooManyLabelsException"
  639. // The limit has been reached on the number of labels for the specified resource.
  640. //
  641. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels
  642. func (c *WorkDocs) CreateLabels(input *CreateLabelsInput) (*CreateLabelsOutput, error) {
  643. req, out := c.CreateLabelsRequest(input)
  644. return out, req.Send()
  645. }
  646. // CreateLabelsWithContext is the same as CreateLabels with the addition of
  647. // the ability to pass a context and additional request options.
  648. //
  649. // See CreateLabels for details on how to use this API operation.
  650. //
  651. // The context must be non-nil and will be used for request cancellation. If
  652. // the context is nil a panic will occur. In the future the SDK may create
  653. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  654. // for more information on using Contexts.
  655. func (c *WorkDocs) CreateLabelsWithContext(ctx aws.Context, input *CreateLabelsInput, opts ...request.Option) (*CreateLabelsOutput, error) {
  656. req, out := c.CreateLabelsRequest(input)
  657. req.SetContext(ctx)
  658. req.ApplyOptions(opts...)
  659. return out, req.Send()
  660. }
  661. const opCreateNotificationSubscription = "CreateNotificationSubscription"
  662. // CreateNotificationSubscriptionRequest generates a "aws/request.Request" representing the
  663. // client's request for the CreateNotificationSubscription operation. The "output" return
  664. // value will be populated with the request's response once the request completes
  665. // successfully.
  666. //
  667. // Use "Send" method on the returned Request to send the API call to the service.
  668. // the "output" return value is not valid until after Send returns without error.
  669. //
  670. // See CreateNotificationSubscription for more information on using the CreateNotificationSubscription
  671. // API call, and error handling.
  672. //
  673. // This method is useful when you want to inject custom logic or configuration
  674. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  675. //
  676. //
  677. // // Example sending a request using the CreateNotificationSubscriptionRequest method.
  678. // req, resp := client.CreateNotificationSubscriptionRequest(params)
  679. //
  680. // err := req.Send()
  681. // if err == nil { // resp is now filled
  682. // fmt.Println(resp)
  683. // }
  684. //
  685. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription
  686. func (c *WorkDocs) CreateNotificationSubscriptionRequest(input *CreateNotificationSubscriptionInput) (req *request.Request, output *CreateNotificationSubscriptionOutput) {
  687. op := &request.Operation{
  688. Name: opCreateNotificationSubscription,
  689. HTTPMethod: "POST",
  690. HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions",
  691. }
  692. if input == nil {
  693. input = &CreateNotificationSubscriptionInput{}
  694. }
  695. output = &CreateNotificationSubscriptionOutput{}
  696. req = c.newRequest(op, input, output)
  697. return
  698. }
  699. // CreateNotificationSubscription API operation for Amazon WorkDocs.
  700. //
  701. // Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives
  702. // a confirmation message, and must confirm the subscription.
  703. //
  704. // For more information, see Subscribe to Notifications (http://docs.aws.amazon.com/workdocs/latest/developerguide/subscribe-notifications.html)
  705. // in the Amazon WorkDocs Developer Guide.
  706. //
  707. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  708. // with awserr.Error's Code and Message methods to get detailed information about
  709. // the error.
  710. //
  711. // See the AWS API reference guide for Amazon WorkDocs's
  712. // API operation CreateNotificationSubscription for usage and error information.
  713. //
  714. // Returned Error Codes:
  715. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  716. // The caller does not have access to perform the action on the resource.
  717. //
  718. // * ErrCodeTooManySubscriptionsException "TooManySubscriptionsException"
  719. // You've reached the limit on the number of subscriptions for the WorkDocs
  720. // instance.
  721. //
  722. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  723. // One or more of the dependencies is unavailable.
  724. //
  725. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription
  726. func (c *WorkDocs) CreateNotificationSubscription(input *CreateNotificationSubscriptionInput) (*CreateNotificationSubscriptionOutput, error) {
  727. req, out := c.CreateNotificationSubscriptionRequest(input)
  728. return out, req.Send()
  729. }
  730. // CreateNotificationSubscriptionWithContext is the same as CreateNotificationSubscription with the addition of
  731. // the ability to pass a context and additional request options.
  732. //
  733. // See CreateNotificationSubscription for details on how to use this API operation.
  734. //
  735. // The context must be non-nil and will be used for request cancellation. If
  736. // the context is nil a panic will occur. In the future the SDK may create
  737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  738. // for more information on using Contexts.
  739. func (c *WorkDocs) CreateNotificationSubscriptionWithContext(ctx aws.Context, input *CreateNotificationSubscriptionInput, opts ...request.Option) (*CreateNotificationSubscriptionOutput, error) {
  740. req, out := c.CreateNotificationSubscriptionRequest(input)
  741. req.SetContext(ctx)
  742. req.ApplyOptions(opts...)
  743. return out, req.Send()
  744. }
  745. const opCreateUser = "CreateUser"
  746. // CreateUserRequest generates a "aws/request.Request" representing the
  747. // client's request for the CreateUser operation. The "output" return
  748. // value will be populated with the request's response once the request completes
  749. // successfully.
  750. //
  751. // Use "Send" method on the returned Request to send the API call to the service.
  752. // the "output" return value is not valid until after Send returns without error.
  753. //
  754. // See CreateUser for more information on using the CreateUser
  755. // API call, and error handling.
  756. //
  757. // This method is useful when you want to inject custom logic or configuration
  758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  759. //
  760. //
  761. // // Example sending a request using the CreateUserRequest method.
  762. // req, resp := client.CreateUserRequest(params)
  763. //
  764. // err := req.Send()
  765. // if err == nil { // resp is now filled
  766. // fmt.Println(resp)
  767. // }
  768. //
  769. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser
  770. func (c *WorkDocs) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) {
  771. op := &request.Operation{
  772. Name: opCreateUser,
  773. HTTPMethod: "POST",
  774. HTTPPath: "/api/v1/users",
  775. }
  776. if input == nil {
  777. input = &CreateUserInput{}
  778. }
  779. output = &CreateUserOutput{}
  780. req = c.newRequest(op, input, output)
  781. return
  782. }
  783. // CreateUser API operation for Amazon WorkDocs.
  784. //
  785. // Creates a user in a Simple AD or Microsoft AD directory. The status of a
  786. // newly created user is "ACTIVE". New users can access Amazon WorkDocs.
  787. //
  788. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  789. // with awserr.Error's Code and Message methods to get detailed information about
  790. // the error.
  791. //
  792. // See the AWS API reference guide for Amazon WorkDocs's
  793. // API operation CreateUser for usage and error information.
  794. //
  795. // Returned Error Codes:
  796. // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
  797. // The resource already exists.
  798. //
  799. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  800. // The operation is not permitted.
  801. //
  802. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  803. // The caller does not have access to perform the action on the resource.
  804. //
  805. // * ErrCodeFailedDependencyException "FailedDependencyException"
  806. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  807. // under the control of the organization is failing, such as a connected Active
  808. // Directory.
  809. //
  810. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  811. // One or more of the dependencies is unavailable.
  812. //
  813. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser
  814. func (c *WorkDocs) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) {
  815. req, out := c.CreateUserRequest(input)
  816. return out, req.Send()
  817. }
  818. // CreateUserWithContext is the same as CreateUser with the addition of
  819. // the ability to pass a context and additional request options.
  820. //
  821. // See CreateUser for details on how to use this API operation.
  822. //
  823. // The context must be non-nil and will be used for request cancellation. If
  824. // the context is nil a panic will occur. In the future the SDK may create
  825. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  826. // for more information on using Contexts.
  827. func (c *WorkDocs) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) {
  828. req, out := c.CreateUserRequest(input)
  829. req.SetContext(ctx)
  830. req.ApplyOptions(opts...)
  831. return out, req.Send()
  832. }
  833. const opDeactivateUser = "DeactivateUser"
  834. // DeactivateUserRequest generates a "aws/request.Request" representing the
  835. // client's request for the DeactivateUser operation. The "output" return
  836. // value will be populated with the request's response once the request completes
  837. // successfully.
  838. //
  839. // Use "Send" method on the returned Request to send the API call to the service.
  840. // the "output" return value is not valid until after Send returns without error.
  841. //
  842. // See DeactivateUser for more information on using the DeactivateUser
  843. // API call, and error handling.
  844. //
  845. // This method is useful when you want to inject custom logic or configuration
  846. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  847. //
  848. //
  849. // // Example sending a request using the DeactivateUserRequest method.
  850. // req, resp := client.DeactivateUserRequest(params)
  851. //
  852. // err := req.Send()
  853. // if err == nil { // resp is now filled
  854. // fmt.Println(resp)
  855. // }
  856. //
  857. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser
  858. func (c *WorkDocs) DeactivateUserRequest(input *DeactivateUserInput) (req *request.Request, output *DeactivateUserOutput) {
  859. op := &request.Operation{
  860. Name: opDeactivateUser,
  861. HTTPMethod: "DELETE",
  862. HTTPPath: "/api/v1/users/{UserId}/activation",
  863. }
  864. if input == nil {
  865. input = &DeactivateUserInput{}
  866. }
  867. output = &DeactivateUserOutput{}
  868. req = c.newRequest(op, input, output)
  869. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  870. return
  871. }
  872. // DeactivateUser API operation for Amazon WorkDocs.
  873. //
  874. // Deactivates the specified user, which revokes the user's access to Amazon
  875. // WorkDocs.
  876. //
  877. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  878. // with awserr.Error's Code and Message methods to get detailed information about
  879. // the error.
  880. //
  881. // See the AWS API reference guide for Amazon WorkDocs's
  882. // API operation DeactivateUser for usage and error information.
  883. //
  884. // Returned Error Codes:
  885. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  886. // The resource does not exist.
  887. //
  888. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  889. // The operation is not permitted.
  890. //
  891. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  892. // The caller does not have access to perform the action on the resource.
  893. //
  894. // * ErrCodeFailedDependencyException "FailedDependencyException"
  895. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  896. // under the control of the organization is failing, such as a connected Active
  897. // Directory.
  898. //
  899. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  900. // One or more of the dependencies is unavailable.
  901. //
  902. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser
  903. func (c *WorkDocs) DeactivateUser(input *DeactivateUserInput) (*DeactivateUserOutput, error) {
  904. req, out := c.DeactivateUserRequest(input)
  905. return out, req.Send()
  906. }
  907. // DeactivateUserWithContext is the same as DeactivateUser with the addition of
  908. // the ability to pass a context and additional request options.
  909. //
  910. // See DeactivateUser for details on how to use this API operation.
  911. //
  912. // The context must be non-nil and will be used for request cancellation. If
  913. // the context is nil a panic will occur. In the future the SDK may create
  914. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  915. // for more information on using Contexts.
  916. func (c *WorkDocs) DeactivateUserWithContext(ctx aws.Context, input *DeactivateUserInput, opts ...request.Option) (*DeactivateUserOutput, error) {
  917. req, out := c.DeactivateUserRequest(input)
  918. req.SetContext(ctx)
  919. req.ApplyOptions(opts...)
  920. return out, req.Send()
  921. }
  922. const opDeleteComment = "DeleteComment"
  923. // DeleteCommentRequest generates a "aws/request.Request" representing the
  924. // client's request for the DeleteComment operation. The "output" return
  925. // value will be populated with the request's response once the request completes
  926. // successfully.
  927. //
  928. // Use "Send" method on the returned Request to send the API call to the service.
  929. // the "output" return value is not valid until after Send returns without error.
  930. //
  931. // See DeleteComment for more information on using the DeleteComment
  932. // API call, and error handling.
  933. //
  934. // This method is useful when you want to inject custom logic or configuration
  935. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  936. //
  937. //
  938. // // Example sending a request using the DeleteCommentRequest method.
  939. // req, resp := client.DeleteCommentRequest(params)
  940. //
  941. // err := req.Send()
  942. // if err == nil { // resp is now filled
  943. // fmt.Println(resp)
  944. // }
  945. //
  946. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment
  947. func (c *WorkDocs) DeleteCommentRequest(input *DeleteCommentInput) (req *request.Request, output *DeleteCommentOutput) {
  948. op := &request.Operation{
  949. Name: opDeleteComment,
  950. HTTPMethod: "DELETE",
  951. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment/{CommentId}",
  952. }
  953. if input == nil {
  954. input = &DeleteCommentInput{}
  955. }
  956. output = &DeleteCommentOutput{}
  957. req = c.newRequest(op, input, output)
  958. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  959. return
  960. }
  961. // DeleteComment API operation for Amazon WorkDocs.
  962. //
  963. // Deletes the specified comment from the document version.
  964. //
  965. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  966. // with awserr.Error's Code and Message methods to get detailed information about
  967. // the error.
  968. //
  969. // See the AWS API reference guide for Amazon WorkDocs's
  970. // API operation DeleteComment for usage and error information.
  971. //
  972. // Returned Error Codes:
  973. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  974. // The resource does not exist.
  975. //
  976. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  977. // The specified document version is not in the INITIALIZED state.
  978. //
  979. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  980. // The operation is not permitted.
  981. //
  982. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  983. // The caller does not have access to perform the action on the resource.
  984. //
  985. // * ErrCodeFailedDependencyException "FailedDependencyException"
  986. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  987. // under the control of the organization is failing, such as a connected Active
  988. // Directory.
  989. //
  990. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  991. // One or more of the dependencies is unavailable.
  992. //
  993. // * ErrCodeDocumentLockedForCommentsException "DocumentLockedForCommentsException"
  994. // This exception is thrown when the document is locked for comments and user
  995. // tries to create or delete a comment on that document.
  996. //
  997. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment
  998. func (c *WorkDocs) DeleteComment(input *DeleteCommentInput) (*DeleteCommentOutput, error) {
  999. req, out := c.DeleteCommentRequest(input)
  1000. return out, req.Send()
  1001. }
  1002. // DeleteCommentWithContext is the same as DeleteComment with the addition of
  1003. // the ability to pass a context and additional request options.
  1004. //
  1005. // See DeleteComment for details on how to use this API operation.
  1006. //
  1007. // The context must be non-nil and will be used for request cancellation. If
  1008. // the context is nil a panic will occur. In the future the SDK may create
  1009. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1010. // for more information on using Contexts.
  1011. func (c *WorkDocs) DeleteCommentWithContext(ctx aws.Context, input *DeleteCommentInput, opts ...request.Option) (*DeleteCommentOutput, error) {
  1012. req, out := c.DeleteCommentRequest(input)
  1013. req.SetContext(ctx)
  1014. req.ApplyOptions(opts...)
  1015. return out, req.Send()
  1016. }
  1017. const opDeleteCustomMetadata = "DeleteCustomMetadata"
  1018. // DeleteCustomMetadataRequest generates a "aws/request.Request" representing the
  1019. // client's request for the DeleteCustomMetadata operation. The "output" return
  1020. // value will be populated with the request's response once the request completes
  1021. // successfully.
  1022. //
  1023. // Use "Send" method on the returned Request to send the API call to the service.
  1024. // the "output" return value is not valid until after Send returns without error.
  1025. //
  1026. // See DeleteCustomMetadata for more information on using the DeleteCustomMetadata
  1027. // API call, and error handling.
  1028. //
  1029. // This method is useful when you want to inject custom logic or configuration
  1030. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1031. //
  1032. //
  1033. // // Example sending a request using the DeleteCustomMetadataRequest method.
  1034. // req, resp := client.DeleteCustomMetadataRequest(params)
  1035. //
  1036. // err := req.Send()
  1037. // if err == nil { // resp is now filled
  1038. // fmt.Println(resp)
  1039. // }
  1040. //
  1041. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata
  1042. func (c *WorkDocs) DeleteCustomMetadataRequest(input *DeleteCustomMetadataInput) (req *request.Request, output *DeleteCustomMetadataOutput) {
  1043. op := &request.Operation{
  1044. Name: opDeleteCustomMetadata,
  1045. HTTPMethod: "DELETE",
  1046. HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
  1047. }
  1048. if input == nil {
  1049. input = &DeleteCustomMetadataInput{}
  1050. }
  1051. output = &DeleteCustomMetadataOutput{}
  1052. req = c.newRequest(op, input, output)
  1053. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1054. return
  1055. }
  1056. // DeleteCustomMetadata API operation for Amazon WorkDocs.
  1057. //
  1058. // Deletes custom metadata from the specified resource.
  1059. //
  1060. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1061. // with awserr.Error's Code and Message methods to get detailed information about
  1062. // the error.
  1063. //
  1064. // See the AWS API reference guide for Amazon WorkDocs's
  1065. // API operation DeleteCustomMetadata for usage and error information.
  1066. //
  1067. // Returned Error Codes:
  1068. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1069. // The resource does not exist.
  1070. //
  1071. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1072. // The operation is not permitted.
  1073. //
  1074. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1075. // The caller does not have access to perform the action on the resource.
  1076. //
  1077. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1078. // The specified document version is not in the INITIALIZED state.
  1079. //
  1080. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1081. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1082. // under the control of the organization is failing, such as a connected Active
  1083. // Directory.
  1084. //
  1085. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1086. // One or more of the dependencies is unavailable.
  1087. //
  1088. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata
  1089. func (c *WorkDocs) DeleteCustomMetadata(input *DeleteCustomMetadataInput) (*DeleteCustomMetadataOutput, error) {
  1090. req, out := c.DeleteCustomMetadataRequest(input)
  1091. return out, req.Send()
  1092. }
  1093. // DeleteCustomMetadataWithContext is the same as DeleteCustomMetadata with the addition of
  1094. // the ability to pass a context and additional request options.
  1095. //
  1096. // See DeleteCustomMetadata for details on how to use this API operation.
  1097. //
  1098. // The context must be non-nil and will be used for request cancellation. If
  1099. // the context is nil a panic will occur. In the future the SDK may create
  1100. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1101. // for more information on using Contexts.
  1102. func (c *WorkDocs) DeleteCustomMetadataWithContext(ctx aws.Context, input *DeleteCustomMetadataInput, opts ...request.Option) (*DeleteCustomMetadataOutput, error) {
  1103. req, out := c.DeleteCustomMetadataRequest(input)
  1104. req.SetContext(ctx)
  1105. req.ApplyOptions(opts...)
  1106. return out, req.Send()
  1107. }
  1108. const opDeleteDocument = "DeleteDocument"
  1109. // DeleteDocumentRequest generates a "aws/request.Request" representing the
  1110. // client's request for the DeleteDocument operation. The "output" return
  1111. // value will be populated with the request's response once the request completes
  1112. // successfully.
  1113. //
  1114. // Use "Send" method on the returned Request to send the API call to the service.
  1115. // the "output" return value is not valid until after Send returns without error.
  1116. //
  1117. // See DeleteDocument for more information on using the DeleteDocument
  1118. // API call, and error handling.
  1119. //
  1120. // This method is useful when you want to inject custom logic or configuration
  1121. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1122. //
  1123. //
  1124. // // Example sending a request using the DeleteDocumentRequest method.
  1125. // req, resp := client.DeleteDocumentRequest(params)
  1126. //
  1127. // err := req.Send()
  1128. // if err == nil { // resp is now filled
  1129. // fmt.Println(resp)
  1130. // }
  1131. //
  1132. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument
  1133. func (c *WorkDocs) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput) {
  1134. op := &request.Operation{
  1135. Name: opDeleteDocument,
  1136. HTTPMethod: "DELETE",
  1137. HTTPPath: "/api/v1/documents/{DocumentId}",
  1138. }
  1139. if input == nil {
  1140. input = &DeleteDocumentInput{}
  1141. }
  1142. output = &DeleteDocumentOutput{}
  1143. req = c.newRequest(op, input, output)
  1144. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1145. return
  1146. }
  1147. // DeleteDocument API operation for Amazon WorkDocs.
  1148. //
  1149. // Permanently deletes the specified document and its associated metadata.
  1150. //
  1151. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1152. // with awserr.Error's Code and Message methods to get detailed information about
  1153. // the error.
  1154. //
  1155. // See the AWS API reference guide for Amazon WorkDocs's
  1156. // API operation DeleteDocument for usage and error information.
  1157. //
  1158. // Returned Error Codes:
  1159. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1160. // The resource does not exist.
  1161. //
  1162. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1163. // The specified document version is not in the INITIALIZED state.
  1164. //
  1165. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  1166. // Another operation is in progress on the resource that conflicts with the
  1167. // current operation.
  1168. //
  1169. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1170. // The resource hierarchy is changing.
  1171. //
  1172. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1173. // The operation is not permitted.
  1174. //
  1175. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1176. // The caller does not have access to perform the action on the resource.
  1177. //
  1178. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1179. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1180. // under the control of the organization is failing, such as a connected Active
  1181. // Directory.
  1182. //
  1183. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1184. // One or more of the dependencies is unavailable.
  1185. //
  1186. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument
  1187. func (c *WorkDocs) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error) {
  1188. req, out := c.DeleteDocumentRequest(input)
  1189. return out, req.Send()
  1190. }
  1191. // DeleteDocumentWithContext is the same as DeleteDocument with the addition of
  1192. // the ability to pass a context and additional request options.
  1193. //
  1194. // See DeleteDocument for details on how to use this API operation.
  1195. //
  1196. // The context must be non-nil and will be used for request cancellation. If
  1197. // the context is nil a panic will occur. In the future the SDK may create
  1198. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1199. // for more information on using Contexts.
  1200. func (c *WorkDocs) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentInput, opts ...request.Option) (*DeleteDocumentOutput, error) {
  1201. req, out := c.DeleteDocumentRequest(input)
  1202. req.SetContext(ctx)
  1203. req.ApplyOptions(opts...)
  1204. return out, req.Send()
  1205. }
  1206. const opDeleteFolder = "DeleteFolder"
  1207. // DeleteFolderRequest generates a "aws/request.Request" representing the
  1208. // client's request for the DeleteFolder operation. The "output" return
  1209. // value will be populated with the request's response once the request completes
  1210. // successfully.
  1211. //
  1212. // Use "Send" method on the returned Request to send the API call to the service.
  1213. // the "output" return value is not valid until after Send returns without error.
  1214. //
  1215. // See DeleteFolder for more information on using the DeleteFolder
  1216. // API call, and error handling.
  1217. //
  1218. // This method is useful when you want to inject custom logic or configuration
  1219. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1220. //
  1221. //
  1222. // // Example sending a request using the DeleteFolderRequest method.
  1223. // req, resp := client.DeleteFolderRequest(params)
  1224. //
  1225. // err := req.Send()
  1226. // if err == nil { // resp is now filled
  1227. // fmt.Println(resp)
  1228. // }
  1229. //
  1230. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder
  1231. func (c *WorkDocs) DeleteFolderRequest(input *DeleteFolderInput) (req *request.Request, output *DeleteFolderOutput) {
  1232. op := &request.Operation{
  1233. Name: opDeleteFolder,
  1234. HTTPMethod: "DELETE",
  1235. HTTPPath: "/api/v1/folders/{FolderId}",
  1236. }
  1237. if input == nil {
  1238. input = &DeleteFolderInput{}
  1239. }
  1240. output = &DeleteFolderOutput{}
  1241. req = c.newRequest(op, input, output)
  1242. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1243. return
  1244. }
  1245. // DeleteFolder API operation for Amazon WorkDocs.
  1246. //
  1247. // Permanently deletes the specified folder and its contents.
  1248. //
  1249. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1250. // with awserr.Error's Code and Message methods to get detailed information about
  1251. // the error.
  1252. //
  1253. // See the AWS API reference guide for Amazon WorkDocs's
  1254. // API operation DeleteFolder for usage and error information.
  1255. //
  1256. // Returned Error Codes:
  1257. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1258. // The resource does not exist.
  1259. //
  1260. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1261. // The specified document version is not in the INITIALIZED state.
  1262. //
  1263. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  1264. // Another operation is in progress on the resource that conflicts with the
  1265. // current operation.
  1266. //
  1267. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1268. // The resource hierarchy is changing.
  1269. //
  1270. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1271. // The operation is not permitted.
  1272. //
  1273. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1274. // The caller does not have access to perform the action on the resource.
  1275. //
  1276. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1277. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1278. // under the control of the organization is failing, such as a connected Active
  1279. // Directory.
  1280. //
  1281. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1282. // One or more of the dependencies is unavailable.
  1283. //
  1284. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder
  1285. func (c *WorkDocs) DeleteFolder(input *DeleteFolderInput) (*DeleteFolderOutput, error) {
  1286. req, out := c.DeleteFolderRequest(input)
  1287. return out, req.Send()
  1288. }
  1289. // DeleteFolderWithContext is the same as DeleteFolder with the addition of
  1290. // the ability to pass a context and additional request options.
  1291. //
  1292. // See DeleteFolder for details on how to use this API operation.
  1293. //
  1294. // The context must be non-nil and will be used for request cancellation. If
  1295. // the context is nil a panic will occur. In the future the SDK may create
  1296. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1297. // for more information on using Contexts.
  1298. func (c *WorkDocs) DeleteFolderWithContext(ctx aws.Context, input *DeleteFolderInput, opts ...request.Option) (*DeleteFolderOutput, error) {
  1299. req, out := c.DeleteFolderRequest(input)
  1300. req.SetContext(ctx)
  1301. req.ApplyOptions(opts...)
  1302. return out, req.Send()
  1303. }
  1304. const opDeleteFolderContents = "DeleteFolderContents"
  1305. // DeleteFolderContentsRequest generates a "aws/request.Request" representing the
  1306. // client's request for the DeleteFolderContents operation. The "output" return
  1307. // value will be populated with the request's response once the request completes
  1308. // successfully.
  1309. //
  1310. // Use "Send" method on the returned Request to send the API call to the service.
  1311. // the "output" return value is not valid until after Send returns without error.
  1312. //
  1313. // See DeleteFolderContents for more information on using the DeleteFolderContents
  1314. // API call, and error handling.
  1315. //
  1316. // This method is useful when you want to inject custom logic or configuration
  1317. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1318. //
  1319. //
  1320. // // Example sending a request using the DeleteFolderContentsRequest method.
  1321. // req, resp := client.DeleteFolderContentsRequest(params)
  1322. //
  1323. // err := req.Send()
  1324. // if err == nil { // resp is now filled
  1325. // fmt.Println(resp)
  1326. // }
  1327. //
  1328. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents
  1329. func (c *WorkDocs) DeleteFolderContentsRequest(input *DeleteFolderContentsInput) (req *request.Request, output *DeleteFolderContentsOutput) {
  1330. op := &request.Operation{
  1331. Name: opDeleteFolderContents,
  1332. HTTPMethod: "DELETE",
  1333. HTTPPath: "/api/v1/folders/{FolderId}/contents",
  1334. }
  1335. if input == nil {
  1336. input = &DeleteFolderContentsInput{}
  1337. }
  1338. output = &DeleteFolderContentsOutput{}
  1339. req = c.newRequest(op, input, output)
  1340. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1341. return
  1342. }
  1343. // DeleteFolderContents API operation for Amazon WorkDocs.
  1344. //
  1345. // Deletes the contents of the specified folder.
  1346. //
  1347. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1348. // with awserr.Error's Code and Message methods to get detailed information about
  1349. // the error.
  1350. //
  1351. // See the AWS API reference guide for Amazon WorkDocs's
  1352. // API operation DeleteFolderContents for usage and error information.
  1353. //
  1354. // Returned Error Codes:
  1355. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1356. // The resource does not exist.
  1357. //
  1358. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1359. // The specified document version is not in the INITIALIZED state.
  1360. //
  1361. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  1362. // Another operation is in progress on the resource that conflicts with the
  1363. // current operation.
  1364. //
  1365. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1366. // The operation is not permitted.
  1367. //
  1368. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1369. // The caller does not have access to perform the action on the resource.
  1370. //
  1371. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1372. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1373. // under the control of the organization is failing, such as a connected Active
  1374. // Directory.
  1375. //
  1376. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1377. // One or more of the dependencies is unavailable.
  1378. //
  1379. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents
  1380. func (c *WorkDocs) DeleteFolderContents(input *DeleteFolderContentsInput) (*DeleteFolderContentsOutput, error) {
  1381. req, out := c.DeleteFolderContentsRequest(input)
  1382. return out, req.Send()
  1383. }
  1384. // DeleteFolderContentsWithContext is the same as DeleteFolderContents with the addition of
  1385. // the ability to pass a context and additional request options.
  1386. //
  1387. // See DeleteFolderContents for details on how to use this API operation.
  1388. //
  1389. // The context must be non-nil and will be used for request cancellation. If
  1390. // the context is nil a panic will occur. In the future the SDK may create
  1391. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1392. // for more information on using Contexts.
  1393. func (c *WorkDocs) DeleteFolderContentsWithContext(ctx aws.Context, input *DeleteFolderContentsInput, opts ...request.Option) (*DeleteFolderContentsOutput, error) {
  1394. req, out := c.DeleteFolderContentsRequest(input)
  1395. req.SetContext(ctx)
  1396. req.ApplyOptions(opts...)
  1397. return out, req.Send()
  1398. }
  1399. const opDeleteLabels = "DeleteLabels"
  1400. // DeleteLabelsRequest generates a "aws/request.Request" representing the
  1401. // client's request for the DeleteLabels operation. The "output" return
  1402. // value will be populated with the request's response once the request completes
  1403. // successfully.
  1404. //
  1405. // Use "Send" method on the returned Request to send the API call to the service.
  1406. // the "output" return value is not valid until after Send returns without error.
  1407. //
  1408. // See DeleteLabels for more information on using the DeleteLabels
  1409. // API call, and error handling.
  1410. //
  1411. // This method is useful when you want to inject custom logic or configuration
  1412. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1413. //
  1414. //
  1415. // // Example sending a request using the DeleteLabelsRequest method.
  1416. // req, resp := client.DeleteLabelsRequest(params)
  1417. //
  1418. // err := req.Send()
  1419. // if err == nil { // resp is now filled
  1420. // fmt.Println(resp)
  1421. // }
  1422. //
  1423. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels
  1424. func (c *WorkDocs) DeleteLabelsRequest(input *DeleteLabelsInput) (req *request.Request, output *DeleteLabelsOutput) {
  1425. op := &request.Operation{
  1426. Name: opDeleteLabels,
  1427. HTTPMethod: "DELETE",
  1428. HTTPPath: "/api/v1/resources/{ResourceId}/labels",
  1429. }
  1430. if input == nil {
  1431. input = &DeleteLabelsInput{}
  1432. }
  1433. output = &DeleteLabelsOutput{}
  1434. req = c.newRequest(op, input, output)
  1435. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1436. return
  1437. }
  1438. // DeleteLabels API operation for Amazon WorkDocs.
  1439. //
  1440. // Deletes the specified list of labels from a resource.
  1441. //
  1442. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1443. // with awserr.Error's Code and Message methods to get detailed information about
  1444. // the error.
  1445. //
  1446. // See the AWS API reference guide for Amazon WorkDocs's
  1447. // API operation DeleteLabels for usage and error information.
  1448. //
  1449. // Returned Error Codes:
  1450. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1451. // The resource does not exist.
  1452. //
  1453. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1454. // The operation is not permitted.
  1455. //
  1456. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1457. // The caller does not have access to perform the action on the resource.
  1458. //
  1459. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1460. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1461. // under the control of the organization is failing, such as a connected Active
  1462. // Directory.
  1463. //
  1464. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1465. // One or more of the dependencies is unavailable.
  1466. //
  1467. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels
  1468. func (c *WorkDocs) DeleteLabels(input *DeleteLabelsInput) (*DeleteLabelsOutput, error) {
  1469. req, out := c.DeleteLabelsRequest(input)
  1470. return out, req.Send()
  1471. }
  1472. // DeleteLabelsWithContext is the same as DeleteLabels with the addition of
  1473. // the ability to pass a context and additional request options.
  1474. //
  1475. // See DeleteLabels for details on how to use this API operation.
  1476. //
  1477. // The context must be non-nil and will be used for request cancellation. If
  1478. // the context is nil a panic will occur. In the future the SDK may create
  1479. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1480. // for more information on using Contexts.
  1481. func (c *WorkDocs) DeleteLabelsWithContext(ctx aws.Context, input *DeleteLabelsInput, opts ...request.Option) (*DeleteLabelsOutput, error) {
  1482. req, out := c.DeleteLabelsRequest(input)
  1483. req.SetContext(ctx)
  1484. req.ApplyOptions(opts...)
  1485. return out, req.Send()
  1486. }
  1487. const opDeleteNotificationSubscription = "DeleteNotificationSubscription"
  1488. // DeleteNotificationSubscriptionRequest generates a "aws/request.Request" representing the
  1489. // client's request for the DeleteNotificationSubscription operation. The "output" return
  1490. // value will be populated with the request's response once the request completes
  1491. // successfully.
  1492. //
  1493. // Use "Send" method on the returned Request to send the API call to the service.
  1494. // the "output" return value is not valid until after Send returns without error.
  1495. //
  1496. // See DeleteNotificationSubscription for more information on using the DeleteNotificationSubscription
  1497. // API call, and error handling.
  1498. //
  1499. // This method is useful when you want to inject custom logic or configuration
  1500. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1501. //
  1502. //
  1503. // // Example sending a request using the DeleteNotificationSubscriptionRequest method.
  1504. // req, resp := client.DeleteNotificationSubscriptionRequest(params)
  1505. //
  1506. // err := req.Send()
  1507. // if err == nil { // resp is now filled
  1508. // fmt.Println(resp)
  1509. // }
  1510. //
  1511. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription
  1512. func (c *WorkDocs) DeleteNotificationSubscriptionRequest(input *DeleteNotificationSubscriptionInput) (req *request.Request, output *DeleteNotificationSubscriptionOutput) {
  1513. op := &request.Operation{
  1514. Name: opDeleteNotificationSubscription,
  1515. HTTPMethod: "DELETE",
  1516. HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions/{SubscriptionId}",
  1517. }
  1518. if input == nil {
  1519. input = &DeleteNotificationSubscriptionInput{}
  1520. }
  1521. output = &DeleteNotificationSubscriptionOutput{}
  1522. req = c.newRequest(op, input, output)
  1523. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1524. return
  1525. }
  1526. // DeleteNotificationSubscription API operation for Amazon WorkDocs.
  1527. //
  1528. // Deletes the specified subscription from the specified organization.
  1529. //
  1530. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1531. // with awserr.Error's Code and Message methods to get detailed information about
  1532. // the error.
  1533. //
  1534. // See the AWS API reference guide for Amazon WorkDocs's
  1535. // API operation DeleteNotificationSubscription for usage and error information.
  1536. //
  1537. // Returned Error Codes:
  1538. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1539. // The caller does not have access to perform the action on the resource.
  1540. //
  1541. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1542. // The resource does not exist.
  1543. //
  1544. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1545. // One or more of the dependencies is unavailable.
  1546. //
  1547. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1548. // The specified document version is not in the INITIALIZED state.
  1549. //
  1550. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription
  1551. func (c *WorkDocs) DeleteNotificationSubscription(input *DeleteNotificationSubscriptionInput) (*DeleteNotificationSubscriptionOutput, error) {
  1552. req, out := c.DeleteNotificationSubscriptionRequest(input)
  1553. return out, req.Send()
  1554. }
  1555. // DeleteNotificationSubscriptionWithContext is the same as DeleteNotificationSubscription with the addition of
  1556. // the ability to pass a context and additional request options.
  1557. //
  1558. // See DeleteNotificationSubscription for details on how to use this API operation.
  1559. //
  1560. // The context must be non-nil and will be used for request cancellation. If
  1561. // the context is nil a panic will occur. In the future the SDK may create
  1562. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1563. // for more information on using Contexts.
  1564. func (c *WorkDocs) DeleteNotificationSubscriptionWithContext(ctx aws.Context, input *DeleteNotificationSubscriptionInput, opts ...request.Option) (*DeleteNotificationSubscriptionOutput, error) {
  1565. req, out := c.DeleteNotificationSubscriptionRequest(input)
  1566. req.SetContext(ctx)
  1567. req.ApplyOptions(opts...)
  1568. return out, req.Send()
  1569. }
  1570. const opDeleteUser = "DeleteUser"
  1571. // DeleteUserRequest generates a "aws/request.Request" representing the
  1572. // client's request for the DeleteUser operation. The "output" return
  1573. // value will be populated with the request's response once the request completes
  1574. // successfully.
  1575. //
  1576. // Use "Send" method on the returned Request to send the API call to the service.
  1577. // the "output" return value is not valid until after Send returns without error.
  1578. //
  1579. // See DeleteUser for more information on using the DeleteUser
  1580. // API call, and error handling.
  1581. //
  1582. // This method is useful when you want to inject custom logic or configuration
  1583. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1584. //
  1585. //
  1586. // // Example sending a request using the DeleteUserRequest method.
  1587. // req, resp := client.DeleteUserRequest(params)
  1588. //
  1589. // err := req.Send()
  1590. // if err == nil { // resp is now filled
  1591. // fmt.Println(resp)
  1592. // }
  1593. //
  1594. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser
  1595. func (c *WorkDocs) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) {
  1596. op := &request.Operation{
  1597. Name: opDeleteUser,
  1598. HTTPMethod: "DELETE",
  1599. HTTPPath: "/api/v1/users/{UserId}",
  1600. }
  1601. if input == nil {
  1602. input = &DeleteUserInput{}
  1603. }
  1604. output = &DeleteUserOutput{}
  1605. req = c.newRequest(op, input, output)
  1606. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1607. return
  1608. }
  1609. // DeleteUser API operation for Amazon WorkDocs.
  1610. //
  1611. // Deletes the specified user from a Simple AD or Microsoft AD directory.
  1612. //
  1613. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1614. // with awserr.Error's Code and Message methods to get detailed information about
  1615. // the error.
  1616. //
  1617. // See the AWS API reference guide for Amazon WorkDocs's
  1618. // API operation DeleteUser for usage and error information.
  1619. //
  1620. // Returned Error Codes:
  1621. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1622. // The resource does not exist.
  1623. //
  1624. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1625. // The operation is not permitted.
  1626. //
  1627. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1628. // The caller does not have access to perform the action on the resource.
  1629. //
  1630. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1631. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1632. // under the control of the organization is failing, such as a connected Active
  1633. // Directory.
  1634. //
  1635. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1636. // One or more of the dependencies is unavailable.
  1637. //
  1638. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser
  1639. func (c *WorkDocs) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) {
  1640. req, out := c.DeleteUserRequest(input)
  1641. return out, req.Send()
  1642. }
  1643. // DeleteUserWithContext is the same as DeleteUser with the addition of
  1644. // the ability to pass a context and additional request options.
  1645. //
  1646. // See DeleteUser for details on how to use this API operation.
  1647. //
  1648. // The context must be non-nil and will be used for request cancellation. If
  1649. // the context is nil a panic will occur. In the future the SDK may create
  1650. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1651. // for more information on using Contexts.
  1652. func (c *WorkDocs) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) {
  1653. req, out := c.DeleteUserRequest(input)
  1654. req.SetContext(ctx)
  1655. req.ApplyOptions(opts...)
  1656. return out, req.Send()
  1657. }
  1658. const opDescribeActivities = "DescribeActivities"
  1659. // DescribeActivitiesRequest generates a "aws/request.Request" representing the
  1660. // client's request for the DescribeActivities operation. The "output" return
  1661. // value will be populated with the request's response once the request completes
  1662. // successfully.
  1663. //
  1664. // Use "Send" method on the returned Request to send the API call to the service.
  1665. // the "output" return value is not valid until after Send returns without error.
  1666. //
  1667. // See DescribeActivities for more information on using the DescribeActivities
  1668. // API call, and error handling.
  1669. //
  1670. // This method is useful when you want to inject custom logic or configuration
  1671. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1672. //
  1673. //
  1674. // // Example sending a request using the DescribeActivitiesRequest method.
  1675. // req, resp := client.DescribeActivitiesRequest(params)
  1676. //
  1677. // err := req.Send()
  1678. // if err == nil { // resp is now filled
  1679. // fmt.Println(resp)
  1680. // }
  1681. //
  1682. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities
  1683. func (c *WorkDocs) DescribeActivitiesRequest(input *DescribeActivitiesInput) (req *request.Request, output *DescribeActivitiesOutput) {
  1684. op := &request.Operation{
  1685. Name: opDescribeActivities,
  1686. HTTPMethod: "GET",
  1687. HTTPPath: "/api/v1/activities",
  1688. }
  1689. if input == nil {
  1690. input = &DescribeActivitiesInput{}
  1691. }
  1692. output = &DescribeActivitiesOutput{}
  1693. req = c.newRequest(op, input, output)
  1694. return
  1695. }
  1696. // DescribeActivities API operation for Amazon WorkDocs.
  1697. //
  1698. // Describes the user activities in a specified time period.
  1699. //
  1700. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1701. // with awserr.Error's Code and Message methods to get detailed information about
  1702. // the error.
  1703. //
  1704. // See the AWS API reference guide for Amazon WorkDocs's
  1705. // API operation DescribeActivities for usage and error information.
  1706. //
  1707. // Returned Error Codes:
  1708. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1709. // The operation is not permitted.
  1710. //
  1711. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1712. // The caller does not have access to perform the action on the resource.
  1713. //
  1714. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1715. // The pagination marker or limit fields are not valid.
  1716. //
  1717. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1718. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1719. // under the control of the organization is failing, such as a connected Active
  1720. // Directory.
  1721. //
  1722. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1723. // One or more of the dependencies is unavailable.
  1724. //
  1725. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities
  1726. func (c *WorkDocs) DescribeActivities(input *DescribeActivitiesInput) (*DescribeActivitiesOutput, error) {
  1727. req, out := c.DescribeActivitiesRequest(input)
  1728. return out, req.Send()
  1729. }
  1730. // DescribeActivitiesWithContext is the same as DescribeActivities with the addition of
  1731. // the ability to pass a context and additional request options.
  1732. //
  1733. // See DescribeActivities for details on how to use this API operation.
  1734. //
  1735. // The context must be non-nil and will be used for request cancellation. If
  1736. // the context is nil a panic will occur. In the future the SDK may create
  1737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1738. // for more information on using Contexts.
  1739. func (c *WorkDocs) DescribeActivitiesWithContext(ctx aws.Context, input *DescribeActivitiesInput, opts ...request.Option) (*DescribeActivitiesOutput, error) {
  1740. req, out := c.DescribeActivitiesRequest(input)
  1741. req.SetContext(ctx)
  1742. req.ApplyOptions(opts...)
  1743. return out, req.Send()
  1744. }
  1745. const opDescribeComments = "DescribeComments"
  1746. // DescribeCommentsRequest generates a "aws/request.Request" representing the
  1747. // client's request for the DescribeComments operation. The "output" return
  1748. // value will be populated with the request's response once the request completes
  1749. // successfully.
  1750. //
  1751. // Use "Send" method on the returned Request to send the API call to the service.
  1752. // the "output" return value is not valid until after Send returns without error.
  1753. //
  1754. // See DescribeComments for more information on using the DescribeComments
  1755. // API call, and error handling.
  1756. //
  1757. // This method is useful when you want to inject custom logic or configuration
  1758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1759. //
  1760. //
  1761. // // Example sending a request using the DescribeCommentsRequest method.
  1762. // req, resp := client.DescribeCommentsRequest(params)
  1763. //
  1764. // err := req.Send()
  1765. // if err == nil { // resp is now filled
  1766. // fmt.Println(resp)
  1767. // }
  1768. //
  1769. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeComments
  1770. func (c *WorkDocs) DescribeCommentsRequest(input *DescribeCommentsInput) (req *request.Request, output *DescribeCommentsOutput) {
  1771. op := &request.Operation{
  1772. Name: opDescribeComments,
  1773. HTTPMethod: "GET",
  1774. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comments",
  1775. }
  1776. if input == nil {
  1777. input = &DescribeCommentsInput{}
  1778. }
  1779. output = &DescribeCommentsOutput{}
  1780. req = c.newRequest(op, input, output)
  1781. return
  1782. }
  1783. // DescribeComments API operation for Amazon WorkDocs.
  1784. //
  1785. // List all the comments for the specified document version.
  1786. //
  1787. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1788. // with awserr.Error's Code and Message methods to get detailed information about
  1789. // the error.
  1790. //
  1791. // See the AWS API reference guide for Amazon WorkDocs's
  1792. // API operation DescribeComments for usage and error information.
  1793. //
  1794. // Returned Error Codes:
  1795. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1796. // The resource does not exist.
  1797. //
  1798. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1799. // The specified document version is not in the INITIALIZED state.
  1800. //
  1801. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1802. // The operation is not permitted.
  1803. //
  1804. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1805. // The caller does not have access to perform the action on the resource.
  1806. //
  1807. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1808. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1809. // under the control of the organization is failing, such as a connected Active
  1810. // Directory.
  1811. //
  1812. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1813. // One or more of the dependencies is unavailable.
  1814. //
  1815. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeComments
  1816. func (c *WorkDocs) DescribeComments(input *DescribeCommentsInput) (*DescribeCommentsOutput, error) {
  1817. req, out := c.DescribeCommentsRequest(input)
  1818. return out, req.Send()
  1819. }
  1820. // DescribeCommentsWithContext is the same as DescribeComments with the addition of
  1821. // the ability to pass a context and additional request options.
  1822. //
  1823. // See DescribeComments for details on how to use this API operation.
  1824. //
  1825. // The context must be non-nil and will be used for request cancellation. If
  1826. // the context is nil a panic will occur. In the future the SDK may create
  1827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1828. // for more information on using Contexts.
  1829. func (c *WorkDocs) DescribeCommentsWithContext(ctx aws.Context, input *DescribeCommentsInput, opts ...request.Option) (*DescribeCommentsOutput, error) {
  1830. req, out := c.DescribeCommentsRequest(input)
  1831. req.SetContext(ctx)
  1832. req.ApplyOptions(opts...)
  1833. return out, req.Send()
  1834. }
  1835. const opDescribeDocumentVersions = "DescribeDocumentVersions"
  1836. // DescribeDocumentVersionsRequest generates a "aws/request.Request" representing the
  1837. // client's request for the DescribeDocumentVersions operation. The "output" return
  1838. // value will be populated with the request's response once the request completes
  1839. // successfully.
  1840. //
  1841. // Use "Send" method on the returned Request to send the API call to the service.
  1842. // the "output" return value is not valid until after Send returns without error.
  1843. //
  1844. // See DescribeDocumentVersions for more information on using the DescribeDocumentVersions
  1845. // API call, and error handling.
  1846. //
  1847. // This method is useful when you want to inject custom logic or configuration
  1848. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1849. //
  1850. //
  1851. // // Example sending a request using the DescribeDocumentVersionsRequest method.
  1852. // req, resp := client.DescribeDocumentVersionsRequest(params)
  1853. //
  1854. // err := req.Send()
  1855. // if err == nil { // resp is now filled
  1856. // fmt.Println(resp)
  1857. // }
  1858. //
  1859. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions
  1860. func (c *WorkDocs) DescribeDocumentVersionsRequest(input *DescribeDocumentVersionsInput) (req *request.Request, output *DescribeDocumentVersionsOutput) {
  1861. op := &request.Operation{
  1862. Name: opDescribeDocumentVersions,
  1863. HTTPMethod: "GET",
  1864. HTTPPath: "/api/v1/documents/{DocumentId}/versions",
  1865. Paginator: &request.Paginator{
  1866. InputTokens: []string{"Marker"},
  1867. OutputTokens: []string{"Marker"},
  1868. LimitToken: "Limit",
  1869. TruncationToken: "",
  1870. },
  1871. }
  1872. if input == nil {
  1873. input = &DescribeDocumentVersionsInput{}
  1874. }
  1875. output = &DescribeDocumentVersionsOutput{}
  1876. req = c.newRequest(op, input, output)
  1877. return
  1878. }
  1879. // DescribeDocumentVersions API operation for Amazon WorkDocs.
  1880. //
  1881. // Retrieves the document versions for the specified document.
  1882. //
  1883. // By default, only active versions are returned.
  1884. //
  1885. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1886. // with awserr.Error's Code and Message methods to get detailed information about
  1887. // the error.
  1888. //
  1889. // See the AWS API reference guide for Amazon WorkDocs's
  1890. // API operation DescribeDocumentVersions for usage and error information.
  1891. //
  1892. // Returned Error Codes:
  1893. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  1894. // The resource does not exist.
  1895. //
  1896. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  1897. // The operation is not permitted.
  1898. //
  1899. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  1900. // The caller does not have access to perform the action on the resource.
  1901. //
  1902. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1903. // The pagination marker or limit fields are not valid.
  1904. //
  1905. // * ErrCodeFailedDependencyException "FailedDependencyException"
  1906. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  1907. // under the control of the organization is failing, such as a connected Active
  1908. // Directory.
  1909. //
  1910. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1911. // One or more of the dependencies is unavailable.
  1912. //
  1913. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  1914. // The specified document version is not in the INITIALIZED state.
  1915. //
  1916. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions
  1917. func (c *WorkDocs) DescribeDocumentVersions(input *DescribeDocumentVersionsInput) (*DescribeDocumentVersionsOutput, error) {
  1918. req, out := c.DescribeDocumentVersionsRequest(input)
  1919. return out, req.Send()
  1920. }
  1921. // DescribeDocumentVersionsWithContext is the same as DescribeDocumentVersions with the addition of
  1922. // the ability to pass a context and additional request options.
  1923. //
  1924. // See DescribeDocumentVersions for details on how to use this API operation.
  1925. //
  1926. // The context must be non-nil and will be used for request cancellation. If
  1927. // the context is nil a panic will occur. In the future the SDK may create
  1928. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1929. // for more information on using Contexts.
  1930. func (c *WorkDocs) DescribeDocumentVersionsWithContext(ctx aws.Context, input *DescribeDocumentVersionsInput, opts ...request.Option) (*DescribeDocumentVersionsOutput, error) {
  1931. req, out := c.DescribeDocumentVersionsRequest(input)
  1932. req.SetContext(ctx)
  1933. req.ApplyOptions(opts...)
  1934. return out, req.Send()
  1935. }
  1936. // DescribeDocumentVersionsPages iterates over the pages of a DescribeDocumentVersions operation,
  1937. // calling the "fn" function with the response data for each page. To stop
  1938. // iterating, return false from the fn function.
  1939. //
  1940. // See DescribeDocumentVersions method for more information on how to use this operation.
  1941. //
  1942. // Note: This operation can generate multiple requests to a service.
  1943. //
  1944. // // Example iterating over at most 3 pages of a DescribeDocumentVersions operation.
  1945. // pageNum := 0
  1946. // err := client.DescribeDocumentVersionsPages(params,
  1947. // func(page *DescribeDocumentVersionsOutput, lastPage bool) bool {
  1948. // pageNum++
  1949. // fmt.Println(page)
  1950. // return pageNum <= 3
  1951. // })
  1952. //
  1953. func (c *WorkDocs) DescribeDocumentVersionsPages(input *DescribeDocumentVersionsInput, fn func(*DescribeDocumentVersionsOutput, bool) bool) error {
  1954. return c.DescribeDocumentVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  1955. }
  1956. // DescribeDocumentVersionsPagesWithContext same as DescribeDocumentVersionsPages except
  1957. // it takes a Context and allows setting request options on the pages.
  1958. //
  1959. // The context must be non-nil and will be used for request cancellation. If
  1960. // the context is nil a panic will occur. In the future the SDK may create
  1961. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1962. // for more information on using Contexts.
  1963. func (c *WorkDocs) DescribeDocumentVersionsPagesWithContext(ctx aws.Context, input *DescribeDocumentVersionsInput, fn func(*DescribeDocumentVersionsOutput, bool) bool, opts ...request.Option) error {
  1964. p := request.Pagination{
  1965. NewRequest: func() (*request.Request, error) {
  1966. var inCpy *DescribeDocumentVersionsInput
  1967. if input != nil {
  1968. tmp := *input
  1969. inCpy = &tmp
  1970. }
  1971. req, _ := c.DescribeDocumentVersionsRequest(inCpy)
  1972. req.SetContext(ctx)
  1973. req.ApplyOptions(opts...)
  1974. return req, nil
  1975. },
  1976. }
  1977. cont := true
  1978. for p.Next() && cont {
  1979. cont = fn(p.Page().(*DescribeDocumentVersionsOutput), !p.HasNextPage())
  1980. }
  1981. return p.Err()
  1982. }
  1983. const opDescribeFolderContents = "DescribeFolderContents"
  1984. // DescribeFolderContentsRequest generates a "aws/request.Request" representing the
  1985. // client's request for the DescribeFolderContents operation. The "output" return
  1986. // value will be populated with the request's response once the request completes
  1987. // successfully.
  1988. //
  1989. // Use "Send" method on the returned Request to send the API call to the service.
  1990. // the "output" return value is not valid until after Send returns without error.
  1991. //
  1992. // See DescribeFolderContents for more information on using the DescribeFolderContents
  1993. // API call, and error handling.
  1994. //
  1995. // This method is useful when you want to inject custom logic or configuration
  1996. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1997. //
  1998. //
  1999. // // Example sending a request using the DescribeFolderContentsRequest method.
  2000. // req, resp := client.DescribeFolderContentsRequest(params)
  2001. //
  2002. // err := req.Send()
  2003. // if err == nil { // resp is now filled
  2004. // fmt.Println(resp)
  2005. // }
  2006. //
  2007. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents
  2008. func (c *WorkDocs) DescribeFolderContentsRequest(input *DescribeFolderContentsInput) (req *request.Request, output *DescribeFolderContentsOutput) {
  2009. op := &request.Operation{
  2010. Name: opDescribeFolderContents,
  2011. HTTPMethod: "GET",
  2012. HTTPPath: "/api/v1/folders/{FolderId}/contents",
  2013. Paginator: &request.Paginator{
  2014. InputTokens: []string{"Marker"},
  2015. OutputTokens: []string{"Marker"},
  2016. LimitToken: "Limit",
  2017. TruncationToken: "",
  2018. },
  2019. }
  2020. if input == nil {
  2021. input = &DescribeFolderContentsInput{}
  2022. }
  2023. output = &DescribeFolderContentsOutput{}
  2024. req = c.newRequest(op, input, output)
  2025. return
  2026. }
  2027. // DescribeFolderContents API operation for Amazon WorkDocs.
  2028. //
  2029. // Describes the contents of the specified folder, including its documents and
  2030. // subfolders.
  2031. //
  2032. // By default, Amazon WorkDocs returns the first 100 active document and folder
  2033. // metadata items. If there are more results, the response includes a marker
  2034. // that you can use to request the next set of results. You can also request
  2035. // initialized documents.
  2036. //
  2037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2038. // with awserr.Error's Code and Message methods to get detailed information about
  2039. // the error.
  2040. //
  2041. // See the AWS API reference guide for Amazon WorkDocs's
  2042. // API operation DescribeFolderContents for usage and error information.
  2043. //
  2044. // Returned Error Codes:
  2045. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2046. // The resource does not exist.
  2047. //
  2048. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2049. // The caller does not have access to perform the action on the resource.
  2050. //
  2051. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  2052. // The pagination marker or limit fields are not valid.
  2053. //
  2054. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2055. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2056. // under the control of the organization is failing, such as a connected Active
  2057. // Directory.
  2058. //
  2059. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2060. // One or more of the dependencies is unavailable.
  2061. //
  2062. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  2063. // The specified document version is not in the INITIALIZED state.
  2064. //
  2065. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents
  2066. func (c *WorkDocs) DescribeFolderContents(input *DescribeFolderContentsInput) (*DescribeFolderContentsOutput, error) {
  2067. req, out := c.DescribeFolderContentsRequest(input)
  2068. return out, req.Send()
  2069. }
  2070. // DescribeFolderContentsWithContext is the same as DescribeFolderContents with the addition of
  2071. // the ability to pass a context and additional request options.
  2072. //
  2073. // See DescribeFolderContents for details on how to use this API operation.
  2074. //
  2075. // The context must be non-nil and will be used for request cancellation. If
  2076. // the context is nil a panic will occur. In the future the SDK may create
  2077. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2078. // for more information on using Contexts.
  2079. func (c *WorkDocs) DescribeFolderContentsWithContext(ctx aws.Context, input *DescribeFolderContentsInput, opts ...request.Option) (*DescribeFolderContentsOutput, error) {
  2080. req, out := c.DescribeFolderContentsRequest(input)
  2081. req.SetContext(ctx)
  2082. req.ApplyOptions(opts...)
  2083. return out, req.Send()
  2084. }
  2085. // DescribeFolderContentsPages iterates over the pages of a DescribeFolderContents operation,
  2086. // calling the "fn" function with the response data for each page. To stop
  2087. // iterating, return false from the fn function.
  2088. //
  2089. // See DescribeFolderContents method for more information on how to use this operation.
  2090. //
  2091. // Note: This operation can generate multiple requests to a service.
  2092. //
  2093. // // Example iterating over at most 3 pages of a DescribeFolderContents operation.
  2094. // pageNum := 0
  2095. // err := client.DescribeFolderContentsPages(params,
  2096. // func(page *DescribeFolderContentsOutput, lastPage bool) bool {
  2097. // pageNum++
  2098. // fmt.Println(page)
  2099. // return pageNum <= 3
  2100. // })
  2101. //
  2102. func (c *WorkDocs) DescribeFolderContentsPages(input *DescribeFolderContentsInput, fn func(*DescribeFolderContentsOutput, bool) bool) error {
  2103. return c.DescribeFolderContentsPagesWithContext(aws.BackgroundContext(), input, fn)
  2104. }
  2105. // DescribeFolderContentsPagesWithContext same as DescribeFolderContentsPages except
  2106. // it takes a Context and allows setting request options on the pages.
  2107. //
  2108. // The context must be non-nil and will be used for request cancellation. If
  2109. // the context is nil a panic will occur. In the future the SDK may create
  2110. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2111. // for more information on using Contexts.
  2112. func (c *WorkDocs) DescribeFolderContentsPagesWithContext(ctx aws.Context, input *DescribeFolderContentsInput, fn func(*DescribeFolderContentsOutput, bool) bool, opts ...request.Option) error {
  2113. p := request.Pagination{
  2114. NewRequest: func() (*request.Request, error) {
  2115. var inCpy *DescribeFolderContentsInput
  2116. if input != nil {
  2117. tmp := *input
  2118. inCpy = &tmp
  2119. }
  2120. req, _ := c.DescribeFolderContentsRequest(inCpy)
  2121. req.SetContext(ctx)
  2122. req.ApplyOptions(opts...)
  2123. return req, nil
  2124. },
  2125. }
  2126. cont := true
  2127. for p.Next() && cont {
  2128. cont = fn(p.Page().(*DescribeFolderContentsOutput), !p.HasNextPage())
  2129. }
  2130. return p.Err()
  2131. }
  2132. const opDescribeGroups = "DescribeGroups"
  2133. // DescribeGroupsRequest generates a "aws/request.Request" representing the
  2134. // client's request for the DescribeGroups operation. The "output" return
  2135. // value will be populated with the request's response once the request completes
  2136. // successfully.
  2137. //
  2138. // Use "Send" method on the returned Request to send the API call to the service.
  2139. // the "output" return value is not valid until after Send returns without error.
  2140. //
  2141. // See DescribeGroups for more information on using the DescribeGroups
  2142. // API call, and error handling.
  2143. //
  2144. // This method is useful when you want to inject custom logic or configuration
  2145. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2146. //
  2147. //
  2148. // // Example sending a request using the DescribeGroupsRequest method.
  2149. // req, resp := client.DescribeGroupsRequest(params)
  2150. //
  2151. // err := req.Send()
  2152. // if err == nil { // resp is now filled
  2153. // fmt.Println(resp)
  2154. // }
  2155. //
  2156. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroups
  2157. func (c *WorkDocs) DescribeGroupsRequest(input *DescribeGroupsInput) (req *request.Request, output *DescribeGroupsOutput) {
  2158. op := &request.Operation{
  2159. Name: opDescribeGroups,
  2160. HTTPMethod: "GET",
  2161. HTTPPath: "/api/v1/groups",
  2162. }
  2163. if input == nil {
  2164. input = &DescribeGroupsInput{}
  2165. }
  2166. output = &DescribeGroupsOutput{}
  2167. req = c.newRequest(op, input, output)
  2168. return
  2169. }
  2170. // DescribeGroups API operation for Amazon WorkDocs.
  2171. //
  2172. // Describes the groups specified by the query. Groups are defined by the underlying
  2173. // Active Directory.
  2174. //
  2175. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2176. // with awserr.Error's Code and Message methods to get detailed information about
  2177. // the error.
  2178. //
  2179. // See the AWS API reference guide for Amazon WorkDocs's
  2180. // API operation DescribeGroups for usage and error information.
  2181. //
  2182. // Returned Error Codes:
  2183. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2184. // The operation is not permitted.
  2185. //
  2186. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2187. // The caller does not have access to perform the action on the resource.
  2188. //
  2189. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2190. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2191. // under the control of the organization is failing, such as a connected Active
  2192. // Directory.
  2193. //
  2194. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2195. // One or more of the dependencies is unavailable.
  2196. //
  2197. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroups
  2198. func (c *WorkDocs) DescribeGroups(input *DescribeGroupsInput) (*DescribeGroupsOutput, error) {
  2199. req, out := c.DescribeGroupsRequest(input)
  2200. return out, req.Send()
  2201. }
  2202. // DescribeGroupsWithContext is the same as DescribeGroups with the addition of
  2203. // the ability to pass a context and additional request options.
  2204. //
  2205. // See DescribeGroups for details on how to use this API operation.
  2206. //
  2207. // The context must be non-nil and will be used for request cancellation. If
  2208. // the context is nil a panic will occur. In the future the SDK may create
  2209. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2210. // for more information on using Contexts.
  2211. func (c *WorkDocs) DescribeGroupsWithContext(ctx aws.Context, input *DescribeGroupsInput, opts ...request.Option) (*DescribeGroupsOutput, error) {
  2212. req, out := c.DescribeGroupsRequest(input)
  2213. req.SetContext(ctx)
  2214. req.ApplyOptions(opts...)
  2215. return out, req.Send()
  2216. }
  2217. const opDescribeNotificationSubscriptions = "DescribeNotificationSubscriptions"
  2218. // DescribeNotificationSubscriptionsRequest generates a "aws/request.Request" representing the
  2219. // client's request for the DescribeNotificationSubscriptions operation. The "output" return
  2220. // value will be populated with the request's response once the request completes
  2221. // successfully.
  2222. //
  2223. // Use "Send" method on the returned Request to send the API call to the service.
  2224. // the "output" return value is not valid until after Send returns without error.
  2225. //
  2226. // See DescribeNotificationSubscriptions for more information on using the DescribeNotificationSubscriptions
  2227. // API call, and error handling.
  2228. //
  2229. // This method is useful when you want to inject custom logic or configuration
  2230. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2231. //
  2232. //
  2233. // // Example sending a request using the DescribeNotificationSubscriptionsRequest method.
  2234. // req, resp := client.DescribeNotificationSubscriptionsRequest(params)
  2235. //
  2236. // err := req.Send()
  2237. // if err == nil { // resp is now filled
  2238. // fmt.Println(resp)
  2239. // }
  2240. //
  2241. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions
  2242. func (c *WorkDocs) DescribeNotificationSubscriptionsRequest(input *DescribeNotificationSubscriptionsInput) (req *request.Request, output *DescribeNotificationSubscriptionsOutput) {
  2243. op := &request.Operation{
  2244. Name: opDescribeNotificationSubscriptions,
  2245. HTTPMethod: "GET",
  2246. HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions",
  2247. }
  2248. if input == nil {
  2249. input = &DescribeNotificationSubscriptionsInput{}
  2250. }
  2251. output = &DescribeNotificationSubscriptionsOutput{}
  2252. req = c.newRequest(op, input, output)
  2253. return
  2254. }
  2255. // DescribeNotificationSubscriptions API operation for Amazon WorkDocs.
  2256. //
  2257. // Lists the specified notification subscriptions.
  2258. //
  2259. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2260. // with awserr.Error's Code and Message methods to get detailed information about
  2261. // the error.
  2262. //
  2263. // See the AWS API reference guide for Amazon WorkDocs's
  2264. // API operation DescribeNotificationSubscriptions for usage and error information.
  2265. //
  2266. // Returned Error Codes:
  2267. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2268. // The caller does not have access to perform the action on the resource.
  2269. //
  2270. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2271. // The resource does not exist.
  2272. //
  2273. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2274. // One or more of the dependencies is unavailable.
  2275. //
  2276. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions
  2277. func (c *WorkDocs) DescribeNotificationSubscriptions(input *DescribeNotificationSubscriptionsInput) (*DescribeNotificationSubscriptionsOutput, error) {
  2278. req, out := c.DescribeNotificationSubscriptionsRequest(input)
  2279. return out, req.Send()
  2280. }
  2281. // DescribeNotificationSubscriptionsWithContext is the same as DescribeNotificationSubscriptions with the addition of
  2282. // the ability to pass a context and additional request options.
  2283. //
  2284. // See DescribeNotificationSubscriptions for details on how to use this API operation.
  2285. //
  2286. // The context must be non-nil and will be used for request cancellation. If
  2287. // the context is nil a panic will occur. In the future the SDK may create
  2288. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2289. // for more information on using Contexts.
  2290. func (c *WorkDocs) DescribeNotificationSubscriptionsWithContext(ctx aws.Context, input *DescribeNotificationSubscriptionsInput, opts ...request.Option) (*DescribeNotificationSubscriptionsOutput, error) {
  2291. req, out := c.DescribeNotificationSubscriptionsRequest(input)
  2292. req.SetContext(ctx)
  2293. req.ApplyOptions(opts...)
  2294. return out, req.Send()
  2295. }
  2296. const opDescribeResourcePermissions = "DescribeResourcePermissions"
  2297. // DescribeResourcePermissionsRequest generates a "aws/request.Request" representing the
  2298. // client's request for the DescribeResourcePermissions operation. The "output" return
  2299. // value will be populated with the request's response once the request completes
  2300. // successfully.
  2301. //
  2302. // Use "Send" method on the returned Request to send the API call to the service.
  2303. // the "output" return value is not valid until after Send returns without error.
  2304. //
  2305. // See DescribeResourcePermissions for more information on using the DescribeResourcePermissions
  2306. // API call, and error handling.
  2307. //
  2308. // This method is useful when you want to inject custom logic or configuration
  2309. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2310. //
  2311. //
  2312. // // Example sending a request using the DescribeResourcePermissionsRequest method.
  2313. // req, resp := client.DescribeResourcePermissionsRequest(params)
  2314. //
  2315. // err := req.Send()
  2316. // if err == nil { // resp is now filled
  2317. // fmt.Println(resp)
  2318. // }
  2319. //
  2320. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions
  2321. func (c *WorkDocs) DescribeResourcePermissionsRequest(input *DescribeResourcePermissionsInput) (req *request.Request, output *DescribeResourcePermissionsOutput) {
  2322. op := &request.Operation{
  2323. Name: opDescribeResourcePermissions,
  2324. HTTPMethod: "GET",
  2325. HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
  2326. }
  2327. if input == nil {
  2328. input = &DescribeResourcePermissionsInput{}
  2329. }
  2330. output = &DescribeResourcePermissionsOutput{}
  2331. req = c.newRequest(op, input, output)
  2332. return
  2333. }
  2334. // DescribeResourcePermissions API operation for Amazon WorkDocs.
  2335. //
  2336. // Describes the permissions of a specified resource.
  2337. //
  2338. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2339. // with awserr.Error's Code and Message methods to get detailed information about
  2340. // the error.
  2341. //
  2342. // See the AWS API reference guide for Amazon WorkDocs's
  2343. // API operation DescribeResourcePermissions for usage and error information.
  2344. //
  2345. // Returned Error Codes:
  2346. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2347. // The operation is not permitted.
  2348. //
  2349. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2350. // The caller does not have access to perform the action on the resource.
  2351. //
  2352. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2353. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2354. // under the control of the organization is failing, such as a connected Active
  2355. // Directory.
  2356. //
  2357. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2358. // One or more of the dependencies is unavailable.
  2359. //
  2360. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions
  2361. func (c *WorkDocs) DescribeResourcePermissions(input *DescribeResourcePermissionsInput) (*DescribeResourcePermissionsOutput, error) {
  2362. req, out := c.DescribeResourcePermissionsRequest(input)
  2363. return out, req.Send()
  2364. }
  2365. // DescribeResourcePermissionsWithContext is the same as DescribeResourcePermissions with the addition of
  2366. // the ability to pass a context and additional request options.
  2367. //
  2368. // See DescribeResourcePermissions for details on how to use this API operation.
  2369. //
  2370. // The context must be non-nil and will be used for request cancellation. If
  2371. // the context is nil a panic will occur. In the future the SDK may create
  2372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2373. // for more information on using Contexts.
  2374. func (c *WorkDocs) DescribeResourcePermissionsWithContext(ctx aws.Context, input *DescribeResourcePermissionsInput, opts ...request.Option) (*DescribeResourcePermissionsOutput, error) {
  2375. req, out := c.DescribeResourcePermissionsRequest(input)
  2376. req.SetContext(ctx)
  2377. req.ApplyOptions(opts...)
  2378. return out, req.Send()
  2379. }
  2380. const opDescribeRootFolders = "DescribeRootFolders"
  2381. // DescribeRootFoldersRequest generates a "aws/request.Request" representing the
  2382. // client's request for the DescribeRootFolders operation. The "output" return
  2383. // value will be populated with the request's response once the request completes
  2384. // successfully.
  2385. //
  2386. // Use "Send" method on the returned Request to send the API call to the service.
  2387. // the "output" return value is not valid until after Send returns without error.
  2388. //
  2389. // See DescribeRootFolders for more information on using the DescribeRootFolders
  2390. // API call, and error handling.
  2391. //
  2392. // This method is useful when you want to inject custom logic or configuration
  2393. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2394. //
  2395. //
  2396. // // Example sending a request using the DescribeRootFoldersRequest method.
  2397. // req, resp := client.DescribeRootFoldersRequest(params)
  2398. //
  2399. // err := req.Send()
  2400. // if err == nil { // resp is now filled
  2401. // fmt.Println(resp)
  2402. // }
  2403. //
  2404. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFolders
  2405. func (c *WorkDocs) DescribeRootFoldersRequest(input *DescribeRootFoldersInput) (req *request.Request, output *DescribeRootFoldersOutput) {
  2406. op := &request.Operation{
  2407. Name: opDescribeRootFolders,
  2408. HTTPMethod: "GET",
  2409. HTTPPath: "/api/v1/me/root",
  2410. }
  2411. if input == nil {
  2412. input = &DescribeRootFoldersInput{}
  2413. }
  2414. output = &DescribeRootFoldersOutput{}
  2415. req = c.newRequest(op, input, output)
  2416. return
  2417. }
  2418. // DescribeRootFolders API operation for Amazon WorkDocs.
  2419. //
  2420. // Describes the current user's special folders; the RootFolder and the RecycleBin.
  2421. // RootFolder is the root of user's files and folders and RecycleBin is the
  2422. // root of recycled items. This is not a valid action for SigV4 (administrative
  2423. // API) clients.
  2424. //
  2425. // This action requires an authentication token. To get an authentication token,
  2426. // register an application with Amazon WorkDocs. For more information, see Authentication
  2427. // and Access Control for User Applications (http://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html)
  2428. // in the Amazon WorkDocs Developer Guide.
  2429. //
  2430. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2431. // with awserr.Error's Code and Message methods to get detailed information about
  2432. // the error.
  2433. //
  2434. // See the AWS API reference guide for Amazon WorkDocs's
  2435. // API operation DescribeRootFolders for usage and error information.
  2436. //
  2437. // Returned Error Codes:
  2438. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2439. // The operation is not permitted.
  2440. //
  2441. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2442. // The caller does not have access to perform the action on the resource.
  2443. //
  2444. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  2445. // The pagination marker or limit fields are not valid.
  2446. //
  2447. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2448. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2449. // under the control of the organization is failing, such as a connected Active
  2450. // Directory.
  2451. //
  2452. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2453. // One or more of the dependencies is unavailable.
  2454. //
  2455. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFolders
  2456. func (c *WorkDocs) DescribeRootFolders(input *DescribeRootFoldersInput) (*DescribeRootFoldersOutput, error) {
  2457. req, out := c.DescribeRootFoldersRequest(input)
  2458. return out, req.Send()
  2459. }
  2460. // DescribeRootFoldersWithContext is the same as DescribeRootFolders with the addition of
  2461. // the ability to pass a context and additional request options.
  2462. //
  2463. // See DescribeRootFolders for details on how to use this API operation.
  2464. //
  2465. // The context must be non-nil and will be used for request cancellation. If
  2466. // the context is nil a panic will occur. In the future the SDK may create
  2467. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2468. // for more information on using Contexts.
  2469. func (c *WorkDocs) DescribeRootFoldersWithContext(ctx aws.Context, input *DescribeRootFoldersInput, opts ...request.Option) (*DescribeRootFoldersOutput, error) {
  2470. req, out := c.DescribeRootFoldersRequest(input)
  2471. req.SetContext(ctx)
  2472. req.ApplyOptions(opts...)
  2473. return out, req.Send()
  2474. }
  2475. const opDescribeUsers = "DescribeUsers"
  2476. // DescribeUsersRequest generates a "aws/request.Request" representing the
  2477. // client's request for the DescribeUsers operation. The "output" return
  2478. // value will be populated with the request's response once the request completes
  2479. // successfully.
  2480. //
  2481. // Use "Send" method on the returned Request to send the API call to the service.
  2482. // the "output" return value is not valid until after Send returns without error.
  2483. //
  2484. // See DescribeUsers for more information on using the DescribeUsers
  2485. // API call, and error handling.
  2486. //
  2487. // This method is useful when you want to inject custom logic or configuration
  2488. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2489. //
  2490. //
  2491. // // Example sending a request using the DescribeUsersRequest method.
  2492. // req, resp := client.DescribeUsersRequest(params)
  2493. //
  2494. // err := req.Send()
  2495. // if err == nil { // resp is now filled
  2496. // fmt.Println(resp)
  2497. // }
  2498. //
  2499. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers
  2500. func (c *WorkDocs) DescribeUsersRequest(input *DescribeUsersInput) (req *request.Request, output *DescribeUsersOutput) {
  2501. op := &request.Operation{
  2502. Name: opDescribeUsers,
  2503. HTTPMethod: "GET",
  2504. HTTPPath: "/api/v1/users",
  2505. Paginator: &request.Paginator{
  2506. InputTokens: []string{"Marker"},
  2507. OutputTokens: []string{"Marker"},
  2508. LimitToken: "Limit",
  2509. TruncationToken: "",
  2510. },
  2511. }
  2512. if input == nil {
  2513. input = &DescribeUsersInput{}
  2514. }
  2515. output = &DescribeUsersOutput{}
  2516. req = c.newRequest(op, input, output)
  2517. return
  2518. }
  2519. // DescribeUsers API operation for Amazon WorkDocs.
  2520. //
  2521. // Describes the specified users. You can describe all users or filter the results
  2522. // (for example, by status or organization).
  2523. //
  2524. // By default, Amazon WorkDocs returns the first 24 active or pending users.
  2525. // If there are more results, the response includes a marker that you can use
  2526. // to request the next set of results.
  2527. //
  2528. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2529. // with awserr.Error's Code and Message methods to get detailed information about
  2530. // the error.
  2531. //
  2532. // See the AWS API reference guide for Amazon WorkDocs's
  2533. // API operation DescribeUsers for usage and error information.
  2534. //
  2535. // Returned Error Codes:
  2536. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2537. // The resource does not exist.
  2538. //
  2539. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2540. // The operation is not permitted.
  2541. //
  2542. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2543. // The caller does not have access to perform the action on the resource.
  2544. //
  2545. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2546. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2547. // under the control of the organization is failing, such as a connected Active
  2548. // Directory.
  2549. //
  2550. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2551. // One or more of the dependencies is unavailable.
  2552. //
  2553. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  2554. // The pagination marker or limit fields are not valid.
  2555. //
  2556. // * ErrCodeRequestedEntityTooLargeException "RequestedEntityTooLargeException"
  2557. // The response is too large to return. The request must include a filter to
  2558. // reduce the size of the response.
  2559. //
  2560. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers
  2561. func (c *WorkDocs) DescribeUsers(input *DescribeUsersInput) (*DescribeUsersOutput, error) {
  2562. req, out := c.DescribeUsersRequest(input)
  2563. return out, req.Send()
  2564. }
  2565. // DescribeUsersWithContext is the same as DescribeUsers with the addition of
  2566. // the ability to pass a context and additional request options.
  2567. //
  2568. // See DescribeUsers for details on how to use this API operation.
  2569. //
  2570. // The context must be non-nil and will be used for request cancellation. If
  2571. // the context is nil a panic will occur. In the future the SDK may create
  2572. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2573. // for more information on using Contexts.
  2574. func (c *WorkDocs) DescribeUsersWithContext(ctx aws.Context, input *DescribeUsersInput, opts ...request.Option) (*DescribeUsersOutput, error) {
  2575. req, out := c.DescribeUsersRequest(input)
  2576. req.SetContext(ctx)
  2577. req.ApplyOptions(opts...)
  2578. return out, req.Send()
  2579. }
  2580. // DescribeUsersPages iterates over the pages of a DescribeUsers operation,
  2581. // calling the "fn" function with the response data for each page. To stop
  2582. // iterating, return false from the fn function.
  2583. //
  2584. // See DescribeUsers method for more information on how to use this operation.
  2585. //
  2586. // Note: This operation can generate multiple requests to a service.
  2587. //
  2588. // // Example iterating over at most 3 pages of a DescribeUsers operation.
  2589. // pageNum := 0
  2590. // err := client.DescribeUsersPages(params,
  2591. // func(page *DescribeUsersOutput, lastPage bool) bool {
  2592. // pageNum++
  2593. // fmt.Println(page)
  2594. // return pageNum <= 3
  2595. // })
  2596. //
  2597. func (c *WorkDocs) DescribeUsersPages(input *DescribeUsersInput, fn func(*DescribeUsersOutput, bool) bool) error {
  2598. return c.DescribeUsersPagesWithContext(aws.BackgroundContext(), input, fn)
  2599. }
  2600. // DescribeUsersPagesWithContext same as DescribeUsersPages except
  2601. // it takes a Context and allows setting request options on the pages.
  2602. //
  2603. // The context must be non-nil and will be used for request cancellation. If
  2604. // the context is nil a panic will occur. In the future the SDK may create
  2605. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2606. // for more information on using Contexts.
  2607. func (c *WorkDocs) DescribeUsersPagesWithContext(ctx aws.Context, input *DescribeUsersInput, fn func(*DescribeUsersOutput, bool) bool, opts ...request.Option) error {
  2608. p := request.Pagination{
  2609. NewRequest: func() (*request.Request, error) {
  2610. var inCpy *DescribeUsersInput
  2611. if input != nil {
  2612. tmp := *input
  2613. inCpy = &tmp
  2614. }
  2615. req, _ := c.DescribeUsersRequest(inCpy)
  2616. req.SetContext(ctx)
  2617. req.ApplyOptions(opts...)
  2618. return req, nil
  2619. },
  2620. }
  2621. cont := true
  2622. for p.Next() && cont {
  2623. cont = fn(p.Page().(*DescribeUsersOutput), !p.HasNextPage())
  2624. }
  2625. return p.Err()
  2626. }
  2627. const opGetCurrentUser = "GetCurrentUser"
  2628. // GetCurrentUserRequest generates a "aws/request.Request" representing the
  2629. // client's request for the GetCurrentUser operation. The "output" return
  2630. // value will be populated with the request's response once the request completes
  2631. // successfully.
  2632. //
  2633. // Use "Send" method on the returned Request to send the API call to the service.
  2634. // the "output" return value is not valid until after Send returns without error.
  2635. //
  2636. // See GetCurrentUser for more information on using the GetCurrentUser
  2637. // API call, and error handling.
  2638. //
  2639. // This method is useful when you want to inject custom logic or configuration
  2640. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2641. //
  2642. //
  2643. // // Example sending a request using the GetCurrentUserRequest method.
  2644. // req, resp := client.GetCurrentUserRequest(params)
  2645. //
  2646. // err := req.Send()
  2647. // if err == nil { // resp is now filled
  2648. // fmt.Println(resp)
  2649. // }
  2650. //
  2651. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUser
  2652. func (c *WorkDocs) GetCurrentUserRequest(input *GetCurrentUserInput) (req *request.Request, output *GetCurrentUserOutput) {
  2653. op := &request.Operation{
  2654. Name: opGetCurrentUser,
  2655. HTTPMethod: "GET",
  2656. HTTPPath: "/api/v1/me",
  2657. }
  2658. if input == nil {
  2659. input = &GetCurrentUserInput{}
  2660. }
  2661. output = &GetCurrentUserOutput{}
  2662. req = c.newRequest(op, input, output)
  2663. return
  2664. }
  2665. // GetCurrentUser API operation for Amazon WorkDocs.
  2666. //
  2667. // Retrieves details of the current user for whom the authentication token was
  2668. // generated. This is not a valid action for SigV4 (administrative API) clients.
  2669. //
  2670. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2671. // with awserr.Error's Code and Message methods to get detailed information about
  2672. // the error.
  2673. //
  2674. // See the AWS API reference guide for Amazon WorkDocs's
  2675. // API operation GetCurrentUser for usage and error information.
  2676. //
  2677. // Returned Error Codes:
  2678. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2679. // The resource does not exist.
  2680. //
  2681. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2682. // The operation is not permitted.
  2683. //
  2684. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2685. // The caller does not have access to perform the action on the resource.
  2686. //
  2687. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2688. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2689. // under the control of the organization is failing, such as a connected Active
  2690. // Directory.
  2691. //
  2692. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2693. // One or more of the dependencies is unavailable.
  2694. //
  2695. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUser
  2696. func (c *WorkDocs) GetCurrentUser(input *GetCurrentUserInput) (*GetCurrentUserOutput, error) {
  2697. req, out := c.GetCurrentUserRequest(input)
  2698. return out, req.Send()
  2699. }
  2700. // GetCurrentUserWithContext is the same as GetCurrentUser with the addition of
  2701. // the ability to pass a context and additional request options.
  2702. //
  2703. // See GetCurrentUser for details on how to use this API operation.
  2704. //
  2705. // The context must be non-nil and will be used for request cancellation. If
  2706. // the context is nil a panic will occur. In the future the SDK may create
  2707. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2708. // for more information on using Contexts.
  2709. func (c *WorkDocs) GetCurrentUserWithContext(ctx aws.Context, input *GetCurrentUserInput, opts ...request.Option) (*GetCurrentUserOutput, error) {
  2710. req, out := c.GetCurrentUserRequest(input)
  2711. req.SetContext(ctx)
  2712. req.ApplyOptions(opts...)
  2713. return out, req.Send()
  2714. }
  2715. const opGetDocument = "GetDocument"
  2716. // GetDocumentRequest generates a "aws/request.Request" representing the
  2717. // client's request for the GetDocument operation. The "output" return
  2718. // value will be populated with the request's response once the request completes
  2719. // successfully.
  2720. //
  2721. // Use "Send" method on the returned Request to send the API call to the service.
  2722. // the "output" return value is not valid until after Send returns without error.
  2723. //
  2724. // See GetDocument for more information on using the GetDocument
  2725. // API call, and error handling.
  2726. //
  2727. // This method is useful when you want to inject custom logic or configuration
  2728. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2729. //
  2730. //
  2731. // // Example sending a request using the GetDocumentRequest method.
  2732. // req, resp := client.GetDocumentRequest(params)
  2733. //
  2734. // err := req.Send()
  2735. // if err == nil { // resp is now filled
  2736. // fmt.Println(resp)
  2737. // }
  2738. //
  2739. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument
  2740. func (c *WorkDocs) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput) {
  2741. op := &request.Operation{
  2742. Name: opGetDocument,
  2743. HTTPMethod: "GET",
  2744. HTTPPath: "/api/v1/documents/{DocumentId}",
  2745. }
  2746. if input == nil {
  2747. input = &GetDocumentInput{}
  2748. }
  2749. output = &GetDocumentOutput{}
  2750. req = c.newRequest(op, input, output)
  2751. return
  2752. }
  2753. // GetDocument API operation for Amazon WorkDocs.
  2754. //
  2755. // Retrieves details of a document.
  2756. //
  2757. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2758. // with awserr.Error's Code and Message methods to get detailed information about
  2759. // the error.
  2760. //
  2761. // See the AWS API reference guide for Amazon WorkDocs's
  2762. // API operation GetDocument for usage and error information.
  2763. //
  2764. // Returned Error Codes:
  2765. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2766. // The resource does not exist.
  2767. //
  2768. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2769. // The operation is not permitted.
  2770. //
  2771. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2772. // The caller does not have access to perform the action on the resource.
  2773. //
  2774. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  2775. // The pagination marker or limit fields are not valid.
  2776. //
  2777. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2778. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2779. // under the control of the organization is failing, such as a connected Active
  2780. // Directory.
  2781. //
  2782. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2783. // One or more of the dependencies is unavailable.
  2784. //
  2785. // * ErrCodeInvalidPasswordException "InvalidPasswordException"
  2786. // The password is invalid.
  2787. //
  2788. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument
  2789. func (c *WorkDocs) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error) {
  2790. req, out := c.GetDocumentRequest(input)
  2791. return out, req.Send()
  2792. }
  2793. // GetDocumentWithContext is the same as GetDocument with the addition of
  2794. // the ability to pass a context and additional request options.
  2795. //
  2796. // See GetDocument for details on how to use this API operation.
  2797. //
  2798. // The context must be non-nil and will be used for request cancellation. If
  2799. // the context is nil a panic will occur. In the future the SDK may create
  2800. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2801. // for more information on using Contexts.
  2802. func (c *WorkDocs) GetDocumentWithContext(ctx aws.Context, input *GetDocumentInput, opts ...request.Option) (*GetDocumentOutput, error) {
  2803. req, out := c.GetDocumentRequest(input)
  2804. req.SetContext(ctx)
  2805. req.ApplyOptions(opts...)
  2806. return out, req.Send()
  2807. }
  2808. const opGetDocumentPath = "GetDocumentPath"
  2809. // GetDocumentPathRequest generates a "aws/request.Request" representing the
  2810. // client's request for the GetDocumentPath operation. The "output" return
  2811. // value will be populated with the request's response once the request completes
  2812. // successfully.
  2813. //
  2814. // Use "Send" method on the returned Request to send the API call to the service.
  2815. // the "output" return value is not valid until after Send returns without error.
  2816. //
  2817. // See GetDocumentPath for more information on using the GetDocumentPath
  2818. // API call, and error handling.
  2819. //
  2820. // This method is useful when you want to inject custom logic or configuration
  2821. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2822. //
  2823. //
  2824. // // Example sending a request using the GetDocumentPathRequest method.
  2825. // req, resp := client.GetDocumentPathRequest(params)
  2826. //
  2827. // err := req.Send()
  2828. // if err == nil { // resp is now filled
  2829. // fmt.Println(resp)
  2830. // }
  2831. //
  2832. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath
  2833. func (c *WorkDocs) GetDocumentPathRequest(input *GetDocumentPathInput) (req *request.Request, output *GetDocumentPathOutput) {
  2834. op := &request.Operation{
  2835. Name: opGetDocumentPath,
  2836. HTTPMethod: "GET",
  2837. HTTPPath: "/api/v1/documents/{DocumentId}/path",
  2838. }
  2839. if input == nil {
  2840. input = &GetDocumentPathInput{}
  2841. }
  2842. output = &GetDocumentPathOutput{}
  2843. req = c.newRequest(op, input, output)
  2844. return
  2845. }
  2846. // GetDocumentPath API operation for Amazon WorkDocs.
  2847. //
  2848. // Retrieves the path information (the hierarchy from the root folder) for the
  2849. // requested document.
  2850. //
  2851. // By default, Amazon WorkDocs returns a maximum of 100 levels upwards from
  2852. // the requested document and only includes the IDs of the parent folders in
  2853. // the path. You can limit the maximum number of levels. You can also request
  2854. // the names of the parent folders.
  2855. //
  2856. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2857. // with awserr.Error's Code and Message methods to get detailed information about
  2858. // the error.
  2859. //
  2860. // See the AWS API reference guide for Amazon WorkDocs's
  2861. // API operation GetDocumentPath for usage and error information.
  2862. //
  2863. // Returned Error Codes:
  2864. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2865. // The resource does not exist.
  2866. //
  2867. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2868. // The operation is not permitted.
  2869. //
  2870. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2871. // The caller does not have access to perform the action on the resource.
  2872. //
  2873. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2874. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2875. // under the control of the organization is failing, such as a connected Active
  2876. // Directory.
  2877. //
  2878. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2879. // One or more of the dependencies is unavailable.
  2880. //
  2881. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath
  2882. func (c *WorkDocs) GetDocumentPath(input *GetDocumentPathInput) (*GetDocumentPathOutput, error) {
  2883. req, out := c.GetDocumentPathRequest(input)
  2884. return out, req.Send()
  2885. }
  2886. // GetDocumentPathWithContext is the same as GetDocumentPath with the addition of
  2887. // the ability to pass a context and additional request options.
  2888. //
  2889. // See GetDocumentPath for details on how to use this API operation.
  2890. //
  2891. // The context must be non-nil and will be used for request cancellation. If
  2892. // the context is nil a panic will occur. In the future the SDK may create
  2893. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2894. // for more information on using Contexts.
  2895. func (c *WorkDocs) GetDocumentPathWithContext(ctx aws.Context, input *GetDocumentPathInput, opts ...request.Option) (*GetDocumentPathOutput, error) {
  2896. req, out := c.GetDocumentPathRequest(input)
  2897. req.SetContext(ctx)
  2898. req.ApplyOptions(opts...)
  2899. return out, req.Send()
  2900. }
  2901. const opGetDocumentVersion = "GetDocumentVersion"
  2902. // GetDocumentVersionRequest generates a "aws/request.Request" representing the
  2903. // client's request for the GetDocumentVersion operation. The "output" return
  2904. // value will be populated with the request's response once the request completes
  2905. // successfully.
  2906. //
  2907. // Use "Send" method on the returned Request to send the API call to the service.
  2908. // the "output" return value is not valid until after Send returns without error.
  2909. //
  2910. // See GetDocumentVersion for more information on using the GetDocumentVersion
  2911. // API call, and error handling.
  2912. //
  2913. // This method is useful when you want to inject custom logic or configuration
  2914. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2915. //
  2916. //
  2917. // // Example sending a request using the GetDocumentVersionRequest method.
  2918. // req, resp := client.GetDocumentVersionRequest(params)
  2919. //
  2920. // err := req.Send()
  2921. // if err == nil { // resp is now filled
  2922. // fmt.Println(resp)
  2923. // }
  2924. //
  2925. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion
  2926. func (c *WorkDocs) GetDocumentVersionRequest(input *GetDocumentVersionInput) (req *request.Request, output *GetDocumentVersionOutput) {
  2927. op := &request.Operation{
  2928. Name: opGetDocumentVersion,
  2929. HTTPMethod: "GET",
  2930. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
  2931. }
  2932. if input == nil {
  2933. input = &GetDocumentVersionInput{}
  2934. }
  2935. output = &GetDocumentVersionOutput{}
  2936. req = c.newRequest(op, input, output)
  2937. return
  2938. }
  2939. // GetDocumentVersion API operation for Amazon WorkDocs.
  2940. //
  2941. // Retrieves version metadata for the specified document.
  2942. //
  2943. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2944. // with awserr.Error's Code and Message methods to get detailed information about
  2945. // the error.
  2946. //
  2947. // See the AWS API reference guide for Amazon WorkDocs's
  2948. // API operation GetDocumentVersion for usage and error information.
  2949. //
  2950. // Returned Error Codes:
  2951. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  2952. // The resource does not exist.
  2953. //
  2954. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  2955. // The operation is not permitted.
  2956. //
  2957. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  2958. // The caller does not have access to perform the action on the resource.
  2959. //
  2960. // * ErrCodeFailedDependencyException "FailedDependencyException"
  2961. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  2962. // under the control of the organization is failing, such as a connected Active
  2963. // Directory.
  2964. //
  2965. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2966. // One or more of the dependencies is unavailable.
  2967. //
  2968. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  2969. // The specified document version is not in the INITIALIZED state.
  2970. //
  2971. // * ErrCodeInvalidPasswordException "InvalidPasswordException"
  2972. // The password is invalid.
  2973. //
  2974. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion
  2975. func (c *WorkDocs) GetDocumentVersion(input *GetDocumentVersionInput) (*GetDocumentVersionOutput, error) {
  2976. req, out := c.GetDocumentVersionRequest(input)
  2977. return out, req.Send()
  2978. }
  2979. // GetDocumentVersionWithContext is the same as GetDocumentVersion with the addition of
  2980. // the ability to pass a context and additional request options.
  2981. //
  2982. // See GetDocumentVersion for details on how to use this API operation.
  2983. //
  2984. // The context must be non-nil and will be used for request cancellation. If
  2985. // the context is nil a panic will occur. In the future the SDK may create
  2986. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2987. // for more information on using Contexts.
  2988. func (c *WorkDocs) GetDocumentVersionWithContext(ctx aws.Context, input *GetDocumentVersionInput, opts ...request.Option) (*GetDocumentVersionOutput, error) {
  2989. req, out := c.GetDocumentVersionRequest(input)
  2990. req.SetContext(ctx)
  2991. req.ApplyOptions(opts...)
  2992. return out, req.Send()
  2993. }
  2994. const opGetFolder = "GetFolder"
  2995. // GetFolderRequest generates a "aws/request.Request" representing the
  2996. // client's request for the GetFolder operation. The "output" return
  2997. // value will be populated with the request's response once the request completes
  2998. // successfully.
  2999. //
  3000. // Use "Send" method on the returned Request to send the API call to the service.
  3001. // the "output" return value is not valid until after Send returns without error.
  3002. //
  3003. // See GetFolder for more information on using the GetFolder
  3004. // API call, and error handling.
  3005. //
  3006. // This method is useful when you want to inject custom logic or configuration
  3007. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3008. //
  3009. //
  3010. // // Example sending a request using the GetFolderRequest method.
  3011. // req, resp := client.GetFolderRequest(params)
  3012. //
  3013. // err := req.Send()
  3014. // if err == nil { // resp is now filled
  3015. // fmt.Println(resp)
  3016. // }
  3017. //
  3018. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder
  3019. func (c *WorkDocs) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) {
  3020. op := &request.Operation{
  3021. Name: opGetFolder,
  3022. HTTPMethod: "GET",
  3023. HTTPPath: "/api/v1/folders/{FolderId}",
  3024. }
  3025. if input == nil {
  3026. input = &GetFolderInput{}
  3027. }
  3028. output = &GetFolderOutput{}
  3029. req = c.newRequest(op, input, output)
  3030. return
  3031. }
  3032. // GetFolder API operation for Amazon WorkDocs.
  3033. //
  3034. // Retrieves the metadata of the specified folder.
  3035. //
  3036. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3037. // with awserr.Error's Code and Message methods to get detailed information about
  3038. // the error.
  3039. //
  3040. // See the AWS API reference guide for Amazon WorkDocs's
  3041. // API operation GetFolder for usage and error information.
  3042. //
  3043. // Returned Error Codes:
  3044. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3045. // The resource does not exist.
  3046. //
  3047. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3048. // The operation is not permitted.
  3049. //
  3050. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3051. // The caller does not have access to perform the action on the resource.
  3052. //
  3053. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  3054. // The pagination marker or limit fields are not valid.
  3055. //
  3056. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3057. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3058. // under the control of the organization is failing, such as a connected Active
  3059. // Directory.
  3060. //
  3061. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3062. // One or more of the dependencies is unavailable.
  3063. //
  3064. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  3065. // The specified document version is not in the INITIALIZED state.
  3066. //
  3067. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder
  3068. func (c *WorkDocs) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) {
  3069. req, out := c.GetFolderRequest(input)
  3070. return out, req.Send()
  3071. }
  3072. // GetFolderWithContext is the same as GetFolder with the addition of
  3073. // the ability to pass a context and additional request options.
  3074. //
  3075. // See GetFolder for details on how to use this API operation.
  3076. //
  3077. // The context must be non-nil and will be used for request cancellation. If
  3078. // the context is nil a panic will occur. In the future the SDK may create
  3079. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3080. // for more information on using Contexts.
  3081. func (c *WorkDocs) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) {
  3082. req, out := c.GetFolderRequest(input)
  3083. req.SetContext(ctx)
  3084. req.ApplyOptions(opts...)
  3085. return out, req.Send()
  3086. }
  3087. const opGetFolderPath = "GetFolderPath"
  3088. // GetFolderPathRequest generates a "aws/request.Request" representing the
  3089. // client's request for the GetFolderPath operation. The "output" return
  3090. // value will be populated with the request's response once the request completes
  3091. // successfully.
  3092. //
  3093. // Use "Send" method on the returned Request to send the API call to the service.
  3094. // the "output" return value is not valid until after Send returns without error.
  3095. //
  3096. // See GetFolderPath for more information on using the GetFolderPath
  3097. // API call, and error handling.
  3098. //
  3099. // This method is useful when you want to inject custom logic or configuration
  3100. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3101. //
  3102. //
  3103. // // Example sending a request using the GetFolderPathRequest method.
  3104. // req, resp := client.GetFolderPathRequest(params)
  3105. //
  3106. // err := req.Send()
  3107. // if err == nil { // resp is now filled
  3108. // fmt.Println(resp)
  3109. // }
  3110. //
  3111. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath
  3112. func (c *WorkDocs) GetFolderPathRequest(input *GetFolderPathInput) (req *request.Request, output *GetFolderPathOutput) {
  3113. op := &request.Operation{
  3114. Name: opGetFolderPath,
  3115. HTTPMethod: "GET",
  3116. HTTPPath: "/api/v1/folders/{FolderId}/path",
  3117. }
  3118. if input == nil {
  3119. input = &GetFolderPathInput{}
  3120. }
  3121. output = &GetFolderPathOutput{}
  3122. req = c.newRequest(op, input, output)
  3123. return
  3124. }
  3125. // GetFolderPath API operation for Amazon WorkDocs.
  3126. //
  3127. // Retrieves the path information (the hierarchy from the root folder) for the
  3128. // specified folder.
  3129. //
  3130. // By default, Amazon WorkDocs returns a maximum of 100 levels upwards from
  3131. // the requested folder and only includes the IDs of the parent folders in the
  3132. // path. You can limit the maximum number of levels. You can also request the
  3133. // parent folder names.
  3134. //
  3135. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3136. // with awserr.Error's Code and Message methods to get detailed information about
  3137. // the error.
  3138. //
  3139. // See the AWS API reference guide for Amazon WorkDocs's
  3140. // API operation GetFolderPath for usage and error information.
  3141. //
  3142. // Returned Error Codes:
  3143. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3144. // The resource does not exist.
  3145. //
  3146. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3147. // The operation is not permitted.
  3148. //
  3149. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3150. // The caller does not have access to perform the action on the resource.
  3151. //
  3152. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3153. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3154. // under the control of the organization is failing, such as a connected Active
  3155. // Directory.
  3156. //
  3157. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3158. // One or more of the dependencies is unavailable.
  3159. //
  3160. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath
  3161. func (c *WorkDocs) GetFolderPath(input *GetFolderPathInput) (*GetFolderPathOutput, error) {
  3162. req, out := c.GetFolderPathRequest(input)
  3163. return out, req.Send()
  3164. }
  3165. // GetFolderPathWithContext is the same as GetFolderPath with the addition of
  3166. // the ability to pass a context and additional request options.
  3167. //
  3168. // See GetFolderPath for details on how to use this API operation.
  3169. //
  3170. // The context must be non-nil and will be used for request cancellation. If
  3171. // the context is nil a panic will occur. In the future the SDK may create
  3172. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3173. // for more information on using Contexts.
  3174. func (c *WorkDocs) GetFolderPathWithContext(ctx aws.Context, input *GetFolderPathInput, opts ...request.Option) (*GetFolderPathOutput, error) {
  3175. req, out := c.GetFolderPathRequest(input)
  3176. req.SetContext(ctx)
  3177. req.ApplyOptions(opts...)
  3178. return out, req.Send()
  3179. }
  3180. const opGetResources = "GetResources"
  3181. // GetResourcesRequest generates a "aws/request.Request" representing the
  3182. // client's request for the GetResources operation. The "output" return
  3183. // value will be populated with the request's response once the request completes
  3184. // successfully.
  3185. //
  3186. // Use "Send" method on the returned Request to send the API call to the service.
  3187. // the "output" return value is not valid until after Send returns without error.
  3188. //
  3189. // See GetResources for more information on using the GetResources
  3190. // API call, and error handling.
  3191. //
  3192. // This method is useful when you want to inject custom logic or configuration
  3193. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3194. //
  3195. //
  3196. // // Example sending a request using the GetResourcesRequest method.
  3197. // req, resp := client.GetResourcesRequest(params)
  3198. //
  3199. // err := req.Send()
  3200. // if err == nil { // resp is now filled
  3201. // fmt.Println(resp)
  3202. // }
  3203. //
  3204. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetResources
  3205. func (c *WorkDocs) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) {
  3206. op := &request.Operation{
  3207. Name: opGetResources,
  3208. HTTPMethod: "GET",
  3209. HTTPPath: "/api/v1/resources",
  3210. }
  3211. if input == nil {
  3212. input = &GetResourcesInput{}
  3213. }
  3214. output = &GetResourcesOutput{}
  3215. req = c.newRequest(op, input, output)
  3216. return
  3217. }
  3218. // GetResources API operation for Amazon WorkDocs.
  3219. //
  3220. // Retrieves a collection of resources, including folders and documents. The
  3221. // only CollectionType supported is SHARED_WITH_ME.
  3222. //
  3223. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3224. // with awserr.Error's Code and Message methods to get detailed information about
  3225. // the error.
  3226. //
  3227. // See the AWS API reference guide for Amazon WorkDocs's
  3228. // API operation GetResources for usage and error information.
  3229. //
  3230. // Returned Error Codes:
  3231. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3232. // The caller does not have access to perform the action on the resource.
  3233. //
  3234. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3235. // The operation is not permitted.
  3236. //
  3237. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  3238. // The pagination marker or limit fields are not valid.
  3239. //
  3240. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3241. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3242. // under the control of the organization is failing, such as a connected Active
  3243. // Directory.
  3244. //
  3245. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3246. // One or more of the dependencies is unavailable.
  3247. //
  3248. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetResources
  3249. func (c *WorkDocs) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) {
  3250. req, out := c.GetResourcesRequest(input)
  3251. return out, req.Send()
  3252. }
  3253. // GetResourcesWithContext is the same as GetResources with the addition of
  3254. // the ability to pass a context and additional request options.
  3255. //
  3256. // See GetResources for details on how to use this API operation.
  3257. //
  3258. // The context must be non-nil and will be used for request cancellation. If
  3259. // the context is nil a panic will occur. In the future the SDK may create
  3260. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3261. // for more information on using Contexts.
  3262. func (c *WorkDocs) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error) {
  3263. req, out := c.GetResourcesRequest(input)
  3264. req.SetContext(ctx)
  3265. req.ApplyOptions(opts...)
  3266. return out, req.Send()
  3267. }
  3268. const opInitiateDocumentVersionUpload = "InitiateDocumentVersionUpload"
  3269. // InitiateDocumentVersionUploadRequest generates a "aws/request.Request" representing the
  3270. // client's request for the InitiateDocumentVersionUpload operation. The "output" return
  3271. // value will be populated with the request's response once the request completes
  3272. // successfully.
  3273. //
  3274. // Use "Send" method on the returned Request to send the API call to the service.
  3275. // the "output" return value is not valid until after Send returns without error.
  3276. //
  3277. // See InitiateDocumentVersionUpload for more information on using the InitiateDocumentVersionUpload
  3278. // API call, and error handling.
  3279. //
  3280. // This method is useful when you want to inject custom logic or configuration
  3281. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3282. //
  3283. //
  3284. // // Example sending a request using the InitiateDocumentVersionUploadRequest method.
  3285. // req, resp := client.InitiateDocumentVersionUploadRequest(params)
  3286. //
  3287. // err := req.Send()
  3288. // if err == nil { // resp is now filled
  3289. // fmt.Println(resp)
  3290. // }
  3291. //
  3292. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUpload
  3293. func (c *WorkDocs) InitiateDocumentVersionUploadRequest(input *InitiateDocumentVersionUploadInput) (req *request.Request, output *InitiateDocumentVersionUploadOutput) {
  3294. op := &request.Operation{
  3295. Name: opInitiateDocumentVersionUpload,
  3296. HTTPMethod: "POST",
  3297. HTTPPath: "/api/v1/documents",
  3298. }
  3299. if input == nil {
  3300. input = &InitiateDocumentVersionUploadInput{}
  3301. }
  3302. output = &InitiateDocumentVersionUploadOutput{}
  3303. req = c.newRequest(op, input, output)
  3304. return
  3305. }
  3306. // InitiateDocumentVersionUpload API operation for Amazon WorkDocs.
  3307. //
  3308. // Creates a new document object and version object.
  3309. //
  3310. // The client specifies the parent folder ID and name of the document to upload.
  3311. // The ID is optionally specified when creating a new version of an existing
  3312. // document. This is the first step to upload a document. Next, upload the document
  3313. // to the URL returned from the call, and then call UpdateDocumentVersion.
  3314. //
  3315. // To cancel the document upload, call AbortDocumentVersionUpload.
  3316. //
  3317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3318. // with awserr.Error's Code and Message methods to get detailed information about
  3319. // the error.
  3320. //
  3321. // See the AWS API reference guide for Amazon WorkDocs's
  3322. // API operation InitiateDocumentVersionUpload for usage and error information.
  3323. //
  3324. // Returned Error Codes:
  3325. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3326. // The resource does not exist.
  3327. //
  3328. // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
  3329. // The resource already exists.
  3330. //
  3331. // * ErrCodeStorageLimitExceededException "StorageLimitExceededException"
  3332. // The storage limit has been exceeded.
  3333. //
  3334. // * ErrCodeStorageLimitWillExceedException "StorageLimitWillExceedException"
  3335. // The storage limit will be exceeded.
  3336. //
  3337. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  3338. // The specified document version is not in the INITIALIZED state.
  3339. //
  3340. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3341. // The operation is not permitted.
  3342. //
  3343. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3344. // The caller does not have access to perform the action on the resource.
  3345. //
  3346. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3347. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3348. // under the control of the organization is failing, such as a connected Active
  3349. // Directory.
  3350. //
  3351. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3352. // One or more of the dependencies is unavailable.
  3353. //
  3354. // * ErrCodeDraftUploadOutOfSyncException "DraftUploadOutOfSyncException"
  3355. // This exception is thrown when a valid checkout ID is not presented on document
  3356. // version upload calls for a document that has been checked out from Web client.
  3357. //
  3358. // * ErrCodeResourceAlreadyCheckedOutException "ResourceAlreadyCheckedOutException"
  3359. // The resource is already checked out.
  3360. //
  3361. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUpload
  3362. func (c *WorkDocs) InitiateDocumentVersionUpload(input *InitiateDocumentVersionUploadInput) (*InitiateDocumentVersionUploadOutput, error) {
  3363. req, out := c.InitiateDocumentVersionUploadRequest(input)
  3364. return out, req.Send()
  3365. }
  3366. // InitiateDocumentVersionUploadWithContext is the same as InitiateDocumentVersionUpload with the addition of
  3367. // the ability to pass a context and additional request options.
  3368. //
  3369. // See InitiateDocumentVersionUpload for details on how to use this API operation.
  3370. //
  3371. // The context must be non-nil and will be used for request cancellation. If
  3372. // the context is nil a panic will occur. In the future the SDK may create
  3373. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3374. // for more information on using Contexts.
  3375. func (c *WorkDocs) InitiateDocumentVersionUploadWithContext(ctx aws.Context, input *InitiateDocumentVersionUploadInput, opts ...request.Option) (*InitiateDocumentVersionUploadOutput, error) {
  3376. req, out := c.InitiateDocumentVersionUploadRequest(input)
  3377. req.SetContext(ctx)
  3378. req.ApplyOptions(opts...)
  3379. return out, req.Send()
  3380. }
  3381. const opRemoveAllResourcePermissions = "RemoveAllResourcePermissions"
  3382. // RemoveAllResourcePermissionsRequest generates a "aws/request.Request" representing the
  3383. // client's request for the RemoveAllResourcePermissions operation. The "output" return
  3384. // value will be populated with the request's response once the request completes
  3385. // successfully.
  3386. //
  3387. // Use "Send" method on the returned Request to send the API call to the service.
  3388. // the "output" return value is not valid until after Send returns without error.
  3389. //
  3390. // See RemoveAllResourcePermissions for more information on using the RemoveAllResourcePermissions
  3391. // API call, and error handling.
  3392. //
  3393. // This method is useful when you want to inject custom logic or configuration
  3394. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3395. //
  3396. //
  3397. // // Example sending a request using the RemoveAllResourcePermissionsRequest method.
  3398. // req, resp := client.RemoveAllResourcePermissionsRequest(params)
  3399. //
  3400. // err := req.Send()
  3401. // if err == nil { // resp is now filled
  3402. // fmt.Println(resp)
  3403. // }
  3404. //
  3405. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissions
  3406. func (c *WorkDocs) RemoveAllResourcePermissionsRequest(input *RemoveAllResourcePermissionsInput) (req *request.Request, output *RemoveAllResourcePermissionsOutput) {
  3407. op := &request.Operation{
  3408. Name: opRemoveAllResourcePermissions,
  3409. HTTPMethod: "DELETE",
  3410. HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
  3411. }
  3412. if input == nil {
  3413. input = &RemoveAllResourcePermissionsInput{}
  3414. }
  3415. output = &RemoveAllResourcePermissionsOutput{}
  3416. req = c.newRequest(op, input, output)
  3417. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3418. return
  3419. }
  3420. // RemoveAllResourcePermissions API operation for Amazon WorkDocs.
  3421. //
  3422. // Removes all the permissions from the specified resource.
  3423. //
  3424. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3425. // with awserr.Error's Code and Message methods to get detailed information about
  3426. // the error.
  3427. //
  3428. // See the AWS API reference guide for Amazon WorkDocs's
  3429. // API operation RemoveAllResourcePermissions for usage and error information.
  3430. //
  3431. // Returned Error Codes:
  3432. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3433. // The operation is not permitted.
  3434. //
  3435. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3436. // The caller does not have access to perform the action on the resource.
  3437. //
  3438. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3439. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3440. // under the control of the organization is failing, such as a connected Active
  3441. // Directory.
  3442. //
  3443. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3444. // One or more of the dependencies is unavailable.
  3445. //
  3446. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissions
  3447. func (c *WorkDocs) RemoveAllResourcePermissions(input *RemoveAllResourcePermissionsInput) (*RemoveAllResourcePermissionsOutput, error) {
  3448. req, out := c.RemoveAllResourcePermissionsRequest(input)
  3449. return out, req.Send()
  3450. }
  3451. // RemoveAllResourcePermissionsWithContext is the same as RemoveAllResourcePermissions with the addition of
  3452. // the ability to pass a context and additional request options.
  3453. //
  3454. // See RemoveAllResourcePermissions for details on how to use this API operation.
  3455. //
  3456. // The context must be non-nil and will be used for request cancellation. If
  3457. // the context is nil a panic will occur. In the future the SDK may create
  3458. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3459. // for more information on using Contexts.
  3460. func (c *WorkDocs) RemoveAllResourcePermissionsWithContext(ctx aws.Context, input *RemoveAllResourcePermissionsInput, opts ...request.Option) (*RemoveAllResourcePermissionsOutput, error) {
  3461. req, out := c.RemoveAllResourcePermissionsRequest(input)
  3462. req.SetContext(ctx)
  3463. req.ApplyOptions(opts...)
  3464. return out, req.Send()
  3465. }
  3466. const opRemoveResourcePermission = "RemoveResourcePermission"
  3467. // RemoveResourcePermissionRequest generates a "aws/request.Request" representing the
  3468. // client's request for the RemoveResourcePermission operation. The "output" return
  3469. // value will be populated with the request's response once the request completes
  3470. // successfully.
  3471. //
  3472. // Use "Send" method on the returned Request to send the API call to the service.
  3473. // the "output" return value is not valid until after Send returns without error.
  3474. //
  3475. // See RemoveResourcePermission for more information on using the RemoveResourcePermission
  3476. // API call, and error handling.
  3477. //
  3478. // This method is useful when you want to inject custom logic or configuration
  3479. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3480. //
  3481. //
  3482. // // Example sending a request using the RemoveResourcePermissionRequest method.
  3483. // req, resp := client.RemoveResourcePermissionRequest(params)
  3484. //
  3485. // err := req.Send()
  3486. // if err == nil { // resp is now filled
  3487. // fmt.Println(resp)
  3488. // }
  3489. //
  3490. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermission
  3491. func (c *WorkDocs) RemoveResourcePermissionRequest(input *RemoveResourcePermissionInput) (req *request.Request, output *RemoveResourcePermissionOutput) {
  3492. op := &request.Operation{
  3493. Name: opRemoveResourcePermission,
  3494. HTTPMethod: "DELETE",
  3495. HTTPPath: "/api/v1/resources/{ResourceId}/permissions/{PrincipalId}",
  3496. }
  3497. if input == nil {
  3498. input = &RemoveResourcePermissionInput{}
  3499. }
  3500. output = &RemoveResourcePermissionOutput{}
  3501. req = c.newRequest(op, input, output)
  3502. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3503. return
  3504. }
  3505. // RemoveResourcePermission API operation for Amazon WorkDocs.
  3506. //
  3507. // Removes the permission for the specified principal from the specified resource.
  3508. //
  3509. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3510. // with awserr.Error's Code and Message methods to get detailed information about
  3511. // the error.
  3512. //
  3513. // See the AWS API reference guide for Amazon WorkDocs's
  3514. // API operation RemoveResourcePermission for usage and error information.
  3515. //
  3516. // Returned Error Codes:
  3517. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3518. // The operation is not permitted.
  3519. //
  3520. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3521. // The caller does not have access to perform the action on the resource.
  3522. //
  3523. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3524. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3525. // under the control of the organization is failing, such as a connected Active
  3526. // Directory.
  3527. //
  3528. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3529. // One or more of the dependencies is unavailable.
  3530. //
  3531. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermission
  3532. func (c *WorkDocs) RemoveResourcePermission(input *RemoveResourcePermissionInput) (*RemoveResourcePermissionOutput, error) {
  3533. req, out := c.RemoveResourcePermissionRequest(input)
  3534. return out, req.Send()
  3535. }
  3536. // RemoveResourcePermissionWithContext is the same as RemoveResourcePermission with the addition of
  3537. // the ability to pass a context and additional request options.
  3538. //
  3539. // See RemoveResourcePermission for details on how to use this API operation.
  3540. //
  3541. // The context must be non-nil and will be used for request cancellation. If
  3542. // the context is nil a panic will occur. In the future the SDK may create
  3543. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3544. // for more information on using Contexts.
  3545. func (c *WorkDocs) RemoveResourcePermissionWithContext(ctx aws.Context, input *RemoveResourcePermissionInput, opts ...request.Option) (*RemoveResourcePermissionOutput, error) {
  3546. req, out := c.RemoveResourcePermissionRequest(input)
  3547. req.SetContext(ctx)
  3548. req.ApplyOptions(opts...)
  3549. return out, req.Send()
  3550. }
  3551. const opUpdateDocument = "UpdateDocument"
  3552. // UpdateDocumentRequest generates a "aws/request.Request" representing the
  3553. // client's request for the UpdateDocument operation. The "output" return
  3554. // value will be populated with the request's response once the request completes
  3555. // successfully.
  3556. //
  3557. // Use "Send" method on the returned Request to send the API call to the service.
  3558. // the "output" return value is not valid until after Send returns without error.
  3559. //
  3560. // See UpdateDocument for more information on using the UpdateDocument
  3561. // API call, and error handling.
  3562. //
  3563. // This method is useful when you want to inject custom logic or configuration
  3564. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3565. //
  3566. //
  3567. // // Example sending a request using the UpdateDocumentRequest method.
  3568. // req, resp := client.UpdateDocumentRequest(params)
  3569. //
  3570. // err := req.Send()
  3571. // if err == nil { // resp is now filled
  3572. // fmt.Println(resp)
  3573. // }
  3574. //
  3575. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocument
  3576. func (c *WorkDocs) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Request, output *UpdateDocumentOutput) {
  3577. op := &request.Operation{
  3578. Name: opUpdateDocument,
  3579. HTTPMethod: "PATCH",
  3580. HTTPPath: "/api/v1/documents/{DocumentId}",
  3581. }
  3582. if input == nil {
  3583. input = &UpdateDocumentInput{}
  3584. }
  3585. output = &UpdateDocumentOutput{}
  3586. req = c.newRequest(op, input, output)
  3587. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3588. return
  3589. }
  3590. // UpdateDocument API operation for Amazon WorkDocs.
  3591. //
  3592. // Updates the specified attributes of a document. The user must have access
  3593. // to both the document and its parent folder, if applicable.
  3594. //
  3595. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3596. // with awserr.Error's Code and Message methods to get detailed information about
  3597. // the error.
  3598. //
  3599. // See the AWS API reference guide for Amazon WorkDocs's
  3600. // API operation UpdateDocument for usage and error information.
  3601. //
  3602. // Returned Error Codes:
  3603. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3604. // The resource does not exist.
  3605. //
  3606. // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
  3607. // The resource already exists.
  3608. //
  3609. // * ErrCodeLimitExceededException "LimitExceededException"
  3610. // The maximum of 100,000 folders under the parent folder has been exceeded.
  3611. //
  3612. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  3613. // The specified document version is not in the INITIALIZED state.
  3614. //
  3615. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  3616. // Another operation is in progress on the resource that conflicts with the
  3617. // current operation.
  3618. //
  3619. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  3620. // The resource hierarchy is changing.
  3621. //
  3622. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3623. // The operation is not permitted.
  3624. //
  3625. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3626. // The caller does not have access to perform the action on the resource.
  3627. //
  3628. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3629. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3630. // under the control of the organization is failing, such as a connected Active
  3631. // Directory.
  3632. //
  3633. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3634. // One or more of the dependencies is unavailable.
  3635. //
  3636. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocument
  3637. func (c *WorkDocs) UpdateDocument(input *UpdateDocumentInput) (*UpdateDocumentOutput, error) {
  3638. req, out := c.UpdateDocumentRequest(input)
  3639. return out, req.Send()
  3640. }
  3641. // UpdateDocumentWithContext is the same as UpdateDocument with the addition of
  3642. // the ability to pass a context and additional request options.
  3643. //
  3644. // See UpdateDocument for details on how to use this API operation.
  3645. //
  3646. // The context must be non-nil and will be used for request cancellation. If
  3647. // the context is nil a panic will occur. In the future the SDK may create
  3648. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3649. // for more information on using Contexts.
  3650. func (c *WorkDocs) UpdateDocumentWithContext(ctx aws.Context, input *UpdateDocumentInput, opts ...request.Option) (*UpdateDocumentOutput, error) {
  3651. req, out := c.UpdateDocumentRequest(input)
  3652. req.SetContext(ctx)
  3653. req.ApplyOptions(opts...)
  3654. return out, req.Send()
  3655. }
  3656. const opUpdateDocumentVersion = "UpdateDocumentVersion"
  3657. // UpdateDocumentVersionRequest generates a "aws/request.Request" representing the
  3658. // client's request for the UpdateDocumentVersion operation. The "output" return
  3659. // value will be populated with the request's response once the request completes
  3660. // successfully.
  3661. //
  3662. // Use "Send" method on the returned Request to send the API call to the service.
  3663. // the "output" return value is not valid until after Send returns without error.
  3664. //
  3665. // See UpdateDocumentVersion for more information on using the UpdateDocumentVersion
  3666. // API call, and error handling.
  3667. //
  3668. // This method is useful when you want to inject custom logic or configuration
  3669. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3670. //
  3671. //
  3672. // // Example sending a request using the UpdateDocumentVersionRequest method.
  3673. // req, resp := client.UpdateDocumentVersionRequest(params)
  3674. //
  3675. // err := req.Send()
  3676. // if err == nil { // resp is now filled
  3677. // fmt.Println(resp)
  3678. // }
  3679. //
  3680. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersion
  3681. func (c *WorkDocs) UpdateDocumentVersionRequest(input *UpdateDocumentVersionInput) (req *request.Request, output *UpdateDocumentVersionOutput) {
  3682. op := &request.Operation{
  3683. Name: opUpdateDocumentVersion,
  3684. HTTPMethod: "PATCH",
  3685. HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
  3686. }
  3687. if input == nil {
  3688. input = &UpdateDocumentVersionInput{}
  3689. }
  3690. output = &UpdateDocumentVersionOutput{}
  3691. req = c.newRequest(op, input, output)
  3692. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3693. return
  3694. }
  3695. // UpdateDocumentVersion API operation for Amazon WorkDocs.
  3696. //
  3697. // Changes the status of the document version to ACTIVE.
  3698. //
  3699. // Amazon WorkDocs also sets its document container to ACTIVE. This is the last
  3700. // step in a document upload, after the client uploads the document to an S3-presigned
  3701. // URL returned by InitiateDocumentVersionUpload.
  3702. //
  3703. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3704. // with awserr.Error's Code and Message methods to get detailed information about
  3705. // the error.
  3706. //
  3707. // See the AWS API reference guide for Amazon WorkDocs's
  3708. // API operation UpdateDocumentVersion for usage and error information.
  3709. //
  3710. // Returned Error Codes:
  3711. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3712. // The resource does not exist.
  3713. //
  3714. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  3715. // The specified document version is not in the INITIALIZED state.
  3716. //
  3717. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  3718. // The resource hierarchy is changing.
  3719. //
  3720. // * ErrCodeInvalidOperationException "InvalidOperationException"
  3721. // The operation is invalid.
  3722. //
  3723. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3724. // The operation is not permitted.
  3725. //
  3726. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3727. // The caller does not have access to perform the action on the resource.
  3728. //
  3729. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3730. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3731. // under the control of the organization is failing, such as a connected Active
  3732. // Directory.
  3733. //
  3734. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3735. // One or more of the dependencies is unavailable.
  3736. //
  3737. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersion
  3738. func (c *WorkDocs) UpdateDocumentVersion(input *UpdateDocumentVersionInput) (*UpdateDocumentVersionOutput, error) {
  3739. req, out := c.UpdateDocumentVersionRequest(input)
  3740. return out, req.Send()
  3741. }
  3742. // UpdateDocumentVersionWithContext is the same as UpdateDocumentVersion with the addition of
  3743. // the ability to pass a context and additional request options.
  3744. //
  3745. // See UpdateDocumentVersion for details on how to use this API operation.
  3746. //
  3747. // The context must be non-nil and will be used for request cancellation. If
  3748. // the context is nil a panic will occur. In the future the SDK may create
  3749. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3750. // for more information on using Contexts.
  3751. func (c *WorkDocs) UpdateDocumentVersionWithContext(ctx aws.Context, input *UpdateDocumentVersionInput, opts ...request.Option) (*UpdateDocumentVersionOutput, error) {
  3752. req, out := c.UpdateDocumentVersionRequest(input)
  3753. req.SetContext(ctx)
  3754. req.ApplyOptions(opts...)
  3755. return out, req.Send()
  3756. }
  3757. const opUpdateFolder = "UpdateFolder"
  3758. // UpdateFolderRequest generates a "aws/request.Request" representing the
  3759. // client's request for the UpdateFolder operation. The "output" return
  3760. // value will be populated with the request's response once the request completes
  3761. // successfully.
  3762. //
  3763. // Use "Send" method on the returned Request to send the API call to the service.
  3764. // the "output" return value is not valid until after Send returns without error.
  3765. //
  3766. // See UpdateFolder for more information on using the UpdateFolder
  3767. // API call, and error handling.
  3768. //
  3769. // This method is useful when you want to inject custom logic or configuration
  3770. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3771. //
  3772. //
  3773. // // Example sending a request using the UpdateFolderRequest method.
  3774. // req, resp := client.UpdateFolderRequest(params)
  3775. //
  3776. // err := req.Send()
  3777. // if err == nil { // resp is now filled
  3778. // fmt.Println(resp)
  3779. // }
  3780. //
  3781. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolder
  3782. func (c *WorkDocs) UpdateFolderRequest(input *UpdateFolderInput) (req *request.Request, output *UpdateFolderOutput) {
  3783. op := &request.Operation{
  3784. Name: opUpdateFolder,
  3785. HTTPMethod: "PATCH",
  3786. HTTPPath: "/api/v1/folders/{FolderId}",
  3787. }
  3788. if input == nil {
  3789. input = &UpdateFolderInput{}
  3790. }
  3791. output = &UpdateFolderOutput{}
  3792. req = c.newRequest(op, input, output)
  3793. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3794. return
  3795. }
  3796. // UpdateFolder API operation for Amazon WorkDocs.
  3797. //
  3798. // Updates the specified attributes of the specified folder. The user must have
  3799. // access to both the folder and its parent folder, if applicable.
  3800. //
  3801. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3802. // with awserr.Error's Code and Message methods to get detailed information about
  3803. // the error.
  3804. //
  3805. // See the AWS API reference guide for Amazon WorkDocs's
  3806. // API operation UpdateFolder for usage and error information.
  3807. //
  3808. // Returned Error Codes:
  3809. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3810. // The resource does not exist.
  3811. //
  3812. // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
  3813. // The resource already exists.
  3814. //
  3815. // * ErrCodeProhibitedStateException "ProhibitedStateException"
  3816. // The specified document version is not in the INITIALIZED state.
  3817. //
  3818. // * ErrCodeConflictingOperationException "ConflictingOperationException"
  3819. // Another operation is in progress on the resource that conflicts with the
  3820. // current operation.
  3821. //
  3822. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  3823. // The resource hierarchy is changing.
  3824. //
  3825. // * ErrCodeLimitExceededException "LimitExceededException"
  3826. // The maximum of 100,000 folders under the parent folder has been exceeded.
  3827. //
  3828. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3829. // The operation is not permitted.
  3830. //
  3831. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3832. // The caller does not have access to perform the action on the resource.
  3833. //
  3834. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3835. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3836. // under the control of the organization is failing, such as a connected Active
  3837. // Directory.
  3838. //
  3839. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3840. // One or more of the dependencies is unavailable.
  3841. //
  3842. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolder
  3843. func (c *WorkDocs) UpdateFolder(input *UpdateFolderInput) (*UpdateFolderOutput, error) {
  3844. req, out := c.UpdateFolderRequest(input)
  3845. return out, req.Send()
  3846. }
  3847. // UpdateFolderWithContext is the same as UpdateFolder with the addition of
  3848. // the ability to pass a context and additional request options.
  3849. //
  3850. // See UpdateFolder for details on how to use this API operation.
  3851. //
  3852. // The context must be non-nil and will be used for request cancellation. If
  3853. // the context is nil a panic will occur. In the future the SDK may create
  3854. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3855. // for more information on using Contexts.
  3856. func (c *WorkDocs) UpdateFolderWithContext(ctx aws.Context, input *UpdateFolderInput, opts ...request.Option) (*UpdateFolderOutput, error) {
  3857. req, out := c.UpdateFolderRequest(input)
  3858. req.SetContext(ctx)
  3859. req.ApplyOptions(opts...)
  3860. return out, req.Send()
  3861. }
  3862. const opUpdateUser = "UpdateUser"
  3863. // UpdateUserRequest generates a "aws/request.Request" representing the
  3864. // client's request for the UpdateUser operation. The "output" return
  3865. // value will be populated with the request's response once the request completes
  3866. // successfully.
  3867. //
  3868. // Use "Send" method on the returned Request to send the API call to the service.
  3869. // the "output" return value is not valid until after Send returns without error.
  3870. //
  3871. // See UpdateUser for more information on using the UpdateUser
  3872. // API call, and error handling.
  3873. //
  3874. // This method is useful when you want to inject custom logic or configuration
  3875. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3876. //
  3877. //
  3878. // // Example sending a request using the UpdateUserRequest method.
  3879. // req, resp := client.UpdateUserRequest(params)
  3880. //
  3881. // err := req.Send()
  3882. // if err == nil { // resp is now filled
  3883. // fmt.Println(resp)
  3884. // }
  3885. //
  3886. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUser
  3887. func (c *WorkDocs) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) {
  3888. op := &request.Operation{
  3889. Name: opUpdateUser,
  3890. HTTPMethod: "PATCH",
  3891. HTTPPath: "/api/v1/users/{UserId}",
  3892. }
  3893. if input == nil {
  3894. input = &UpdateUserInput{}
  3895. }
  3896. output = &UpdateUserOutput{}
  3897. req = c.newRequest(op, input, output)
  3898. return
  3899. }
  3900. // UpdateUser API operation for Amazon WorkDocs.
  3901. //
  3902. // Updates the specified attributes of the specified user, and grants or revokes
  3903. // administrative privileges to the Amazon WorkDocs site.
  3904. //
  3905. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3906. // with awserr.Error's Code and Message methods to get detailed information about
  3907. // the error.
  3908. //
  3909. // See the AWS API reference guide for Amazon WorkDocs's
  3910. // API operation UpdateUser for usage and error information.
  3911. //
  3912. // Returned Error Codes:
  3913. // * ErrCodeEntityNotExistsException "EntityNotExistsException"
  3914. // The resource does not exist.
  3915. //
  3916. // * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
  3917. // The operation is not permitted.
  3918. //
  3919. // * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
  3920. // The caller does not have access to perform the action on the resource.
  3921. //
  3922. // * ErrCodeIllegalUserStateException "IllegalUserStateException"
  3923. // The user is undergoing transfer of ownership.
  3924. //
  3925. // * ErrCodeFailedDependencyException "FailedDependencyException"
  3926. // The AWS Directory Service cannot reach an on-premises instance. Or a dependency
  3927. // under the control of the organization is failing, such as a connected Active
  3928. // Directory.
  3929. //
  3930. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  3931. // One or more of the dependencies is unavailable.
  3932. //
  3933. // * ErrCodeDeactivatingLastSystemUserException "DeactivatingLastSystemUserException"
  3934. // The last user in the organization is being deactivated.
  3935. //
  3936. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  3937. // The pagination marker or limit fields are not valid.
  3938. //
  3939. // See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUser
  3940. func (c *WorkDocs) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) {
  3941. req, out := c.UpdateUserRequest(input)
  3942. return out, req.Send()
  3943. }
  3944. // UpdateUserWithContext is the same as UpdateUser with the addition of
  3945. // the ability to pass a context and additional request options.
  3946. //
  3947. // See UpdateUser for details on how to use this API operation.
  3948. //
  3949. // The context must be non-nil and will be used for request cancellation. If
  3950. // the context is nil a panic will occur. In the future the SDK may create
  3951. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3952. // for more information on using Contexts.
  3953. func (c *WorkDocs) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) {
  3954. req, out := c.UpdateUserRequest(input)
  3955. req.SetContext(ctx)
  3956. req.ApplyOptions(opts...)
  3957. return out, req.Send()
  3958. }
  3959. type AbortDocumentVersionUploadInput struct {
  3960. _ struct{} `type:"structure"`
  3961. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  3962. // API actions, as in accessing the API using AWS credentials.
  3963. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  3964. // The ID of the document.
  3965. //
  3966. // DocumentId is a required field
  3967. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  3968. // The ID of the version.
  3969. //
  3970. // VersionId is a required field
  3971. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  3972. }
  3973. // String returns the string representation
  3974. func (s AbortDocumentVersionUploadInput) String() string {
  3975. return awsutil.Prettify(s)
  3976. }
  3977. // GoString returns the string representation
  3978. func (s AbortDocumentVersionUploadInput) GoString() string {
  3979. return s.String()
  3980. }
  3981. // Validate inspects the fields of the type to determine if they are valid.
  3982. func (s *AbortDocumentVersionUploadInput) Validate() error {
  3983. invalidParams := request.ErrInvalidParams{Context: "AbortDocumentVersionUploadInput"}
  3984. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  3985. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  3986. }
  3987. if s.DocumentId == nil {
  3988. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  3989. }
  3990. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  3991. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  3992. }
  3993. if s.VersionId == nil {
  3994. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  3995. }
  3996. if s.VersionId != nil && len(*s.VersionId) < 1 {
  3997. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  3998. }
  3999. if invalidParams.Len() > 0 {
  4000. return invalidParams
  4001. }
  4002. return nil
  4003. }
  4004. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4005. func (s *AbortDocumentVersionUploadInput) SetAuthenticationToken(v string) *AbortDocumentVersionUploadInput {
  4006. s.AuthenticationToken = &v
  4007. return s
  4008. }
  4009. // SetDocumentId sets the DocumentId field's value.
  4010. func (s *AbortDocumentVersionUploadInput) SetDocumentId(v string) *AbortDocumentVersionUploadInput {
  4011. s.DocumentId = &v
  4012. return s
  4013. }
  4014. // SetVersionId sets the VersionId field's value.
  4015. func (s *AbortDocumentVersionUploadInput) SetVersionId(v string) *AbortDocumentVersionUploadInput {
  4016. s.VersionId = &v
  4017. return s
  4018. }
  4019. type AbortDocumentVersionUploadOutput struct {
  4020. _ struct{} `type:"structure"`
  4021. }
  4022. // String returns the string representation
  4023. func (s AbortDocumentVersionUploadOutput) String() string {
  4024. return awsutil.Prettify(s)
  4025. }
  4026. // GoString returns the string representation
  4027. func (s AbortDocumentVersionUploadOutput) GoString() string {
  4028. return s.String()
  4029. }
  4030. type ActivateUserInput struct {
  4031. _ struct{} `type:"structure"`
  4032. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4033. // API actions, as in accessing the API using AWS credentials.
  4034. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4035. // The ID of the user.
  4036. //
  4037. // UserId is a required field
  4038. UserId *string `location:"uri" locationName:"UserId" min:"1" type:"string" required:"true"`
  4039. }
  4040. // String returns the string representation
  4041. func (s ActivateUserInput) String() string {
  4042. return awsutil.Prettify(s)
  4043. }
  4044. // GoString returns the string representation
  4045. func (s ActivateUserInput) GoString() string {
  4046. return s.String()
  4047. }
  4048. // Validate inspects the fields of the type to determine if they are valid.
  4049. func (s *ActivateUserInput) Validate() error {
  4050. invalidParams := request.ErrInvalidParams{Context: "ActivateUserInput"}
  4051. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4052. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4053. }
  4054. if s.UserId == nil {
  4055. invalidParams.Add(request.NewErrParamRequired("UserId"))
  4056. }
  4057. if s.UserId != nil && len(*s.UserId) < 1 {
  4058. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  4059. }
  4060. if invalidParams.Len() > 0 {
  4061. return invalidParams
  4062. }
  4063. return nil
  4064. }
  4065. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4066. func (s *ActivateUserInput) SetAuthenticationToken(v string) *ActivateUserInput {
  4067. s.AuthenticationToken = &v
  4068. return s
  4069. }
  4070. // SetUserId sets the UserId field's value.
  4071. func (s *ActivateUserInput) SetUserId(v string) *ActivateUserInput {
  4072. s.UserId = &v
  4073. return s
  4074. }
  4075. type ActivateUserOutput struct {
  4076. _ struct{} `type:"structure"`
  4077. // The user information.
  4078. User *User `type:"structure"`
  4079. }
  4080. // String returns the string representation
  4081. func (s ActivateUserOutput) String() string {
  4082. return awsutil.Prettify(s)
  4083. }
  4084. // GoString returns the string representation
  4085. func (s ActivateUserOutput) GoString() string {
  4086. return s.String()
  4087. }
  4088. // SetUser sets the User field's value.
  4089. func (s *ActivateUserOutput) SetUser(v *User) *ActivateUserOutput {
  4090. s.User = v
  4091. return s
  4092. }
  4093. // Describes the activity information.
  4094. type Activity struct {
  4095. _ struct{} `type:"structure"`
  4096. // Metadata of the commenting activity. This is an optional field and is filled
  4097. // for commenting activities.
  4098. CommentMetadata *CommentMetadata `type:"structure"`
  4099. // The user who performed the action.
  4100. Initiator *UserMetadata `type:"structure"`
  4101. // Indicates whether an activity is indirect or direct. An indirect activity
  4102. // results from a direct activity performed on a parent resource. For example,
  4103. // sharing a parent folder (the direct activity) shares all of the subfolders
  4104. // and documents within the parent folder (the indirect activity).
  4105. IsIndirectActivity *bool `type:"boolean"`
  4106. // The ID of the organization.
  4107. OrganizationId *string `min:"1" type:"string"`
  4108. // The original parent of the resource. This is an optional field and is filled
  4109. // for move activities.
  4110. OriginalParent *ResourceMetadata `type:"structure"`
  4111. // The list of users or groups impacted by this action. This is an optional
  4112. // field and is filled for the following sharing activities: DOCUMENT_SHARED,
  4113. // DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.
  4114. Participants *Participants `type:"structure"`
  4115. // The metadata of the resource involved in the user action.
  4116. ResourceMetadata *ResourceMetadata `type:"structure"`
  4117. // The timestamp when the action was performed.
  4118. TimeStamp *time.Time `type:"timestamp"`
  4119. // The activity type.
  4120. Type *string `type:"string" enum:"ActivityType"`
  4121. }
  4122. // String returns the string representation
  4123. func (s Activity) String() string {
  4124. return awsutil.Prettify(s)
  4125. }
  4126. // GoString returns the string representation
  4127. func (s Activity) GoString() string {
  4128. return s.String()
  4129. }
  4130. // SetCommentMetadata sets the CommentMetadata field's value.
  4131. func (s *Activity) SetCommentMetadata(v *CommentMetadata) *Activity {
  4132. s.CommentMetadata = v
  4133. return s
  4134. }
  4135. // SetInitiator sets the Initiator field's value.
  4136. func (s *Activity) SetInitiator(v *UserMetadata) *Activity {
  4137. s.Initiator = v
  4138. return s
  4139. }
  4140. // SetIsIndirectActivity sets the IsIndirectActivity field's value.
  4141. func (s *Activity) SetIsIndirectActivity(v bool) *Activity {
  4142. s.IsIndirectActivity = &v
  4143. return s
  4144. }
  4145. // SetOrganizationId sets the OrganizationId field's value.
  4146. func (s *Activity) SetOrganizationId(v string) *Activity {
  4147. s.OrganizationId = &v
  4148. return s
  4149. }
  4150. // SetOriginalParent sets the OriginalParent field's value.
  4151. func (s *Activity) SetOriginalParent(v *ResourceMetadata) *Activity {
  4152. s.OriginalParent = v
  4153. return s
  4154. }
  4155. // SetParticipants sets the Participants field's value.
  4156. func (s *Activity) SetParticipants(v *Participants) *Activity {
  4157. s.Participants = v
  4158. return s
  4159. }
  4160. // SetResourceMetadata sets the ResourceMetadata field's value.
  4161. func (s *Activity) SetResourceMetadata(v *ResourceMetadata) *Activity {
  4162. s.ResourceMetadata = v
  4163. return s
  4164. }
  4165. // SetTimeStamp sets the TimeStamp field's value.
  4166. func (s *Activity) SetTimeStamp(v time.Time) *Activity {
  4167. s.TimeStamp = &v
  4168. return s
  4169. }
  4170. // SetType sets the Type field's value.
  4171. func (s *Activity) SetType(v string) *Activity {
  4172. s.Type = &v
  4173. return s
  4174. }
  4175. type AddResourcePermissionsInput struct {
  4176. _ struct{} `type:"structure"`
  4177. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4178. // API actions, as in accessing the API using AWS credentials.
  4179. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4180. // The notification options.
  4181. NotificationOptions *NotificationOptions `type:"structure"`
  4182. // The users, groups, or organization being granted permission.
  4183. //
  4184. // Principals is a required field
  4185. Principals []*SharePrincipal `type:"list" required:"true"`
  4186. // The ID of the resource.
  4187. //
  4188. // ResourceId is a required field
  4189. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  4190. }
  4191. // String returns the string representation
  4192. func (s AddResourcePermissionsInput) String() string {
  4193. return awsutil.Prettify(s)
  4194. }
  4195. // GoString returns the string representation
  4196. func (s AddResourcePermissionsInput) GoString() string {
  4197. return s.String()
  4198. }
  4199. // Validate inspects the fields of the type to determine if they are valid.
  4200. func (s *AddResourcePermissionsInput) Validate() error {
  4201. invalidParams := request.ErrInvalidParams{Context: "AddResourcePermissionsInput"}
  4202. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4203. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4204. }
  4205. if s.Principals == nil {
  4206. invalidParams.Add(request.NewErrParamRequired("Principals"))
  4207. }
  4208. if s.ResourceId == nil {
  4209. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4210. }
  4211. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4212. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4213. }
  4214. if s.Principals != nil {
  4215. for i, v := range s.Principals {
  4216. if v == nil {
  4217. continue
  4218. }
  4219. if err := v.Validate(); err != nil {
  4220. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Principals", i), err.(request.ErrInvalidParams))
  4221. }
  4222. }
  4223. }
  4224. if invalidParams.Len() > 0 {
  4225. return invalidParams
  4226. }
  4227. return nil
  4228. }
  4229. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4230. func (s *AddResourcePermissionsInput) SetAuthenticationToken(v string) *AddResourcePermissionsInput {
  4231. s.AuthenticationToken = &v
  4232. return s
  4233. }
  4234. // SetNotificationOptions sets the NotificationOptions field's value.
  4235. func (s *AddResourcePermissionsInput) SetNotificationOptions(v *NotificationOptions) *AddResourcePermissionsInput {
  4236. s.NotificationOptions = v
  4237. return s
  4238. }
  4239. // SetPrincipals sets the Principals field's value.
  4240. func (s *AddResourcePermissionsInput) SetPrincipals(v []*SharePrincipal) *AddResourcePermissionsInput {
  4241. s.Principals = v
  4242. return s
  4243. }
  4244. // SetResourceId sets the ResourceId field's value.
  4245. func (s *AddResourcePermissionsInput) SetResourceId(v string) *AddResourcePermissionsInput {
  4246. s.ResourceId = &v
  4247. return s
  4248. }
  4249. type AddResourcePermissionsOutput struct {
  4250. _ struct{} `type:"structure"`
  4251. // The share results.
  4252. ShareResults []*ShareResult `type:"list"`
  4253. }
  4254. // String returns the string representation
  4255. func (s AddResourcePermissionsOutput) String() string {
  4256. return awsutil.Prettify(s)
  4257. }
  4258. // GoString returns the string representation
  4259. func (s AddResourcePermissionsOutput) GoString() string {
  4260. return s.String()
  4261. }
  4262. // SetShareResults sets the ShareResults field's value.
  4263. func (s *AddResourcePermissionsOutput) SetShareResults(v []*ShareResult) *AddResourcePermissionsOutput {
  4264. s.ShareResults = v
  4265. return s
  4266. }
  4267. // Describes a comment.
  4268. type Comment struct {
  4269. _ struct{} `type:"structure"`
  4270. // The ID of the comment.
  4271. //
  4272. // CommentId is a required field
  4273. CommentId *string `min:"1" type:"string" required:"true"`
  4274. // The details of the user who made the comment.
  4275. Contributor *User `type:"structure"`
  4276. // The time that the comment was created.
  4277. CreatedTimestamp *time.Time `type:"timestamp"`
  4278. // The ID of the parent comment.
  4279. ParentId *string `min:"1" type:"string"`
  4280. // If the comment is a reply to another user's comment, this field contains
  4281. // the user ID of the user being replied to.
  4282. RecipientId *string `min:"1" type:"string"`
  4283. // The status of the comment.
  4284. Status *string `type:"string" enum:"CommentStatusType"`
  4285. // The text of the comment.
  4286. Text *string `min:"1" type:"string" sensitive:"true"`
  4287. // The ID of the root comment in the thread.
  4288. ThreadId *string `min:"1" type:"string"`
  4289. // The visibility of the comment. Options are either PRIVATE, where the comment
  4290. // is visible only to the comment author and document owner and co-owners, or
  4291. // PUBLIC, where the comment is visible to document owners, co-owners, and contributors.
  4292. Visibility *string `type:"string" enum:"CommentVisibilityType"`
  4293. }
  4294. // String returns the string representation
  4295. func (s Comment) String() string {
  4296. return awsutil.Prettify(s)
  4297. }
  4298. // GoString returns the string representation
  4299. func (s Comment) GoString() string {
  4300. return s.String()
  4301. }
  4302. // SetCommentId sets the CommentId field's value.
  4303. func (s *Comment) SetCommentId(v string) *Comment {
  4304. s.CommentId = &v
  4305. return s
  4306. }
  4307. // SetContributor sets the Contributor field's value.
  4308. func (s *Comment) SetContributor(v *User) *Comment {
  4309. s.Contributor = v
  4310. return s
  4311. }
  4312. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  4313. func (s *Comment) SetCreatedTimestamp(v time.Time) *Comment {
  4314. s.CreatedTimestamp = &v
  4315. return s
  4316. }
  4317. // SetParentId sets the ParentId field's value.
  4318. func (s *Comment) SetParentId(v string) *Comment {
  4319. s.ParentId = &v
  4320. return s
  4321. }
  4322. // SetRecipientId sets the RecipientId field's value.
  4323. func (s *Comment) SetRecipientId(v string) *Comment {
  4324. s.RecipientId = &v
  4325. return s
  4326. }
  4327. // SetStatus sets the Status field's value.
  4328. func (s *Comment) SetStatus(v string) *Comment {
  4329. s.Status = &v
  4330. return s
  4331. }
  4332. // SetText sets the Text field's value.
  4333. func (s *Comment) SetText(v string) *Comment {
  4334. s.Text = &v
  4335. return s
  4336. }
  4337. // SetThreadId sets the ThreadId field's value.
  4338. func (s *Comment) SetThreadId(v string) *Comment {
  4339. s.ThreadId = &v
  4340. return s
  4341. }
  4342. // SetVisibility sets the Visibility field's value.
  4343. func (s *Comment) SetVisibility(v string) *Comment {
  4344. s.Visibility = &v
  4345. return s
  4346. }
  4347. // Describes the metadata of a comment.
  4348. type CommentMetadata struct {
  4349. _ struct{} `type:"structure"`
  4350. // The ID of the comment.
  4351. CommentId *string `min:"1" type:"string"`
  4352. // The status of the comment.
  4353. CommentStatus *string `type:"string" enum:"CommentStatusType"`
  4354. // The user who made the comment.
  4355. Contributor *User `type:"structure"`
  4356. // The timestamp that the comment was created.
  4357. CreatedTimestamp *time.Time `type:"timestamp"`
  4358. // The ID of the user being replied to.
  4359. RecipientId *string `min:"1" type:"string"`
  4360. }
  4361. // String returns the string representation
  4362. func (s CommentMetadata) String() string {
  4363. return awsutil.Prettify(s)
  4364. }
  4365. // GoString returns the string representation
  4366. func (s CommentMetadata) GoString() string {
  4367. return s.String()
  4368. }
  4369. // SetCommentId sets the CommentId field's value.
  4370. func (s *CommentMetadata) SetCommentId(v string) *CommentMetadata {
  4371. s.CommentId = &v
  4372. return s
  4373. }
  4374. // SetCommentStatus sets the CommentStatus field's value.
  4375. func (s *CommentMetadata) SetCommentStatus(v string) *CommentMetadata {
  4376. s.CommentStatus = &v
  4377. return s
  4378. }
  4379. // SetContributor sets the Contributor field's value.
  4380. func (s *CommentMetadata) SetContributor(v *User) *CommentMetadata {
  4381. s.Contributor = v
  4382. return s
  4383. }
  4384. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  4385. func (s *CommentMetadata) SetCreatedTimestamp(v time.Time) *CommentMetadata {
  4386. s.CreatedTimestamp = &v
  4387. return s
  4388. }
  4389. // SetRecipientId sets the RecipientId field's value.
  4390. func (s *CommentMetadata) SetRecipientId(v string) *CommentMetadata {
  4391. s.RecipientId = &v
  4392. return s
  4393. }
  4394. type CreateCommentInput struct {
  4395. _ struct{} `type:"structure"`
  4396. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4397. // API actions, as in accessing the API using AWS credentials.
  4398. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4399. // The ID of the document.
  4400. //
  4401. // DocumentId is a required field
  4402. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  4403. // Set this parameter to TRUE to send an email out to the document collaborators
  4404. // after the comment is created.
  4405. NotifyCollaborators *bool `type:"boolean"`
  4406. // The ID of the parent comment.
  4407. ParentId *string `min:"1" type:"string"`
  4408. // The text of the comment.
  4409. //
  4410. // Text is a required field
  4411. Text *string `min:"1" type:"string" required:"true" sensitive:"true"`
  4412. // The ID of the root comment in the thread.
  4413. ThreadId *string `min:"1" type:"string"`
  4414. // The ID of the document version.
  4415. //
  4416. // VersionId is a required field
  4417. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  4418. // The visibility of the comment. Options are either PRIVATE, where the comment
  4419. // is visible only to the comment author and document owner and co-owners, or
  4420. // PUBLIC, where the comment is visible to document owners, co-owners, and contributors.
  4421. Visibility *string `type:"string" enum:"CommentVisibilityType"`
  4422. }
  4423. // String returns the string representation
  4424. func (s CreateCommentInput) String() string {
  4425. return awsutil.Prettify(s)
  4426. }
  4427. // GoString returns the string representation
  4428. func (s CreateCommentInput) GoString() string {
  4429. return s.String()
  4430. }
  4431. // Validate inspects the fields of the type to determine if they are valid.
  4432. func (s *CreateCommentInput) Validate() error {
  4433. invalidParams := request.ErrInvalidParams{Context: "CreateCommentInput"}
  4434. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4435. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4436. }
  4437. if s.DocumentId == nil {
  4438. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  4439. }
  4440. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  4441. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  4442. }
  4443. if s.ParentId != nil && len(*s.ParentId) < 1 {
  4444. invalidParams.Add(request.NewErrParamMinLen("ParentId", 1))
  4445. }
  4446. if s.Text == nil {
  4447. invalidParams.Add(request.NewErrParamRequired("Text"))
  4448. }
  4449. if s.Text != nil && len(*s.Text) < 1 {
  4450. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  4451. }
  4452. if s.ThreadId != nil && len(*s.ThreadId) < 1 {
  4453. invalidParams.Add(request.NewErrParamMinLen("ThreadId", 1))
  4454. }
  4455. if s.VersionId == nil {
  4456. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  4457. }
  4458. if s.VersionId != nil && len(*s.VersionId) < 1 {
  4459. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  4460. }
  4461. if invalidParams.Len() > 0 {
  4462. return invalidParams
  4463. }
  4464. return nil
  4465. }
  4466. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4467. func (s *CreateCommentInput) SetAuthenticationToken(v string) *CreateCommentInput {
  4468. s.AuthenticationToken = &v
  4469. return s
  4470. }
  4471. // SetDocumentId sets the DocumentId field's value.
  4472. func (s *CreateCommentInput) SetDocumentId(v string) *CreateCommentInput {
  4473. s.DocumentId = &v
  4474. return s
  4475. }
  4476. // SetNotifyCollaborators sets the NotifyCollaborators field's value.
  4477. func (s *CreateCommentInput) SetNotifyCollaborators(v bool) *CreateCommentInput {
  4478. s.NotifyCollaborators = &v
  4479. return s
  4480. }
  4481. // SetParentId sets the ParentId field's value.
  4482. func (s *CreateCommentInput) SetParentId(v string) *CreateCommentInput {
  4483. s.ParentId = &v
  4484. return s
  4485. }
  4486. // SetText sets the Text field's value.
  4487. func (s *CreateCommentInput) SetText(v string) *CreateCommentInput {
  4488. s.Text = &v
  4489. return s
  4490. }
  4491. // SetThreadId sets the ThreadId field's value.
  4492. func (s *CreateCommentInput) SetThreadId(v string) *CreateCommentInput {
  4493. s.ThreadId = &v
  4494. return s
  4495. }
  4496. // SetVersionId sets the VersionId field's value.
  4497. func (s *CreateCommentInput) SetVersionId(v string) *CreateCommentInput {
  4498. s.VersionId = &v
  4499. return s
  4500. }
  4501. // SetVisibility sets the Visibility field's value.
  4502. func (s *CreateCommentInput) SetVisibility(v string) *CreateCommentInput {
  4503. s.Visibility = &v
  4504. return s
  4505. }
  4506. type CreateCommentOutput struct {
  4507. _ struct{} `type:"structure"`
  4508. // The comment that has been created.
  4509. Comment *Comment `type:"structure"`
  4510. }
  4511. // String returns the string representation
  4512. func (s CreateCommentOutput) String() string {
  4513. return awsutil.Prettify(s)
  4514. }
  4515. // GoString returns the string representation
  4516. func (s CreateCommentOutput) GoString() string {
  4517. return s.String()
  4518. }
  4519. // SetComment sets the Comment field's value.
  4520. func (s *CreateCommentOutput) SetComment(v *Comment) *CreateCommentOutput {
  4521. s.Comment = v
  4522. return s
  4523. }
  4524. type CreateCustomMetadataInput struct {
  4525. _ struct{} `type:"structure"`
  4526. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4527. // API actions, as in accessing the API using AWS credentials.
  4528. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4529. // Custom metadata in the form of name-value pairs.
  4530. //
  4531. // CustomMetadata is a required field
  4532. CustomMetadata map[string]*string `min:"1" type:"map" required:"true"`
  4533. // The ID of the resource.
  4534. //
  4535. // ResourceId is a required field
  4536. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  4537. // The ID of the version, if the custom metadata is being added to a document
  4538. // version.
  4539. VersionId *string `location:"querystring" locationName:"versionid" min:"1" type:"string"`
  4540. }
  4541. // String returns the string representation
  4542. func (s CreateCustomMetadataInput) String() string {
  4543. return awsutil.Prettify(s)
  4544. }
  4545. // GoString returns the string representation
  4546. func (s CreateCustomMetadataInput) GoString() string {
  4547. return s.String()
  4548. }
  4549. // Validate inspects the fields of the type to determine if they are valid.
  4550. func (s *CreateCustomMetadataInput) Validate() error {
  4551. invalidParams := request.ErrInvalidParams{Context: "CreateCustomMetadataInput"}
  4552. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4553. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4554. }
  4555. if s.CustomMetadata == nil {
  4556. invalidParams.Add(request.NewErrParamRequired("CustomMetadata"))
  4557. }
  4558. if s.CustomMetadata != nil && len(s.CustomMetadata) < 1 {
  4559. invalidParams.Add(request.NewErrParamMinLen("CustomMetadata", 1))
  4560. }
  4561. if s.ResourceId == nil {
  4562. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4563. }
  4564. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4565. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4566. }
  4567. if s.VersionId != nil && len(*s.VersionId) < 1 {
  4568. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  4569. }
  4570. if invalidParams.Len() > 0 {
  4571. return invalidParams
  4572. }
  4573. return nil
  4574. }
  4575. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4576. func (s *CreateCustomMetadataInput) SetAuthenticationToken(v string) *CreateCustomMetadataInput {
  4577. s.AuthenticationToken = &v
  4578. return s
  4579. }
  4580. // SetCustomMetadata sets the CustomMetadata field's value.
  4581. func (s *CreateCustomMetadataInput) SetCustomMetadata(v map[string]*string) *CreateCustomMetadataInput {
  4582. s.CustomMetadata = v
  4583. return s
  4584. }
  4585. // SetResourceId sets the ResourceId field's value.
  4586. func (s *CreateCustomMetadataInput) SetResourceId(v string) *CreateCustomMetadataInput {
  4587. s.ResourceId = &v
  4588. return s
  4589. }
  4590. // SetVersionId sets the VersionId field's value.
  4591. func (s *CreateCustomMetadataInput) SetVersionId(v string) *CreateCustomMetadataInput {
  4592. s.VersionId = &v
  4593. return s
  4594. }
  4595. type CreateCustomMetadataOutput struct {
  4596. _ struct{} `type:"structure"`
  4597. }
  4598. // String returns the string representation
  4599. func (s CreateCustomMetadataOutput) String() string {
  4600. return awsutil.Prettify(s)
  4601. }
  4602. // GoString returns the string representation
  4603. func (s CreateCustomMetadataOutput) GoString() string {
  4604. return s.String()
  4605. }
  4606. type CreateFolderInput struct {
  4607. _ struct{} `type:"structure"`
  4608. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4609. // API actions, as in accessing the API using AWS credentials.
  4610. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4611. // The name of the new folder.
  4612. Name *string `min:"1" type:"string"`
  4613. // The ID of the parent folder.
  4614. //
  4615. // ParentFolderId is a required field
  4616. ParentFolderId *string `min:"1" type:"string" required:"true"`
  4617. }
  4618. // String returns the string representation
  4619. func (s CreateFolderInput) String() string {
  4620. return awsutil.Prettify(s)
  4621. }
  4622. // GoString returns the string representation
  4623. func (s CreateFolderInput) GoString() string {
  4624. return s.String()
  4625. }
  4626. // Validate inspects the fields of the type to determine if they are valid.
  4627. func (s *CreateFolderInput) Validate() error {
  4628. invalidParams := request.ErrInvalidParams{Context: "CreateFolderInput"}
  4629. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4630. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4631. }
  4632. if s.Name != nil && len(*s.Name) < 1 {
  4633. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4634. }
  4635. if s.ParentFolderId == nil {
  4636. invalidParams.Add(request.NewErrParamRequired("ParentFolderId"))
  4637. }
  4638. if s.ParentFolderId != nil && len(*s.ParentFolderId) < 1 {
  4639. invalidParams.Add(request.NewErrParamMinLen("ParentFolderId", 1))
  4640. }
  4641. if invalidParams.Len() > 0 {
  4642. return invalidParams
  4643. }
  4644. return nil
  4645. }
  4646. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4647. func (s *CreateFolderInput) SetAuthenticationToken(v string) *CreateFolderInput {
  4648. s.AuthenticationToken = &v
  4649. return s
  4650. }
  4651. // SetName sets the Name field's value.
  4652. func (s *CreateFolderInput) SetName(v string) *CreateFolderInput {
  4653. s.Name = &v
  4654. return s
  4655. }
  4656. // SetParentFolderId sets the ParentFolderId field's value.
  4657. func (s *CreateFolderInput) SetParentFolderId(v string) *CreateFolderInput {
  4658. s.ParentFolderId = &v
  4659. return s
  4660. }
  4661. type CreateFolderOutput struct {
  4662. _ struct{} `type:"structure"`
  4663. // The metadata of the folder.
  4664. Metadata *FolderMetadata `type:"structure"`
  4665. }
  4666. // String returns the string representation
  4667. func (s CreateFolderOutput) String() string {
  4668. return awsutil.Prettify(s)
  4669. }
  4670. // GoString returns the string representation
  4671. func (s CreateFolderOutput) GoString() string {
  4672. return s.String()
  4673. }
  4674. // SetMetadata sets the Metadata field's value.
  4675. func (s *CreateFolderOutput) SetMetadata(v *FolderMetadata) *CreateFolderOutput {
  4676. s.Metadata = v
  4677. return s
  4678. }
  4679. type CreateLabelsInput struct {
  4680. _ struct{} `type:"structure"`
  4681. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4682. // API actions, as in accessing the API using AWS credentials.
  4683. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4684. // List of labels to add to the resource.
  4685. //
  4686. // Labels is a required field
  4687. Labels []*string `type:"list" required:"true"`
  4688. // The ID of the resource.
  4689. //
  4690. // ResourceId is a required field
  4691. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  4692. }
  4693. // String returns the string representation
  4694. func (s CreateLabelsInput) String() string {
  4695. return awsutil.Prettify(s)
  4696. }
  4697. // GoString returns the string representation
  4698. func (s CreateLabelsInput) GoString() string {
  4699. return s.String()
  4700. }
  4701. // Validate inspects the fields of the type to determine if they are valid.
  4702. func (s *CreateLabelsInput) Validate() error {
  4703. invalidParams := request.ErrInvalidParams{Context: "CreateLabelsInput"}
  4704. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4705. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4706. }
  4707. if s.Labels == nil {
  4708. invalidParams.Add(request.NewErrParamRequired("Labels"))
  4709. }
  4710. if s.ResourceId == nil {
  4711. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4712. }
  4713. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4714. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4715. }
  4716. if invalidParams.Len() > 0 {
  4717. return invalidParams
  4718. }
  4719. return nil
  4720. }
  4721. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4722. func (s *CreateLabelsInput) SetAuthenticationToken(v string) *CreateLabelsInput {
  4723. s.AuthenticationToken = &v
  4724. return s
  4725. }
  4726. // SetLabels sets the Labels field's value.
  4727. func (s *CreateLabelsInput) SetLabels(v []*string) *CreateLabelsInput {
  4728. s.Labels = v
  4729. return s
  4730. }
  4731. // SetResourceId sets the ResourceId field's value.
  4732. func (s *CreateLabelsInput) SetResourceId(v string) *CreateLabelsInput {
  4733. s.ResourceId = &v
  4734. return s
  4735. }
  4736. type CreateLabelsOutput struct {
  4737. _ struct{} `type:"structure"`
  4738. }
  4739. // String returns the string representation
  4740. func (s CreateLabelsOutput) String() string {
  4741. return awsutil.Prettify(s)
  4742. }
  4743. // GoString returns the string representation
  4744. func (s CreateLabelsOutput) GoString() string {
  4745. return s.String()
  4746. }
  4747. type CreateNotificationSubscriptionInput struct {
  4748. _ struct{} `type:"structure"`
  4749. // The endpoint to receive the notifications. If the protocol is HTTPS, the
  4750. // endpoint is a URL that begins with "https://".
  4751. //
  4752. // Endpoint is a required field
  4753. Endpoint *string `min:"1" type:"string" required:"true"`
  4754. // The ID of the organization.
  4755. //
  4756. // OrganizationId is a required field
  4757. OrganizationId *string `location:"uri" locationName:"OrganizationId" min:"1" type:"string" required:"true"`
  4758. // The protocol to use. The supported value is https, which delivers JSON-encoded
  4759. // messages using HTTPS POST.
  4760. //
  4761. // Protocol is a required field
  4762. Protocol *string `type:"string" required:"true" enum:"SubscriptionProtocolType"`
  4763. // The notification type.
  4764. //
  4765. // SubscriptionType is a required field
  4766. SubscriptionType *string `type:"string" required:"true" enum:"SubscriptionType"`
  4767. }
  4768. // String returns the string representation
  4769. func (s CreateNotificationSubscriptionInput) String() string {
  4770. return awsutil.Prettify(s)
  4771. }
  4772. // GoString returns the string representation
  4773. func (s CreateNotificationSubscriptionInput) GoString() string {
  4774. return s.String()
  4775. }
  4776. // Validate inspects the fields of the type to determine if they are valid.
  4777. func (s *CreateNotificationSubscriptionInput) Validate() error {
  4778. invalidParams := request.ErrInvalidParams{Context: "CreateNotificationSubscriptionInput"}
  4779. if s.Endpoint == nil {
  4780. invalidParams.Add(request.NewErrParamRequired("Endpoint"))
  4781. }
  4782. if s.Endpoint != nil && len(*s.Endpoint) < 1 {
  4783. invalidParams.Add(request.NewErrParamMinLen("Endpoint", 1))
  4784. }
  4785. if s.OrganizationId == nil {
  4786. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4787. }
  4788. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  4789. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  4790. }
  4791. if s.Protocol == nil {
  4792. invalidParams.Add(request.NewErrParamRequired("Protocol"))
  4793. }
  4794. if s.SubscriptionType == nil {
  4795. invalidParams.Add(request.NewErrParamRequired("SubscriptionType"))
  4796. }
  4797. if invalidParams.Len() > 0 {
  4798. return invalidParams
  4799. }
  4800. return nil
  4801. }
  4802. // SetEndpoint sets the Endpoint field's value.
  4803. func (s *CreateNotificationSubscriptionInput) SetEndpoint(v string) *CreateNotificationSubscriptionInput {
  4804. s.Endpoint = &v
  4805. return s
  4806. }
  4807. // SetOrganizationId sets the OrganizationId field's value.
  4808. func (s *CreateNotificationSubscriptionInput) SetOrganizationId(v string) *CreateNotificationSubscriptionInput {
  4809. s.OrganizationId = &v
  4810. return s
  4811. }
  4812. // SetProtocol sets the Protocol field's value.
  4813. func (s *CreateNotificationSubscriptionInput) SetProtocol(v string) *CreateNotificationSubscriptionInput {
  4814. s.Protocol = &v
  4815. return s
  4816. }
  4817. // SetSubscriptionType sets the SubscriptionType field's value.
  4818. func (s *CreateNotificationSubscriptionInput) SetSubscriptionType(v string) *CreateNotificationSubscriptionInput {
  4819. s.SubscriptionType = &v
  4820. return s
  4821. }
  4822. type CreateNotificationSubscriptionOutput struct {
  4823. _ struct{} `type:"structure"`
  4824. // The subscription.
  4825. Subscription *Subscription `type:"structure"`
  4826. }
  4827. // String returns the string representation
  4828. func (s CreateNotificationSubscriptionOutput) String() string {
  4829. return awsutil.Prettify(s)
  4830. }
  4831. // GoString returns the string representation
  4832. func (s CreateNotificationSubscriptionOutput) GoString() string {
  4833. return s.String()
  4834. }
  4835. // SetSubscription sets the Subscription field's value.
  4836. func (s *CreateNotificationSubscriptionOutput) SetSubscription(v *Subscription) *CreateNotificationSubscriptionOutput {
  4837. s.Subscription = v
  4838. return s
  4839. }
  4840. type CreateUserInput struct {
  4841. _ struct{} `type:"structure"`
  4842. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4843. // API actions, as in accessing the API using AWS credentials.
  4844. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4845. // The email address of the user.
  4846. EmailAddress *string `min:"1" type:"string"`
  4847. // The given name of the user.
  4848. //
  4849. // GivenName is a required field
  4850. GivenName *string `min:"1" type:"string" required:"true"`
  4851. // The ID of the organization.
  4852. OrganizationId *string `min:"1" type:"string"`
  4853. // The password of the user.
  4854. //
  4855. // Password is a required field
  4856. Password *string `min:"4" type:"string" required:"true" sensitive:"true"`
  4857. // The amount of storage for the user.
  4858. StorageRule *StorageRuleType `type:"structure"`
  4859. // The surname of the user.
  4860. //
  4861. // Surname is a required field
  4862. Surname *string `min:"1" type:"string" required:"true"`
  4863. // The time zone ID of the user.
  4864. TimeZoneId *string `min:"1" type:"string"`
  4865. // The login name of the user.
  4866. //
  4867. // Username is a required field
  4868. Username *string `min:"1" type:"string" required:"true"`
  4869. }
  4870. // String returns the string representation
  4871. func (s CreateUserInput) String() string {
  4872. return awsutil.Prettify(s)
  4873. }
  4874. // GoString returns the string representation
  4875. func (s CreateUserInput) GoString() string {
  4876. return s.String()
  4877. }
  4878. // Validate inspects the fields of the type to determine if they are valid.
  4879. func (s *CreateUserInput) Validate() error {
  4880. invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"}
  4881. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  4882. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  4883. }
  4884. if s.EmailAddress != nil && len(*s.EmailAddress) < 1 {
  4885. invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1))
  4886. }
  4887. if s.GivenName == nil {
  4888. invalidParams.Add(request.NewErrParamRequired("GivenName"))
  4889. }
  4890. if s.GivenName != nil && len(*s.GivenName) < 1 {
  4891. invalidParams.Add(request.NewErrParamMinLen("GivenName", 1))
  4892. }
  4893. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  4894. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  4895. }
  4896. if s.Password == nil {
  4897. invalidParams.Add(request.NewErrParamRequired("Password"))
  4898. }
  4899. if s.Password != nil && len(*s.Password) < 4 {
  4900. invalidParams.Add(request.NewErrParamMinLen("Password", 4))
  4901. }
  4902. if s.Surname == nil {
  4903. invalidParams.Add(request.NewErrParamRequired("Surname"))
  4904. }
  4905. if s.Surname != nil && len(*s.Surname) < 1 {
  4906. invalidParams.Add(request.NewErrParamMinLen("Surname", 1))
  4907. }
  4908. if s.TimeZoneId != nil && len(*s.TimeZoneId) < 1 {
  4909. invalidParams.Add(request.NewErrParamMinLen("TimeZoneId", 1))
  4910. }
  4911. if s.Username == nil {
  4912. invalidParams.Add(request.NewErrParamRequired("Username"))
  4913. }
  4914. if s.Username != nil && len(*s.Username) < 1 {
  4915. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  4916. }
  4917. if invalidParams.Len() > 0 {
  4918. return invalidParams
  4919. }
  4920. return nil
  4921. }
  4922. // SetAuthenticationToken sets the AuthenticationToken field's value.
  4923. func (s *CreateUserInput) SetAuthenticationToken(v string) *CreateUserInput {
  4924. s.AuthenticationToken = &v
  4925. return s
  4926. }
  4927. // SetEmailAddress sets the EmailAddress field's value.
  4928. func (s *CreateUserInput) SetEmailAddress(v string) *CreateUserInput {
  4929. s.EmailAddress = &v
  4930. return s
  4931. }
  4932. // SetGivenName sets the GivenName field's value.
  4933. func (s *CreateUserInput) SetGivenName(v string) *CreateUserInput {
  4934. s.GivenName = &v
  4935. return s
  4936. }
  4937. // SetOrganizationId sets the OrganizationId field's value.
  4938. func (s *CreateUserInput) SetOrganizationId(v string) *CreateUserInput {
  4939. s.OrganizationId = &v
  4940. return s
  4941. }
  4942. // SetPassword sets the Password field's value.
  4943. func (s *CreateUserInput) SetPassword(v string) *CreateUserInput {
  4944. s.Password = &v
  4945. return s
  4946. }
  4947. // SetStorageRule sets the StorageRule field's value.
  4948. func (s *CreateUserInput) SetStorageRule(v *StorageRuleType) *CreateUserInput {
  4949. s.StorageRule = v
  4950. return s
  4951. }
  4952. // SetSurname sets the Surname field's value.
  4953. func (s *CreateUserInput) SetSurname(v string) *CreateUserInput {
  4954. s.Surname = &v
  4955. return s
  4956. }
  4957. // SetTimeZoneId sets the TimeZoneId field's value.
  4958. func (s *CreateUserInput) SetTimeZoneId(v string) *CreateUserInput {
  4959. s.TimeZoneId = &v
  4960. return s
  4961. }
  4962. // SetUsername sets the Username field's value.
  4963. func (s *CreateUserInput) SetUsername(v string) *CreateUserInput {
  4964. s.Username = &v
  4965. return s
  4966. }
  4967. type CreateUserOutput struct {
  4968. _ struct{} `type:"structure"`
  4969. // The user information.
  4970. User *User `type:"structure"`
  4971. }
  4972. // String returns the string representation
  4973. func (s CreateUserOutput) String() string {
  4974. return awsutil.Prettify(s)
  4975. }
  4976. // GoString returns the string representation
  4977. func (s CreateUserOutput) GoString() string {
  4978. return s.String()
  4979. }
  4980. // SetUser sets the User field's value.
  4981. func (s *CreateUserOutput) SetUser(v *User) *CreateUserOutput {
  4982. s.User = v
  4983. return s
  4984. }
  4985. type DeactivateUserInput struct {
  4986. _ struct{} `type:"structure"`
  4987. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  4988. // API actions, as in accessing the API using AWS credentials.
  4989. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  4990. // The ID of the user.
  4991. //
  4992. // UserId is a required field
  4993. UserId *string `location:"uri" locationName:"UserId" min:"1" type:"string" required:"true"`
  4994. }
  4995. // String returns the string representation
  4996. func (s DeactivateUserInput) String() string {
  4997. return awsutil.Prettify(s)
  4998. }
  4999. // GoString returns the string representation
  5000. func (s DeactivateUserInput) GoString() string {
  5001. return s.String()
  5002. }
  5003. // Validate inspects the fields of the type to determine if they are valid.
  5004. func (s *DeactivateUserInput) Validate() error {
  5005. invalidParams := request.ErrInvalidParams{Context: "DeactivateUserInput"}
  5006. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5007. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5008. }
  5009. if s.UserId == nil {
  5010. invalidParams.Add(request.NewErrParamRequired("UserId"))
  5011. }
  5012. if s.UserId != nil && len(*s.UserId) < 1 {
  5013. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  5014. }
  5015. if invalidParams.Len() > 0 {
  5016. return invalidParams
  5017. }
  5018. return nil
  5019. }
  5020. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5021. func (s *DeactivateUserInput) SetAuthenticationToken(v string) *DeactivateUserInput {
  5022. s.AuthenticationToken = &v
  5023. return s
  5024. }
  5025. // SetUserId sets the UserId field's value.
  5026. func (s *DeactivateUserInput) SetUserId(v string) *DeactivateUserInput {
  5027. s.UserId = &v
  5028. return s
  5029. }
  5030. type DeactivateUserOutput struct {
  5031. _ struct{} `type:"structure"`
  5032. }
  5033. // String returns the string representation
  5034. func (s DeactivateUserOutput) String() string {
  5035. return awsutil.Prettify(s)
  5036. }
  5037. // GoString returns the string representation
  5038. func (s DeactivateUserOutput) GoString() string {
  5039. return s.String()
  5040. }
  5041. type DeleteCommentInput struct {
  5042. _ struct{} `type:"structure"`
  5043. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5044. // API actions, as in accessing the API using AWS credentials.
  5045. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5046. // The ID of the comment.
  5047. //
  5048. // CommentId is a required field
  5049. CommentId *string `location:"uri" locationName:"CommentId" min:"1" type:"string" required:"true"`
  5050. // The ID of the document.
  5051. //
  5052. // DocumentId is a required field
  5053. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  5054. // The ID of the document version.
  5055. //
  5056. // VersionId is a required field
  5057. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  5058. }
  5059. // String returns the string representation
  5060. func (s DeleteCommentInput) String() string {
  5061. return awsutil.Prettify(s)
  5062. }
  5063. // GoString returns the string representation
  5064. func (s DeleteCommentInput) GoString() string {
  5065. return s.String()
  5066. }
  5067. // Validate inspects the fields of the type to determine if they are valid.
  5068. func (s *DeleteCommentInput) Validate() error {
  5069. invalidParams := request.ErrInvalidParams{Context: "DeleteCommentInput"}
  5070. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5071. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5072. }
  5073. if s.CommentId == nil {
  5074. invalidParams.Add(request.NewErrParamRequired("CommentId"))
  5075. }
  5076. if s.CommentId != nil && len(*s.CommentId) < 1 {
  5077. invalidParams.Add(request.NewErrParamMinLen("CommentId", 1))
  5078. }
  5079. if s.DocumentId == nil {
  5080. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  5081. }
  5082. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  5083. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  5084. }
  5085. if s.VersionId == nil {
  5086. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  5087. }
  5088. if s.VersionId != nil && len(*s.VersionId) < 1 {
  5089. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  5090. }
  5091. if invalidParams.Len() > 0 {
  5092. return invalidParams
  5093. }
  5094. return nil
  5095. }
  5096. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5097. func (s *DeleteCommentInput) SetAuthenticationToken(v string) *DeleteCommentInput {
  5098. s.AuthenticationToken = &v
  5099. return s
  5100. }
  5101. // SetCommentId sets the CommentId field's value.
  5102. func (s *DeleteCommentInput) SetCommentId(v string) *DeleteCommentInput {
  5103. s.CommentId = &v
  5104. return s
  5105. }
  5106. // SetDocumentId sets the DocumentId field's value.
  5107. func (s *DeleteCommentInput) SetDocumentId(v string) *DeleteCommentInput {
  5108. s.DocumentId = &v
  5109. return s
  5110. }
  5111. // SetVersionId sets the VersionId field's value.
  5112. func (s *DeleteCommentInput) SetVersionId(v string) *DeleteCommentInput {
  5113. s.VersionId = &v
  5114. return s
  5115. }
  5116. type DeleteCommentOutput struct {
  5117. _ struct{} `type:"structure"`
  5118. }
  5119. // String returns the string representation
  5120. func (s DeleteCommentOutput) String() string {
  5121. return awsutil.Prettify(s)
  5122. }
  5123. // GoString returns the string representation
  5124. func (s DeleteCommentOutput) GoString() string {
  5125. return s.String()
  5126. }
  5127. type DeleteCustomMetadataInput struct {
  5128. _ struct{} `type:"structure"`
  5129. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5130. // API actions, as in accessing the API using AWS credentials.
  5131. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5132. // Flag to indicate removal of all custom metadata properties from the specified
  5133. // resource.
  5134. DeleteAll *bool `location:"querystring" locationName:"deleteAll" type:"boolean"`
  5135. // List of properties to remove.
  5136. Keys []*string `location:"querystring" locationName:"keys" type:"list"`
  5137. // The ID of the resource, either a document or folder.
  5138. //
  5139. // ResourceId is a required field
  5140. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  5141. // The ID of the version, if the custom metadata is being deleted from a document
  5142. // version.
  5143. VersionId *string `location:"querystring" locationName:"versionId" min:"1" type:"string"`
  5144. }
  5145. // String returns the string representation
  5146. func (s DeleteCustomMetadataInput) String() string {
  5147. return awsutil.Prettify(s)
  5148. }
  5149. // GoString returns the string representation
  5150. func (s DeleteCustomMetadataInput) GoString() string {
  5151. return s.String()
  5152. }
  5153. // Validate inspects the fields of the type to determine if they are valid.
  5154. func (s *DeleteCustomMetadataInput) Validate() error {
  5155. invalidParams := request.ErrInvalidParams{Context: "DeleteCustomMetadataInput"}
  5156. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5157. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5158. }
  5159. if s.ResourceId == nil {
  5160. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5161. }
  5162. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  5163. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  5164. }
  5165. if s.VersionId != nil && len(*s.VersionId) < 1 {
  5166. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  5167. }
  5168. if invalidParams.Len() > 0 {
  5169. return invalidParams
  5170. }
  5171. return nil
  5172. }
  5173. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5174. func (s *DeleteCustomMetadataInput) SetAuthenticationToken(v string) *DeleteCustomMetadataInput {
  5175. s.AuthenticationToken = &v
  5176. return s
  5177. }
  5178. // SetDeleteAll sets the DeleteAll field's value.
  5179. func (s *DeleteCustomMetadataInput) SetDeleteAll(v bool) *DeleteCustomMetadataInput {
  5180. s.DeleteAll = &v
  5181. return s
  5182. }
  5183. // SetKeys sets the Keys field's value.
  5184. func (s *DeleteCustomMetadataInput) SetKeys(v []*string) *DeleteCustomMetadataInput {
  5185. s.Keys = v
  5186. return s
  5187. }
  5188. // SetResourceId sets the ResourceId field's value.
  5189. func (s *DeleteCustomMetadataInput) SetResourceId(v string) *DeleteCustomMetadataInput {
  5190. s.ResourceId = &v
  5191. return s
  5192. }
  5193. // SetVersionId sets the VersionId field's value.
  5194. func (s *DeleteCustomMetadataInput) SetVersionId(v string) *DeleteCustomMetadataInput {
  5195. s.VersionId = &v
  5196. return s
  5197. }
  5198. type DeleteCustomMetadataOutput struct {
  5199. _ struct{} `type:"structure"`
  5200. }
  5201. // String returns the string representation
  5202. func (s DeleteCustomMetadataOutput) String() string {
  5203. return awsutil.Prettify(s)
  5204. }
  5205. // GoString returns the string representation
  5206. func (s DeleteCustomMetadataOutput) GoString() string {
  5207. return s.String()
  5208. }
  5209. type DeleteDocumentInput struct {
  5210. _ struct{} `type:"structure"`
  5211. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5212. // API actions, as in accessing the API using AWS credentials.
  5213. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5214. // The ID of the document.
  5215. //
  5216. // DocumentId is a required field
  5217. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  5218. }
  5219. // String returns the string representation
  5220. func (s DeleteDocumentInput) String() string {
  5221. return awsutil.Prettify(s)
  5222. }
  5223. // GoString returns the string representation
  5224. func (s DeleteDocumentInput) GoString() string {
  5225. return s.String()
  5226. }
  5227. // Validate inspects the fields of the type to determine if they are valid.
  5228. func (s *DeleteDocumentInput) Validate() error {
  5229. invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentInput"}
  5230. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5231. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5232. }
  5233. if s.DocumentId == nil {
  5234. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  5235. }
  5236. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  5237. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  5238. }
  5239. if invalidParams.Len() > 0 {
  5240. return invalidParams
  5241. }
  5242. return nil
  5243. }
  5244. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5245. func (s *DeleteDocumentInput) SetAuthenticationToken(v string) *DeleteDocumentInput {
  5246. s.AuthenticationToken = &v
  5247. return s
  5248. }
  5249. // SetDocumentId sets the DocumentId field's value.
  5250. func (s *DeleteDocumentInput) SetDocumentId(v string) *DeleteDocumentInput {
  5251. s.DocumentId = &v
  5252. return s
  5253. }
  5254. type DeleteDocumentOutput struct {
  5255. _ struct{} `type:"structure"`
  5256. }
  5257. // String returns the string representation
  5258. func (s DeleteDocumentOutput) String() string {
  5259. return awsutil.Prettify(s)
  5260. }
  5261. // GoString returns the string representation
  5262. func (s DeleteDocumentOutput) GoString() string {
  5263. return s.String()
  5264. }
  5265. type DeleteFolderContentsInput struct {
  5266. _ struct{} `type:"structure"`
  5267. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5268. // API actions, as in accessing the API using AWS credentials.
  5269. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5270. // The ID of the folder.
  5271. //
  5272. // FolderId is a required field
  5273. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  5274. }
  5275. // String returns the string representation
  5276. func (s DeleteFolderContentsInput) String() string {
  5277. return awsutil.Prettify(s)
  5278. }
  5279. // GoString returns the string representation
  5280. func (s DeleteFolderContentsInput) GoString() string {
  5281. return s.String()
  5282. }
  5283. // Validate inspects the fields of the type to determine if they are valid.
  5284. func (s *DeleteFolderContentsInput) Validate() error {
  5285. invalidParams := request.ErrInvalidParams{Context: "DeleteFolderContentsInput"}
  5286. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5287. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5288. }
  5289. if s.FolderId == nil {
  5290. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  5291. }
  5292. if s.FolderId != nil && len(*s.FolderId) < 1 {
  5293. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  5294. }
  5295. if invalidParams.Len() > 0 {
  5296. return invalidParams
  5297. }
  5298. return nil
  5299. }
  5300. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5301. func (s *DeleteFolderContentsInput) SetAuthenticationToken(v string) *DeleteFolderContentsInput {
  5302. s.AuthenticationToken = &v
  5303. return s
  5304. }
  5305. // SetFolderId sets the FolderId field's value.
  5306. func (s *DeleteFolderContentsInput) SetFolderId(v string) *DeleteFolderContentsInput {
  5307. s.FolderId = &v
  5308. return s
  5309. }
  5310. type DeleteFolderContentsOutput struct {
  5311. _ struct{} `type:"structure"`
  5312. }
  5313. // String returns the string representation
  5314. func (s DeleteFolderContentsOutput) String() string {
  5315. return awsutil.Prettify(s)
  5316. }
  5317. // GoString returns the string representation
  5318. func (s DeleteFolderContentsOutput) GoString() string {
  5319. return s.String()
  5320. }
  5321. type DeleteFolderInput struct {
  5322. _ struct{} `type:"structure"`
  5323. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5324. // API actions, as in accessing the API using AWS credentials.
  5325. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5326. // The ID of the folder.
  5327. //
  5328. // FolderId is a required field
  5329. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  5330. }
  5331. // String returns the string representation
  5332. func (s DeleteFolderInput) String() string {
  5333. return awsutil.Prettify(s)
  5334. }
  5335. // GoString returns the string representation
  5336. func (s DeleteFolderInput) GoString() string {
  5337. return s.String()
  5338. }
  5339. // Validate inspects the fields of the type to determine if they are valid.
  5340. func (s *DeleteFolderInput) Validate() error {
  5341. invalidParams := request.ErrInvalidParams{Context: "DeleteFolderInput"}
  5342. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5343. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5344. }
  5345. if s.FolderId == nil {
  5346. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  5347. }
  5348. if s.FolderId != nil && len(*s.FolderId) < 1 {
  5349. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  5350. }
  5351. if invalidParams.Len() > 0 {
  5352. return invalidParams
  5353. }
  5354. return nil
  5355. }
  5356. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5357. func (s *DeleteFolderInput) SetAuthenticationToken(v string) *DeleteFolderInput {
  5358. s.AuthenticationToken = &v
  5359. return s
  5360. }
  5361. // SetFolderId sets the FolderId field's value.
  5362. func (s *DeleteFolderInput) SetFolderId(v string) *DeleteFolderInput {
  5363. s.FolderId = &v
  5364. return s
  5365. }
  5366. type DeleteFolderOutput struct {
  5367. _ struct{} `type:"structure"`
  5368. }
  5369. // String returns the string representation
  5370. func (s DeleteFolderOutput) String() string {
  5371. return awsutil.Prettify(s)
  5372. }
  5373. // GoString returns the string representation
  5374. func (s DeleteFolderOutput) GoString() string {
  5375. return s.String()
  5376. }
  5377. type DeleteLabelsInput struct {
  5378. _ struct{} `type:"structure"`
  5379. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5380. // API actions, as in accessing the API using AWS credentials.
  5381. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5382. // Flag to request removal of all labels from the specified resource.
  5383. DeleteAll *bool `location:"querystring" locationName:"deleteAll" type:"boolean"`
  5384. // List of labels to delete from the resource.
  5385. Labels []*string `location:"querystring" locationName:"labels" type:"list"`
  5386. // The ID of the resource.
  5387. //
  5388. // ResourceId is a required field
  5389. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  5390. }
  5391. // String returns the string representation
  5392. func (s DeleteLabelsInput) String() string {
  5393. return awsutil.Prettify(s)
  5394. }
  5395. // GoString returns the string representation
  5396. func (s DeleteLabelsInput) GoString() string {
  5397. return s.String()
  5398. }
  5399. // Validate inspects the fields of the type to determine if they are valid.
  5400. func (s *DeleteLabelsInput) Validate() error {
  5401. invalidParams := request.ErrInvalidParams{Context: "DeleteLabelsInput"}
  5402. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5403. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5404. }
  5405. if s.ResourceId == nil {
  5406. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5407. }
  5408. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  5409. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  5410. }
  5411. if invalidParams.Len() > 0 {
  5412. return invalidParams
  5413. }
  5414. return nil
  5415. }
  5416. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5417. func (s *DeleteLabelsInput) SetAuthenticationToken(v string) *DeleteLabelsInput {
  5418. s.AuthenticationToken = &v
  5419. return s
  5420. }
  5421. // SetDeleteAll sets the DeleteAll field's value.
  5422. func (s *DeleteLabelsInput) SetDeleteAll(v bool) *DeleteLabelsInput {
  5423. s.DeleteAll = &v
  5424. return s
  5425. }
  5426. // SetLabels sets the Labels field's value.
  5427. func (s *DeleteLabelsInput) SetLabels(v []*string) *DeleteLabelsInput {
  5428. s.Labels = v
  5429. return s
  5430. }
  5431. // SetResourceId sets the ResourceId field's value.
  5432. func (s *DeleteLabelsInput) SetResourceId(v string) *DeleteLabelsInput {
  5433. s.ResourceId = &v
  5434. return s
  5435. }
  5436. type DeleteLabelsOutput struct {
  5437. _ struct{} `type:"structure"`
  5438. }
  5439. // String returns the string representation
  5440. func (s DeleteLabelsOutput) String() string {
  5441. return awsutil.Prettify(s)
  5442. }
  5443. // GoString returns the string representation
  5444. func (s DeleteLabelsOutput) GoString() string {
  5445. return s.String()
  5446. }
  5447. type DeleteNotificationSubscriptionInput struct {
  5448. _ struct{} `type:"structure"`
  5449. // The ID of the organization.
  5450. //
  5451. // OrganizationId is a required field
  5452. OrganizationId *string `location:"uri" locationName:"OrganizationId" min:"1" type:"string" required:"true"`
  5453. // The ID of the subscription.
  5454. //
  5455. // SubscriptionId is a required field
  5456. SubscriptionId *string `location:"uri" locationName:"SubscriptionId" min:"1" type:"string" required:"true"`
  5457. }
  5458. // String returns the string representation
  5459. func (s DeleteNotificationSubscriptionInput) String() string {
  5460. return awsutil.Prettify(s)
  5461. }
  5462. // GoString returns the string representation
  5463. func (s DeleteNotificationSubscriptionInput) GoString() string {
  5464. return s.String()
  5465. }
  5466. // Validate inspects the fields of the type to determine if they are valid.
  5467. func (s *DeleteNotificationSubscriptionInput) Validate() error {
  5468. invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationSubscriptionInput"}
  5469. if s.OrganizationId == nil {
  5470. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5471. }
  5472. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  5473. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  5474. }
  5475. if s.SubscriptionId == nil {
  5476. invalidParams.Add(request.NewErrParamRequired("SubscriptionId"))
  5477. }
  5478. if s.SubscriptionId != nil && len(*s.SubscriptionId) < 1 {
  5479. invalidParams.Add(request.NewErrParamMinLen("SubscriptionId", 1))
  5480. }
  5481. if invalidParams.Len() > 0 {
  5482. return invalidParams
  5483. }
  5484. return nil
  5485. }
  5486. // SetOrganizationId sets the OrganizationId field's value.
  5487. func (s *DeleteNotificationSubscriptionInput) SetOrganizationId(v string) *DeleteNotificationSubscriptionInput {
  5488. s.OrganizationId = &v
  5489. return s
  5490. }
  5491. // SetSubscriptionId sets the SubscriptionId field's value.
  5492. func (s *DeleteNotificationSubscriptionInput) SetSubscriptionId(v string) *DeleteNotificationSubscriptionInput {
  5493. s.SubscriptionId = &v
  5494. return s
  5495. }
  5496. type DeleteNotificationSubscriptionOutput struct {
  5497. _ struct{} `type:"structure"`
  5498. }
  5499. // String returns the string representation
  5500. func (s DeleteNotificationSubscriptionOutput) String() string {
  5501. return awsutil.Prettify(s)
  5502. }
  5503. // GoString returns the string representation
  5504. func (s DeleteNotificationSubscriptionOutput) GoString() string {
  5505. return s.String()
  5506. }
  5507. type DeleteUserInput struct {
  5508. _ struct{} `type:"structure"`
  5509. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5510. // API actions, as in accessing the API using AWS credentials.
  5511. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5512. // The ID of the user.
  5513. //
  5514. // UserId is a required field
  5515. UserId *string `location:"uri" locationName:"UserId" min:"1" type:"string" required:"true"`
  5516. }
  5517. // String returns the string representation
  5518. func (s DeleteUserInput) String() string {
  5519. return awsutil.Prettify(s)
  5520. }
  5521. // GoString returns the string representation
  5522. func (s DeleteUserInput) GoString() string {
  5523. return s.String()
  5524. }
  5525. // Validate inspects the fields of the type to determine if they are valid.
  5526. func (s *DeleteUserInput) Validate() error {
  5527. invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"}
  5528. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5529. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5530. }
  5531. if s.UserId == nil {
  5532. invalidParams.Add(request.NewErrParamRequired("UserId"))
  5533. }
  5534. if s.UserId != nil && len(*s.UserId) < 1 {
  5535. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  5536. }
  5537. if invalidParams.Len() > 0 {
  5538. return invalidParams
  5539. }
  5540. return nil
  5541. }
  5542. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5543. func (s *DeleteUserInput) SetAuthenticationToken(v string) *DeleteUserInput {
  5544. s.AuthenticationToken = &v
  5545. return s
  5546. }
  5547. // SetUserId sets the UserId field's value.
  5548. func (s *DeleteUserInput) SetUserId(v string) *DeleteUserInput {
  5549. s.UserId = &v
  5550. return s
  5551. }
  5552. type DeleteUserOutput struct {
  5553. _ struct{} `type:"structure"`
  5554. }
  5555. // String returns the string representation
  5556. func (s DeleteUserOutput) String() string {
  5557. return awsutil.Prettify(s)
  5558. }
  5559. // GoString returns the string representation
  5560. func (s DeleteUserOutput) GoString() string {
  5561. return s.String()
  5562. }
  5563. type DescribeActivitiesInput struct {
  5564. _ struct{} `type:"structure"`
  5565. // Specifies which activity types to include in the response. If this field
  5566. // is left empty, all activity types are returned.
  5567. ActivityTypes *string `location:"querystring" locationName:"activityTypes" min:"1" type:"string"`
  5568. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5569. // API actions, as in accessing the API using AWS credentials.
  5570. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5571. // The timestamp that determines the end time of the activities. The response
  5572. // includes the activities performed before the specified timestamp.
  5573. EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp"`
  5574. // Includes indirect activities. An indirect activity results from a direct
  5575. // activity performed on a parent resource. For example, sharing a parent folder
  5576. // (the direct activity) shares all of the subfolders and documents within the
  5577. // parent folder (the indirect activity).
  5578. IncludeIndirectActivities *bool `location:"querystring" locationName:"includeIndirectActivities" type:"boolean"`
  5579. // The maximum number of items to return.
  5580. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  5581. // The marker for the next set of results.
  5582. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  5583. // The ID of the organization. This is a mandatory parameter when using administrative
  5584. // API (SigV4) requests.
  5585. OrganizationId *string `location:"querystring" locationName:"organizationId" min:"1" type:"string"`
  5586. // The document or folder ID for which to describe activity types.
  5587. ResourceId *string `location:"querystring" locationName:"resourceId" min:"1" type:"string"`
  5588. // The timestamp that determines the starting time of the activities. The response
  5589. // includes the activities performed after the specified timestamp.
  5590. StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp"`
  5591. // The ID of the user who performed the action. The response includes activities
  5592. // pertaining to this user. This is an optional parameter and is only applicable
  5593. // for administrative API (SigV4) requests.
  5594. UserId *string `location:"querystring" locationName:"userId" min:"1" type:"string"`
  5595. }
  5596. // String returns the string representation
  5597. func (s DescribeActivitiesInput) String() string {
  5598. return awsutil.Prettify(s)
  5599. }
  5600. // GoString returns the string representation
  5601. func (s DescribeActivitiesInput) GoString() string {
  5602. return s.String()
  5603. }
  5604. // Validate inspects the fields of the type to determine if they are valid.
  5605. func (s *DescribeActivitiesInput) Validate() error {
  5606. invalidParams := request.ErrInvalidParams{Context: "DescribeActivitiesInput"}
  5607. if s.ActivityTypes != nil && len(*s.ActivityTypes) < 1 {
  5608. invalidParams.Add(request.NewErrParamMinLen("ActivityTypes", 1))
  5609. }
  5610. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5611. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5612. }
  5613. if s.Limit != nil && *s.Limit < 1 {
  5614. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5615. }
  5616. if s.Marker != nil && len(*s.Marker) < 1 {
  5617. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  5618. }
  5619. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  5620. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  5621. }
  5622. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  5623. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  5624. }
  5625. if s.UserId != nil && len(*s.UserId) < 1 {
  5626. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  5627. }
  5628. if invalidParams.Len() > 0 {
  5629. return invalidParams
  5630. }
  5631. return nil
  5632. }
  5633. // SetActivityTypes sets the ActivityTypes field's value.
  5634. func (s *DescribeActivitiesInput) SetActivityTypes(v string) *DescribeActivitiesInput {
  5635. s.ActivityTypes = &v
  5636. return s
  5637. }
  5638. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5639. func (s *DescribeActivitiesInput) SetAuthenticationToken(v string) *DescribeActivitiesInput {
  5640. s.AuthenticationToken = &v
  5641. return s
  5642. }
  5643. // SetEndTime sets the EndTime field's value.
  5644. func (s *DescribeActivitiesInput) SetEndTime(v time.Time) *DescribeActivitiesInput {
  5645. s.EndTime = &v
  5646. return s
  5647. }
  5648. // SetIncludeIndirectActivities sets the IncludeIndirectActivities field's value.
  5649. func (s *DescribeActivitiesInput) SetIncludeIndirectActivities(v bool) *DescribeActivitiesInput {
  5650. s.IncludeIndirectActivities = &v
  5651. return s
  5652. }
  5653. // SetLimit sets the Limit field's value.
  5654. func (s *DescribeActivitiesInput) SetLimit(v int64) *DescribeActivitiesInput {
  5655. s.Limit = &v
  5656. return s
  5657. }
  5658. // SetMarker sets the Marker field's value.
  5659. func (s *DescribeActivitiesInput) SetMarker(v string) *DescribeActivitiesInput {
  5660. s.Marker = &v
  5661. return s
  5662. }
  5663. // SetOrganizationId sets the OrganizationId field's value.
  5664. func (s *DescribeActivitiesInput) SetOrganizationId(v string) *DescribeActivitiesInput {
  5665. s.OrganizationId = &v
  5666. return s
  5667. }
  5668. // SetResourceId sets the ResourceId field's value.
  5669. func (s *DescribeActivitiesInput) SetResourceId(v string) *DescribeActivitiesInput {
  5670. s.ResourceId = &v
  5671. return s
  5672. }
  5673. // SetStartTime sets the StartTime field's value.
  5674. func (s *DescribeActivitiesInput) SetStartTime(v time.Time) *DescribeActivitiesInput {
  5675. s.StartTime = &v
  5676. return s
  5677. }
  5678. // SetUserId sets the UserId field's value.
  5679. func (s *DescribeActivitiesInput) SetUserId(v string) *DescribeActivitiesInput {
  5680. s.UserId = &v
  5681. return s
  5682. }
  5683. type DescribeActivitiesOutput struct {
  5684. _ struct{} `type:"structure"`
  5685. // The marker for the next set of results.
  5686. Marker *string `min:"1" type:"string"`
  5687. // The list of activities for the specified user and time period.
  5688. UserActivities []*Activity `type:"list"`
  5689. }
  5690. // String returns the string representation
  5691. func (s DescribeActivitiesOutput) String() string {
  5692. return awsutil.Prettify(s)
  5693. }
  5694. // GoString returns the string representation
  5695. func (s DescribeActivitiesOutput) GoString() string {
  5696. return s.String()
  5697. }
  5698. // SetMarker sets the Marker field's value.
  5699. func (s *DescribeActivitiesOutput) SetMarker(v string) *DescribeActivitiesOutput {
  5700. s.Marker = &v
  5701. return s
  5702. }
  5703. // SetUserActivities sets the UserActivities field's value.
  5704. func (s *DescribeActivitiesOutput) SetUserActivities(v []*Activity) *DescribeActivitiesOutput {
  5705. s.UserActivities = v
  5706. return s
  5707. }
  5708. type DescribeCommentsInput struct {
  5709. _ struct{} `type:"structure"`
  5710. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5711. // API actions, as in accessing the API using AWS credentials.
  5712. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5713. // The ID of the document.
  5714. //
  5715. // DocumentId is a required field
  5716. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  5717. // The maximum number of items to return.
  5718. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  5719. // The marker for the next set of results. This marker was received from a previous
  5720. // call.
  5721. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  5722. // The ID of the document version.
  5723. //
  5724. // VersionId is a required field
  5725. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  5726. }
  5727. // String returns the string representation
  5728. func (s DescribeCommentsInput) String() string {
  5729. return awsutil.Prettify(s)
  5730. }
  5731. // GoString returns the string representation
  5732. func (s DescribeCommentsInput) GoString() string {
  5733. return s.String()
  5734. }
  5735. // Validate inspects the fields of the type to determine if they are valid.
  5736. func (s *DescribeCommentsInput) Validate() error {
  5737. invalidParams := request.ErrInvalidParams{Context: "DescribeCommentsInput"}
  5738. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5739. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5740. }
  5741. if s.DocumentId == nil {
  5742. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  5743. }
  5744. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  5745. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  5746. }
  5747. if s.Limit != nil && *s.Limit < 1 {
  5748. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5749. }
  5750. if s.Marker != nil && len(*s.Marker) < 1 {
  5751. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  5752. }
  5753. if s.VersionId == nil {
  5754. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  5755. }
  5756. if s.VersionId != nil && len(*s.VersionId) < 1 {
  5757. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  5758. }
  5759. if invalidParams.Len() > 0 {
  5760. return invalidParams
  5761. }
  5762. return nil
  5763. }
  5764. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5765. func (s *DescribeCommentsInput) SetAuthenticationToken(v string) *DescribeCommentsInput {
  5766. s.AuthenticationToken = &v
  5767. return s
  5768. }
  5769. // SetDocumentId sets the DocumentId field's value.
  5770. func (s *DescribeCommentsInput) SetDocumentId(v string) *DescribeCommentsInput {
  5771. s.DocumentId = &v
  5772. return s
  5773. }
  5774. // SetLimit sets the Limit field's value.
  5775. func (s *DescribeCommentsInput) SetLimit(v int64) *DescribeCommentsInput {
  5776. s.Limit = &v
  5777. return s
  5778. }
  5779. // SetMarker sets the Marker field's value.
  5780. func (s *DescribeCommentsInput) SetMarker(v string) *DescribeCommentsInput {
  5781. s.Marker = &v
  5782. return s
  5783. }
  5784. // SetVersionId sets the VersionId field's value.
  5785. func (s *DescribeCommentsInput) SetVersionId(v string) *DescribeCommentsInput {
  5786. s.VersionId = &v
  5787. return s
  5788. }
  5789. type DescribeCommentsOutput struct {
  5790. _ struct{} `type:"structure"`
  5791. // The list of comments for the specified document version.
  5792. Comments []*Comment `type:"list"`
  5793. // The marker for the next set of results. This marker was received from a previous
  5794. // call.
  5795. Marker *string `min:"1" type:"string"`
  5796. }
  5797. // String returns the string representation
  5798. func (s DescribeCommentsOutput) String() string {
  5799. return awsutil.Prettify(s)
  5800. }
  5801. // GoString returns the string representation
  5802. func (s DescribeCommentsOutput) GoString() string {
  5803. return s.String()
  5804. }
  5805. // SetComments sets the Comments field's value.
  5806. func (s *DescribeCommentsOutput) SetComments(v []*Comment) *DescribeCommentsOutput {
  5807. s.Comments = v
  5808. return s
  5809. }
  5810. // SetMarker sets the Marker field's value.
  5811. func (s *DescribeCommentsOutput) SetMarker(v string) *DescribeCommentsOutput {
  5812. s.Marker = &v
  5813. return s
  5814. }
  5815. type DescribeDocumentVersionsInput struct {
  5816. _ struct{} `type:"structure"`
  5817. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5818. // API actions, as in accessing the API using AWS credentials.
  5819. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5820. // The ID of the document.
  5821. //
  5822. // DocumentId is a required field
  5823. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  5824. // Specify "SOURCE" to include initialized versions and a URL for the source
  5825. // document.
  5826. Fields *string `location:"querystring" locationName:"fields" min:"1" type:"string"`
  5827. // A comma-separated list of values. Specify "INITIALIZED" to include incomplete
  5828. // versions.
  5829. Include *string `location:"querystring" locationName:"include" min:"1" type:"string"`
  5830. // The maximum number of versions to return with this call.
  5831. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  5832. // The marker for the next set of results. (You received this marker from a
  5833. // previous call.)
  5834. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  5835. }
  5836. // String returns the string representation
  5837. func (s DescribeDocumentVersionsInput) String() string {
  5838. return awsutil.Prettify(s)
  5839. }
  5840. // GoString returns the string representation
  5841. func (s DescribeDocumentVersionsInput) GoString() string {
  5842. return s.String()
  5843. }
  5844. // Validate inspects the fields of the type to determine if they are valid.
  5845. func (s *DescribeDocumentVersionsInput) Validate() error {
  5846. invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentVersionsInput"}
  5847. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5848. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5849. }
  5850. if s.DocumentId == nil {
  5851. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  5852. }
  5853. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  5854. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  5855. }
  5856. if s.Fields != nil && len(*s.Fields) < 1 {
  5857. invalidParams.Add(request.NewErrParamMinLen("Fields", 1))
  5858. }
  5859. if s.Include != nil && len(*s.Include) < 1 {
  5860. invalidParams.Add(request.NewErrParamMinLen("Include", 1))
  5861. }
  5862. if s.Limit != nil && *s.Limit < 1 {
  5863. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5864. }
  5865. if s.Marker != nil && len(*s.Marker) < 1 {
  5866. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  5867. }
  5868. if invalidParams.Len() > 0 {
  5869. return invalidParams
  5870. }
  5871. return nil
  5872. }
  5873. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5874. func (s *DescribeDocumentVersionsInput) SetAuthenticationToken(v string) *DescribeDocumentVersionsInput {
  5875. s.AuthenticationToken = &v
  5876. return s
  5877. }
  5878. // SetDocumentId sets the DocumentId field's value.
  5879. func (s *DescribeDocumentVersionsInput) SetDocumentId(v string) *DescribeDocumentVersionsInput {
  5880. s.DocumentId = &v
  5881. return s
  5882. }
  5883. // SetFields sets the Fields field's value.
  5884. func (s *DescribeDocumentVersionsInput) SetFields(v string) *DescribeDocumentVersionsInput {
  5885. s.Fields = &v
  5886. return s
  5887. }
  5888. // SetInclude sets the Include field's value.
  5889. func (s *DescribeDocumentVersionsInput) SetInclude(v string) *DescribeDocumentVersionsInput {
  5890. s.Include = &v
  5891. return s
  5892. }
  5893. // SetLimit sets the Limit field's value.
  5894. func (s *DescribeDocumentVersionsInput) SetLimit(v int64) *DescribeDocumentVersionsInput {
  5895. s.Limit = &v
  5896. return s
  5897. }
  5898. // SetMarker sets the Marker field's value.
  5899. func (s *DescribeDocumentVersionsInput) SetMarker(v string) *DescribeDocumentVersionsInput {
  5900. s.Marker = &v
  5901. return s
  5902. }
  5903. type DescribeDocumentVersionsOutput struct {
  5904. _ struct{} `type:"structure"`
  5905. // The document versions.
  5906. DocumentVersions []*DocumentVersionMetadata `type:"list"`
  5907. // The marker to use when requesting the next set of results. If there are no
  5908. // additional results, the string is empty.
  5909. Marker *string `min:"1" type:"string"`
  5910. }
  5911. // String returns the string representation
  5912. func (s DescribeDocumentVersionsOutput) String() string {
  5913. return awsutil.Prettify(s)
  5914. }
  5915. // GoString returns the string representation
  5916. func (s DescribeDocumentVersionsOutput) GoString() string {
  5917. return s.String()
  5918. }
  5919. // SetDocumentVersions sets the DocumentVersions field's value.
  5920. func (s *DescribeDocumentVersionsOutput) SetDocumentVersions(v []*DocumentVersionMetadata) *DescribeDocumentVersionsOutput {
  5921. s.DocumentVersions = v
  5922. return s
  5923. }
  5924. // SetMarker sets the Marker field's value.
  5925. func (s *DescribeDocumentVersionsOutput) SetMarker(v string) *DescribeDocumentVersionsOutput {
  5926. s.Marker = &v
  5927. return s
  5928. }
  5929. type DescribeFolderContentsInput struct {
  5930. _ struct{} `type:"structure"`
  5931. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  5932. // API actions, as in accessing the API using AWS credentials.
  5933. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  5934. // The ID of the folder.
  5935. //
  5936. // FolderId is a required field
  5937. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  5938. // The contents to include. Specify "INITIALIZED" to include initialized documents.
  5939. Include *string `location:"querystring" locationName:"include" min:"1" type:"string"`
  5940. // The maximum number of items to return with this call.
  5941. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  5942. // The marker for the next set of results. This marker was received from a previous
  5943. // call.
  5944. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  5945. // The order for the contents of the folder.
  5946. Order *string `location:"querystring" locationName:"order" type:"string" enum:"OrderType"`
  5947. // The sorting criteria.
  5948. Sort *string `location:"querystring" locationName:"sort" type:"string" enum:"ResourceSortType"`
  5949. // The type of items.
  5950. Type *string `location:"querystring" locationName:"type" type:"string" enum:"FolderContentType"`
  5951. }
  5952. // String returns the string representation
  5953. func (s DescribeFolderContentsInput) String() string {
  5954. return awsutil.Prettify(s)
  5955. }
  5956. // GoString returns the string representation
  5957. func (s DescribeFolderContentsInput) GoString() string {
  5958. return s.String()
  5959. }
  5960. // Validate inspects the fields of the type to determine if they are valid.
  5961. func (s *DescribeFolderContentsInput) Validate() error {
  5962. invalidParams := request.ErrInvalidParams{Context: "DescribeFolderContentsInput"}
  5963. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  5964. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  5965. }
  5966. if s.FolderId == nil {
  5967. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  5968. }
  5969. if s.FolderId != nil && len(*s.FolderId) < 1 {
  5970. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  5971. }
  5972. if s.Include != nil && len(*s.Include) < 1 {
  5973. invalidParams.Add(request.NewErrParamMinLen("Include", 1))
  5974. }
  5975. if s.Limit != nil && *s.Limit < 1 {
  5976. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  5977. }
  5978. if s.Marker != nil && len(*s.Marker) < 1 {
  5979. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  5980. }
  5981. if invalidParams.Len() > 0 {
  5982. return invalidParams
  5983. }
  5984. return nil
  5985. }
  5986. // SetAuthenticationToken sets the AuthenticationToken field's value.
  5987. func (s *DescribeFolderContentsInput) SetAuthenticationToken(v string) *DescribeFolderContentsInput {
  5988. s.AuthenticationToken = &v
  5989. return s
  5990. }
  5991. // SetFolderId sets the FolderId field's value.
  5992. func (s *DescribeFolderContentsInput) SetFolderId(v string) *DescribeFolderContentsInput {
  5993. s.FolderId = &v
  5994. return s
  5995. }
  5996. // SetInclude sets the Include field's value.
  5997. func (s *DescribeFolderContentsInput) SetInclude(v string) *DescribeFolderContentsInput {
  5998. s.Include = &v
  5999. return s
  6000. }
  6001. // SetLimit sets the Limit field's value.
  6002. func (s *DescribeFolderContentsInput) SetLimit(v int64) *DescribeFolderContentsInput {
  6003. s.Limit = &v
  6004. return s
  6005. }
  6006. // SetMarker sets the Marker field's value.
  6007. func (s *DescribeFolderContentsInput) SetMarker(v string) *DescribeFolderContentsInput {
  6008. s.Marker = &v
  6009. return s
  6010. }
  6011. // SetOrder sets the Order field's value.
  6012. func (s *DescribeFolderContentsInput) SetOrder(v string) *DescribeFolderContentsInput {
  6013. s.Order = &v
  6014. return s
  6015. }
  6016. // SetSort sets the Sort field's value.
  6017. func (s *DescribeFolderContentsInput) SetSort(v string) *DescribeFolderContentsInput {
  6018. s.Sort = &v
  6019. return s
  6020. }
  6021. // SetType sets the Type field's value.
  6022. func (s *DescribeFolderContentsInput) SetType(v string) *DescribeFolderContentsInput {
  6023. s.Type = &v
  6024. return s
  6025. }
  6026. type DescribeFolderContentsOutput struct {
  6027. _ struct{} `type:"structure"`
  6028. // The documents in the specified folder.
  6029. Documents []*DocumentMetadata `type:"list"`
  6030. // The subfolders in the specified folder.
  6031. Folders []*FolderMetadata `type:"list"`
  6032. // The marker to use when requesting the next set of results. If there are no
  6033. // additional results, the string is empty.
  6034. Marker *string `min:"1" type:"string"`
  6035. }
  6036. // String returns the string representation
  6037. func (s DescribeFolderContentsOutput) String() string {
  6038. return awsutil.Prettify(s)
  6039. }
  6040. // GoString returns the string representation
  6041. func (s DescribeFolderContentsOutput) GoString() string {
  6042. return s.String()
  6043. }
  6044. // SetDocuments sets the Documents field's value.
  6045. func (s *DescribeFolderContentsOutput) SetDocuments(v []*DocumentMetadata) *DescribeFolderContentsOutput {
  6046. s.Documents = v
  6047. return s
  6048. }
  6049. // SetFolders sets the Folders field's value.
  6050. func (s *DescribeFolderContentsOutput) SetFolders(v []*FolderMetadata) *DescribeFolderContentsOutput {
  6051. s.Folders = v
  6052. return s
  6053. }
  6054. // SetMarker sets the Marker field's value.
  6055. func (s *DescribeFolderContentsOutput) SetMarker(v string) *DescribeFolderContentsOutput {
  6056. s.Marker = &v
  6057. return s
  6058. }
  6059. type DescribeGroupsInput struct {
  6060. _ struct{} `type:"structure"`
  6061. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6062. // API actions, as in accessing the API using AWS credentials.
  6063. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  6064. // The maximum number of items to return with this call.
  6065. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6066. // The marker for the next set of results. (You received this marker from a
  6067. // previous call.)
  6068. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6069. // The ID of the organization.
  6070. OrganizationId *string `location:"querystring" locationName:"organizationId" min:"1" type:"string"`
  6071. // A query to describe groups by group name.
  6072. //
  6073. // SearchQuery is a required field
  6074. SearchQuery *string `location:"querystring" locationName:"searchQuery" min:"1" type:"string" required:"true" sensitive:"true"`
  6075. }
  6076. // String returns the string representation
  6077. func (s DescribeGroupsInput) String() string {
  6078. return awsutil.Prettify(s)
  6079. }
  6080. // GoString returns the string representation
  6081. func (s DescribeGroupsInput) GoString() string {
  6082. return s.String()
  6083. }
  6084. // Validate inspects the fields of the type to determine if they are valid.
  6085. func (s *DescribeGroupsInput) Validate() error {
  6086. invalidParams := request.ErrInvalidParams{Context: "DescribeGroupsInput"}
  6087. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6088. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6089. }
  6090. if s.Limit != nil && *s.Limit < 1 {
  6091. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6092. }
  6093. if s.Marker != nil && len(*s.Marker) < 1 {
  6094. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  6095. }
  6096. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  6097. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  6098. }
  6099. if s.SearchQuery == nil {
  6100. invalidParams.Add(request.NewErrParamRequired("SearchQuery"))
  6101. }
  6102. if s.SearchQuery != nil && len(*s.SearchQuery) < 1 {
  6103. invalidParams.Add(request.NewErrParamMinLen("SearchQuery", 1))
  6104. }
  6105. if invalidParams.Len() > 0 {
  6106. return invalidParams
  6107. }
  6108. return nil
  6109. }
  6110. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6111. func (s *DescribeGroupsInput) SetAuthenticationToken(v string) *DescribeGroupsInput {
  6112. s.AuthenticationToken = &v
  6113. return s
  6114. }
  6115. // SetLimit sets the Limit field's value.
  6116. func (s *DescribeGroupsInput) SetLimit(v int64) *DescribeGroupsInput {
  6117. s.Limit = &v
  6118. return s
  6119. }
  6120. // SetMarker sets the Marker field's value.
  6121. func (s *DescribeGroupsInput) SetMarker(v string) *DescribeGroupsInput {
  6122. s.Marker = &v
  6123. return s
  6124. }
  6125. // SetOrganizationId sets the OrganizationId field's value.
  6126. func (s *DescribeGroupsInput) SetOrganizationId(v string) *DescribeGroupsInput {
  6127. s.OrganizationId = &v
  6128. return s
  6129. }
  6130. // SetSearchQuery sets the SearchQuery field's value.
  6131. func (s *DescribeGroupsInput) SetSearchQuery(v string) *DescribeGroupsInput {
  6132. s.SearchQuery = &v
  6133. return s
  6134. }
  6135. type DescribeGroupsOutput struct {
  6136. _ struct{} `type:"structure"`
  6137. // The list of groups.
  6138. Groups []*GroupMetadata `type:"list"`
  6139. // The marker to use when requesting the next set of results. If there are no
  6140. // additional results, the string is empty.
  6141. Marker *string `min:"1" type:"string"`
  6142. }
  6143. // String returns the string representation
  6144. func (s DescribeGroupsOutput) String() string {
  6145. return awsutil.Prettify(s)
  6146. }
  6147. // GoString returns the string representation
  6148. func (s DescribeGroupsOutput) GoString() string {
  6149. return s.String()
  6150. }
  6151. // SetGroups sets the Groups field's value.
  6152. func (s *DescribeGroupsOutput) SetGroups(v []*GroupMetadata) *DescribeGroupsOutput {
  6153. s.Groups = v
  6154. return s
  6155. }
  6156. // SetMarker sets the Marker field's value.
  6157. func (s *DescribeGroupsOutput) SetMarker(v string) *DescribeGroupsOutput {
  6158. s.Marker = &v
  6159. return s
  6160. }
  6161. type DescribeNotificationSubscriptionsInput struct {
  6162. _ struct{} `type:"structure"`
  6163. // The maximum number of items to return with this call.
  6164. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6165. // The marker for the next set of results. (You received this marker from a
  6166. // previous call.)
  6167. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6168. // The ID of the organization.
  6169. //
  6170. // OrganizationId is a required field
  6171. OrganizationId *string `location:"uri" locationName:"OrganizationId" min:"1" type:"string" required:"true"`
  6172. }
  6173. // String returns the string representation
  6174. func (s DescribeNotificationSubscriptionsInput) String() string {
  6175. return awsutil.Prettify(s)
  6176. }
  6177. // GoString returns the string representation
  6178. func (s DescribeNotificationSubscriptionsInput) GoString() string {
  6179. return s.String()
  6180. }
  6181. // Validate inspects the fields of the type to determine if they are valid.
  6182. func (s *DescribeNotificationSubscriptionsInput) Validate() error {
  6183. invalidParams := request.ErrInvalidParams{Context: "DescribeNotificationSubscriptionsInput"}
  6184. if s.Limit != nil && *s.Limit < 1 {
  6185. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6186. }
  6187. if s.Marker != nil && len(*s.Marker) < 1 {
  6188. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  6189. }
  6190. if s.OrganizationId == nil {
  6191. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  6192. }
  6193. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  6194. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  6195. }
  6196. if invalidParams.Len() > 0 {
  6197. return invalidParams
  6198. }
  6199. return nil
  6200. }
  6201. // SetLimit sets the Limit field's value.
  6202. func (s *DescribeNotificationSubscriptionsInput) SetLimit(v int64) *DescribeNotificationSubscriptionsInput {
  6203. s.Limit = &v
  6204. return s
  6205. }
  6206. // SetMarker sets the Marker field's value.
  6207. func (s *DescribeNotificationSubscriptionsInput) SetMarker(v string) *DescribeNotificationSubscriptionsInput {
  6208. s.Marker = &v
  6209. return s
  6210. }
  6211. // SetOrganizationId sets the OrganizationId field's value.
  6212. func (s *DescribeNotificationSubscriptionsInput) SetOrganizationId(v string) *DescribeNotificationSubscriptionsInput {
  6213. s.OrganizationId = &v
  6214. return s
  6215. }
  6216. type DescribeNotificationSubscriptionsOutput struct {
  6217. _ struct{} `type:"structure"`
  6218. // The marker to use when requesting the next set of results. If there are no
  6219. // additional results, the string is empty.
  6220. Marker *string `min:"1" type:"string"`
  6221. // The subscriptions.
  6222. Subscriptions []*Subscription `type:"list"`
  6223. }
  6224. // String returns the string representation
  6225. func (s DescribeNotificationSubscriptionsOutput) String() string {
  6226. return awsutil.Prettify(s)
  6227. }
  6228. // GoString returns the string representation
  6229. func (s DescribeNotificationSubscriptionsOutput) GoString() string {
  6230. return s.String()
  6231. }
  6232. // SetMarker sets the Marker field's value.
  6233. func (s *DescribeNotificationSubscriptionsOutput) SetMarker(v string) *DescribeNotificationSubscriptionsOutput {
  6234. s.Marker = &v
  6235. return s
  6236. }
  6237. // SetSubscriptions sets the Subscriptions field's value.
  6238. func (s *DescribeNotificationSubscriptionsOutput) SetSubscriptions(v []*Subscription) *DescribeNotificationSubscriptionsOutput {
  6239. s.Subscriptions = v
  6240. return s
  6241. }
  6242. type DescribeResourcePermissionsInput struct {
  6243. _ struct{} `type:"structure"`
  6244. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6245. // API actions, as in accessing the API using AWS credentials.
  6246. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  6247. // The maximum number of items to return with this call.
  6248. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6249. // The marker for the next set of results. (You received this marker from a
  6250. // previous call)
  6251. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6252. // The ID of the principal to filter permissions by.
  6253. PrincipalId *string `location:"querystring" locationName:"principalId" min:"1" type:"string"`
  6254. // The ID of the resource.
  6255. //
  6256. // ResourceId is a required field
  6257. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  6258. }
  6259. // String returns the string representation
  6260. func (s DescribeResourcePermissionsInput) String() string {
  6261. return awsutil.Prettify(s)
  6262. }
  6263. // GoString returns the string representation
  6264. func (s DescribeResourcePermissionsInput) GoString() string {
  6265. return s.String()
  6266. }
  6267. // Validate inspects the fields of the type to determine if they are valid.
  6268. func (s *DescribeResourcePermissionsInput) Validate() error {
  6269. invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePermissionsInput"}
  6270. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6271. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6272. }
  6273. if s.Limit != nil && *s.Limit < 1 {
  6274. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6275. }
  6276. if s.Marker != nil && len(*s.Marker) < 1 {
  6277. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  6278. }
  6279. if s.PrincipalId != nil && len(*s.PrincipalId) < 1 {
  6280. invalidParams.Add(request.NewErrParamMinLen("PrincipalId", 1))
  6281. }
  6282. if s.ResourceId == nil {
  6283. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6284. }
  6285. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  6286. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  6287. }
  6288. if invalidParams.Len() > 0 {
  6289. return invalidParams
  6290. }
  6291. return nil
  6292. }
  6293. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6294. func (s *DescribeResourcePermissionsInput) SetAuthenticationToken(v string) *DescribeResourcePermissionsInput {
  6295. s.AuthenticationToken = &v
  6296. return s
  6297. }
  6298. // SetLimit sets the Limit field's value.
  6299. func (s *DescribeResourcePermissionsInput) SetLimit(v int64) *DescribeResourcePermissionsInput {
  6300. s.Limit = &v
  6301. return s
  6302. }
  6303. // SetMarker sets the Marker field's value.
  6304. func (s *DescribeResourcePermissionsInput) SetMarker(v string) *DescribeResourcePermissionsInput {
  6305. s.Marker = &v
  6306. return s
  6307. }
  6308. // SetPrincipalId sets the PrincipalId field's value.
  6309. func (s *DescribeResourcePermissionsInput) SetPrincipalId(v string) *DescribeResourcePermissionsInput {
  6310. s.PrincipalId = &v
  6311. return s
  6312. }
  6313. // SetResourceId sets the ResourceId field's value.
  6314. func (s *DescribeResourcePermissionsInput) SetResourceId(v string) *DescribeResourcePermissionsInput {
  6315. s.ResourceId = &v
  6316. return s
  6317. }
  6318. type DescribeResourcePermissionsOutput struct {
  6319. _ struct{} `type:"structure"`
  6320. // The marker to use when requesting the next set of results. If there are no
  6321. // additional results, the string is empty.
  6322. Marker *string `min:"1" type:"string"`
  6323. // The principals.
  6324. Principals []*Principal `type:"list"`
  6325. }
  6326. // String returns the string representation
  6327. func (s DescribeResourcePermissionsOutput) String() string {
  6328. return awsutil.Prettify(s)
  6329. }
  6330. // GoString returns the string representation
  6331. func (s DescribeResourcePermissionsOutput) GoString() string {
  6332. return s.String()
  6333. }
  6334. // SetMarker sets the Marker field's value.
  6335. func (s *DescribeResourcePermissionsOutput) SetMarker(v string) *DescribeResourcePermissionsOutput {
  6336. s.Marker = &v
  6337. return s
  6338. }
  6339. // SetPrincipals sets the Principals field's value.
  6340. func (s *DescribeResourcePermissionsOutput) SetPrincipals(v []*Principal) *DescribeResourcePermissionsOutput {
  6341. s.Principals = v
  6342. return s
  6343. }
  6344. type DescribeRootFoldersInput struct {
  6345. _ struct{} `type:"structure"`
  6346. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6347. // API actions, as in accessing the API using AWS credentials.
  6348. //
  6349. // AuthenticationToken is a required field
  6350. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" required:"true" sensitive:"true"`
  6351. // The maximum number of items to return.
  6352. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6353. // The marker for the next set of results. (You received this marker from a
  6354. // previous call.)
  6355. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6356. }
  6357. // String returns the string representation
  6358. func (s DescribeRootFoldersInput) String() string {
  6359. return awsutil.Prettify(s)
  6360. }
  6361. // GoString returns the string representation
  6362. func (s DescribeRootFoldersInput) GoString() string {
  6363. return s.String()
  6364. }
  6365. // Validate inspects the fields of the type to determine if they are valid.
  6366. func (s *DescribeRootFoldersInput) Validate() error {
  6367. invalidParams := request.ErrInvalidParams{Context: "DescribeRootFoldersInput"}
  6368. if s.AuthenticationToken == nil {
  6369. invalidParams.Add(request.NewErrParamRequired("AuthenticationToken"))
  6370. }
  6371. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6372. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6373. }
  6374. if s.Limit != nil && *s.Limit < 1 {
  6375. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6376. }
  6377. if s.Marker != nil && len(*s.Marker) < 1 {
  6378. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  6379. }
  6380. if invalidParams.Len() > 0 {
  6381. return invalidParams
  6382. }
  6383. return nil
  6384. }
  6385. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6386. func (s *DescribeRootFoldersInput) SetAuthenticationToken(v string) *DescribeRootFoldersInput {
  6387. s.AuthenticationToken = &v
  6388. return s
  6389. }
  6390. // SetLimit sets the Limit field's value.
  6391. func (s *DescribeRootFoldersInput) SetLimit(v int64) *DescribeRootFoldersInput {
  6392. s.Limit = &v
  6393. return s
  6394. }
  6395. // SetMarker sets the Marker field's value.
  6396. func (s *DescribeRootFoldersInput) SetMarker(v string) *DescribeRootFoldersInput {
  6397. s.Marker = &v
  6398. return s
  6399. }
  6400. type DescribeRootFoldersOutput struct {
  6401. _ struct{} `type:"structure"`
  6402. // The user's special folders.
  6403. Folders []*FolderMetadata `type:"list"`
  6404. // The marker for the next set of results.
  6405. Marker *string `min:"1" type:"string"`
  6406. }
  6407. // String returns the string representation
  6408. func (s DescribeRootFoldersOutput) String() string {
  6409. return awsutil.Prettify(s)
  6410. }
  6411. // GoString returns the string representation
  6412. func (s DescribeRootFoldersOutput) GoString() string {
  6413. return s.String()
  6414. }
  6415. // SetFolders sets the Folders field's value.
  6416. func (s *DescribeRootFoldersOutput) SetFolders(v []*FolderMetadata) *DescribeRootFoldersOutput {
  6417. s.Folders = v
  6418. return s
  6419. }
  6420. // SetMarker sets the Marker field's value.
  6421. func (s *DescribeRootFoldersOutput) SetMarker(v string) *DescribeRootFoldersOutput {
  6422. s.Marker = &v
  6423. return s
  6424. }
  6425. type DescribeUsersInput struct {
  6426. _ struct{} `type:"structure"`
  6427. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6428. // API actions, as in accessing the API using AWS credentials.
  6429. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  6430. // A comma-separated list of values. Specify "STORAGE_METADATA" to include the
  6431. // user storage quota and utilization information.
  6432. Fields *string `location:"querystring" locationName:"fields" min:"1" type:"string"`
  6433. // The state of the users. Specify "ALL" to include inactive users.
  6434. Include *string `location:"querystring" locationName:"include" type:"string" enum:"UserFilterType"`
  6435. // The maximum number of items to return.
  6436. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6437. // The marker for the next set of results. (You received this marker from a
  6438. // previous call.)
  6439. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6440. // The order for the results.
  6441. Order *string `location:"querystring" locationName:"order" type:"string" enum:"OrderType"`
  6442. // The ID of the organization.
  6443. OrganizationId *string `location:"querystring" locationName:"organizationId" min:"1" type:"string"`
  6444. // A query to filter users by user name.
  6445. Query *string `location:"querystring" locationName:"query" min:"1" type:"string" sensitive:"true"`
  6446. // The sorting criteria.
  6447. Sort *string `location:"querystring" locationName:"sort" type:"string" enum:"UserSortType"`
  6448. // The IDs of the users.
  6449. UserIds *string `location:"querystring" locationName:"userIds" min:"1" type:"string"`
  6450. }
  6451. // String returns the string representation
  6452. func (s DescribeUsersInput) String() string {
  6453. return awsutil.Prettify(s)
  6454. }
  6455. // GoString returns the string representation
  6456. func (s DescribeUsersInput) GoString() string {
  6457. return s.String()
  6458. }
  6459. // Validate inspects the fields of the type to determine if they are valid.
  6460. func (s *DescribeUsersInput) Validate() error {
  6461. invalidParams := request.ErrInvalidParams{Context: "DescribeUsersInput"}
  6462. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6463. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6464. }
  6465. if s.Fields != nil && len(*s.Fields) < 1 {
  6466. invalidParams.Add(request.NewErrParamMinLen("Fields", 1))
  6467. }
  6468. if s.Limit != nil && *s.Limit < 1 {
  6469. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  6470. }
  6471. if s.Marker != nil && len(*s.Marker) < 1 {
  6472. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  6473. }
  6474. if s.OrganizationId != nil && len(*s.OrganizationId) < 1 {
  6475. invalidParams.Add(request.NewErrParamMinLen("OrganizationId", 1))
  6476. }
  6477. if s.Query != nil && len(*s.Query) < 1 {
  6478. invalidParams.Add(request.NewErrParamMinLen("Query", 1))
  6479. }
  6480. if s.UserIds != nil && len(*s.UserIds) < 1 {
  6481. invalidParams.Add(request.NewErrParamMinLen("UserIds", 1))
  6482. }
  6483. if invalidParams.Len() > 0 {
  6484. return invalidParams
  6485. }
  6486. return nil
  6487. }
  6488. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6489. func (s *DescribeUsersInput) SetAuthenticationToken(v string) *DescribeUsersInput {
  6490. s.AuthenticationToken = &v
  6491. return s
  6492. }
  6493. // SetFields sets the Fields field's value.
  6494. func (s *DescribeUsersInput) SetFields(v string) *DescribeUsersInput {
  6495. s.Fields = &v
  6496. return s
  6497. }
  6498. // SetInclude sets the Include field's value.
  6499. func (s *DescribeUsersInput) SetInclude(v string) *DescribeUsersInput {
  6500. s.Include = &v
  6501. return s
  6502. }
  6503. // SetLimit sets the Limit field's value.
  6504. func (s *DescribeUsersInput) SetLimit(v int64) *DescribeUsersInput {
  6505. s.Limit = &v
  6506. return s
  6507. }
  6508. // SetMarker sets the Marker field's value.
  6509. func (s *DescribeUsersInput) SetMarker(v string) *DescribeUsersInput {
  6510. s.Marker = &v
  6511. return s
  6512. }
  6513. // SetOrder sets the Order field's value.
  6514. func (s *DescribeUsersInput) SetOrder(v string) *DescribeUsersInput {
  6515. s.Order = &v
  6516. return s
  6517. }
  6518. // SetOrganizationId sets the OrganizationId field's value.
  6519. func (s *DescribeUsersInput) SetOrganizationId(v string) *DescribeUsersInput {
  6520. s.OrganizationId = &v
  6521. return s
  6522. }
  6523. // SetQuery sets the Query field's value.
  6524. func (s *DescribeUsersInput) SetQuery(v string) *DescribeUsersInput {
  6525. s.Query = &v
  6526. return s
  6527. }
  6528. // SetSort sets the Sort field's value.
  6529. func (s *DescribeUsersInput) SetSort(v string) *DescribeUsersInput {
  6530. s.Sort = &v
  6531. return s
  6532. }
  6533. // SetUserIds sets the UserIds field's value.
  6534. func (s *DescribeUsersInput) SetUserIds(v string) *DescribeUsersInput {
  6535. s.UserIds = &v
  6536. return s
  6537. }
  6538. type DescribeUsersOutput struct {
  6539. _ struct{} `type:"structure"`
  6540. // The marker to use when requesting the next set of results. If there are no
  6541. // additional results, the string is empty.
  6542. Marker *string `min:"1" type:"string"`
  6543. // The total number of users included in the results.
  6544. //
  6545. // Deprecated: TotalNumberOfUsers has been deprecated
  6546. TotalNumberOfUsers *int64 `deprecated:"true" type:"long"`
  6547. // The users.
  6548. Users []*User `type:"list"`
  6549. }
  6550. // String returns the string representation
  6551. func (s DescribeUsersOutput) String() string {
  6552. return awsutil.Prettify(s)
  6553. }
  6554. // GoString returns the string representation
  6555. func (s DescribeUsersOutput) GoString() string {
  6556. return s.String()
  6557. }
  6558. // SetMarker sets the Marker field's value.
  6559. func (s *DescribeUsersOutput) SetMarker(v string) *DescribeUsersOutput {
  6560. s.Marker = &v
  6561. return s
  6562. }
  6563. // SetTotalNumberOfUsers sets the TotalNumberOfUsers field's value.
  6564. func (s *DescribeUsersOutput) SetTotalNumberOfUsers(v int64) *DescribeUsersOutput {
  6565. s.TotalNumberOfUsers = &v
  6566. return s
  6567. }
  6568. // SetUsers sets the Users field's value.
  6569. func (s *DescribeUsersOutput) SetUsers(v []*User) *DescribeUsersOutput {
  6570. s.Users = v
  6571. return s
  6572. }
  6573. // Describes the document.
  6574. type DocumentMetadata struct {
  6575. _ struct{} `type:"structure"`
  6576. // The time when the document was created.
  6577. CreatedTimestamp *time.Time `type:"timestamp"`
  6578. // The ID of the creator.
  6579. CreatorId *string `min:"1" type:"string"`
  6580. // The ID of the document.
  6581. Id *string `min:"1" type:"string"`
  6582. // List of labels on the document.
  6583. Labels []*string `type:"list"`
  6584. // The latest version of the document.
  6585. LatestVersionMetadata *DocumentVersionMetadata `type:"structure"`
  6586. // The time when the document was updated.
  6587. ModifiedTimestamp *time.Time `type:"timestamp"`
  6588. // The ID of the parent folder.
  6589. ParentFolderId *string `min:"1" type:"string"`
  6590. // The resource state.
  6591. ResourceState *string `type:"string" enum:"ResourceStateType"`
  6592. }
  6593. // String returns the string representation
  6594. func (s DocumentMetadata) String() string {
  6595. return awsutil.Prettify(s)
  6596. }
  6597. // GoString returns the string representation
  6598. func (s DocumentMetadata) GoString() string {
  6599. return s.String()
  6600. }
  6601. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  6602. func (s *DocumentMetadata) SetCreatedTimestamp(v time.Time) *DocumentMetadata {
  6603. s.CreatedTimestamp = &v
  6604. return s
  6605. }
  6606. // SetCreatorId sets the CreatorId field's value.
  6607. func (s *DocumentMetadata) SetCreatorId(v string) *DocumentMetadata {
  6608. s.CreatorId = &v
  6609. return s
  6610. }
  6611. // SetId sets the Id field's value.
  6612. func (s *DocumentMetadata) SetId(v string) *DocumentMetadata {
  6613. s.Id = &v
  6614. return s
  6615. }
  6616. // SetLabels sets the Labels field's value.
  6617. func (s *DocumentMetadata) SetLabels(v []*string) *DocumentMetadata {
  6618. s.Labels = v
  6619. return s
  6620. }
  6621. // SetLatestVersionMetadata sets the LatestVersionMetadata field's value.
  6622. func (s *DocumentMetadata) SetLatestVersionMetadata(v *DocumentVersionMetadata) *DocumentMetadata {
  6623. s.LatestVersionMetadata = v
  6624. return s
  6625. }
  6626. // SetModifiedTimestamp sets the ModifiedTimestamp field's value.
  6627. func (s *DocumentMetadata) SetModifiedTimestamp(v time.Time) *DocumentMetadata {
  6628. s.ModifiedTimestamp = &v
  6629. return s
  6630. }
  6631. // SetParentFolderId sets the ParentFolderId field's value.
  6632. func (s *DocumentMetadata) SetParentFolderId(v string) *DocumentMetadata {
  6633. s.ParentFolderId = &v
  6634. return s
  6635. }
  6636. // SetResourceState sets the ResourceState field's value.
  6637. func (s *DocumentMetadata) SetResourceState(v string) *DocumentMetadata {
  6638. s.ResourceState = &v
  6639. return s
  6640. }
  6641. // Describes a version of a document.
  6642. type DocumentVersionMetadata struct {
  6643. _ struct{} `type:"structure"`
  6644. // The timestamp when the content of the document was originally created.
  6645. ContentCreatedTimestamp *time.Time `type:"timestamp"`
  6646. // The timestamp when the content of the document was modified.
  6647. ContentModifiedTimestamp *time.Time `type:"timestamp"`
  6648. // The content type of the document.
  6649. ContentType *string `min:"1" type:"string"`
  6650. // The timestamp when the document was first uploaded.
  6651. CreatedTimestamp *time.Time `type:"timestamp"`
  6652. // The ID of the creator.
  6653. CreatorId *string `min:"1" type:"string"`
  6654. // The ID of the version.
  6655. Id *string `min:"1" type:"string"`
  6656. // The timestamp when the document was last uploaded.
  6657. ModifiedTimestamp *time.Time `type:"timestamp"`
  6658. // The name of the version.
  6659. Name *string `min:"1" type:"string"`
  6660. // The signature of the document.
  6661. Signature *string `type:"string"`
  6662. // The size of the document, in bytes.
  6663. Size *int64 `type:"long"`
  6664. // The source of the document.
  6665. Source map[string]*string `type:"map"`
  6666. // The status of the document.
  6667. Status *string `type:"string" enum:"DocumentStatusType"`
  6668. // The thumbnail of the document.
  6669. Thumbnail map[string]*string `type:"map"`
  6670. }
  6671. // String returns the string representation
  6672. func (s DocumentVersionMetadata) String() string {
  6673. return awsutil.Prettify(s)
  6674. }
  6675. // GoString returns the string representation
  6676. func (s DocumentVersionMetadata) GoString() string {
  6677. return s.String()
  6678. }
  6679. // SetContentCreatedTimestamp sets the ContentCreatedTimestamp field's value.
  6680. func (s *DocumentVersionMetadata) SetContentCreatedTimestamp(v time.Time) *DocumentVersionMetadata {
  6681. s.ContentCreatedTimestamp = &v
  6682. return s
  6683. }
  6684. // SetContentModifiedTimestamp sets the ContentModifiedTimestamp field's value.
  6685. func (s *DocumentVersionMetadata) SetContentModifiedTimestamp(v time.Time) *DocumentVersionMetadata {
  6686. s.ContentModifiedTimestamp = &v
  6687. return s
  6688. }
  6689. // SetContentType sets the ContentType field's value.
  6690. func (s *DocumentVersionMetadata) SetContentType(v string) *DocumentVersionMetadata {
  6691. s.ContentType = &v
  6692. return s
  6693. }
  6694. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  6695. func (s *DocumentVersionMetadata) SetCreatedTimestamp(v time.Time) *DocumentVersionMetadata {
  6696. s.CreatedTimestamp = &v
  6697. return s
  6698. }
  6699. // SetCreatorId sets the CreatorId field's value.
  6700. func (s *DocumentVersionMetadata) SetCreatorId(v string) *DocumentVersionMetadata {
  6701. s.CreatorId = &v
  6702. return s
  6703. }
  6704. // SetId sets the Id field's value.
  6705. func (s *DocumentVersionMetadata) SetId(v string) *DocumentVersionMetadata {
  6706. s.Id = &v
  6707. return s
  6708. }
  6709. // SetModifiedTimestamp sets the ModifiedTimestamp field's value.
  6710. func (s *DocumentVersionMetadata) SetModifiedTimestamp(v time.Time) *DocumentVersionMetadata {
  6711. s.ModifiedTimestamp = &v
  6712. return s
  6713. }
  6714. // SetName sets the Name field's value.
  6715. func (s *DocumentVersionMetadata) SetName(v string) *DocumentVersionMetadata {
  6716. s.Name = &v
  6717. return s
  6718. }
  6719. // SetSignature sets the Signature field's value.
  6720. func (s *DocumentVersionMetadata) SetSignature(v string) *DocumentVersionMetadata {
  6721. s.Signature = &v
  6722. return s
  6723. }
  6724. // SetSize sets the Size field's value.
  6725. func (s *DocumentVersionMetadata) SetSize(v int64) *DocumentVersionMetadata {
  6726. s.Size = &v
  6727. return s
  6728. }
  6729. // SetSource sets the Source field's value.
  6730. func (s *DocumentVersionMetadata) SetSource(v map[string]*string) *DocumentVersionMetadata {
  6731. s.Source = v
  6732. return s
  6733. }
  6734. // SetStatus sets the Status field's value.
  6735. func (s *DocumentVersionMetadata) SetStatus(v string) *DocumentVersionMetadata {
  6736. s.Status = &v
  6737. return s
  6738. }
  6739. // SetThumbnail sets the Thumbnail field's value.
  6740. func (s *DocumentVersionMetadata) SetThumbnail(v map[string]*string) *DocumentVersionMetadata {
  6741. s.Thumbnail = v
  6742. return s
  6743. }
  6744. // Describes a folder.
  6745. type FolderMetadata struct {
  6746. _ struct{} `type:"structure"`
  6747. // The time when the folder was created.
  6748. CreatedTimestamp *time.Time `type:"timestamp"`
  6749. // The ID of the creator.
  6750. CreatorId *string `min:"1" type:"string"`
  6751. // The ID of the folder.
  6752. Id *string `min:"1" type:"string"`
  6753. // List of labels on the folder.
  6754. Labels []*string `type:"list"`
  6755. // The size of the latest version of the folder metadata.
  6756. LatestVersionSize *int64 `type:"long"`
  6757. // The time when the folder was updated.
  6758. ModifiedTimestamp *time.Time `type:"timestamp"`
  6759. // The name of the folder.
  6760. Name *string `min:"1" type:"string"`
  6761. // The ID of the parent folder.
  6762. ParentFolderId *string `min:"1" type:"string"`
  6763. // The resource state of the folder.
  6764. ResourceState *string `type:"string" enum:"ResourceStateType"`
  6765. // The unique identifier created from the subfolders and documents of the folder.
  6766. Signature *string `type:"string"`
  6767. // The size of the folder metadata.
  6768. Size *int64 `type:"long"`
  6769. }
  6770. // String returns the string representation
  6771. func (s FolderMetadata) String() string {
  6772. return awsutil.Prettify(s)
  6773. }
  6774. // GoString returns the string representation
  6775. func (s FolderMetadata) GoString() string {
  6776. return s.String()
  6777. }
  6778. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  6779. func (s *FolderMetadata) SetCreatedTimestamp(v time.Time) *FolderMetadata {
  6780. s.CreatedTimestamp = &v
  6781. return s
  6782. }
  6783. // SetCreatorId sets the CreatorId field's value.
  6784. func (s *FolderMetadata) SetCreatorId(v string) *FolderMetadata {
  6785. s.CreatorId = &v
  6786. return s
  6787. }
  6788. // SetId sets the Id field's value.
  6789. func (s *FolderMetadata) SetId(v string) *FolderMetadata {
  6790. s.Id = &v
  6791. return s
  6792. }
  6793. // SetLabels sets the Labels field's value.
  6794. func (s *FolderMetadata) SetLabels(v []*string) *FolderMetadata {
  6795. s.Labels = v
  6796. return s
  6797. }
  6798. // SetLatestVersionSize sets the LatestVersionSize field's value.
  6799. func (s *FolderMetadata) SetLatestVersionSize(v int64) *FolderMetadata {
  6800. s.LatestVersionSize = &v
  6801. return s
  6802. }
  6803. // SetModifiedTimestamp sets the ModifiedTimestamp field's value.
  6804. func (s *FolderMetadata) SetModifiedTimestamp(v time.Time) *FolderMetadata {
  6805. s.ModifiedTimestamp = &v
  6806. return s
  6807. }
  6808. // SetName sets the Name field's value.
  6809. func (s *FolderMetadata) SetName(v string) *FolderMetadata {
  6810. s.Name = &v
  6811. return s
  6812. }
  6813. // SetParentFolderId sets the ParentFolderId field's value.
  6814. func (s *FolderMetadata) SetParentFolderId(v string) *FolderMetadata {
  6815. s.ParentFolderId = &v
  6816. return s
  6817. }
  6818. // SetResourceState sets the ResourceState field's value.
  6819. func (s *FolderMetadata) SetResourceState(v string) *FolderMetadata {
  6820. s.ResourceState = &v
  6821. return s
  6822. }
  6823. // SetSignature sets the Signature field's value.
  6824. func (s *FolderMetadata) SetSignature(v string) *FolderMetadata {
  6825. s.Signature = &v
  6826. return s
  6827. }
  6828. // SetSize sets the Size field's value.
  6829. func (s *FolderMetadata) SetSize(v int64) *FolderMetadata {
  6830. s.Size = &v
  6831. return s
  6832. }
  6833. type GetCurrentUserInput struct {
  6834. _ struct{} `type:"structure"`
  6835. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6836. // API actions, as in accessing the API using AWS credentials.
  6837. //
  6838. // AuthenticationToken is a required field
  6839. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" required:"true" sensitive:"true"`
  6840. }
  6841. // String returns the string representation
  6842. func (s GetCurrentUserInput) String() string {
  6843. return awsutil.Prettify(s)
  6844. }
  6845. // GoString returns the string representation
  6846. func (s GetCurrentUserInput) GoString() string {
  6847. return s.String()
  6848. }
  6849. // Validate inspects the fields of the type to determine if they are valid.
  6850. func (s *GetCurrentUserInput) Validate() error {
  6851. invalidParams := request.ErrInvalidParams{Context: "GetCurrentUserInput"}
  6852. if s.AuthenticationToken == nil {
  6853. invalidParams.Add(request.NewErrParamRequired("AuthenticationToken"))
  6854. }
  6855. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6856. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6857. }
  6858. if invalidParams.Len() > 0 {
  6859. return invalidParams
  6860. }
  6861. return nil
  6862. }
  6863. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6864. func (s *GetCurrentUserInput) SetAuthenticationToken(v string) *GetCurrentUserInput {
  6865. s.AuthenticationToken = &v
  6866. return s
  6867. }
  6868. type GetCurrentUserOutput struct {
  6869. _ struct{} `type:"structure"`
  6870. // Metadata of the user.
  6871. User *User `type:"structure"`
  6872. }
  6873. // String returns the string representation
  6874. func (s GetCurrentUserOutput) String() string {
  6875. return awsutil.Prettify(s)
  6876. }
  6877. // GoString returns the string representation
  6878. func (s GetCurrentUserOutput) GoString() string {
  6879. return s.String()
  6880. }
  6881. // SetUser sets the User field's value.
  6882. func (s *GetCurrentUserOutput) SetUser(v *User) *GetCurrentUserOutput {
  6883. s.User = v
  6884. return s
  6885. }
  6886. type GetDocumentInput struct {
  6887. _ struct{} `type:"structure"`
  6888. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6889. // API actions, as in accessing the API using AWS credentials.
  6890. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  6891. // The ID of the document.
  6892. //
  6893. // DocumentId is a required field
  6894. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  6895. // Set this to TRUE to include custom metadata in the response.
  6896. IncludeCustomMetadata *bool `location:"querystring" locationName:"includeCustomMetadata" type:"boolean"`
  6897. }
  6898. // String returns the string representation
  6899. func (s GetDocumentInput) String() string {
  6900. return awsutil.Prettify(s)
  6901. }
  6902. // GoString returns the string representation
  6903. func (s GetDocumentInput) GoString() string {
  6904. return s.String()
  6905. }
  6906. // Validate inspects the fields of the type to determine if they are valid.
  6907. func (s *GetDocumentInput) Validate() error {
  6908. invalidParams := request.ErrInvalidParams{Context: "GetDocumentInput"}
  6909. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6910. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6911. }
  6912. if s.DocumentId == nil {
  6913. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  6914. }
  6915. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  6916. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  6917. }
  6918. if invalidParams.Len() > 0 {
  6919. return invalidParams
  6920. }
  6921. return nil
  6922. }
  6923. // SetAuthenticationToken sets the AuthenticationToken field's value.
  6924. func (s *GetDocumentInput) SetAuthenticationToken(v string) *GetDocumentInput {
  6925. s.AuthenticationToken = &v
  6926. return s
  6927. }
  6928. // SetDocumentId sets the DocumentId field's value.
  6929. func (s *GetDocumentInput) SetDocumentId(v string) *GetDocumentInput {
  6930. s.DocumentId = &v
  6931. return s
  6932. }
  6933. // SetIncludeCustomMetadata sets the IncludeCustomMetadata field's value.
  6934. func (s *GetDocumentInput) SetIncludeCustomMetadata(v bool) *GetDocumentInput {
  6935. s.IncludeCustomMetadata = &v
  6936. return s
  6937. }
  6938. type GetDocumentOutput struct {
  6939. _ struct{} `type:"structure"`
  6940. // The custom metadata on the document.
  6941. CustomMetadata map[string]*string `min:"1" type:"map"`
  6942. // The metadata details of the document.
  6943. Metadata *DocumentMetadata `type:"structure"`
  6944. }
  6945. // String returns the string representation
  6946. func (s GetDocumentOutput) String() string {
  6947. return awsutil.Prettify(s)
  6948. }
  6949. // GoString returns the string representation
  6950. func (s GetDocumentOutput) GoString() string {
  6951. return s.String()
  6952. }
  6953. // SetCustomMetadata sets the CustomMetadata field's value.
  6954. func (s *GetDocumentOutput) SetCustomMetadata(v map[string]*string) *GetDocumentOutput {
  6955. s.CustomMetadata = v
  6956. return s
  6957. }
  6958. // SetMetadata sets the Metadata field's value.
  6959. func (s *GetDocumentOutput) SetMetadata(v *DocumentMetadata) *GetDocumentOutput {
  6960. s.Metadata = v
  6961. return s
  6962. }
  6963. type GetDocumentPathInput struct {
  6964. _ struct{} `type:"structure"`
  6965. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  6966. // API actions, as in accessing the API using AWS credentials.
  6967. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  6968. // The ID of the document.
  6969. //
  6970. // DocumentId is a required field
  6971. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  6972. // A comma-separated list of values. Specify NAME to include the names of the
  6973. // parent folders.
  6974. Fields *string `location:"querystring" locationName:"fields" min:"1" type:"string"`
  6975. // The maximum number of levels in the hierarchy to return.
  6976. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  6977. // This value is not supported.
  6978. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  6979. }
  6980. // String returns the string representation
  6981. func (s GetDocumentPathInput) String() string {
  6982. return awsutil.Prettify(s)
  6983. }
  6984. // GoString returns the string representation
  6985. func (s GetDocumentPathInput) GoString() string {
  6986. return s.String()
  6987. }
  6988. // Validate inspects the fields of the type to determine if they are valid.
  6989. func (s *GetDocumentPathInput) Validate() error {
  6990. invalidParams := request.ErrInvalidParams{Context: "GetDocumentPathInput"}
  6991. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  6992. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  6993. }
  6994. if s.DocumentId == nil {
  6995. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  6996. }
  6997. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  6998. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  6999. }
  7000. if s.Fields != nil && len(*s.Fields) < 1 {
  7001. invalidParams.Add(request.NewErrParamMinLen("Fields", 1))
  7002. }
  7003. if s.Limit != nil && *s.Limit < 1 {
  7004. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  7005. }
  7006. if s.Marker != nil && len(*s.Marker) < 1 {
  7007. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  7008. }
  7009. if invalidParams.Len() > 0 {
  7010. return invalidParams
  7011. }
  7012. return nil
  7013. }
  7014. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7015. func (s *GetDocumentPathInput) SetAuthenticationToken(v string) *GetDocumentPathInput {
  7016. s.AuthenticationToken = &v
  7017. return s
  7018. }
  7019. // SetDocumentId sets the DocumentId field's value.
  7020. func (s *GetDocumentPathInput) SetDocumentId(v string) *GetDocumentPathInput {
  7021. s.DocumentId = &v
  7022. return s
  7023. }
  7024. // SetFields sets the Fields field's value.
  7025. func (s *GetDocumentPathInput) SetFields(v string) *GetDocumentPathInput {
  7026. s.Fields = &v
  7027. return s
  7028. }
  7029. // SetLimit sets the Limit field's value.
  7030. func (s *GetDocumentPathInput) SetLimit(v int64) *GetDocumentPathInput {
  7031. s.Limit = &v
  7032. return s
  7033. }
  7034. // SetMarker sets the Marker field's value.
  7035. func (s *GetDocumentPathInput) SetMarker(v string) *GetDocumentPathInput {
  7036. s.Marker = &v
  7037. return s
  7038. }
  7039. type GetDocumentPathOutput struct {
  7040. _ struct{} `type:"structure"`
  7041. // The path information.
  7042. Path *ResourcePath `type:"structure"`
  7043. }
  7044. // String returns the string representation
  7045. func (s GetDocumentPathOutput) String() string {
  7046. return awsutil.Prettify(s)
  7047. }
  7048. // GoString returns the string representation
  7049. func (s GetDocumentPathOutput) GoString() string {
  7050. return s.String()
  7051. }
  7052. // SetPath sets the Path field's value.
  7053. func (s *GetDocumentPathOutput) SetPath(v *ResourcePath) *GetDocumentPathOutput {
  7054. s.Path = v
  7055. return s
  7056. }
  7057. type GetDocumentVersionInput struct {
  7058. _ struct{} `type:"structure"`
  7059. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7060. // API actions, as in accessing the API using AWS credentials.
  7061. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7062. // The ID of the document.
  7063. //
  7064. // DocumentId is a required field
  7065. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  7066. // A comma-separated list of values. Specify "SOURCE" to include a URL for the
  7067. // source document.
  7068. Fields *string `location:"querystring" locationName:"fields" min:"1" type:"string"`
  7069. // Set this to TRUE to include custom metadata in the response.
  7070. IncludeCustomMetadata *bool `location:"querystring" locationName:"includeCustomMetadata" type:"boolean"`
  7071. // The version ID of the document.
  7072. //
  7073. // VersionId is a required field
  7074. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  7075. }
  7076. // String returns the string representation
  7077. func (s GetDocumentVersionInput) String() string {
  7078. return awsutil.Prettify(s)
  7079. }
  7080. // GoString returns the string representation
  7081. func (s GetDocumentVersionInput) GoString() string {
  7082. return s.String()
  7083. }
  7084. // Validate inspects the fields of the type to determine if they are valid.
  7085. func (s *GetDocumentVersionInput) Validate() error {
  7086. invalidParams := request.ErrInvalidParams{Context: "GetDocumentVersionInput"}
  7087. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7088. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7089. }
  7090. if s.DocumentId == nil {
  7091. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  7092. }
  7093. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  7094. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  7095. }
  7096. if s.Fields != nil && len(*s.Fields) < 1 {
  7097. invalidParams.Add(request.NewErrParamMinLen("Fields", 1))
  7098. }
  7099. if s.VersionId == nil {
  7100. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  7101. }
  7102. if s.VersionId != nil && len(*s.VersionId) < 1 {
  7103. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  7104. }
  7105. if invalidParams.Len() > 0 {
  7106. return invalidParams
  7107. }
  7108. return nil
  7109. }
  7110. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7111. func (s *GetDocumentVersionInput) SetAuthenticationToken(v string) *GetDocumentVersionInput {
  7112. s.AuthenticationToken = &v
  7113. return s
  7114. }
  7115. // SetDocumentId sets the DocumentId field's value.
  7116. func (s *GetDocumentVersionInput) SetDocumentId(v string) *GetDocumentVersionInput {
  7117. s.DocumentId = &v
  7118. return s
  7119. }
  7120. // SetFields sets the Fields field's value.
  7121. func (s *GetDocumentVersionInput) SetFields(v string) *GetDocumentVersionInput {
  7122. s.Fields = &v
  7123. return s
  7124. }
  7125. // SetIncludeCustomMetadata sets the IncludeCustomMetadata field's value.
  7126. func (s *GetDocumentVersionInput) SetIncludeCustomMetadata(v bool) *GetDocumentVersionInput {
  7127. s.IncludeCustomMetadata = &v
  7128. return s
  7129. }
  7130. // SetVersionId sets the VersionId field's value.
  7131. func (s *GetDocumentVersionInput) SetVersionId(v string) *GetDocumentVersionInput {
  7132. s.VersionId = &v
  7133. return s
  7134. }
  7135. type GetDocumentVersionOutput struct {
  7136. _ struct{} `type:"structure"`
  7137. // The custom metadata on the document version.
  7138. CustomMetadata map[string]*string `min:"1" type:"map"`
  7139. // The version metadata.
  7140. Metadata *DocumentVersionMetadata `type:"structure"`
  7141. }
  7142. // String returns the string representation
  7143. func (s GetDocumentVersionOutput) String() string {
  7144. return awsutil.Prettify(s)
  7145. }
  7146. // GoString returns the string representation
  7147. func (s GetDocumentVersionOutput) GoString() string {
  7148. return s.String()
  7149. }
  7150. // SetCustomMetadata sets the CustomMetadata field's value.
  7151. func (s *GetDocumentVersionOutput) SetCustomMetadata(v map[string]*string) *GetDocumentVersionOutput {
  7152. s.CustomMetadata = v
  7153. return s
  7154. }
  7155. // SetMetadata sets the Metadata field's value.
  7156. func (s *GetDocumentVersionOutput) SetMetadata(v *DocumentVersionMetadata) *GetDocumentVersionOutput {
  7157. s.Metadata = v
  7158. return s
  7159. }
  7160. type GetFolderInput struct {
  7161. _ struct{} `type:"structure"`
  7162. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7163. // API actions, as in accessing the API using AWS credentials.
  7164. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7165. // The ID of the folder.
  7166. //
  7167. // FolderId is a required field
  7168. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  7169. // Set to TRUE to include custom metadata in the response.
  7170. IncludeCustomMetadata *bool `location:"querystring" locationName:"includeCustomMetadata" type:"boolean"`
  7171. }
  7172. // String returns the string representation
  7173. func (s GetFolderInput) String() string {
  7174. return awsutil.Prettify(s)
  7175. }
  7176. // GoString returns the string representation
  7177. func (s GetFolderInput) GoString() string {
  7178. return s.String()
  7179. }
  7180. // Validate inspects the fields of the type to determine if they are valid.
  7181. func (s *GetFolderInput) Validate() error {
  7182. invalidParams := request.ErrInvalidParams{Context: "GetFolderInput"}
  7183. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7184. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7185. }
  7186. if s.FolderId == nil {
  7187. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  7188. }
  7189. if s.FolderId != nil && len(*s.FolderId) < 1 {
  7190. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  7191. }
  7192. if invalidParams.Len() > 0 {
  7193. return invalidParams
  7194. }
  7195. return nil
  7196. }
  7197. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7198. func (s *GetFolderInput) SetAuthenticationToken(v string) *GetFolderInput {
  7199. s.AuthenticationToken = &v
  7200. return s
  7201. }
  7202. // SetFolderId sets the FolderId field's value.
  7203. func (s *GetFolderInput) SetFolderId(v string) *GetFolderInput {
  7204. s.FolderId = &v
  7205. return s
  7206. }
  7207. // SetIncludeCustomMetadata sets the IncludeCustomMetadata field's value.
  7208. func (s *GetFolderInput) SetIncludeCustomMetadata(v bool) *GetFolderInput {
  7209. s.IncludeCustomMetadata = &v
  7210. return s
  7211. }
  7212. type GetFolderOutput struct {
  7213. _ struct{} `type:"structure"`
  7214. // The custom metadata on the folder.
  7215. CustomMetadata map[string]*string `min:"1" type:"map"`
  7216. // The metadata of the folder.
  7217. Metadata *FolderMetadata `type:"structure"`
  7218. }
  7219. // String returns the string representation
  7220. func (s GetFolderOutput) String() string {
  7221. return awsutil.Prettify(s)
  7222. }
  7223. // GoString returns the string representation
  7224. func (s GetFolderOutput) GoString() string {
  7225. return s.String()
  7226. }
  7227. // SetCustomMetadata sets the CustomMetadata field's value.
  7228. func (s *GetFolderOutput) SetCustomMetadata(v map[string]*string) *GetFolderOutput {
  7229. s.CustomMetadata = v
  7230. return s
  7231. }
  7232. // SetMetadata sets the Metadata field's value.
  7233. func (s *GetFolderOutput) SetMetadata(v *FolderMetadata) *GetFolderOutput {
  7234. s.Metadata = v
  7235. return s
  7236. }
  7237. type GetFolderPathInput struct {
  7238. _ struct{} `type:"structure"`
  7239. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7240. // API actions, as in accessing the API using AWS credentials.
  7241. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7242. // A comma-separated list of values. Specify "NAME" to include the names of
  7243. // the parent folders.
  7244. Fields *string `location:"querystring" locationName:"fields" min:"1" type:"string"`
  7245. // The ID of the folder.
  7246. //
  7247. // FolderId is a required field
  7248. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  7249. // The maximum number of levels in the hierarchy to return.
  7250. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  7251. // This value is not supported.
  7252. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  7253. }
  7254. // String returns the string representation
  7255. func (s GetFolderPathInput) String() string {
  7256. return awsutil.Prettify(s)
  7257. }
  7258. // GoString returns the string representation
  7259. func (s GetFolderPathInput) GoString() string {
  7260. return s.String()
  7261. }
  7262. // Validate inspects the fields of the type to determine if they are valid.
  7263. func (s *GetFolderPathInput) Validate() error {
  7264. invalidParams := request.ErrInvalidParams{Context: "GetFolderPathInput"}
  7265. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7266. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7267. }
  7268. if s.Fields != nil && len(*s.Fields) < 1 {
  7269. invalidParams.Add(request.NewErrParamMinLen("Fields", 1))
  7270. }
  7271. if s.FolderId == nil {
  7272. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  7273. }
  7274. if s.FolderId != nil && len(*s.FolderId) < 1 {
  7275. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  7276. }
  7277. if s.Limit != nil && *s.Limit < 1 {
  7278. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  7279. }
  7280. if s.Marker != nil && len(*s.Marker) < 1 {
  7281. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  7282. }
  7283. if invalidParams.Len() > 0 {
  7284. return invalidParams
  7285. }
  7286. return nil
  7287. }
  7288. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7289. func (s *GetFolderPathInput) SetAuthenticationToken(v string) *GetFolderPathInput {
  7290. s.AuthenticationToken = &v
  7291. return s
  7292. }
  7293. // SetFields sets the Fields field's value.
  7294. func (s *GetFolderPathInput) SetFields(v string) *GetFolderPathInput {
  7295. s.Fields = &v
  7296. return s
  7297. }
  7298. // SetFolderId sets the FolderId field's value.
  7299. func (s *GetFolderPathInput) SetFolderId(v string) *GetFolderPathInput {
  7300. s.FolderId = &v
  7301. return s
  7302. }
  7303. // SetLimit sets the Limit field's value.
  7304. func (s *GetFolderPathInput) SetLimit(v int64) *GetFolderPathInput {
  7305. s.Limit = &v
  7306. return s
  7307. }
  7308. // SetMarker sets the Marker field's value.
  7309. func (s *GetFolderPathInput) SetMarker(v string) *GetFolderPathInput {
  7310. s.Marker = &v
  7311. return s
  7312. }
  7313. type GetFolderPathOutput struct {
  7314. _ struct{} `type:"structure"`
  7315. // The path information.
  7316. Path *ResourcePath `type:"structure"`
  7317. }
  7318. // String returns the string representation
  7319. func (s GetFolderPathOutput) String() string {
  7320. return awsutil.Prettify(s)
  7321. }
  7322. // GoString returns the string representation
  7323. func (s GetFolderPathOutput) GoString() string {
  7324. return s.String()
  7325. }
  7326. // SetPath sets the Path field's value.
  7327. func (s *GetFolderPathOutput) SetPath(v *ResourcePath) *GetFolderPathOutput {
  7328. s.Path = v
  7329. return s
  7330. }
  7331. type GetResourcesInput struct {
  7332. _ struct{} `type:"structure"`
  7333. // The Amazon WorkDocs authentication token. Do not set this field when using
  7334. // administrative API actions, as in accessing the API operation using AWS credentials.
  7335. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7336. // The collection type.
  7337. CollectionType *string `location:"querystring" locationName:"collectionType" type:"string" enum:"ResourceCollectionType"`
  7338. // The maximum number of resources to return.
  7339. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  7340. // The marker for the next set of results. This marker was received from a previous
  7341. // call.
  7342. Marker *string `location:"querystring" locationName:"marker" min:"1" type:"string"`
  7343. // The user ID for the resource collection. This is a required field for accessing
  7344. // the API operation using IAM credentials.
  7345. UserId *string `location:"querystring" locationName:"userId" min:"1" type:"string"`
  7346. }
  7347. // String returns the string representation
  7348. func (s GetResourcesInput) String() string {
  7349. return awsutil.Prettify(s)
  7350. }
  7351. // GoString returns the string representation
  7352. func (s GetResourcesInput) GoString() string {
  7353. return s.String()
  7354. }
  7355. // Validate inspects the fields of the type to determine if they are valid.
  7356. func (s *GetResourcesInput) Validate() error {
  7357. invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"}
  7358. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7359. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7360. }
  7361. if s.Limit != nil && *s.Limit < 1 {
  7362. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  7363. }
  7364. if s.Marker != nil && len(*s.Marker) < 1 {
  7365. invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
  7366. }
  7367. if s.UserId != nil && len(*s.UserId) < 1 {
  7368. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  7369. }
  7370. if invalidParams.Len() > 0 {
  7371. return invalidParams
  7372. }
  7373. return nil
  7374. }
  7375. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7376. func (s *GetResourcesInput) SetAuthenticationToken(v string) *GetResourcesInput {
  7377. s.AuthenticationToken = &v
  7378. return s
  7379. }
  7380. // SetCollectionType sets the CollectionType field's value.
  7381. func (s *GetResourcesInput) SetCollectionType(v string) *GetResourcesInput {
  7382. s.CollectionType = &v
  7383. return s
  7384. }
  7385. // SetLimit sets the Limit field's value.
  7386. func (s *GetResourcesInput) SetLimit(v int64) *GetResourcesInput {
  7387. s.Limit = &v
  7388. return s
  7389. }
  7390. // SetMarker sets the Marker field's value.
  7391. func (s *GetResourcesInput) SetMarker(v string) *GetResourcesInput {
  7392. s.Marker = &v
  7393. return s
  7394. }
  7395. // SetUserId sets the UserId field's value.
  7396. func (s *GetResourcesInput) SetUserId(v string) *GetResourcesInput {
  7397. s.UserId = &v
  7398. return s
  7399. }
  7400. type GetResourcesOutput struct {
  7401. _ struct{} `type:"structure"`
  7402. // The documents in the specified collection.
  7403. Documents []*DocumentMetadata `type:"list"`
  7404. // The folders in the specified folder.
  7405. Folders []*FolderMetadata `type:"list"`
  7406. // The marker to use when requesting the next set of results. If there are no
  7407. // additional results, the string is empty.
  7408. Marker *string `min:"1" type:"string"`
  7409. }
  7410. // String returns the string representation
  7411. func (s GetResourcesOutput) String() string {
  7412. return awsutil.Prettify(s)
  7413. }
  7414. // GoString returns the string representation
  7415. func (s GetResourcesOutput) GoString() string {
  7416. return s.String()
  7417. }
  7418. // SetDocuments sets the Documents field's value.
  7419. func (s *GetResourcesOutput) SetDocuments(v []*DocumentMetadata) *GetResourcesOutput {
  7420. s.Documents = v
  7421. return s
  7422. }
  7423. // SetFolders sets the Folders field's value.
  7424. func (s *GetResourcesOutput) SetFolders(v []*FolderMetadata) *GetResourcesOutput {
  7425. s.Folders = v
  7426. return s
  7427. }
  7428. // SetMarker sets the Marker field's value.
  7429. func (s *GetResourcesOutput) SetMarker(v string) *GetResourcesOutput {
  7430. s.Marker = &v
  7431. return s
  7432. }
  7433. // Describes the metadata of a user group.
  7434. type GroupMetadata struct {
  7435. _ struct{} `type:"structure"`
  7436. // The ID of the user group.
  7437. Id *string `min:"1" type:"string"`
  7438. // The name of the group.
  7439. Name *string `type:"string"`
  7440. }
  7441. // String returns the string representation
  7442. func (s GroupMetadata) String() string {
  7443. return awsutil.Prettify(s)
  7444. }
  7445. // GoString returns the string representation
  7446. func (s GroupMetadata) GoString() string {
  7447. return s.String()
  7448. }
  7449. // SetId sets the Id field's value.
  7450. func (s *GroupMetadata) SetId(v string) *GroupMetadata {
  7451. s.Id = &v
  7452. return s
  7453. }
  7454. // SetName sets the Name field's value.
  7455. func (s *GroupMetadata) SetName(v string) *GroupMetadata {
  7456. s.Name = &v
  7457. return s
  7458. }
  7459. type InitiateDocumentVersionUploadInput struct {
  7460. _ struct{} `type:"structure"`
  7461. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7462. // API actions, as in accessing the API using AWS credentials.
  7463. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7464. // The timestamp when the content of the document was originally created.
  7465. ContentCreatedTimestamp *time.Time `type:"timestamp"`
  7466. // The timestamp when the content of the document was modified.
  7467. ContentModifiedTimestamp *time.Time `type:"timestamp"`
  7468. // The content type of the document.
  7469. ContentType *string `min:"1" type:"string"`
  7470. // The size of the document, in bytes.
  7471. DocumentSizeInBytes *int64 `type:"long"`
  7472. // The ID of the document.
  7473. Id *string `min:"1" type:"string"`
  7474. // The name of the document.
  7475. Name *string `min:"1" type:"string"`
  7476. // The ID of the parent folder.
  7477. //
  7478. // ParentFolderId is a required field
  7479. ParentFolderId *string `min:"1" type:"string" required:"true"`
  7480. }
  7481. // String returns the string representation
  7482. func (s InitiateDocumentVersionUploadInput) String() string {
  7483. return awsutil.Prettify(s)
  7484. }
  7485. // GoString returns the string representation
  7486. func (s InitiateDocumentVersionUploadInput) GoString() string {
  7487. return s.String()
  7488. }
  7489. // Validate inspects the fields of the type to determine if they are valid.
  7490. func (s *InitiateDocumentVersionUploadInput) Validate() error {
  7491. invalidParams := request.ErrInvalidParams{Context: "InitiateDocumentVersionUploadInput"}
  7492. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7493. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7494. }
  7495. if s.ContentType != nil && len(*s.ContentType) < 1 {
  7496. invalidParams.Add(request.NewErrParamMinLen("ContentType", 1))
  7497. }
  7498. if s.Id != nil && len(*s.Id) < 1 {
  7499. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  7500. }
  7501. if s.Name != nil && len(*s.Name) < 1 {
  7502. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  7503. }
  7504. if s.ParentFolderId == nil {
  7505. invalidParams.Add(request.NewErrParamRequired("ParentFolderId"))
  7506. }
  7507. if s.ParentFolderId != nil && len(*s.ParentFolderId) < 1 {
  7508. invalidParams.Add(request.NewErrParamMinLen("ParentFolderId", 1))
  7509. }
  7510. if invalidParams.Len() > 0 {
  7511. return invalidParams
  7512. }
  7513. return nil
  7514. }
  7515. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7516. func (s *InitiateDocumentVersionUploadInput) SetAuthenticationToken(v string) *InitiateDocumentVersionUploadInput {
  7517. s.AuthenticationToken = &v
  7518. return s
  7519. }
  7520. // SetContentCreatedTimestamp sets the ContentCreatedTimestamp field's value.
  7521. func (s *InitiateDocumentVersionUploadInput) SetContentCreatedTimestamp(v time.Time) *InitiateDocumentVersionUploadInput {
  7522. s.ContentCreatedTimestamp = &v
  7523. return s
  7524. }
  7525. // SetContentModifiedTimestamp sets the ContentModifiedTimestamp field's value.
  7526. func (s *InitiateDocumentVersionUploadInput) SetContentModifiedTimestamp(v time.Time) *InitiateDocumentVersionUploadInput {
  7527. s.ContentModifiedTimestamp = &v
  7528. return s
  7529. }
  7530. // SetContentType sets the ContentType field's value.
  7531. func (s *InitiateDocumentVersionUploadInput) SetContentType(v string) *InitiateDocumentVersionUploadInput {
  7532. s.ContentType = &v
  7533. return s
  7534. }
  7535. // SetDocumentSizeInBytes sets the DocumentSizeInBytes field's value.
  7536. func (s *InitiateDocumentVersionUploadInput) SetDocumentSizeInBytes(v int64) *InitiateDocumentVersionUploadInput {
  7537. s.DocumentSizeInBytes = &v
  7538. return s
  7539. }
  7540. // SetId sets the Id field's value.
  7541. func (s *InitiateDocumentVersionUploadInput) SetId(v string) *InitiateDocumentVersionUploadInput {
  7542. s.Id = &v
  7543. return s
  7544. }
  7545. // SetName sets the Name field's value.
  7546. func (s *InitiateDocumentVersionUploadInput) SetName(v string) *InitiateDocumentVersionUploadInput {
  7547. s.Name = &v
  7548. return s
  7549. }
  7550. // SetParentFolderId sets the ParentFolderId field's value.
  7551. func (s *InitiateDocumentVersionUploadInput) SetParentFolderId(v string) *InitiateDocumentVersionUploadInput {
  7552. s.ParentFolderId = &v
  7553. return s
  7554. }
  7555. type InitiateDocumentVersionUploadOutput struct {
  7556. _ struct{} `type:"structure"`
  7557. // The document metadata.
  7558. Metadata *DocumentMetadata `type:"structure"`
  7559. // The upload metadata.
  7560. UploadMetadata *UploadMetadata `type:"structure"`
  7561. }
  7562. // String returns the string representation
  7563. func (s InitiateDocumentVersionUploadOutput) String() string {
  7564. return awsutil.Prettify(s)
  7565. }
  7566. // GoString returns the string representation
  7567. func (s InitiateDocumentVersionUploadOutput) GoString() string {
  7568. return s.String()
  7569. }
  7570. // SetMetadata sets the Metadata field's value.
  7571. func (s *InitiateDocumentVersionUploadOutput) SetMetadata(v *DocumentMetadata) *InitiateDocumentVersionUploadOutput {
  7572. s.Metadata = v
  7573. return s
  7574. }
  7575. // SetUploadMetadata sets the UploadMetadata field's value.
  7576. func (s *InitiateDocumentVersionUploadOutput) SetUploadMetadata(v *UploadMetadata) *InitiateDocumentVersionUploadOutput {
  7577. s.UploadMetadata = v
  7578. return s
  7579. }
  7580. // Set of options which defines notification preferences of given action.
  7581. type NotificationOptions struct {
  7582. _ struct{} `type:"structure"`
  7583. // Text value to be included in the email body.
  7584. EmailMessage *string `type:"string" sensitive:"true"`
  7585. // Boolean value to indicate an email notification should be sent to the receipients.
  7586. SendEmail *bool `type:"boolean"`
  7587. }
  7588. // String returns the string representation
  7589. func (s NotificationOptions) String() string {
  7590. return awsutil.Prettify(s)
  7591. }
  7592. // GoString returns the string representation
  7593. func (s NotificationOptions) GoString() string {
  7594. return s.String()
  7595. }
  7596. // SetEmailMessage sets the EmailMessage field's value.
  7597. func (s *NotificationOptions) SetEmailMessage(v string) *NotificationOptions {
  7598. s.EmailMessage = &v
  7599. return s
  7600. }
  7601. // SetSendEmail sets the SendEmail field's value.
  7602. func (s *NotificationOptions) SetSendEmail(v bool) *NotificationOptions {
  7603. s.SendEmail = &v
  7604. return s
  7605. }
  7606. // Describes the users or user groups.
  7607. type Participants struct {
  7608. _ struct{} `type:"structure"`
  7609. // The list of user groups.
  7610. Groups []*GroupMetadata `type:"list"`
  7611. // The list of users.
  7612. Users []*UserMetadata `type:"list"`
  7613. }
  7614. // String returns the string representation
  7615. func (s Participants) String() string {
  7616. return awsutil.Prettify(s)
  7617. }
  7618. // GoString returns the string representation
  7619. func (s Participants) GoString() string {
  7620. return s.String()
  7621. }
  7622. // SetGroups sets the Groups field's value.
  7623. func (s *Participants) SetGroups(v []*GroupMetadata) *Participants {
  7624. s.Groups = v
  7625. return s
  7626. }
  7627. // SetUsers sets the Users field's value.
  7628. func (s *Participants) SetUsers(v []*UserMetadata) *Participants {
  7629. s.Users = v
  7630. return s
  7631. }
  7632. // Describes the permissions.
  7633. type PermissionInfo struct {
  7634. _ struct{} `type:"structure"`
  7635. // The role of the user.
  7636. Role *string `type:"string" enum:"RoleType"`
  7637. // The type of permissions.
  7638. Type *string `type:"string" enum:"RolePermissionType"`
  7639. }
  7640. // String returns the string representation
  7641. func (s PermissionInfo) String() string {
  7642. return awsutil.Prettify(s)
  7643. }
  7644. // GoString returns the string representation
  7645. func (s PermissionInfo) GoString() string {
  7646. return s.String()
  7647. }
  7648. // SetRole sets the Role field's value.
  7649. func (s *PermissionInfo) SetRole(v string) *PermissionInfo {
  7650. s.Role = &v
  7651. return s
  7652. }
  7653. // SetType sets the Type field's value.
  7654. func (s *PermissionInfo) SetType(v string) *PermissionInfo {
  7655. s.Type = &v
  7656. return s
  7657. }
  7658. // Describes a resource.
  7659. type Principal struct {
  7660. _ struct{} `type:"structure"`
  7661. // The ID of the resource.
  7662. Id *string `min:"1" type:"string"`
  7663. // The permission information for the resource.
  7664. Roles []*PermissionInfo `type:"list"`
  7665. // The type of resource.
  7666. Type *string `type:"string" enum:"PrincipalType"`
  7667. }
  7668. // String returns the string representation
  7669. func (s Principal) String() string {
  7670. return awsutil.Prettify(s)
  7671. }
  7672. // GoString returns the string representation
  7673. func (s Principal) GoString() string {
  7674. return s.String()
  7675. }
  7676. // SetId sets the Id field's value.
  7677. func (s *Principal) SetId(v string) *Principal {
  7678. s.Id = &v
  7679. return s
  7680. }
  7681. // SetRoles sets the Roles field's value.
  7682. func (s *Principal) SetRoles(v []*PermissionInfo) *Principal {
  7683. s.Roles = v
  7684. return s
  7685. }
  7686. // SetType sets the Type field's value.
  7687. func (s *Principal) SetType(v string) *Principal {
  7688. s.Type = &v
  7689. return s
  7690. }
  7691. type RemoveAllResourcePermissionsInput struct {
  7692. _ struct{} `type:"structure"`
  7693. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7694. // API actions, as in accessing the API using AWS credentials.
  7695. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7696. // The ID of the resource.
  7697. //
  7698. // ResourceId is a required field
  7699. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  7700. }
  7701. // String returns the string representation
  7702. func (s RemoveAllResourcePermissionsInput) String() string {
  7703. return awsutil.Prettify(s)
  7704. }
  7705. // GoString returns the string representation
  7706. func (s RemoveAllResourcePermissionsInput) GoString() string {
  7707. return s.String()
  7708. }
  7709. // Validate inspects the fields of the type to determine if they are valid.
  7710. func (s *RemoveAllResourcePermissionsInput) Validate() error {
  7711. invalidParams := request.ErrInvalidParams{Context: "RemoveAllResourcePermissionsInput"}
  7712. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7713. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7714. }
  7715. if s.ResourceId == nil {
  7716. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7717. }
  7718. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  7719. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  7720. }
  7721. if invalidParams.Len() > 0 {
  7722. return invalidParams
  7723. }
  7724. return nil
  7725. }
  7726. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7727. func (s *RemoveAllResourcePermissionsInput) SetAuthenticationToken(v string) *RemoveAllResourcePermissionsInput {
  7728. s.AuthenticationToken = &v
  7729. return s
  7730. }
  7731. // SetResourceId sets the ResourceId field's value.
  7732. func (s *RemoveAllResourcePermissionsInput) SetResourceId(v string) *RemoveAllResourcePermissionsInput {
  7733. s.ResourceId = &v
  7734. return s
  7735. }
  7736. type RemoveAllResourcePermissionsOutput struct {
  7737. _ struct{} `type:"structure"`
  7738. }
  7739. // String returns the string representation
  7740. func (s RemoveAllResourcePermissionsOutput) String() string {
  7741. return awsutil.Prettify(s)
  7742. }
  7743. // GoString returns the string representation
  7744. func (s RemoveAllResourcePermissionsOutput) GoString() string {
  7745. return s.String()
  7746. }
  7747. type RemoveResourcePermissionInput struct {
  7748. _ struct{} `type:"structure"`
  7749. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  7750. // API actions, as in accessing the API using AWS credentials.
  7751. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  7752. // The principal ID of the resource.
  7753. //
  7754. // PrincipalId is a required field
  7755. PrincipalId *string `location:"uri" locationName:"PrincipalId" min:"1" type:"string" required:"true"`
  7756. // The principal type of the resource.
  7757. PrincipalType *string `location:"querystring" locationName:"type" type:"string" enum:"PrincipalType"`
  7758. // The ID of the resource.
  7759. //
  7760. // ResourceId is a required field
  7761. ResourceId *string `location:"uri" locationName:"ResourceId" min:"1" type:"string" required:"true"`
  7762. }
  7763. // String returns the string representation
  7764. func (s RemoveResourcePermissionInput) String() string {
  7765. return awsutil.Prettify(s)
  7766. }
  7767. // GoString returns the string representation
  7768. func (s RemoveResourcePermissionInput) GoString() string {
  7769. return s.String()
  7770. }
  7771. // Validate inspects the fields of the type to determine if they are valid.
  7772. func (s *RemoveResourcePermissionInput) Validate() error {
  7773. invalidParams := request.ErrInvalidParams{Context: "RemoveResourcePermissionInput"}
  7774. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  7775. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  7776. }
  7777. if s.PrincipalId == nil {
  7778. invalidParams.Add(request.NewErrParamRequired("PrincipalId"))
  7779. }
  7780. if s.PrincipalId != nil && len(*s.PrincipalId) < 1 {
  7781. invalidParams.Add(request.NewErrParamMinLen("PrincipalId", 1))
  7782. }
  7783. if s.ResourceId == nil {
  7784. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7785. }
  7786. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  7787. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  7788. }
  7789. if invalidParams.Len() > 0 {
  7790. return invalidParams
  7791. }
  7792. return nil
  7793. }
  7794. // SetAuthenticationToken sets the AuthenticationToken field's value.
  7795. func (s *RemoveResourcePermissionInput) SetAuthenticationToken(v string) *RemoveResourcePermissionInput {
  7796. s.AuthenticationToken = &v
  7797. return s
  7798. }
  7799. // SetPrincipalId sets the PrincipalId field's value.
  7800. func (s *RemoveResourcePermissionInput) SetPrincipalId(v string) *RemoveResourcePermissionInput {
  7801. s.PrincipalId = &v
  7802. return s
  7803. }
  7804. // SetPrincipalType sets the PrincipalType field's value.
  7805. func (s *RemoveResourcePermissionInput) SetPrincipalType(v string) *RemoveResourcePermissionInput {
  7806. s.PrincipalType = &v
  7807. return s
  7808. }
  7809. // SetResourceId sets the ResourceId field's value.
  7810. func (s *RemoveResourcePermissionInput) SetResourceId(v string) *RemoveResourcePermissionInput {
  7811. s.ResourceId = &v
  7812. return s
  7813. }
  7814. type RemoveResourcePermissionOutput struct {
  7815. _ struct{} `type:"structure"`
  7816. }
  7817. // String returns the string representation
  7818. func (s RemoveResourcePermissionOutput) String() string {
  7819. return awsutil.Prettify(s)
  7820. }
  7821. // GoString returns the string representation
  7822. func (s RemoveResourcePermissionOutput) GoString() string {
  7823. return s.String()
  7824. }
  7825. // Describes the metadata of a resource.
  7826. type ResourceMetadata struct {
  7827. _ struct{} `type:"structure"`
  7828. // The ID of the resource.
  7829. Id *string `min:"1" type:"string"`
  7830. // The name of the resource.
  7831. Name *string `min:"1" type:"string"`
  7832. // The original name of the resource before a rename operation.
  7833. OriginalName *string `min:"1" type:"string"`
  7834. // The owner of the resource.
  7835. Owner *UserMetadata `type:"structure"`
  7836. // The parent ID of the resource before a rename operation.
  7837. ParentId *string `min:"1" type:"string"`
  7838. // The type of resource.
  7839. Type *string `type:"string" enum:"ResourceType"`
  7840. // The version ID of the resource. This is an optional field and is filled for
  7841. // action on document version.
  7842. VersionId *string `min:"1" type:"string"`
  7843. }
  7844. // String returns the string representation
  7845. func (s ResourceMetadata) String() string {
  7846. return awsutil.Prettify(s)
  7847. }
  7848. // GoString returns the string representation
  7849. func (s ResourceMetadata) GoString() string {
  7850. return s.String()
  7851. }
  7852. // SetId sets the Id field's value.
  7853. func (s *ResourceMetadata) SetId(v string) *ResourceMetadata {
  7854. s.Id = &v
  7855. return s
  7856. }
  7857. // SetName sets the Name field's value.
  7858. func (s *ResourceMetadata) SetName(v string) *ResourceMetadata {
  7859. s.Name = &v
  7860. return s
  7861. }
  7862. // SetOriginalName sets the OriginalName field's value.
  7863. func (s *ResourceMetadata) SetOriginalName(v string) *ResourceMetadata {
  7864. s.OriginalName = &v
  7865. return s
  7866. }
  7867. // SetOwner sets the Owner field's value.
  7868. func (s *ResourceMetadata) SetOwner(v *UserMetadata) *ResourceMetadata {
  7869. s.Owner = v
  7870. return s
  7871. }
  7872. // SetParentId sets the ParentId field's value.
  7873. func (s *ResourceMetadata) SetParentId(v string) *ResourceMetadata {
  7874. s.ParentId = &v
  7875. return s
  7876. }
  7877. // SetType sets the Type field's value.
  7878. func (s *ResourceMetadata) SetType(v string) *ResourceMetadata {
  7879. s.Type = &v
  7880. return s
  7881. }
  7882. // SetVersionId sets the VersionId field's value.
  7883. func (s *ResourceMetadata) SetVersionId(v string) *ResourceMetadata {
  7884. s.VersionId = &v
  7885. return s
  7886. }
  7887. // Describes the path information of a resource.
  7888. type ResourcePath struct {
  7889. _ struct{} `type:"structure"`
  7890. // The components of the resource path.
  7891. Components []*ResourcePathComponent `type:"list"`
  7892. }
  7893. // String returns the string representation
  7894. func (s ResourcePath) String() string {
  7895. return awsutil.Prettify(s)
  7896. }
  7897. // GoString returns the string representation
  7898. func (s ResourcePath) GoString() string {
  7899. return s.String()
  7900. }
  7901. // SetComponents sets the Components field's value.
  7902. func (s *ResourcePath) SetComponents(v []*ResourcePathComponent) *ResourcePath {
  7903. s.Components = v
  7904. return s
  7905. }
  7906. // Describes the resource path.
  7907. type ResourcePathComponent struct {
  7908. _ struct{} `type:"structure"`
  7909. // The ID of the resource path.
  7910. Id *string `min:"1" type:"string"`
  7911. // The name of the resource path.
  7912. Name *string `min:"1" type:"string"`
  7913. }
  7914. // String returns the string representation
  7915. func (s ResourcePathComponent) String() string {
  7916. return awsutil.Prettify(s)
  7917. }
  7918. // GoString returns the string representation
  7919. func (s ResourcePathComponent) GoString() string {
  7920. return s.String()
  7921. }
  7922. // SetId sets the Id field's value.
  7923. func (s *ResourcePathComponent) SetId(v string) *ResourcePathComponent {
  7924. s.Id = &v
  7925. return s
  7926. }
  7927. // SetName sets the Name field's value.
  7928. func (s *ResourcePathComponent) SetName(v string) *ResourcePathComponent {
  7929. s.Name = &v
  7930. return s
  7931. }
  7932. // Describes the recipient type and ID, if available.
  7933. type SharePrincipal struct {
  7934. _ struct{} `type:"structure"`
  7935. // The ID of the recipient.
  7936. //
  7937. // Id is a required field
  7938. Id *string `min:"1" type:"string" required:"true"`
  7939. // The role of the recipient.
  7940. //
  7941. // Role is a required field
  7942. Role *string `type:"string" required:"true" enum:"RoleType"`
  7943. // The type of the recipient.
  7944. //
  7945. // Type is a required field
  7946. Type *string `type:"string" required:"true" enum:"PrincipalType"`
  7947. }
  7948. // String returns the string representation
  7949. func (s SharePrincipal) String() string {
  7950. return awsutil.Prettify(s)
  7951. }
  7952. // GoString returns the string representation
  7953. func (s SharePrincipal) GoString() string {
  7954. return s.String()
  7955. }
  7956. // Validate inspects the fields of the type to determine if they are valid.
  7957. func (s *SharePrincipal) Validate() error {
  7958. invalidParams := request.ErrInvalidParams{Context: "SharePrincipal"}
  7959. if s.Id == nil {
  7960. invalidParams.Add(request.NewErrParamRequired("Id"))
  7961. }
  7962. if s.Id != nil && len(*s.Id) < 1 {
  7963. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  7964. }
  7965. if s.Role == nil {
  7966. invalidParams.Add(request.NewErrParamRequired("Role"))
  7967. }
  7968. if s.Type == nil {
  7969. invalidParams.Add(request.NewErrParamRequired("Type"))
  7970. }
  7971. if invalidParams.Len() > 0 {
  7972. return invalidParams
  7973. }
  7974. return nil
  7975. }
  7976. // SetId sets the Id field's value.
  7977. func (s *SharePrincipal) SetId(v string) *SharePrincipal {
  7978. s.Id = &v
  7979. return s
  7980. }
  7981. // SetRole sets the Role field's value.
  7982. func (s *SharePrincipal) SetRole(v string) *SharePrincipal {
  7983. s.Role = &v
  7984. return s
  7985. }
  7986. // SetType sets the Type field's value.
  7987. func (s *SharePrincipal) SetType(v string) *SharePrincipal {
  7988. s.Type = &v
  7989. return s
  7990. }
  7991. // Describes the share results of a resource.
  7992. type ShareResult struct {
  7993. _ struct{} `type:"structure"`
  7994. // The ID of the invited user.
  7995. InviteePrincipalId *string `min:"1" type:"string"`
  7996. // The ID of the principal.
  7997. PrincipalId *string `min:"1" type:"string"`
  7998. // The role.
  7999. Role *string `type:"string" enum:"RoleType"`
  8000. // The ID of the resource that was shared.
  8001. ShareId *string `min:"1" type:"string"`
  8002. // The status.
  8003. Status *string `type:"string" enum:"ShareStatusType"`
  8004. // The status message.
  8005. StatusMessage *string `type:"string" sensitive:"true"`
  8006. }
  8007. // String returns the string representation
  8008. func (s ShareResult) String() string {
  8009. return awsutil.Prettify(s)
  8010. }
  8011. // GoString returns the string representation
  8012. func (s ShareResult) GoString() string {
  8013. return s.String()
  8014. }
  8015. // SetInviteePrincipalId sets the InviteePrincipalId field's value.
  8016. func (s *ShareResult) SetInviteePrincipalId(v string) *ShareResult {
  8017. s.InviteePrincipalId = &v
  8018. return s
  8019. }
  8020. // SetPrincipalId sets the PrincipalId field's value.
  8021. func (s *ShareResult) SetPrincipalId(v string) *ShareResult {
  8022. s.PrincipalId = &v
  8023. return s
  8024. }
  8025. // SetRole sets the Role field's value.
  8026. func (s *ShareResult) SetRole(v string) *ShareResult {
  8027. s.Role = &v
  8028. return s
  8029. }
  8030. // SetShareId sets the ShareId field's value.
  8031. func (s *ShareResult) SetShareId(v string) *ShareResult {
  8032. s.ShareId = &v
  8033. return s
  8034. }
  8035. // SetStatus sets the Status field's value.
  8036. func (s *ShareResult) SetStatus(v string) *ShareResult {
  8037. s.Status = &v
  8038. return s
  8039. }
  8040. // SetStatusMessage sets the StatusMessage field's value.
  8041. func (s *ShareResult) SetStatusMessage(v string) *ShareResult {
  8042. s.StatusMessage = &v
  8043. return s
  8044. }
  8045. // Describes the storage for a user.
  8046. type StorageRuleType struct {
  8047. _ struct{} `type:"structure"`
  8048. // The amount of storage allocated, in bytes.
  8049. StorageAllocatedInBytes *int64 `type:"long"`
  8050. // The type of storage.
  8051. StorageType *string `type:"string" enum:"StorageType"`
  8052. }
  8053. // String returns the string representation
  8054. func (s StorageRuleType) String() string {
  8055. return awsutil.Prettify(s)
  8056. }
  8057. // GoString returns the string representation
  8058. func (s StorageRuleType) GoString() string {
  8059. return s.String()
  8060. }
  8061. // SetStorageAllocatedInBytes sets the StorageAllocatedInBytes field's value.
  8062. func (s *StorageRuleType) SetStorageAllocatedInBytes(v int64) *StorageRuleType {
  8063. s.StorageAllocatedInBytes = &v
  8064. return s
  8065. }
  8066. // SetStorageType sets the StorageType field's value.
  8067. func (s *StorageRuleType) SetStorageType(v string) *StorageRuleType {
  8068. s.StorageType = &v
  8069. return s
  8070. }
  8071. // Describes a subscription.
  8072. type Subscription struct {
  8073. _ struct{} `type:"structure"`
  8074. // The endpoint of the subscription.
  8075. EndPoint *string `min:"1" type:"string"`
  8076. // The protocol of the subscription.
  8077. Protocol *string `type:"string" enum:"SubscriptionProtocolType"`
  8078. // The ID of the subscription.
  8079. SubscriptionId *string `min:"1" type:"string"`
  8080. }
  8081. // String returns the string representation
  8082. func (s Subscription) String() string {
  8083. return awsutil.Prettify(s)
  8084. }
  8085. // GoString returns the string representation
  8086. func (s Subscription) GoString() string {
  8087. return s.String()
  8088. }
  8089. // SetEndPoint sets the EndPoint field's value.
  8090. func (s *Subscription) SetEndPoint(v string) *Subscription {
  8091. s.EndPoint = &v
  8092. return s
  8093. }
  8094. // SetProtocol sets the Protocol field's value.
  8095. func (s *Subscription) SetProtocol(v string) *Subscription {
  8096. s.Protocol = &v
  8097. return s
  8098. }
  8099. // SetSubscriptionId sets the SubscriptionId field's value.
  8100. func (s *Subscription) SetSubscriptionId(v string) *Subscription {
  8101. s.SubscriptionId = &v
  8102. return s
  8103. }
  8104. type UpdateDocumentInput struct {
  8105. _ struct{} `type:"structure"`
  8106. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  8107. // API actions, as in accessing the API using AWS credentials.
  8108. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  8109. // The ID of the document.
  8110. //
  8111. // DocumentId is a required field
  8112. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  8113. // The name of the document.
  8114. Name *string `min:"1" type:"string"`
  8115. // The ID of the parent folder.
  8116. ParentFolderId *string `min:"1" type:"string"`
  8117. // The resource state of the document. Only ACTIVE and RECYCLED are supported.
  8118. ResourceState *string `type:"string" enum:"ResourceStateType"`
  8119. }
  8120. // String returns the string representation
  8121. func (s UpdateDocumentInput) String() string {
  8122. return awsutil.Prettify(s)
  8123. }
  8124. // GoString returns the string representation
  8125. func (s UpdateDocumentInput) GoString() string {
  8126. return s.String()
  8127. }
  8128. // Validate inspects the fields of the type to determine if they are valid.
  8129. func (s *UpdateDocumentInput) Validate() error {
  8130. invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentInput"}
  8131. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  8132. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  8133. }
  8134. if s.DocumentId == nil {
  8135. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  8136. }
  8137. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  8138. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  8139. }
  8140. if s.Name != nil && len(*s.Name) < 1 {
  8141. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8142. }
  8143. if s.ParentFolderId != nil && len(*s.ParentFolderId) < 1 {
  8144. invalidParams.Add(request.NewErrParamMinLen("ParentFolderId", 1))
  8145. }
  8146. if invalidParams.Len() > 0 {
  8147. return invalidParams
  8148. }
  8149. return nil
  8150. }
  8151. // SetAuthenticationToken sets the AuthenticationToken field's value.
  8152. func (s *UpdateDocumentInput) SetAuthenticationToken(v string) *UpdateDocumentInput {
  8153. s.AuthenticationToken = &v
  8154. return s
  8155. }
  8156. // SetDocumentId sets the DocumentId field's value.
  8157. func (s *UpdateDocumentInput) SetDocumentId(v string) *UpdateDocumentInput {
  8158. s.DocumentId = &v
  8159. return s
  8160. }
  8161. // SetName sets the Name field's value.
  8162. func (s *UpdateDocumentInput) SetName(v string) *UpdateDocumentInput {
  8163. s.Name = &v
  8164. return s
  8165. }
  8166. // SetParentFolderId sets the ParentFolderId field's value.
  8167. func (s *UpdateDocumentInput) SetParentFolderId(v string) *UpdateDocumentInput {
  8168. s.ParentFolderId = &v
  8169. return s
  8170. }
  8171. // SetResourceState sets the ResourceState field's value.
  8172. func (s *UpdateDocumentInput) SetResourceState(v string) *UpdateDocumentInput {
  8173. s.ResourceState = &v
  8174. return s
  8175. }
  8176. type UpdateDocumentOutput struct {
  8177. _ struct{} `type:"structure"`
  8178. }
  8179. // String returns the string representation
  8180. func (s UpdateDocumentOutput) String() string {
  8181. return awsutil.Prettify(s)
  8182. }
  8183. // GoString returns the string representation
  8184. func (s UpdateDocumentOutput) GoString() string {
  8185. return s.String()
  8186. }
  8187. type UpdateDocumentVersionInput struct {
  8188. _ struct{} `type:"structure"`
  8189. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  8190. // API actions, as in accessing the API using AWS credentials.
  8191. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  8192. // The ID of the document.
  8193. //
  8194. // DocumentId is a required field
  8195. DocumentId *string `location:"uri" locationName:"DocumentId" min:"1" type:"string" required:"true"`
  8196. // The version ID of the document.
  8197. //
  8198. // VersionId is a required field
  8199. VersionId *string `location:"uri" locationName:"VersionId" min:"1" type:"string" required:"true"`
  8200. // The status of the version.
  8201. VersionStatus *string `type:"string" enum:"DocumentVersionStatus"`
  8202. }
  8203. // String returns the string representation
  8204. func (s UpdateDocumentVersionInput) String() string {
  8205. return awsutil.Prettify(s)
  8206. }
  8207. // GoString returns the string representation
  8208. func (s UpdateDocumentVersionInput) GoString() string {
  8209. return s.String()
  8210. }
  8211. // Validate inspects the fields of the type to determine if they are valid.
  8212. func (s *UpdateDocumentVersionInput) Validate() error {
  8213. invalidParams := request.ErrInvalidParams{Context: "UpdateDocumentVersionInput"}
  8214. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  8215. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  8216. }
  8217. if s.DocumentId == nil {
  8218. invalidParams.Add(request.NewErrParamRequired("DocumentId"))
  8219. }
  8220. if s.DocumentId != nil && len(*s.DocumentId) < 1 {
  8221. invalidParams.Add(request.NewErrParamMinLen("DocumentId", 1))
  8222. }
  8223. if s.VersionId == nil {
  8224. invalidParams.Add(request.NewErrParamRequired("VersionId"))
  8225. }
  8226. if s.VersionId != nil && len(*s.VersionId) < 1 {
  8227. invalidParams.Add(request.NewErrParamMinLen("VersionId", 1))
  8228. }
  8229. if invalidParams.Len() > 0 {
  8230. return invalidParams
  8231. }
  8232. return nil
  8233. }
  8234. // SetAuthenticationToken sets the AuthenticationToken field's value.
  8235. func (s *UpdateDocumentVersionInput) SetAuthenticationToken(v string) *UpdateDocumentVersionInput {
  8236. s.AuthenticationToken = &v
  8237. return s
  8238. }
  8239. // SetDocumentId sets the DocumentId field's value.
  8240. func (s *UpdateDocumentVersionInput) SetDocumentId(v string) *UpdateDocumentVersionInput {
  8241. s.DocumentId = &v
  8242. return s
  8243. }
  8244. // SetVersionId sets the VersionId field's value.
  8245. func (s *UpdateDocumentVersionInput) SetVersionId(v string) *UpdateDocumentVersionInput {
  8246. s.VersionId = &v
  8247. return s
  8248. }
  8249. // SetVersionStatus sets the VersionStatus field's value.
  8250. func (s *UpdateDocumentVersionInput) SetVersionStatus(v string) *UpdateDocumentVersionInput {
  8251. s.VersionStatus = &v
  8252. return s
  8253. }
  8254. type UpdateDocumentVersionOutput struct {
  8255. _ struct{} `type:"structure"`
  8256. }
  8257. // String returns the string representation
  8258. func (s UpdateDocumentVersionOutput) String() string {
  8259. return awsutil.Prettify(s)
  8260. }
  8261. // GoString returns the string representation
  8262. func (s UpdateDocumentVersionOutput) GoString() string {
  8263. return s.String()
  8264. }
  8265. type UpdateFolderInput struct {
  8266. _ struct{} `type:"structure"`
  8267. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  8268. // API actions, as in accessing the API using AWS credentials.
  8269. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  8270. // The ID of the folder.
  8271. //
  8272. // FolderId is a required field
  8273. FolderId *string `location:"uri" locationName:"FolderId" min:"1" type:"string" required:"true"`
  8274. // The name of the folder.
  8275. Name *string `min:"1" type:"string"`
  8276. // The ID of the parent folder.
  8277. ParentFolderId *string `min:"1" type:"string"`
  8278. // The resource state of the folder. Only ACTIVE and RECYCLED are accepted values
  8279. // from the API.
  8280. ResourceState *string `type:"string" enum:"ResourceStateType"`
  8281. }
  8282. // String returns the string representation
  8283. func (s UpdateFolderInput) String() string {
  8284. return awsutil.Prettify(s)
  8285. }
  8286. // GoString returns the string representation
  8287. func (s UpdateFolderInput) GoString() string {
  8288. return s.String()
  8289. }
  8290. // Validate inspects the fields of the type to determine if they are valid.
  8291. func (s *UpdateFolderInput) Validate() error {
  8292. invalidParams := request.ErrInvalidParams{Context: "UpdateFolderInput"}
  8293. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  8294. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  8295. }
  8296. if s.FolderId == nil {
  8297. invalidParams.Add(request.NewErrParamRequired("FolderId"))
  8298. }
  8299. if s.FolderId != nil && len(*s.FolderId) < 1 {
  8300. invalidParams.Add(request.NewErrParamMinLen("FolderId", 1))
  8301. }
  8302. if s.Name != nil && len(*s.Name) < 1 {
  8303. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  8304. }
  8305. if s.ParentFolderId != nil && len(*s.ParentFolderId) < 1 {
  8306. invalidParams.Add(request.NewErrParamMinLen("ParentFolderId", 1))
  8307. }
  8308. if invalidParams.Len() > 0 {
  8309. return invalidParams
  8310. }
  8311. return nil
  8312. }
  8313. // SetAuthenticationToken sets the AuthenticationToken field's value.
  8314. func (s *UpdateFolderInput) SetAuthenticationToken(v string) *UpdateFolderInput {
  8315. s.AuthenticationToken = &v
  8316. return s
  8317. }
  8318. // SetFolderId sets the FolderId field's value.
  8319. func (s *UpdateFolderInput) SetFolderId(v string) *UpdateFolderInput {
  8320. s.FolderId = &v
  8321. return s
  8322. }
  8323. // SetName sets the Name field's value.
  8324. func (s *UpdateFolderInput) SetName(v string) *UpdateFolderInput {
  8325. s.Name = &v
  8326. return s
  8327. }
  8328. // SetParentFolderId sets the ParentFolderId field's value.
  8329. func (s *UpdateFolderInput) SetParentFolderId(v string) *UpdateFolderInput {
  8330. s.ParentFolderId = &v
  8331. return s
  8332. }
  8333. // SetResourceState sets the ResourceState field's value.
  8334. func (s *UpdateFolderInput) SetResourceState(v string) *UpdateFolderInput {
  8335. s.ResourceState = &v
  8336. return s
  8337. }
  8338. type UpdateFolderOutput struct {
  8339. _ struct{} `type:"structure"`
  8340. }
  8341. // String returns the string representation
  8342. func (s UpdateFolderOutput) String() string {
  8343. return awsutil.Prettify(s)
  8344. }
  8345. // GoString returns the string representation
  8346. func (s UpdateFolderOutput) GoString() string {
  8347. return s.String()
  8348. }
  8349. type UpdateUserInput struct {
  8350. _ struct{} `type:"structure"`
  8351. // Amazon WorkDocs authentication token. Do not set this field when using administrative
  8352. // API actions, as in accessing the API using AWS credentials.
  8353. AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" sensitive:"true"`
  8354. // The given name of the user.
  8355. GivenName *string `min:"1" type:"string"`
  8356. // Boolean value to determine whether the user is granted Poweruser privileges.
  8357. GrantPoweruserPrivileges *string `type:"string" enum:"BooleanEnumType"`
  8358. // The locale of the user.
  8359. Locale *string `type:"string" enum:"LocaleType"`
  8360. // The amount of storage for the user.
  8361. StorageRule *StorageRuleType `type:"structure"`
  8362. // The surname of the user.
  8363. Surname *string `min:"1" type:"string"`
  8364. // The time zone ID of the user.
  8365. TimeZoneId *string `min:"1" type:"string"`
  8366. // The type of the user.
  8367. Type *string `type:"string" enum:"UserType"`
  8368. // The ID of the user.
  8369. //
  8370. // UserId is a required field
  8371. UserId *string `location:"uri" locationName:"UserId" min:"1" type:"string" required:"true"`
  8372. }
  8373. // String returns the string representation
  8374. func (s UpdateUserInput) String() string {
  8375. return awsutil.Prettify(s)
  8376. }
  8377. // GoString returns the string representation
  8378. func (s UpdateUserInput) GoString() string {
  8379. return s.String()
  8380. }
  8381. // Validate inspects the fields of the type to determine if they are valid.
  8382. func (s *UpdateUserInput) Validate() error {
  8383. invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"}
  8384. if s.AuthenticationToken != nil && len(*s.AuthenticationToken) < 1 {
  8385. invalidParams.Add(request.NewErrParamMinLen("AuthenticationToken", 1))
  8386. }
  8387. if s.GivenName != nil && len(*s.GivenName) < 1 {
  8388. invalidParams.Add(request.NewErrParamMinLen("GivenName", 1))
  8389. }
  8390. if s.Surname != nil && len(*s.Surname) < 1 {
  8391. invalidParams.Add(request.NewErrParamMinLen("Surname", 1))
  8392. }
  8393. if s.TimeZoneId != nil && len(*s.TimeZoneId) < 1 {
  8394. invalidParams.Add(request.NewErrParamMinLen("TimeZoneId", 1))
  8395. }
  8396. if s.UserId == nil {
  8397. invalidParams.Add(request.NewErrParamRequired("UserId"))
  8398. }
  8399. if s.UserId != nil && len(*s.UserId) < 1 {
  8400. invalidParams.Add(request.NewErrParamMinLen("UserId", 1))
  8401. }
  8402. if invalidParams.Len() > 0 {
  8403. return invalidParams
  8404. }
  8405. return nil
  8406. }
  8407. // SetAuthenticationToken sets the AuthenticationToken field's value.
  8408. func (s *UpdateUserInput) SetAuthenticationToken(v string) *UpdateUserInput {
  8409. s.AuthenticationToken = &v
  8410. return s
  8411. }
  8412. // SetGivenName sets the GivenName field's value.
  8413. func (s *UpdateUserInput) SetGivenName(v string) *UpdateUserInput {
  8414. s.GivenName = &v
  8415. return s
  8416. }
  8417. // SetGrantPoweruserPrivileges sets the GrantPoweruserPrivileges field's value.
  8418. func (s *UpdateUserInput) SetGrantPoweruserPrivileges(v string) *UpdateUserInput {
  8419. s.GrantPoweruserPrivileges = &v
  8420. return s
  8421. }
  8422. // SetLocale sets the Locale field's value.
  8423. func (s *UpdateUserInput) SetLocale(v string) *UpdateUserInput {
  8424. s.Locale = &v
  8425. return s
  8426. }
  8427. // SetStorageRule sets the StorageRule field's value.
  8428. func (s *UpdateUserInput) SetStorageRule(v *StorageRuleType) *UpdateUserInput {
  8429. s.StorageRule = v
  8430. return s
  8431. }
  8432. // SetSurname sets the Surname field's value.
  8433. func (s *UpdateUserInput) SetSurname(v string) *UpdateUserInput {
  8434. s.Surname = &v
  8435. return s
  8436. }
  8437. // SetTimeZoneId sets the TimeZoneId field's value.
  8438. func (s *UpdateUserInput) SetTimeZoneId(v string) *UpdateUserInput {
  8439. s.TimeZoneId = &v
  8440. return s
  8441. }
  8442. // SetType sets the Type field's value.
  8443. func (s *UpdateUserInput) SetType(v string) *UpdateUserInput {
  8444. s.Type = &v
  8445. return s
  8446. }
  8447. // SetUserId sets the UserId field's value.
  8448. func (s *UpdateUserInput) SetUserId(v string) *UpdateUserInput {
  8449. s.UserId = &v
  8450. return s
  8451. }
  8452. type UpdateUserOutput struct {
  8453. _ struct{} `type:"structure"`
  8454. // The user information.
  8455. User *User `type:"structure"`
  8456. }
  8457. // String returns the string representation
  8458. func (s UpdateUserOutput) String() string {
  8459. return awsutil.Prettify(s)
  8460. }
  8461. // GoString returns the string representation
  8462. func (s UpdateUserOutput) GoString() string {
  8463. return s.String()
  8464. }
  8465. // SetUser sets the User field's value.
  8466. func (s *UpdateUserOutput) SetUser(v *User) *UpdateUserOutput {
  8467. s.User = v
  8468. return s
  8469. }
  8470. // Describes the upload.
  8471. type UploadMetadata struct {
  8472. _ struct{} `type:"structure"`
  8473. // The signed headers.
  8474. SignedHeaders map[string]*string `type:"map"`
  8475. // The URL of the upload.
  8476. UploadUrl *string `min:"1" type:"string" sensitive:"true"`
  8477. }
  8478. // String returns the string representation
  8479. func (s UploadMetadata) String() string {
  8480. return awsutil.Prettify(s)
  8481. }
  8482. // GoString returns the string representation
  8483. func (s UploadMetadata) GoString() string {
  8484. return s.String()
  8485. }
  8486. // SetSignedHeaders sets the SignedHeaders field's value.
  8487. func (s *UploadMetadata) SetSignedHeaders(v map[string]*string) *UploadMetadata {
  8488. s.SignedHeaders = v
  8489. return s
  8490. }
  8491. // SetUploadUrl sets the UploadUrl field's value.
  8492. func (s *UploadMetadata) SetUploadUrl(v string) *UploadMetadata {
  8493. s.UploadUrl = &v
  8494. return s
  8495. }
  8496. // Describes a user.
  8497. type User struct {
  8498. _ struct{} `type:"structure"`
  8499. // The time when the user was created.
  8500. CreatedTimestamp *time.Time `type:"timestamp"`
  8501. // The email address of the user.
  8502. EmailAddress *string `min:"1" type:"string"`
  8503. // The given name of the user.
  8504. GivenName *string `min:"1" type:"string"`
  8505. // The ID of the user.
  8506. Id *string `min:"1" type:"string"`
  8507. // The locale of the user.
  8508. Locale *string `type:"string" enum:"LocaleType"`
  8509. // The time when the user was modified.
  8510. ModifiedTimestamp *time.Time `type:"timestamp"`
  8511. // The ID of the organization.
  8512. OrganizationId *string `min:"1" type:"string"`
  8513. // The ID of the recycle bin folder.
  8514. RecycleBinFolderId *string `min:"1" type:"string"`
  8515. // The ID of the root folder.
  8516. RootFolderId *string `min:"1" type:"string"`
  8517. // The status of the user.
  8518. Status *string `type:"string" enum:"UserStatusType"`
  8519. // The storage for the user.
  8520. Storage *UserStorageMetadata `type:"structure"`
  8521. // The surname of the user.
  8522. Surname *string `min:"1" type:"string"`
  8523. // The time zone ID of the user.
  8524. TimeZoneId *string `min:"1" type:"string"`
  8525. // The type of user.
  8526. Type *string `type:"string" enum:"UserType"`
  8527. // The login name of the user.
  8528. Username *string `min:"1" type:"string"`
  8529. }
  8530. // String returns the string representation
  8531. func (s User) String() string {
  8532. return awsutil.Prettify(s)
  8533. }
  8534. // GoString returns the string representation
  8535. func (s User) GoString() string {
  8536. return s.String()
  8537. }
  8538. // SetCreatedTimestamp sets the CreatedTimestamp field's value.
  8539. func (s *User) SetCreatedTimestamp(v time.Time) *User {
  8540. s.CreatedTimestamp = &v
  8541. return s
  8542. }
  8543. // SetEmailAddress sets the EmailAddress field's value.
  8544. func (s *User) SetEmailAddress(v string) *User {
  8545. s.EmailAddress = &v
  8546. return s
  8547. }
  8548. // SetGivenName sets the GivenName field's value.
  8549. func (s *User) SetGivenName(v string) *User {
  8550. s.GivenName = &v
  8551. return s
  8552. }
  8553. // SetId sets the Id field's value.
  8554. func (s *User) SetId(v string) *User {
  8555. s.Id = &v
  8556. return s
  8557. }
  8558. // SetLocale sets the Locale field's value.
  8559. func (s *User) SetLocale(v string) *User {
  8560. s.Locale = &v
  8561. return s
  8562. }
  8563. // SetModifiedTimestamp sets the ModifiedTimestamp field's value.
  8564. func (s *User) SetModifiedTimestamp(v time.Time) *User {
  8565. s.ModifiedTimestamp = &v
  8566. return s
  8567. }
  8568. // SetOrganizationId sets the OrganizationId field's value.
  8569. func (s *User) SetOrganizationId(v string) *User {
  8570. s.OrganizationId = &v
  8571. return s
  8572. }
  8573. // SetRecycleBinFolderId sets the RecycleBinFolderId field's value.
  8574. func (s *User) SetRecycleBinFolderId(v string) *User {
  8575. s.RecycleBinFolderId = &v
  8576. return s
  8577. }
  8578. // SetRootFolderId sets the RootFolderId field's value.
  8579. func (s *User) SetRootFolderId(v string) *User {
  8580. s.RootFolderId = &v
  8581. return s
  8582. }
  8583. // SetStatus sets the Status field's value.
  8584. func (s *User) SetStatus(v string) *User {
  8585. s.Status = &v
  8586. return s
  8587. }
  8588. // SetStorage sets the Storage field's value.
  8589. func (s *User) SetStorage(v *UserStorageMetadata) *User {
  8590. s.Storage = v
  8591. return s
  8592. }
  8593. // SetSurname sets the Surname field's value.
  8594. func (s *User) SetSurname(v string) *User {
  8595. s.Surname = &v
  8596. return s
  8597. }
  8598. // SetTimeZoneId sets the TimeZoneId field's value.
  8599. func (s *User) SetTimeZoneId(v string) *User {
  8600. s.TimeZoneId = &v
  8601. return s
  8602. }
  8603. // SetType sets the Type field's value.
  8604. func (s *User) SetType(v string) *User {
  8605. s.Type = &v
  8606. return s
  8607. }
  8608. // SetUsername sets the Username field's value.
  8609. func (s *User) SetUsername(v string) *User {
  8610. s.Username = &v
  8611. return s
  8612. }
  8613. // Describes the metadata of the user.
  8614. type UserMetadata struct {
  8615. _ struct{} `type:"structure"`
  8616. // The email address of the user.
  8617. EmailAddress *string `min:"1" type:"string"`
  8618. // The given name of the user before a rename operation.
  8619. GivenName *string `min:"1" type:"string"`
  8620. // The ID of the user.
  8621. Id *string `min:"1" type:"string"`
  8622. // The surname of the user.
  8623. Surname *string `min:"1" type:"string"`
  8624. // The name of the user.
  8625. Username *string `min:"1" type:"string"`
  8626. }
  8627. // String returns the string representation
  8628. func (s UserMetadata) String() string {
  8629. return awsutil.Prettify(s)
  8630. }
  8631. // GoString returns the string representation
  8632. func (s UserMetadata) GoString() string {
  8633. return s.String()
  8634. }
  8635. // SetEmailAddress sets the EmailAddress field's value.
  8636. func (s *UserMetadata) SetEmailAddress(v string) *UserMetadata {
  8637. s.EmailAddress = &v
  8638. return s
  8639. }
  8640. // SetGivenName sets the GivenName field's value.
  8641. func (s *UserMetadata) SetGivenName(v string) *UserMetadata {
  8642. s.GivenName = &v
  8643. return s
  8644. }
  8645. // SetId sets the Id field's value.
  8646. func (s *UserMetadata) SetId(v string) *UserMetadata {
  8647. s.Id = &v
  8648. return s
  8649. }
  8650. // SetSurname sets the Surname field's value.
  8651. func (s *UserMetadata) SetSurname(v string) *UserMetadata {
  8652. s.Surname = &v
  8653. return s
  8654. }
  8655. // SetUsername sets the Username field's value.
  8656. func (s *UserMetadata) SetUsername(v string) *UserMetadata {
  8657. s.Username = &v
  8658. return s
  8659. }
  8660. // Describes the storage for a user.
  8661. type UserStorageMetadata struct {
  8662. _ struct{} `type:"structure"`
  8663. // The storage for a user.
  8664. StorageRule *StorageRuleType `type:"structure"`
  8665. // The amount of storage used, in bytes.
  8666. StorageUtilizedInBytes *int64 `type:"long"`
  8667. }
  8668. // String returns the string representation
  8669. func (s UserStorageMetadata) String() string {
  8670. return awsutil.Prettify(s)
  8671. }
  8672. // GoString returns the string representation
  8673. func (s UserStorageMetadata) GoString() string {
  8674. return s.String()
  8675. }
  8676. // SetStorageRule sets the StorageRule field's value.
  8677. func (s *UserStorageMetadata) SetStorageRule(v *StorageRuleType) *UserStorageMetadata {
  8678. s.StorageRule = v
  8679. return s
  8680. }
  8681. // SetStorageUtilizedInBytes sets the StorageUtilizedInBytes field's value.
  8682. func (s *UserStorageMetadata) SetStorageUtilizedInBytes(v int64) *UserStorageMetadata {
  8683. s.StorageUtilizedInBytes = &v
  8684. return s
  8685. }
  8686. const (
  8687. // ActivityTypeDocumentCheckedIn is a ActivityType enum value
  8688. ActivityTypeDocumentCheckedIn = "DOCUMENT_CHECKED_IN"
  8689. // ActivityTypeDocumentCheckedOut is a ActivityType enum value
  8690. ActivityTypeDocumentCheckedOut = "DOCUMENT_CHECKED_OUT"
  8691. // ActivityTypeDocumentRenamed is a ActivityType enum value
  8692. ActivityTypeDocumentRenamed = "DOCUMENT_RENAMED"
  8693. // ActivityTypeDocumentVersionUploaded is a ActivityType enum value
  8694. ActivityTypeDocumentVersionUploaded = "DOCUMENT_VERSION_UPLOADED"
  8695. // ActivityTypeDocumentVersionDeleted is a ActivityType enum value
  8696. ActivityTypeDocumentVersionDeleted = "DOCUMENT_VERSION_DELETED"
  8697. // ActivityTypeDocumentVersionViewed is a ActivityType enum value
  8698. ActivityTypeDocumentVersionViewed = "DOCUMENT_VERSION_VIEWED"
  8699. // ActivityTypeDocumentVersionDownloaded is a ActivityType enum value
  8700. ActivityTypeDocumentVersionDownloaded = "DOCUMENT_VERSION_DOWNLOADED"
  8701. // ActivityTypeDocumentRecycled is a ActivityType enum value
  8702. ActivityTypeDocumentRecycled = "DOCUMENT_RECYCLED"
  8703. // ActivityTypeDocumentRestored is a ActivityType enum value
  8704. ActivityTypeDocumentRestored = "DOCUMENT_RESTORED"
  8705. // ActivityTypeDocumentReverted is a ActivityType enum value
  8706. ActivityTypeDocumentReverted = "DOCUMENT_REVERTED"
  8707. // ActivityTypeDocumentShared is a ActivityType enum value
  8708. ActivityTypeDocumentShared = "DOCUMENT_SHARED"
  8709. // ActivityTypeDocumentUnshared is a ActivityType enum value
  8710. ActivityTypeDocumentUnshared = "DOCUMENT_UNSHARED"
  8711. // ActivityTypeDocumentSharePermissionChanged is a ActivityType enum value
  8712. ActivityTypeDocumentSharePermissionChanged = "DOCUMENT_SHARE_PERMISSION_CHANGED"
  8713. // ActivityTypeDocumentShareableLinkCreated is a ActivityType enum value
  8714. ActivityTypeDocumentShareableLinkCreated = "DOCUMENT_SHAREABLE_LINK_CREATED"
  8715. // ActivityTypeDocumentShareableLinkRemoved is a ActivityType enum value
  8716. ActivityTypeDocumentShareableLinkRemoved = "DOCUMENT_SHAREABLE_LINK_REMOVED"
  8717. // ActivityTypeDocumentShareableLinkPermissionChanged is a ActivityType enum value
  8718. ActivityTypeDocumentShareableLinkPermissionChanged = "DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED"
  8719. // ActivityTypeDocumentMoved is a ActivityType enum value
  8720. ActivityTypeDocumentMoved = "DOCUMENT_MOVED"
  8721. // ActivityTypeDocumentCommentAdded is a ActivityType enum value
  8722. ActivityTypeDocumentCommentAdded = "DOCUMENT_COMMENT_ADDED"
  8723. // ActivityTypeDocumentCommentDeleted is a ActivityType enum value
  8724. ActivityTypeDocumentCommentDeleted = "DOCUMENT_COMMENT_DELETED"
  8725. // ActivityTypeDocumentAnnotationAdded is a ActivityType enum value
  8726. ActivityTypeDocumentAnnotationAdded = "DOCUMENT_ANNOTATION_ADDED"
  8727. // ActivityTypeDocumentAnnotationDeleted is a ActivityType enum value
  8728. ActivityTypeDocumentAnnotationDeleted = "DOCUMENT_ANNOTATION_DELETED"
  8729. // ActivityTypeFolderCreated is a ActivityType enum value
  8730. ActivityTypeFolderCreated = "FOLDER_CREATED"
  8731. // ActivityTypeFolderDeleted is a ActivityType enum value
  8732. ActivityTypeFolderDeleted = "FOLDER_DELETED"
  8733. // ActivityTypeFolderRenamed is a ActivityType enum value
  8734. ActivityTypeFolderRenamed = "FOLDER_RENAMED"
  8735. // ActivityTypeFolderRecycled is a ActivityType enum value
  8736. ActivityTypeFolderRecycled = "FOLDER_RECYCLED"
  8737. // ActivityTypeFolderRestored is a ActivityType enum value
  8738. ActivityTypeFolderRestored = "FOLDER_RESTORED"
  8739. // ActivityTypeFolderShared is a ActivityType enum value
  8740. ActivityTypeFolderShared = "FOLDER_SHARED"
  8741. // ActivityTypeFolderUnshared is a ActivityType enum value
  8742. ActivityTypeFolderUnshared = "FOLDER_UNSHARED"
  8743. // ActivityTypeFolderSharePermissionChanged is a ActivityType enum value
  8744. ActivityTypeFolderSharePermissionChanged = "FOLDER_SHARE_PERMISSION_CHANGED"
  8745. // ActivityTypeFolderShareableLinkCreated is a ActivityType enum value
  8746. ActivityTypeFolderShareableLinkCreated = "FOLDER_SHAREABLE_LINK_CREATED"
  8747. // ActivityTypeFolderShareableLinkRemoved is a ActivityType enum value
  8748. ActivityTypeFolderShareableLinkRemoved = "FOLDER_SHAREABLE_LINK_REMOVED"
  8749. // ActivityTypeFolderShareableLinkPermissionChanged is a ActivityType enum value
  8750. ActivityTypeFolderShareableLinkPermissionChanged = "FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED"
  8751. // ActivityTypeFolderMoved is a ActivityType enum value
  8752. ActivityTypeFolderMoved = "FOLDER_MOVED"
  8753. )
  8754. const (
  8755. // BooleanEnumTypeTrue is a BooleanEnumType enum value
  8756. BooleanEnumTypeTrue = "TRUE"
  8757. // BooleanEnumTypeFalse is a BooleanEnumType enum value
  8758. BooleanEnumTypeFalse = "FALSE"
  8759. )
  8760. const (
  8761. // CommentStatusTypeDraft is a CommentStatusType enum value
  8762. CommentStatusTypeDraft = "DRAFT"
  8763. // CommentStatusTypePublished is a CommentStatusType enum value
  8764. CommentStatusTypePublished = "PUBLISHED"
  8765. // CommentStatusTypeDeleted is a CommentStatusType enum value
  8766. CommentStatusTypeDeleted = "DELETED"
  8767. )
  8768. const (
  8769. // CommentVisibilityTypePublic is a CommentVisibilityType enum value
  8770. CommentVisibilityTypePublic = "PUBLIC"
  8771. // CommentVisibilityTypePrivate is a CommentVisibilityType enum value
  8772. CommentVisibilityTypePrivate = "PRIVATE"
  8773. )
  8774. const (
  8775. // DocumentSourceTypeOriginal is a DocumentSourceType enum value
  8776. DocumentSourceTypeOriginal = "ORIGINAL"
  8777. // DocumentSourceTypeWithComments is a DocumentSourceType enum value
  8778. DocumentSourceTypeWithComments = "WITH_COMMENTS"
  8779. )
  8780. const (
  8781. // DocumentStatusTypeInitialized is a DocumentStatusType enum value
  8782. DocumentStatusTypeInitialized = "INITIALIZED"
  8783. // DocumentStatusTypeActive is a DocumentStatusType enum value
  8784. DocumentStatusTypeActive = "ACTIVE"
  8785. )
  8786. const (
  8787. // DocumentThumbnailTypeSmall is a DocumentThumbnailType enum value
  8788. DocumentThumbnailTypeSmall = "SMALL"
  8789. // DocumentThumbnailTypeSmallHq is a DocumentThumbnailType enum value
  8790. DocumentThumbnailTypeSmallHq = "SMALL_HQ"
  8791. // DocumentThumbnailTypeLarge is a DocumentThumbnailType enum value
  8792. DocumentThumbnailTypeLarge = "LARGE"
  8793. )
  8794. const (
  8795. // DocumentVersionStatusActive is a DocumentVersionStatus enum value
  8796. DocumentVersionStatusActive = "ACTIVE"
  8797. )
  8798. const (
  8799. // FolderContentTypeAll is a FolderContentType enum value
  8800. FolderContentTypeAll = "ALL"
  8801. // FolderContentTypeDocument is a FolderContentType enum value
  8802. FolderContentTypeDocument = "DOCUMENT"
  8803. // FolderContentTypeFolder is a FolderContentType enum value
  8804. FolderContentTypeFolder = "FOLDER"
  8805. )
  8806. const (
  8807. // LocaleTypeEn is a LocaleType enum value
  8808. LocaleTypeEn = "en"
  8809. // LocaleTypeFr is a LocaleType enum value
  8810. LocaleTypeFr = "fr"
  8811. // LocaleTypeKo is a LocaleType enum value
  8812. LocaleTypeKo = "ko"
  8813. // LocaleTypeDe is a LocaleType enum value
  8814. LocaleTypeDe = "de"
  8815. // LocaleTypeEs is a LocaleType enum value
  8816. LocaleTypeEs = "es"
  8817. // LocaleTypeJa is a LocaleType enum value
  8818. LocaleTypeJa = "ja"
  8819. // LocaleTypeRu is a LocaleType enum value
  8820. LocaleTypeRu = "ru"
  8821. // LocaleTypeZhCn is a LocaleType enum value
  8822. LocaleTypeZhCn = "zh_CN"
  8823. // LocaleTypeZhTw is a LocaleType enum value
  8824. LocaleTypeZhTw = "zh_TW"
  8825. // LocaleTypePtBr is a LocaleType enum value
  8826. LocaleTypePtBr = "pt_BR"
  8827. // LocaleTypeDefault is a LocaleType enum value
  8828. LocaleTypeDefault = "default"
  8829. )
  8830. const (
  8831. // OrderTypeAscending is a OrderType enum value
  8832. OrderTypeAscending = "ASCENDING"
  8833. // OrderTypeDescending is a OrderType enum value
  8834. OrderTypeDescending = "DESCENDING"
  8835. )
  8836. const (
  8837. // PrincipalTypeUser is a PrincipalType enum value
  8838. PrincipalTypeUser = "USER"
  8839. // PrincipalTypeGroup is a PrincipalType enum value
  8840. PrincipalTypeGroup = "GROUP"
  8841. // PrincipalTypeInvite is a PrincipalType enum value
  8842. PrincipalTypeInvite = "INVITE"
  8843. // PrincipalTypeAnonymous is a PrincipalType enum value
  8844. PrincipalTypeAnonymous = "ANONYMOUS"
  8845. // PrincipalTypeOrganization is a PrincipalType enum value
  8846. PrincipalTypeOrganization = "ORGANIZATION"
  8847. )
  8848. const (
  8849. // ResourceCollectionTypeSharedWithMe is a ResourceCollectionType enum value
  8850. ResourceCollectionTypeSharedWithMe = "SHARED_WITH_ME"
  8851. )
  8852. const (
  8853. // ResourceSortTypeDate is a ResourceSortType enum value
  8854. ResourceSortTypeDate = "DATE"
  8855. // ResourceSortTypeName is a ResourceSortType enum value
  8856. ResourceSortTypeName = "NAME"
  8857. )
  8858. const (
  8859. // ResourceStateTypeActive is a ResourceStateType enum value
  8860. ResourceStateTypeActive = "ACTIVE"
  8861. // ResourceStateTypeRestoring is a ResourceStateType enum value
  8862. ResourceStateTypeRestoring = "RESTORING"
  8863. // ResourceStateTypeRecycling is a ResourceStateType enum value
  8864. ResourceStateTypeRecycling = "RECYCLING"
  8865. // ResourceStateTypeRecycled is a ResourceStateType enum value
  8866. ResourceStateTypeRecycled = "RECYCLED"
  8867. )
  8868. const (
  8869. // ResourceTypeFolder is a ResourceType enum value
  8870. ResourceTypeFolder = "FOLDER"
  8871. // ResourceTypeDocument is a ResourceType enum value
  8872. ResourceTypeDocument = "DOCUMENT"
  8873. )
  8874. const (
  8875. // RolePermissionTypeDirect is a RolePermissionType enum value
  8876. RolePermissionTypeDirect = "DIRECT"
  8877. // RolePermissionTypeInherited is a RolePermissionType enum value
  8878. RolePermissionTypeInherited = "INHERITED"
  8879. )
  8880. const (
  8881. // RoleTypeViewer is a RoleType enum value
  8882. RoleTypeViewer = "VIEWER"
  8883. // RoleTypeContributor is a RoleType enum value
  8884. RoleTypeContributor = "CONTRIBUTOR"
  8885. // RoleTypeOwner is a RoleType enum value
  8886. RoleTypeOwner = "OWNER"
  8887. // RoleTypeCoowner is a RoleType enum value
  8888. RoleTypeCoowner = "COOWNER"
  8889. )
  8890. const (
  8891. // ShareStatusTypeSuccess is a ShareStatusType enum value
  8892. ShareStatusTypeSuccess = "SUCCESS"
  8893. // ShareStatusTypeFailure is a ShareStatusType enum value
  8894. ShareStatusTypeFailure = "FAILURE"
  8895. )
  8896. const (
  8897. // StorageTypeUnlimited is a StorageType enum value
  8898. StorageTypeUnlimited = "UNLIMITED"
  8899. // StorageTypeQuota is a StorageType enum value
  8900. StorageTypeQuota = "QUOTA"
  8901. )
  8902. const (
  8903. // SubscriptionProtocolTypeHttps is a SubscriptionProtocolType enum value
  8904. SubscriptionProtocolTypeHttps = "HTTPS"
  8905. )
  8906. const (
  8907. // SubscriptionTypeAll is a SubscriptionType enum value
  8908. SubscriptionTypeAll = "ALL"
  8909. )
  8910. const (
  8911. // UserFilterTypeAll is a UserFilterType enum value
  8912. UserFilterTypeAll = "ALL"
  8913. // UserFilterTypeActivePending is a UserFilterType enum value
  8914. UserFilterTypeActivePending = "ACTIVE_PENDING"
  8915. )
  8916. const (
  8917. // UserSortTypeUserName is a UserSortType enum value
  8918. UserSortTypeUserName = "USER_NAME"
  8919. // UserSortTypeFullName is a UserSortType enum value
  8920. UserSortTypeFullName = "FULL_NAME"
  8921. // UserSortTypeStorageLimit is a UserSortType enum value
  8922. UserSortTypeStorageLimit = "STORAGE_LIMIT"
  8923. // UserSortTypeUserStatus is a UserSortType enum value
  8924. UserSortTypeUserStatus = "USER_STATUS"
  8925. // UserSortTypeStorageUsed is a UserSortType enum value
  8926. UserSortTypeStorageUsed = "STORAGE_USED"
  8927. )
  8928. const (
  8929. // UserStatusTypeActive is a UserStatusType enum value
  8930. UserStatusTypeActive = "ACTIVE"
  8931. // UserStatusTypeInactive is a UserStatusType enum value
  8932. UserStatusTypeInactive = "INACTIVE"
  8933. // UserStatusTypePending is a UserStatusType enum value
  8934. UserStatusTypePending = "PENDING"
  8935. )
  8936. const (
  8937. // UserTypeUser is a UserType enum value
  8938. UserTypeUser = "USER"
  8939. // UserTypeAdmin is a UserType enum value
  8940. UserTypeAdmin = "ADMIN"
  8941. // UserTypePoweruser is a UserType enum value
  8942. UserTypePoweruser = "POWERUSER"
  8943. // UserTypeMinimaluser is a UserType enum value
  8944. UserTypeMinimaluser = "MINIMALUSER"
  8945. // UserTypeWorkspacesuser is a UserType enum value
  8946. UserTypeWorkspacesuser = "WORKSPACESUSER"
  8947. )