api.go 234 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package workmail
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opAssociateDelegateToResource = "AssociateDelegateToResource"
  12. // AssociateDelegateToResourceRequest generates a "aws/request.Request" representing the
  13. // client's request for the AssociateDelegateToResource operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See AssociateDelegateToResource for more information on using the AssociateDelegateToResource
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the AssociateDelegateToResourceRequest method.
  28. // req, resp := client.AssociateDelegateToResourceRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource
  36. func (c *WorkMail) AssociateDelegateToResourceRequest(input *AssociateDelegateToResourceInput) (req *request.Request, output *AssociateDelegateToResourceOutput) {
  37. op := &request.Operation{
  38. Name: opAssociateDelegateToResource,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &AssociateDelegateToResourceInput{}
  44. }
  45. output = &AssociateDelegateToResourceOutput{}
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  48. return
  49. }
  50. // AssociateDelegateToResource API operation for Amazon WorkMail.
  51. //
  52. // Adds a member to the resource's set of delegates.
  53. //
  54. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  55. // with awserr.Error's Code and Message methods to get detailed information about
  56. // the error.
  57. //
  58. // See the AWS API reference guide for Amazon WorkMail's
  59. // API operation AssociateDelegateToResource for usage and error information.
  60. //
  61. // Returned Error Codes:
  62. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  63. // The identifier supplied for the entity is valid, but it does not exist in
  64. // your organization.
  65. //
  66. // * ErrCodeEntityStateException "EntityStateException"
  67. // You are performing an operation on an entity that isn't in the expected state,
  68. // such as trying to update a deleted user.
  69. //
  70. // * ErrCodeInvalidParameterException "InvalidParameterException"
  71. // One or more of the input parameters don't match the service's restrictions.
  72. //
  73. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  74. // An operation received a valid organization identifier that either doesn't
  75. // belong or exist in the system.
  76. //
  77. // * ErrCodeOrganizationStateException "OrganizationStateException"
  78. // The organization must have a valid state (Active or Synchronizing) to perform
  79. // certain operations on the organization or its entities.
  80. //
  81. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource
  82. func (c *WorkMail) AssociateDelegateToResource(input *AssociateDelegateToResourceInput) (*AssociateDelegateToResourceOutput, error) {
  83. req, out := c.AssociateDelegateToResourceRequest(input)
  84. return out, req.Send()
  85. }
  86. // AssociateDelegateToResourceWithContext is the same as AssociateDelegateToResource with the addition of
  87. // the ability to pass a context and additional request options.
  88. //
  89. // See AssociateDelegateToResource for details on how to use this API operation.
  90. //
  91. // The context must be non-nil and will be used for request cancellation. If
  92. // the context is nil a panic will occur. In the future the SDK may create
  93. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  94. // for more information on using Contexts.
  95. func (c *WorkMail) AssociateDelegateToResourceWithContext(ctx aws.Context, input *AssociateDelegateToResourceInput, opts ...request.Option) (*AssociateDelegateToResourceOutput, error) {
  96. req, out := c.AssociateDelegateToResourceRequest(input)
  97. req.SetContext(ctx)
  98. req.ApplyOptions(opts...)
  99. return out, req.Send()
  100. }
  101. const opAssociateMemberToGroup = "AssociateMemberToGroup"
  102. // AssociateMemberToGroupRequest generates a "aws/request.Request" representing the
  103. // client's request for the AssociateMemberToGroup operation. The "output" return
  104. // value will be populated with the request's response once the request completes
  105. // successfully.
  106. //
  107. // Use "Send" method on the returned Request to send the API call to the service.
  108. // the "output" return value is not valid until after Send returns without error.
  109. //
  110. // See AssociateMemberToGroup for more information on using the AssociateMemberToGroup
  111. // API call, and error handling.
  112. //
  113. // This method is useful when you want to inject custom logic or configuration
  114. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  115. //
  116. //
  117. // // Example sending a request using the AssociateMemberToGroupRequest method.
  118. // req, resp := client.AssociateMemberToGroupRequest(params)
  119. //
  120. // err := req.Send()
  121. // if err == nil { // resp is now filled
  122. // fmt.Println(resp)
  123. // }
  124. //
  125. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup
  126. func (c *WorkMail) AssociateMemberToGroupRequest(input *AssociateMemberToGroupInput) (req *request.Request, output *AssociateMemberToGroupOutput) {
  127. op := &request.Operation{
  128. Name: opAssociateMemberToGroup,
  129. HTTPMethod: "POST",
  130. HTTPPath: "/",
  131. }
  132. if input == nil {
  133. input = &AssociateMemberToGroupInput{}
  134. }
  135. output = &AssociateMemberToGroupOutput{}
  136. req = c.newRequest(op, input, output)
  137. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  138. return
  139. }
  140. // AssociateMemberToGroup API operation for Amazon WorkMail.
  141. //
  142. // Adds a member to the group's set.
  143. //
  144. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  145. // with awserr.Error's Code and Message methods to get detailed information about
  146. // the error.
  147. //
  148. // See the AWS API reference guide for Amazon WorkMail's
  149. // API operation AssociateMemberToGroup for usage and error information.
  150. //
  151. // Returned Error Codes:
  152. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  153. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  154. // WorkMail service.
  155. //
  156. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  157. // The directory that you are trying to perform operations on isn't available.
  158. //
  159. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  160. // The identifier supplied for the entity is valid, but it does not exist in
  161. // your organization.
  162. //
  163. // * ErrCodeEntityStateException "EntityStateException"
  164. // You are performing an operation on an entity that isn't in the expected state,
  165. // such as trying to update a deleted user.
  166. //
  167. // * ErrCodeInvalidParameterException "InvalidParameterException"
  168. // One or more of the input parameters don't match the service's restrictions.
  169. //
  170. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  171. // An operation received a valid organization identifier that either doesn't
  172. // belong or exist in the system.
  173. //
  174. // * ErrCodeOrganizationStateException "OrganizationStateException"
  175. // The organization must have a valid state (Active or Synchronizing) to perform
  176. // certain operations on the organization or its entities.
  177. //
  178. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  179. // You can't perform a write operation against a read-only directory.
  180. //
  181. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup
  182. func (c *WorkMail) AssociateMemberToGroup(input *AssociateMemberToGroupInput) (*AssociateMemberToGroupOutput, error) {
  183. req, out := c.AssociateMemberToGroupRequest(input)
  184. return out, req.Send()
  185. }
  186. // AssociateMemberToGroupWithContext is the same as AssociateMemberToGroup with the addition of
  187. // the ability to pass a context and additional request options.
  188. //
  189. // See AssociateMemberToGroup for details on how to use this API operation.
  190. //
  191. // The context must be non-nil and will be used for request cancellation. If
  192. // the context is nil a panic will occur. In the future the SDK may create
  193. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  194. // for more information on using Contexts.
  195. func (c *WorkMail) AssociateMemberToGroupWithContext(ctx aws.Context, input *AssociateMemberToGroupInput, opts ...request.Option) (*AssociateMemberToGroupOutput, error) {
  196. req, out := c.AssociateMemberToGroupRequest(input)
  197. req.SetContext(ctx)
  198. req.ApplyOptions(opts...)
  199. return out, req.Send()
  200. }
  201. const opCreateAlias = "CreateAlias"
  202. // CreateAliasRequest generates a "aws/request.Request" representing the
  203. // client's request for the CreateAlias operation. The "output" return
  204. // value will be populated with the request's response once the request completes
  205. // successfully.
  206. //
  207. // Use "Send" method on the returned Request to send the API call to the service.
  208. // the "output" return value is not valid until after Send returns without error.
  209. //
  210. // See CreateAlias for more information on using the CreateAlias
  211. // API call, and error handling.
  212. //
  213. // This method is useful when you want to inject custom logic or configuration
  214. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  215. //
  216. //
  217. // // Example sending a request using the CreateAliasRequest method.
  218. // req, resp := client.CreateAliasRequest(params)
  219. //
  220. // err := req.Send()
  221. // if err == nil { // resp is now filled
  222. // fmt.Println(resp)
  223. // }
  224. //
  225. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias
  226. func (c *WorkMail) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) {
  227. op := &request.Operation{
  228. Name: opCreateAlias,
  229. HTTPMethod: "POST",
  230. HTTPPath: "/",
  231. }
  232. if input == nil {
  233. input = &CreateAliasInput{}
  234. }
  235. output = &CreateAliasOutput{}
  236. req = c.newRequest(op, input, output)
  237. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  238. return
  239. }
  240. // CreateAlias API operation for Amazon WorkMail.
  241. //
  242. // Adds an alias to the set of a given member of Amazon WorkMail.
  243. //
  244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  245. // with awserr.Error's Code and Message methods to get detailed information about
  246. // the error.
  247. //
  248. // See the AWS API reference guide for Amazon WorkMail's
  249. // API operation CreateAlias for usage and error information.
  250. //
  251. // Returned Error Codes:
  252. // * ErrCodeEmailAddressInUseException "EmailAddressInUseException"
  253. // The email address that you're trying to assign is already created for a different
  254. // user, group, or resource.
  255. //
  256. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  257. // The identifier supplied for the entity is valid, but it does not exist in
  258. // your organization.
  259. //
  260. // * ErrCodeEntityStateException "EntityStateException"
  261. // You are performing an operation on an entity that isn't in the expected state,
  262. // such as trying to update a deleted user.
  263. //
  264. // * ErrCodeInvalidParameterException "InvalidParameterException"
  265. // One or more of the input parameters don't match the service's restrictions.
  266. //
  267. // * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException"
  268. // For an email or alias to be created in Amazon WorkMail, the included domain
  269. // must be defined in the organization.
  270. //
  271. // * ErrCodeMailDomainStateException "MailDomainStateException"
  272. // After a domain has been added to the organization, it must be verified. The
  273. // domain is not yet verified.
  274. //
  275. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  276. // An operation received a valid organization identifier that either doesn't
  277. // belong or exist in the system.
  278. //
  279. // * ErrCodeOrganizationStateException "OrganizationStateException"
  280. // The organization must have a valid state (Active or Synchronizing) to perform
  281. // certain operations on the organization or its entities.
  282. //
  283. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias
  284. func (c *WorkMail) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) {
  285. req, out := c.CreateAliasRequest(input)
  286. return out, req.Send()
  287. }
  288. // CreateAliasWithContext is the same as CreateAlias with the addition of
  289. // the ability to pass a context and additional request options.
  290. //
  291. // See CreateAlias for details on how to use this API operation.
  292. //
  293. // The context must be non-nil and will be used for request cancellation. If
  294. // the context is nil a panic will occur. In the future the SDK may create
  295. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  296. // for more information on using Contexts.
  297. func (c *WorkMail) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) {
  298. req, out := c.CreateAliasRequest(input)
  299. req.SetContext(ctx)
  300. req.ApplyOptions(opts...)
  301. return out, req.Send()
  302. }
  303. const opCreateGroup = "CreateGroup"
  304. // CreateGroupRequest generates a "aws/request.Request" representing the
  305. // client's request for the CreateGroup operation. The "output" return
  306. // value will be populated with the request's response once the request completes
  307. // successfully.
  308. //
  309. // Use "Send" method on the returned Request to send the API call to the service.
  310. // the "output" return value is not valid until after Send returns without error.
  311. //
  312. // See CreateGroup for more information on using the CreateGroup
  313. // API call, and error handling.
  314. //
  315. // This method is useful when you want to inject custom logic or configuration
  316. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  317. //
  318. //
  319. // // Example sending a request using the CreateGroupRequest method.
  320. // req, resp := client.CreateGroupRequest(params)
  321. //
  322. // err := req.Send()
  323. // if err == nil { // resp is now filled
  324. // fmt.Println(resp)
  325. // }
  326. //
  327. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup
  328. func (c *WorkMail) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) {
  329. op := &request.Operation{
  330. Name: opCreateGroup,
  331. HTTPMethod: "POST",
  332. HTTPPath: "/",
  333. }
  334. if input == nil {
  335. input = &CreateGroupInput{}
  336. }
  337. output = &CreateGroupOutput{}
  338. req = c.newRequest(op, input, output)
  339. return
  340. }
  341. // CreateGroup API operation for Amazon WorkMail.
  342. //
  343. // Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail
  344. // operation.
  345. //
  346. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  347. // with awserr.Error's Code and Message methods to get detailed information about
  348. // the error.
  349. //
  350. // See the AWS API reference guide for Amazon WorkMail's
  351. // API operation CreateGroup for usage and error information.
  352. //
  353. // Returned Error Codes:
  354. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  355. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  356. // WorkMail service.
  357. //
  358. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  359. // The directory that you are trying to perform operations on isn't available.
  360. //
  361. // * ErrCodeInvalidParameterException "InvalidParameterException"
  362. // One or more of the input parameters don't match the service's restrictions.
  363. //
  364. // * ErrCodeNameAvailabilityException "NameAvailabilityException"
  365. // The entity (user, group, or user) name isn't unique in Amazon WorkMail.
  366. //
  367. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  368. // An operation received a valid organization identifier that either doesn't
  369. // belong or exist in the system.
  370. //
  371. // * ErrCodeOrganizationStateException "OrganizationStateException"
  372. // The organization must have a valid state (Active or Synchronizing) to perform
  373. // certain operations on the organization or its entities.
  374. //
  375. // * ErrCodeReservedNameException "ReservedNameException"
  376. // This entity name is not allowed in Amazon WorkMail.
  377. //
  378. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  379. // You can't perform a write operation against a read-only directory.
  380. //
  381. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup
  382. func (c *WorkMail) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) {
  383. req, out := c.CreateGroupRequest(input)
  384. return out, req.Send()
  385. }
  386. // CreateGroupWithContext is the same as CreateGroup with the addition of
  387. // the ability to pass a context and additional request options.
  388. //
  389. // See CreateGroup for details on how to use this API operation.
  390. //
  391. // The context must be non-nil and will be used for request cancellation. If
  392. // the context is nil a panic will occur. In the future the SDK may create
  393. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  394. // for more information on using Contexts.
  395. func (c *WorkMail) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) {
  396. req, out := c.CreateGroupRequest(input)
  397. req.SetContext(ctx)
  398. req.ApplyOptions(opts...)
  399. return out, req.Send()
  400. }
  401. const opCreateResource = "CreateResource"
  402. // CreateResourceRequest generates a "aws/request.Request" representing the
  403. // client's request for the CreateResource operation. The "output" return
  404. // value will be populated with the request's response once the request completes
  405. // successfully.
  406. //
  407. // Use "Send" method on the returned Request to send the API call to the service.
  408. // the "output" return value is not valid until after Send returns without error.
  409. //
  410. // See CreateResource for more information on using the CreateResource
  411. // API call, and error handling.
  412. //
  413. // This method is useful when you want to inject custom logic or configuration
  414. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  415. //
  416. //
  417. // // Example sending a request using the CreateResourceRequest method.
  418. // req, resp := client.CreateResourceRequest(params)
  419. //
  420. // err := req.Send()
  421. // if err == nil { // resp is now filled
  422. // fmt.Println(resp)
  423. // }
  424. //
  425. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource
  426. func (c *WorkMail) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *CreateResourceOutput) {
  427. op := &request.Operation{
  428. Name: opCreateResource,
  429. HTTPMethod: "POST",
  430. HTTPPath: "/",
  431. }
  432. if input == nil {
  433. input = &CreateResourceInput{}
  434. }
  435. output = &CreateResourceOutput{}
  436. req = c.newRequest(op, input, output)
  437. return
  438. }
  439. // CreateResource API operation for Amazon WorkMail.
  440. //
  441. // Creates a new Amazon WorkMail resource. The available types are equipment
  442. // and room.
  443. //
  444. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  445. // with awserr.Error's Code and Message methods to get detailed information about
  446. // the error.
  447. //
  448. // See the AWS API reference guide for Amazon WorkMail's
  449. // API operation CreateResource for usage and error information.
  450. //
  451. // Returned Error Codes:
  452. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  453. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  454. // WorkMail service.
  455. //
  456. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  457. // The directory that you are trying to perform operations on isn't available.
  458. //
  459. // * ErrCodeInvalidParameterException "InvalidParameterException"
  460. // One or more of the input parameters don't match the service's restrictions.
  461. //
  462. // * ErrCodeNameAvailabilityException "NameAvailabilityException"
  463. // The entity (user, group, or user) name isn't unique in Amazon WorkMail.
  464. //
  465. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  466. // An operation received a valid organization identifier that either doesn't
  467. // belong or exist in the system.
  468. //
  469. // * ErrCodeOrganizationStateException "OrganizationStateException"
  470. // The organization must have a valid state (Active or Synchronizing) to perform
  471. // certain operations on the organization or its entities.
  472. //
  473. // * ErrCodeReservedNameException "ReservedNameException"
  474. // This entity name is not allowed in Amazon WorkMail.
  475. //
  476. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource
  477. func (c *WorkMail) CreateResource(input *CreateResourceInput) (*CreateResourceOutput, error) {
  478. req, out := c.CreateResourceRequest(input)
  479. return out, req.Send()
  480. }
  481. // CreateResourceWithContext is the same as CreateResource with the addition of
  482. // the ability to pass a context and additional request options.
  483. //
  484. // See CreateResource for details on how to use this API operation.
  485. //
  486. // The context must be non-nil and will be used for request cancellation. If
  487. // the context is nil a panic will occur. In the future the SDK may create
  488. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  489. // for more information on using Contexts.
  490. func (c *WorkMail) CreateResourceWithContext(ctx aws.Context, input *CreateResourceInput, opts ...request.Option) (*CreateResourceOutput, error) {
  491. req, out := c.CreateResourceRequest(input)
  492. req.SetContext(ctx)
  493. req.ApplyOptions(opts...)
  494. return out, req.Send()
  495. }
  496. const opCreateUser = "CreateUser"
  497. // CreateUserRequest generates a "aws/request.Request" representing the
  498. // client's request for the CreateUser operation. The "output" return
  499. // value will be populated with the request's response once the request completes
  500. // successfully.
  501. //
  502. // Use "Send" method on the returned Request to send the API call to the service.
  503. // the "output" return value is not valid until after Send returns without error.
  504. //
  505. // See CreateUser for more information on using the CreateUser
  506. // API call, and error handling.
  507. //
  508. // This method is useful when you want to inject custom logic or configuration
  509. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  510. //
  511. //
  512. // // Example sending a request using the CreateUserRequest method.
  513. // req, resp := client.CreateUserRequest(params)
  514. //
  515. // err := req.Send()
  516. // if err == nil { // resp is now filled
  517. // fmt.Println(resp)
  518. // }
  519. //
  520. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser
  521. func (c *WorkMail) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) {
  522. op := &request.Operation{
  523. Name: opCreateUser,
  524. HTTPMethod: "POST",
  525. HTTPPath: "/",
  526. }
  527. if input == nil {
  528. input = &CreateUserInput{}
  529. }
  530. output = &CreateUserOutput{}
  531. req = c.newRequest(op, input, output)
  532. return
  533. }
  534. // CreateUser API operation for Amazon WorkMail.
  535. //
  536. // Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail
  537. // operation.
  538. //
  539. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  540. // with awserr.Error's Code and Message methods to get detailed information about
  541. // the error.
  542. //
  543. // See the AWS API reference guide for Amazon WorkMail's
  544. // API operation CreateUser for usage and error information.
  545. //
  546. // Returned Error Codes:
  547. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  548. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  549. // WorkMail service.
  550. //
  551. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  552. // The directory that you are trying to perform operations on isn't available.
  553. //
  554. // * ErrCodeInvalidParameterException "InvalidParameterException"
  555. // One or more of the input parameters don't match the service's restrictions.
  556. //
  557. // * ErrCodeInvalidPasswordException "InvalidPasswordException"
  558. // The supplied password doesn't match the minimum security constraints, such
  559. // as length or use of special characters.
  560. //
  561. // * ErrCodeNameAvailabilityException "NameAvailabilityException"
  562. // The entity (user, group, or user) name isn't unique in Amazon WorkMail.
  563. //
  564. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  565. // An operation received a valid organization identifier that either doesn't
  566. // belong or exist in the system.
  567. //
  568. // * ErrCodeOrganizationStateException "OrganizationStateException"
  569. // The organization must have a valid state (Active or Synchronizing) to perform
  570. // certain operations on the organization or its entities.
  571. //
  572. // * ErrCodeReservedNameException "ReservedNameException"
  573. // This entity name is not allowed in Amazon WorkMail.
  574. //
  575. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  576. // You can't perform a write operation against a read-only directory.
  577. //
  578. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser
  579. func (c *WorkMail) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) {
  580. req, out := c.CreateUserRequest(input)
  581. return out, req.Send()
  582. }
  583. // CreateUserWithContext is the same as CreateUser with the addition of
  584. // the ability to pass a context and additional request options.
  585. //
  586. // See CreateUser for details on how to use this API operation.
  587. //
  588. // The context must be non-nil and will be used for request cancellation. If
  589. // the context is nil a panic will occur. In the future the SDK may create
  590. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  591. // for more information on using Contexts.
  592. func (c *WorkMail) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) {
  593. req, out := c.CreateUserRequest(input)
  594. req.SetContext(ctx)
  595. req.ApplyOptions(opts...)
  596. return out, req.Send()
  597. }
  598. const opDeleteAlias = "DeleteAlias"
  599. // DeleteAliasRequest generates a "aws/request.Request" representing the
  600. // client's request for the DeleteAlias operation. The "output" return
  601. // value will be populated with the request's response once the request completes
  602. // successfully.
  603. //
  604. // Use "Send" method on the returned Request to send the API call to the service.
  605. // the "output" return value is not valid until after Send returns without error.
  606. //
  607. // See DeleteAlias for more information on using the DeleteAlias
  608. // API call, and error handling.
  609. //
  610. // This method is useful when you want to inject custom logic or configuration
  611. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  612. //
  613. //
  614. // // Example sending a request using the DeleteAliasRequest method.
  615. // req, resp := client.DeleteAliasRequest(params)
  616. //
  617. // err := req.Send()
  618. // if err == nil { // resp is now filled
  619. // fmt.Println(resp)
  620. // }
  621. //
  622. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias
  623. func (c *WorkMail) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
  624. op := &request.Operation{
  625. Name: opDeleteAlias,
  626. HTTPMethod: "POST",
  627. HTTPPath: "/",
  628. }
  629. if input == nil {
  630. input = &DeleteAliasInput{}
  631. }
  632. output = &DeleteAliasOutput{}
  633. req = c.newRequest(op, input, output)
  634. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  635. return
  636. }
  637. // DeleteAlias API operation for Amazon WorkMail.
  638. //
  639. // Remove the alias from a set of aliases for a given user.
  640. //
  641. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  642. // with awserr.Error's Code and Message methods to get detailed information about
  643. // the error.
  644. //
  645. // See the AWS API reference guide for Amazon WorkMail's
  646. // API operation DeleteAlias for usage and error information.
  647. //
  648. // Returned Error Codes:
  649. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  650. // The identifier supplied for the entity is valid, but it does not exist in
  651. // your organization.
  652. //
  653. // * ErrCodeEntityStateException "EntityStateException"
  654. // You are performing an operation on an entity that isn't in the expected state,
  655. // such as trying to update a deleted user.
  656. //
  657. // * ErrCodeInvalidParameterException "InvalidParameterException"
  658. // One or more of the input parameters don't match the service's restrictions.
  659. //
  660. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  661. // An operation received a valid organization identifier that either doesn't
  662. // belong or exist in the system.
  663. //
  664. // * ErrCodeOrganizationStateException "OrganizationStateException"
  665. // The organization must have a valid state (Active or Synchronizing) to perform
  666. // certain operations on the organization or its entities.
  667. //
  668. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias
  669. func (c *WorkMail) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
  670. req, out := c.DeleteAliasRequest(input)
  671. return out, req.Send()
  672. }
  673. // DeleteAliasWithContext is the same as DeleteAlias with the addition of
  674. // the ability to pass a context and additional request options.
  675. //
  676. // See DeleteAlias for details on how to use this API operation.
  677. //
  678. // The context must be non-nil and will be used for request cancellation. If
  679. // the context is nil a panic will occur. In the future the SDK may create
  680. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  681. // for more information on using Contexts.
  682. func (c *WorkMail) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) {
  683. req, out := c.DeleteAliasRequest(input)
  684. req.SetContext(ctx)
  685. req.ApplyOptions(opts...)
  686. return out, req.Send()
  687. }
  688. const opDeleteGroup = "DeleteGroup"
  689. // DeleteGroupRequest generates a "aws/request.Request" representing the
  690. // client's request for the DeleteGroup operation. The "output" return
  691. // value will be populated with the request's response once the request completes
  692. // successfully.
  693. //
  694. // Use "Send" method on the returned Request to send the API call to the service.
  695. // the "output" return value is not valid until after Send returns without error.
  696. //
  697. // See DeleteGroup for more information on using the DeleteGroup
  698. // API call, and error handling.
  699. //
  700. // This method is useful when you want to inject custom logic or configuration
  701. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  702. //
  703. //
  704. // // Example sending a request using the DeleteGroupRequest method.
  705. // req, resp := client.DeleteGroupRequest(params)
  706. //
  707. // err := req.Send()
  708. // if err == nil { // resp is now filled
  709. // fmt.Println(resp)
  710. // }
  711. //
  712. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup
  713. func (c *WorkMail) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) {
  714. op := &request.Operation{
  715. Name: opDeleteGroup,
  716. HTTPMethod: "POST",
  717. HTTPPath: "/",
  718. }
  719. if input == nil {
  720. input = &DeleteGroupInput{}
  721. }
  722. output = &DeleteGroupOutput{}
  723. req = c.newRequest(op, input, output)
  724. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  725. return
  726. }
  727. // DeleteGroup API operation for Amazon WorkMail.
  728. //
  729. // Deletes a group from Amazon WorkMail.
  730. //
  731. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  732. // with awserr.Error's Code and Message methods to get detailed information about
  733. // the error.
  734. //
  735. // See the AWS API reference guide for Amazon WorkMail's
  736. // API operation DeleteGroup for usage and error information.
  737. //
  738. // Returned Error Codes:
  739. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  740. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  741. // WorkMail service.
  742. //
  743. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  744. // The directory that you are trying to perform operations on isn't available.
  745. //
  746. // * ErrCodeEntityStateException "EntityStateException"
  747. // You are performing an operation on an entity that isn't in the expected state,
  748. // such as trying to update a deleted user.
  749. //
  750. // * ErrCodeInvalidParameterException "InvalidParameterException"
  751. // One or more of the input parameters don't match the service's restrictions.
  752. //
  753. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  754. // An operation received a valid organization identifier that either doesn't
  755. // belong or exist in the system.
  756. //
  757. // * ErrCodeOrganizationStateException "OrganizationStateException"
  758. // The organization must have a valid state (Active or Synchronizing) to perform
  759. // certain operations on the organization or its entities.
  760. //
  761. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  762. // You can't perform a write operation against a read-only directory.
  763. //
  764. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup
  765. func (c *WorkMail) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) {
  766. req, out := c.DeleteGroupRequest(input)
  767. return out, req.Send()
  768. }
  769. // DeleteGroupWithContext is the same as DeleteGroup with the addition of
  770. // the ability to pass a context and additional request options.
  771. //
  772. // See DeleteGroup for details on how to use this API operation.
  773. //
  774. // The context must be non-nil and will be used for request cancellation. If
  775. // the context is nil a panic will occur. In the future the SDK may create
  776. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  777. // for more information on using Contexts.
  778. func (c *WorkMail) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) {
  779. req, out := c.DeleteGroupRequest(input)
  780. req.SetContext(ctx)
  781. req.ApplyOptions(opts...)
  782. return out, req.Send()
  783. }
  784. const opDeleteMailboxPermissions = "DeleteMailboxPermissions"
  785. // DeleteMailboxPermissionsRequest generates a "aws/request.Request" representing the
  786. // client's request for the DeleteMailboxPermissions operation. The "output" return
  787. // value will be populated with the request's response once the request completes
  788. // successfully.
  789. //
  790. // Use "Send" method on the returned Request to send the API call to the service.
  791. // the "output" return value is not valid until after Send returns without error.
  792. //
  793. // See DeleteMailboxPermissions for more information on using the DeleteMailboxPermissions
  794. // API call, and error handling.
  795. //
  796. // This method is useful when you want to inject custom logic or configuration
  797. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  798. //
  799. //
  800. // // Example sending a request using the DeleteMailboxPermissionsRequest method.
  801. // req, resp := client.DeleteMailboxPermissionsRequest(params)
  802. //
  803. // err := req.Send()
  804. // if err == nil { // resp is now filled
  805. // fmt.Println(resp)
  806. // }
  807. //
  808. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteMailboxPermissions
  809. func (c *WorkMail) DeleteMailboxPermissionsRequest(input *DeleteMailboxPermissionsInput) (req *request.Request, output *DeleteMailboxPermissionsOutput) {
  810. op := &request.Operation{
  811. Name: opDeleteMailboxPermissions,
  812. HTTPMethod: "POST",
  813. HTTPPath: "/",
  814. }
  815. if input == nil {
  816. input = &DeleteMailboxPermissionsInput{}
  817. }
  818. output = &DeleteMailboxPermissionsOutput{}
  819. req = c.newRequest(op, input, output)
  820. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  821. return
  822. }
  823. // DeleteMailboxPermissions API operation for Amazon WorkMail.
  824. //
  825. // Deletes permissions granted to a user or group.
  826. //
  827. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  828. // with awserr.Error's Code and Message methods to get detailed information about
  829. // the error.
  830. //
  831. // See the AWS API reference guide for Amazon WorkMail's
  832. // API operation DeleteMailboxPermissions for usage and error information.
  833. //
  834. // Returned Error Codes:
  835. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  836. // The identifier supplied for the entity is valid, but it does not exist in
  837. // your organization.
  838. //
  839. // * ErrCodeEntityStateException "EntityStateException"
  840. // You are performing an operation on an entity that isn't in the expected state,
  841. // such as trying to update a deleted user.
  842. //
  843. // * ErrCodeInvalidParameterException "InvalidParameterException"
  844. // One or more of the input parameters don't match the service's restrictions.
  845. //
  846. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  847. // An operation received a valid organization identifier that either doesn't
  848. // belong or exist in the system.
  849. //
  850. // * ErrCodeOrganizationStateException "OrganizationStateException"
  851. // The organization must have a valid state (Active or Synchronizing) to perform
  852. // certain operations on the organization or its entities.
  853. //
  854. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteMailboxPermissions
  855. func (c *WorkMail) DeleteMailboxPermissions(input *DeleteMailboxPermissionsInput) (*DeleteMailboxPermissionsOutput, error) {
  856. req, out := c.DeleteMailboxPermissionsRequest(input)
  857. return out, req.Send()
  858. }
  859. // DeleteMailboxPermissionsWithContext is the same as DeleteMailboxPermissions with the addition of
  860. // the ability to pass a context and additional request options.
  861. //
  862. // See DeleteMailboxPermissions for details on how to use this API operation.
  863. //
  864. // The context must be non-nil and will be used for request cancellation. If
  865. // the context is nil a panic will occur. In the future the SDK may create
  866. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  867. // for more information on using Contexts.
  868. func (c *WorkMail) DeleteMailboxPermissionsWithContext(ctx aws.Context, input *DeleteMailboxPermissionsInput, opts ...request.Option) (*DeleteMailboxPermissionsOutput, error) {
  869. req, out := c.DeleteMailboxPermissionsRequest(input)
  870. req.SetContext(ctx)
  871. req.ApplyOptions(opts...)
  872. return out, req.Send()
  873. }
  874. const opDeleteResource = "DeleteResource"
  875. // DeleteResourceRequest generates a "aws/request.Request" representing the
  876. // client's request for the DeleteResource operation. The "output" return
  877. // value will be populated with the request's response once the request completes
  878. // successfully.
  879. //
  880. // Use "Send" method on the returned Request to send the API call to the service.
  881. // the "output" return value is not valid until after Send returns without error.
  882. //
  883. // See DeleteResource for more information on using the DeleteResource
  884. // API call, and error handling.
  885. //
  886. // This method is useful when you want to inject custom logic or configuration
  887. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  888. //
  889. //
  890. // // Example sending a request using the DeleteResourceRequest method.
  891. // req, resp := client.DeleteResourceRequest(params)
  892. //
  893. // err := req.Send()
  894. // if err == nil { // resp is now filled
  895. // fmt.Println(resp)
  896. // }
  897. //
  898. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource
  899. func (c *WorkMail) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) {
  900. op := &request.Operation{
  901. Name: opDeleteResource,
  902. HTTPMethod: "POST",
  903. HTTPPath: "/",
  904. }
  905. if input == nil {
  906. input = &DeleteResourceInput{}
  907. }
  908. output = &DeleteResourceOutput{}
  909. req = c.newRequest(op, input, output)
  910. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  911. return
  912. }
  913. // DeleteResource API operation for Amazon WorkMail.
  914. //
  915. // Deletes the specified resource.
  916. //
  917. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  918. // with awserr.Error's Code and Message methods to get detailed information about
  919. // the error.
  920. //
  921. // See the AWS API reference guide for Amazon WorkMail's
  922. // API operation DeleteResource for usage and error information.
  923. //
  924. // Returned Error Codes:
  925. // * ErrCodeEntityStateException "EntityStateException"
  926. // You are performing an operation on an entity that isn't in the expected state,
  927. // such as trying to update a deleted user.
  928. //
  929. // * ErrCodeInvalidParameterException "InvalidParameterException"
  930. // One or more of the input parameters don't match the service's restrictions.
  931. //
  932. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  933. // An operation received a valid organization identifier that either doesn't
  934. // belong or exist in the system.
  935. //
  936. // * ErrCodeOrganizationStateException "OrganizationStateException"
  937. // The organization must have a valid state (Active or Synchronizing) to perform
  938. // certain operations on the organization or its entities.
  939. //
  940. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource
  941. func (c *WorkMail) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) {
  942. req, out := c.DeleteResourceRequest(input)
  943. return out, req.Send()
  944. }
  945. // DeleteResourceWithContext is the same as DeleteResource with the addition of
  946. // the ability to pass a context and additional request options.
  947. //
  948. // See DeleteResource for details on how to use this API operation.
  949. //
  950. // The context must be non-nil and will be used for request cancellation. If
  951. // the context is nil a panic will occur. In the future the SDK may create
  952. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  953. // for more information on using Contexts.
  954. func (c *WorkMail) DeleteResourceWithContext(ctx aws.Context, input *DeleteResourceInput, opts ...request.Option) (*DeleteResourceOutput, error) {
  955. req, out := c.DeleteResourceRequest(input)
  956. req.SetContext(ctx)
  957. req.ApplyOptions(opts...)
  958. return out, req.Send()
  959. }
  960. const opDeleteUser = "DeleteUser"
  961. // DeleteUserRequest generates a "aws/request.Request" representing the
  962. // client's request for the DeleteUser operation. The "output" return
  963. // value will be populated with the request's response once the request completes
  964. // successfully.
  965. //
  966. // Use "Send" method on the returned Request to send the API call to the service.
  967. // the "output" return value is not valid until after Send returns without error.
  968. //
  969. // See DeleteUser for more information on using the DeleteUser
  970. // API call, and error handling.
  971. //
  972. // This method is useful when you want to inject custom logic or configuration
  973. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  974. //
  975. //
  976. // // Example sending a request using the DeleteUserRequest method.
  977. // req, resp := client.DeleteUserRequest(params)
  978. //
  979. // err := req.Send()
  980. // if err == nil { // resp is now filled
  981. // fmt.Println(resp)
  982. // }
  983. //
  984. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser
  985. func (c *WorkMail) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) {
  986. op := &request.Operation{
  987. Name: opDeleteUser,
  988. HTTPMethod: "POST",
  989. HTTPPath: "/",
  990. }
  991. if input == nil {
  992. input = &DeleteUserInput{}
  993. }
  994. output = &DeleteUserOutput{}
  995. req = c.newRequest(op, input, output)
  996. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  997. return
  998. }
  999. // DeleteUser API operation for Amazon WorkMail.
  1000. //
  1001. // Deletes a user from Amazon WorkMail and all subsequent systems. The action
  1002. // can't be undone. The mailbox is kept as-is for a minimum of 30 days, without
  1003. // any means to restore it.
  1004. //
  1005. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1006. // with awserr.Error's Code and Message methods to get detailed information about
  1007. // the error.
  1008. //
  1009. // See the AWS API reference guide for Amazon WorkMail's
  1010. // API operation DeleteUser for usage and error information.
  1011. //
  1012. // Returned Error Codes:
  1013. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  1014. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  1015. // WorkMail service.
  1016. //
  1017. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  1018. // The directory that you are trying to perform operations on isn't available.
  1019. //
  1020. // * ErrCodeEntityStateException "EntityStateException"
  1021. // You are performing an operation on an entity that isn't in the expected state,
  1022. // such as trying to update a deleted user.
  1023. //
  1024. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1025. // One or more of the input parameters don't match the service's restrictions.
  1026. //
  1027. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1028. // An operation received a valid organization identifier that either doesn't
  1029. // belong or exist in the system.
  1030. //
  1031. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1032. // The organization must have a valid state (Active or Synchronizing) to perform
  1033. // certain operations on the organization or its entities.
  1034. //
  1035. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  1036. // You can't perform a write operation against a read-only directory.
  1037. //
  1038. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser
  1039. func (c *WorkMail) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) {
  1040. req, out := c.DeleteUserRequest(input)
  1041. return out, req.Send()
  1042. }
  1043. // DeleteUserWithContext is the same as DeleteUser with the addition of
  1044. // the ability to pass a context and additional request options.
  1045. //
  1046. // See DeleteUser for details on how to use this API operation.
  1047. //
  1048. // The context must be non-nil and will be used for request cancellation. If
  1049. // the context is nil a panic will occur. In the future the SDK may create
  1050. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1051. // for more information on using Contexts.
  1052. func (c *WorkMail) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) {
  1053. req, out := c.DeleteUserRequest(input)
  1054. req.SetContext(ctx)
  1055. req.ApplyOptions(opts...)
  1056. return out, req.Send()
  1057. }
  1058. const opDeregisterFromWorkMail = "DeregisterFromWorkMail"
  1059. // DeregisterFromWorkMailRequest generates a "aws/request.Request" representing the
  1060. // client's request for the DeregisterFromWorkMail operation. The "output" return
  1061. // value will be populated with the request's response once the request completes
  1062. // successfully.
  1063. //
  1064. // Use "Send" method on the returned Request to send the API call to the service.
  1065. // the "output" return value is not valid until after Send returns without error.
  1066. //
  1067. // See DeregisterFromWorkMail for more information on using the DeregisterFromWorkMail
  1068. // API call, and error handling.
  1069. //
  1070. // This method is useful when you want to inject custom logic or configuration
  1071. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1072. //
  1073. //
  1074. // // Example sending a request using the DeregisterFromWorkMailRequest method.
  1075. // req, resp := client.DeregisterFromWorkMailRequest(params)
  1076. //
  1077. // err := req.Send()
  1078. // if err == nil { // resp is now filled
  1079. // fmt.Println(resp)
  1080. // }
  1081. //
  1082. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail
  1083. func (c *WorkMail) DeregisterFromWorkMailRequest(input *DeregisterFromWorkMailInput) (req *request.Request, output *DeregisterFromWorkMailOutput) {
  1084. op := &request.Operation{
  1085. Name: opDeregisterFromWorkMail,
  1086. HTTPMethod: "POST",
  1087. HTTPPath: "/",
  1088. }
  1089. if input == nil {
  1090. input = &DeregisterFromWorkMailInput{}
  1091. }
  1092. output = &DeregisterFromWorkMailOutput{}
  1093. req = c.newRequest(op, input, output)
  1094. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1095. return
  1096. }
  1097. // DeregisterFromWorkMail API operation for Amazon WorkMail.
  1098. //
  1099. // Mark a user, group, or resource as no longer used in Amazon WorkMail. This
  1100. // action disassociates the mailbox and schedules it for clean-up. Amazon WorkMail
  1101. // keeps mailboxes for 30 days before they are permanently removed. The functionality
  1102. // in the console is Disable.
  1103. //
  1104. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1105. // with awserr.Error's Code and Message methods to get detailed information about
  1106. // the error.
  1107. //
  1108. // See the AWS API reference guide for Amazon WorkMail's
  1109. // API operation DeregisterFromWorkMail for usage and error information.
  1110. //
  1111. // Returned Error Codes:
  1112. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1113. // The identifier supplied for the entity is valid, but it does not exist in
  1114. // your organization.
  1115. //
  1116. // * ErrCodeEntityStateException "EntityStateException"
  1117. // You are performing an operation on an entity that isn't in the expected state,
  1118. // such as trying to update a deleted user.
  1119. //
  1120. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1121. // One or more of the input parameters don't match the service's restrictions.
  1122. //
  1123. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1124. // An operation received a valid organization identifier that either doesn't
  1125. // belong or exist in the system.
  1126. //
  1127. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1128. // The organization must have a valid state (Active or Synchronizing) to perform
  1129. // certain operations on the organization or its entities.
  1130. //
  1131. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail
  1132. func (c *WorkMail) DeregisterFromWorkMail(input *DeregisterFromWorkMailInput) (*DeregisterFromWorkMailOutput, error) {
  1133. req, out := c.DeregisterFromWorkMailRequest(input)
  1134. return out, req.Send()
  1135. }
  1136. // DeregisterFromWorkMailWithContext is the same as DeregisterFromWorkMail with the addition of
  1137. // the ability to pass a context and additional request options.
  1138. //
  1139. // See DeregisterFromWorkMail for details on how to use this API operation.
  1140. //
  1141. // The context must be non-nil and will be used for request cancellation. If
  1142. // the context is nil a panic will occur. In the future the SDK may create
  1143. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1144. // for more information on using Contexts.
  1145. func (c *WorkMail) DeregisterFromWorkMailWithContext(ctx aws.Context, input *DeregisterFromWorkMailInput, opts ...request.Option) (*DeregisterFromWorkMailOutput, error) {
  1146. req, out := c.DeregisterFromWorkMailRequest(input)
  1147. req.SetContext(ctx)
  1148. req.ApplyOptions(opts...)
  1149. return out, req.Send()
  1150. }
  1151. const opDescribeGroup = "DescribeGroup"
  1152. // DescribeGroupRequest generates a "aws/request.Request" representing the
  1153. // client's request for the DescribeGroup operation. The "output" return
  1154. // value will be populated with the request's response once the request completes
  1155. // successfully.
  1156. //
  1157. // Use "Send" method on the returned Request to send the API call to the service.
  1158. // the "output" return value is not valid until after Send returns without error.
  1159. //
  1160. // See DescribeGroup for more information on using the DescribeGroup
  1161. // API call, and error handling.
  1162. //
  1163. // This method is useful when you want to inject custom logic or configuration
  1164. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1165. //
  1166. //
  1167. // // Example sending a request using the DescribeGroupRequest method.
  1168. // req, resp := client.DescribeGroupRequest(params)
  1169. //
  1170. // err := req.Send()
  1171. // if err == nil { // resp is now filled
  1172. // fmt.Println(resp)
  1173. // }
  1174. //
  1175. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup
  1176. func (c *WorkMail) DescribeGroupRequest(input *DescribeGroupInput) (req *request.Request, output *DescribeGroupOutput) {
  1177. op := &request.Operation{
  1178. Name: opDescribeGroup,
  1179. HTTPMethod: "POST",
  1180. HTTPPath: "/",
  1181. }
  1182. if input == nil {
  1183. input = &DescribeGroupInput{}
  1184. }
  1185. output = &DescribeGroupOutput{}
  1186. req = c.newRequest(op, input, output)
  1187. return
  1188. }
  1189. // DescribeGroup API operation for Amazon WorkMail.
  1190. //
  1191. // Returns the data available for the group.
  1192. //
  1193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1194. // with awserr.Error's Code and Message methods to get detailed information about
  1195. // the error.
  1196. //
  1197. // See the AWS API reference guide for Amazon WorkMail's
  1198. // API operation DescribeGroup for usage and error information.
  1199. //
  1200. // Returned Error Codes:
  1201. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1202. // The identifier supplied for the entity is valid, but it does not exist in
  1203. // your organization.
  1204. //
  1205. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1206. // One or more of the input parameters don't match the service's restrictions.
  1207. //
  1208. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1209. // An operation received a valid organization identifier that either doesn't
  1210. // belong or exist in the system.
  1211. //
  1212. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1213. // The organization must have a valid state (Active or Synchronizing) to perform
  1214. // certain operations on the organization or its entities.
  1215. //
  1216. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup
  1217. func (c *WorkMail) DescribeGroup(input *DescribeGroupInput) (*DescribeGroupOutput, error) {
  1218. req, out := c.DescribeGroupRequest(input)
  1219. return out, req.Send()
  1220. }
  1221. // DescribeGroupWithContext is the same as DescribeGroup with the addition of
  1222. // the ability to pass a context and additional request options.
  1223. //
  1224. // See DescribeGroup for details on how to use this API operation.
  1225. //
  1226. // The context must be non-nil and will be used for request cancellation. If
  1227. // the context is nil a panic will occur. In the future the SDK may create
  1228. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1229. // for more information on using Contexts.
  1230. func (c *WorkMail) DescribeGroupWithContext(ctx aws.Context, input *DescribeGroupInput, opts ...request.Option) (*DescribeGroupOutput, error) {
  1231. req, out := c.DescribeGroupRequest(input)
  1232. req.SetContext(ctx)
  1233. req.ApplyOptions(opts...)
  1234. return out, req.Send()
  1235. }
  1236. const opDescribeOrganization = "DescribeOrganization"
  1237. // DescribeOrganizationRequest generates a "aws/request.Request" representing the
  1238. // client's request for the DescribeOrganization operation. The "output" return
  1239. // value will be populated with the request's response once the request completes
  1240. // successfully.
  1241. //
  1242. // Use "Send" method on the returned Request to send the API call to the service.
  1243. // the "output" return value is not valid until after Send returns without error.
  1244. //
  1245. // See DescribeOrganization for more information on using the DescribeOrganization
  1246. // API call, and error handling.
  1247. //
  1248. // This method is useful when you want to inject custom logic or configuration
  1249. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1250. //
  1251. //
  1252. // // Example sending a request using the DescribeOrganizationRequest method.
  1253. // req, resp := client.DescribeOrganizationRequest(params)
  1254. //
  1255. // err := req.Send()
  1256. // if err == nil { // resp is now filled
  1257. // fmt.Println(resp)
  1258. // }
  1259. //
  1260. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization
  1261. func (c *WorkMail) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) {
  1262. op := &request.Operation{
  1263. Name: opDescribeOrganization,
  1264. HTTPMethod: "POST",
  1265. HTTPPath: "/",
  1266. }
  1267. if input == nil {
  1268. input = &DescribeOrganizationInput{}
  1269. }
  1270. output = &DescribeOrganizationOutput{}
  1271. req = c.newRequest(op, input, output)
  1272. return
  1273. }
  1274. // DescribeOrganization API operation for Amazon WorkMail.
  1275. //
  1276. // Provides more information regarding a given organization based on its identifier.
  1277. //
  1278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1279. // with awserr.Error's Code and Message methods to get detailed information about
  1280. // the error.
  1281. //
  1282. // See the AWS API reference guide for Amazon WorkMail's
  1283. // API operation DescribeOrganization for usage and error information.
  1284. //
  1285. // Returned Error Codes:
  1286. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1287. // One or more of the input parameters don't match the service's restrictions.
  1288. //
  1289. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1290. // An operation received a valid organization identifier that either doesn't
  1291. // belong or exist in the system.
  1292. //
  1293. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization
  1294. func (c *WorkMail) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) {
  1295. req, out := c.DescribeOrganizationRequest(input)
  1296. return out, req.Send()
  1297. }
  1298. // DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of
  1299. // the ability to pass a context and additional request options.
  1300. //
  1301. // See DescribeOrganization for details on how to use this API operation.
  1302. //
  1303. // The context must be non-nil and will be used for request cancellation. If
  1304. // the context is nil a panic will occur. In the future the SDK may create
  1305. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1306. // for more information on using Contexts.
  1307. func (c *WorkMail) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) {
  1308. req, out := c.DescribeOrganizationRequest(input)
  1309. req.SetContext(ctx)
  1310. req.ApplyOptions(opts...)
  1311. return out, req.Send()
  1312. }
  1313. const opDescribeResource = "DescribeResource"
  1314. // DescribeResourceRequest generates a "aws/request.Request" representing the
  1315. // client's request for the DescribeResource operation. The "output" return
  1316. // value will be populated with the request's response once the request completes
  1317. // successfully.
  1318. //
  1319. // Use "Send" method on the returned Request to send the API call to the service.
  1320. // the "output" return value is not valid until after Send returns without error.
  1321. //
  1322. // See DescribeResource for more information on using the DescribeResource
  1323. // API call, and error handling.
  1324. //
  1325. // This method is useful when you want to inject custom logic or configuration
  1326. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1327. //
  1328. //
  1329. // // Example sending a request using the DescribeResourceRequest method.
  1330. // req, resp := client.DescribeResourceRequest(params)
  1331. //
  1332. // err := req.Send()
  1333. // if err == nil { // resp is now filled
  1334. // fmt.Println(resp)
  1335. // }
  1336. //
  1337. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource
  1338. func (c *WorkMail) DescribeResourceRequest(input *DescribeResourceInput) (req *request.Request, output *DescribeResourceOutput) {
  1339. op := &request.Operation{
  1340. Name: opDescribeResource,
  1341. HTTPMethod: "POST",
  1342. HTTPPath: "/",
  1343. }
  1344. if input == nil {
  1345. input = &DescribeResourceInput{}
  1346. }
  1347. output = &DescribeResourceOutput{}
  1348. req = c.newRequest(op, input, output)
  1349. return
  1350. }
  1351. // DescribeResource API operation for Amazon WorkMail.
  1352. //
  1353. // Returns the data available for the resource.
  1354. //
  1355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1356. // with awserr.Error's Code and Message methods to get detailed information about
  1357. // the error.
  1358. //
  1359. // See the AWS API reference guide for Amazon WorkMail's
  1360. // API operation DescribeResource for usage and error information.
  1361. //
  1362. // Returned Error Codes:
  1363. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1364. // The identifier supplied for the entity is valid, but it does not exist in
  1365. // your organization.
  1366. //
  1367. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1368. // One or more of the input parameters don't match the service's restrictions.
  1369. //
  1370. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1371. // An operation received a valid organization identifier that either doesn't
  1372. // belong or exist in the system.
  1373. //
  1374. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1375. // The organization must have a valid state (Active or Synchronizing) to perform
  1376. // certain operations on the organization or its entities.
  1377. //
  1378. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource
  1379. func (c *WorkMail) DescribeResource(input *DescribeResourceInput) (*DescribeResourceOutput, error) {
  1380. req, out := c.DescribeResourceRequest(input)
  1381. return out, req.Send()
  1382. }
  1383. // DescribeResourceWithContext is the same as DescribeResource with the addition of
  1384. // the ability to pass a context and additional request options.
  1385. //
  1386. // See DescribeResource for details on how to use this API operation.
  1387. //
  1388. // The context must be non-nil and will be used for request cancellation. If
  1389. // the context is nil a panic will occur. In the future the SDK may create
  1390. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1391. // for more information on using Contexts.
  1392. func (c *WorkMail) DescribeResourceWithContext(ctx aws.Context, input *DescribeResourceInput, opts ...request.Option) (*DescribeResourceOutput, error) {
  1393. req, out := c.DescribeResourceRequest(input)
  1394. req.SetContext(ctx)
  1395. req.ApplyOptions(opts...)
  1396. return out, req.Send()
  1397. }
  1398. const opDescribeUser = "DescribeUser"
  1399. // DescribeUserRequest generates a "aws/request.Request" representing the
  1400. // client's request for the DescribeUser operation. The "output" return
  1401. // value will be populated with the request's response once the request completes
  1402. // successfully.
  1403. //
  1404. // Use "Send" method on the returned Request to send the API call to the service.
  1405. // the "output" return value is not valid until after Send returns without error.
  1406. //
  1407. // See DescribeUser for more information on using the DescribeUser
  1408. // API call, and error handling.
  1409. //
  1410. // This method is useful when you want to inject custom logic or configuration
  1411. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1412. //
  1413. //
  1414. // // Example sending a request using the DescribeUserRequest method.
  1415. // req, resp := client.DescribeUserRequest(params)
  1416. //
  1417. // err := req.Send()
  1418. // if err == nil { // resp is now filled
  1419. // fmt.Println(resp)
  1420. // }
  1421. //
  1422. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser
  1423. func (c *WorkMail) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) {
  1424. op := &request.Operation{
  1425. Name: opDescribeUser,
  1426. HTTPMethod: "POST",
  1427. HTTPPath: "/",
  1428. }
  1429. if input == nil {
  1430. input = &DescribeUserInput{}
  1431. }
  1432. output = &DescribeUserOutput{}
  1433. req = c.newRequest(op, input, output)
  1434. return
  1435. }
  1436. // DescribeUser API operation for Amazon WorkMail.
  1437. //
  1438. // Provides information regarding the user.
  1439. //
  1440. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1441. // with awserr.Error's Code and Message methods to get detailed information about
  1442. // the error.
  1443. //
  1444. // See the AWS API reference guide for Amazon WorkMail's
  1445. // API operation DescribeUser for usage and error information.
  1446. //
  1447. // Returned Error Codes:
  1448. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1449. // The identifier supplied for the entity is valid, but it does not exist in
  1450. // your organization.
  1451. //
  1452. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1453. // One or more of the input parameters don't match the service's restrictions.
  1454. //
  1455. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1456. // An operation received a valid organization identifier that either doesn't
  1457. // belong or exist in the system.
  1458. //
  1459. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1460. // The organization must have a valid state (Active or Synchronizing) to perform
  1461. // certain operations on the organization or its entities.
  1462. //
  1463. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser
  1464. func (c *WorkMail) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) {
  1465. req, out := c.DescribeUserRequest(input)
  1466. return out, req.Send()
  1467. }
  1468. // DescribeUserWithContext is the same as DescribeUser with the addition of
  1469. // the ability to pass a context and additional request options.
  1470. //
  1471. // See DescribeUser for details on how to use this API operation.
  1472. //
  1473. // The context must be non-nil and will be used for request cancellation. If
  1474. // the context is nil a panic will occur. In the future the SDK may create
  1475. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1476. // for more information on using Contexts.
  1477. func (c *WorkMail) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) {
  1478. req, out := c.DescribeUserRequest(input)
  1479. req.SetContext(ctx)
  1480. req.ApplyOptions(opts...)
  1481. return out, req.Send()
  1482. }
  1483. const opDisassociateDelegateFromResource = "DisassociateDelegateFromResource"
  1484. // DisassociateDelegateFromResourceRequest generates a "aws/request.Request" representing the
  1485. // client's request for the DisassociateDelegateFromResource operation. The "output" return
  1486. // value will be populated with the request's response once the request completes
  1487. // successfully.
  1488. //
  1489. // Use "Send" method on the returned Request to send the API call to the service.
  1490. // the "output" return value is not valid until after Send returns without error.
  1491. //
  1492. // See DisassociateDelegateFromResource for more information on using the DisassociateDelegateFromResource
  1493. // API call, and error handling.
  1494. //
  1495. // This method is useful when you want to inject custom logic or configuration
  1496. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1497. //
  1498. //
  1499. // // Example sending a request using the DisassociateDelegateFromResourceRequest method.
  1500. // req, resp := client.DisassociateDelegateFromResourceRequest(params)
  1501. //
  1502. // err := req.Send()
  1503. // if err == nil { // resp is now filled
  1504. // fmt.Println(resp)
  1505. // }
  1506. //
  1507. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource
  1508. func (c *WorkMail) DisassociateDelegateFromResourceRequest(input *DisassociateDelegateFromResourceInput) (req *request.Request, output *DisassociateDelegateFromResourceOutput) {
  1509. op := &request.Operation{
  1510. Name: opDisassociateDelegateFromResource,
  1511. HTTPMethod: "POST",
  1512. HTTPPath: "/",
  1513. }
  1514. if input == nil {
  1515. input = &DisassociateDelegateFromResourceInput{}
  1516. }
  1517. output = &DisassociateDelegateFromResourceOutput{}
  1518. req = c.newRequest(op, input, output)
  1519. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1520. return
  1521. }
  1522. // DisassociateDelegateFromResource API operation for Amazon WorkMail.
  1523. //
  1524. // Removes a member from the resource's set of delegates.
  1525. //
  1526. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1527. // with awserr.Error's Code and Message methods to get detailed information about
  1528. // the error.
  1529. //
  1530. // See the AWS API reference guide for Amazon WorkMail's
  1531. // API operation DisassociateDelegateFromResource for usage and error information.
  1532. //
  1533. // Returned Error Codes:
  1534. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1535. // The identifier supplied for the entity is valid, but it does not exist in
  1536. // your organization.
  1537. //
  1538. // * ErrCodeEntityStateException "EntityStateException"
  1539. // You are performing an operation on an entity that isn't in the expected state,
  1540. // such as trying to update a deleted user.
  1541. //
  1542. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1543. // One or more of the input parameters don't match the service's restrictions.
  1544. //
  1545. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1546. // An operation received a valid organization identifier that either doesn't
  1547. // belong or exist in the system.
  1548. //
  1549. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1550. // The organization must have a valid state (Active or Synchronizing) to perform
  1551. // certain operations on the organization or its entities.
  1552. //
  1553. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource
  1554. func (c *WorkMail) DisassociateDelegateFromResource(input *DisassociateDelegateFromResourceInput) (*DisassociateDelegateFromResourceOutput, error) {
  1555. req, out := c.DisassociateDelegateFromResourceRequest(input)
  1556. return out, req.Send()
  1557. }
  1558. // DisassociateDelegateFromResourceWithContext is the same as DisassociateDelegateFromResource with the addition of
  1559. // the ability to pass a context and additional request options.
  1560. //
  1561. // See DisassociateDelegateFromResource for details on how to use this API operation.
  1562. //
  1563. // The context must be non-nil and will be used for request cancellation. If
  1564. // the context is nil a panic will occur. In the future the SDK may create
  1565. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1566. // for more information on using Contexts.
  1567. func (c *WorkMail) DisassociateDelegateFromResourceWithContext(ctx aws.Context, input *DisassociateDelegateFromResourceInput, opts ...request.Option) (*DisassociateDelegateFromResourceOutput, error) {
  1568. req, out := c.DisassociateDelegateFromResourceRequest(input)
  1569. req.SetContext(ctx)
  1570. req.ApplyOptions(opts...)
  1571. return out, req.Send()
  1572. }
  1573. const opDisassociateMemberFromGroup = "DisassociateMemberFromGroup"
  1574. // DisassociateMemberFromGroupRequest generates a "aws/request.Request" representing the
  1575. // client's request for the DisassociateMemberFromGroup operation. The "output" return
  1576. // value will be populated with the request's response once the request completes
  1577. // successfully.
  1578. //
  1579. // Use "Send" method on the returned Request to send the API call to the service.
  1580. // the "output" return value is not valid until after Send returns without error.
  1581. //
  1582. // See DisassociateMemberFromGroup for more information on using the DisassociateMemberFromGroup
  1583. // API call, and error handling.
  1584. //
  1585. // This method is useful when you want to inject custom logic or configuration
  1586. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1587. //
  1588. //
  1589. // // Example sending a request using the DisassociateMemberFromGroupRequest method.
  1590. // req, resp := client.DisassociateMemberFromGroupRequest(params)
  1591. //
  1592. // err := req.Send()
  1593. // if err == nil { // resp is now filled
  1594. // fmt.Println(resp)
  1595. // }
  1596. //
  1597. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup
  1598. func (c *WorkMail) DisassociateMemberFromGroupRequest(input *DisassociateMemberFromGroupInput) (req *request.Request, output *DisassociateMemberFromGroupOutput) {
  1599. op := &request.Operation{
  1600. Name: opDisassociateMemberFromGroup,
  1601. HTTPMethod: "POST",
  1602. HTTPPath: "/",
  1603. }
  1604. if input == nil {
  1605. input = &DisassociateMemberFromGroupInput{}
  1606. }
  1607. output = &DisassociateMemberFromGroupOutput{}
  1608. req = c.newRequest(op, input, output)
  1609. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1610. return
  1611. }
  1612. // DisassociateMemberFromGroup API operation for Amazon WorkMail.
  1613. //
  1614. // Removes a member from a group.
  1615. //
  1616. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1617. // with awserr.Error's Code and Message methods to get detailed information about
  1618. // the error.
  1619. //
  1620. // See the AWS API reference guide for Amazon WorkMail's
  1621. // API operation DisassociateMemberFromGroup for usage and error information.
  1622. //
  1623. // Returned Error Codes:
  1624. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  1625. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  1626. // WorkMail service.
  1627. //
  1628. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  1629. // The directory that you are trying to perform operations on isn't available.
  1630. //
  1631. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1632. // The identifier supplied for the entity is valid, but it does not exist in
  1633. // your organization.
  1634. //
  1635. // * ErrCodeEntityStateException "EntityStateException"
  1636. // You are performing an operation on an entity that isn't in the expected state,
  1637. // such as trying to update a deleted user.
  1638. //
  1639. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1640. // One or more of the input parameters don't match the service's restrictions.
  1641. //
  1642. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1643. // An operation received a valid organization identifier that either doesn't
  1644. // belong or exist in the system.
  1645. //
  1646. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1647. // The organization must have a valid state (Active or Synchronizing) to perform
  1648. // certain operations on the organization or its entities.
  1649. //
  1650. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  1651. // You can't perform a write operation against a read-only directory.
  1652. //
  1653. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup
  1654. func (c *WorkMail) DisassociateMemberFromGroup(input *DisassociateMemberFromGroupInput) (*DisassociateMemberFromGroupOutput, error) {
  1655. req, out := c.DisassociateMemberFromGroupRequest(input)
  1656. return out, req.Send()
  1657. }
  1658. // DisassociateMemberFromGroupWithContext is the same as DisassociateMemberFromGroup with the addition of
  1659. // the ability to pass a context and additional request options.
  1660. //
  1661. // See DisassociateMemberFromGroup for details on how to use this API operation.
  1662. //
  1663. // The context must be non-nil and will be used for request cancellation. If
  1664. // the context is nil a panic will occur. In the future the SDK may create
  1665. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1666. // for more information on using Contexts.
  1667. func (c *WorkMail) DisassociateMemberFromGroupWithContext(ctx aws.Context, input *DisassociateMemberFromGroupInput, opts ...request.Option) (*DisassociateMemberFromGroupOutput, error) {
  1668. req, out := c.DisassociateMemberFromGroupRequest(input)
  1669. req.SetContext(ctx)
  1670. req.ApplyOptions(opts...)
  1671. return out, req.Send()
  1672. }
  1673. const opListAliases = "ListAliases"
  1674. // ListAliasesRequest generates a "aws/request.Request" representing the
  1675. // client's request for the ListAliases operation. The "output" return
  1676. // value will be populated with the request's response once the request completes
  1677. // successfully.
  1678. //
  1679. // Use "Send" method on the returned Request to send the API call to the service.
  1680. // the "output" return value is not valid until after Send returns without error.
  1681. //
  1682. // See ListAliases for more information on using the ListAliases
  1683. // API call, and error handling.
  1684. //
  1685. // This method is useful when you want to inject custom logic or configuration
  1686. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1687. //
  1688. //
  1689. // // Example sending a request using the ListAliasesRequest method.
  1690. // req, resp := client.ListAliasesRequest(params)
  1691. //
  1692. // err := req.Send()
  1693. // if err == nil { // resp is now filled
  1694. // fmt.Println(resp)
  1695. // }
  1696. //
  1697. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases
  1698. func (c *WorkMail) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
  1699. op := &request.Operation{
  1700. Name: opListAliases,
  1701. HTTPMethod: "POST",
  1702. HTTPPath: "/",
  1703. Paginator: &request.Paginator{
  1704. InputTokens: []string{"NextToken"},
  1705. OutputTokens: []string{"NextToken"},
  1706. LimitToken: "MaxResults",
  1707. TruncationToken: "",
  1708. },
  1709. }
  1710. if input == nil {
  1711. input = &ListAliasesInput{}
  1712. }
  1713. output = &ListAliasesOutput{}
  1714. req = c.newRequest(op, input, output)
  1715. return
  1716. }
  1717. // ListAliases API operation for Amazon WorkMail.
  1718. //
  1719. // Creates a paginated call to list the aliases associated with a given entity.
  1720. //
  1721. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1722. // with awserr.Error's Code and Message methods to get detailed information about
  1723. // the error.
  1724. //
  1725. // See the AWS API reference guide for Amazon WorkMail's
  1726. // API operation ListAliases for usage and error information.
  1727. //
  1728. // Returned Error Codes:
  1729. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1730. // The identifier supplied for the entity is valid, but it does not exist in
  1731. // your organization.
  1732. //
  1733. // * ErrCodeEntityStateException "EntityStateException"
  1734. // You are performing an operation on an entity that isn't in the expected state,
  1735. // such as trying to update a deleted user.
  1736. //
  1737. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1738. // One or more of the input parameters don't match the service's restrictions.
  1739. //
  1740. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1741. // An operation received a valid organization identifier that either doesn't
  1742. // belong or exist in the system.
  1743. //
  1744. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1745. // The organization must have a valid state (Active or Synchronizing) to perform
  1746. // certain operations on the organization or its entities.
  1747. //
  1748. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases
  1749. func (c *WorkMail) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
  1750. req, out := c.ListAliasesRequest(input)
  1751. return out, req.Send()
  1752. }
  1753. // ListAliasesWithContext is the same as ListAliases with the addition of
  1754. // the ability to pass a context and additional request options.
  1755. //
  1756. // See ListAliases for details on how to use this API operation.
  1757. //
  1758. // The context must be non-nil and will be used for request cancellation. If
  1759. // the context is nil a panic will occur. In the future the SDK may create
  1760. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1761. // for more information on using Contexts.
  1762. func (c *WorkMail) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) {
  1763. req, out := c.ListAliasesRequest(input)
  1764. req.SetContext(ctx)
  1765. req.ApplyOptions(opts...)
  1766. return out, req.Send()
  1767. }
  1768. // ListAliasesPages iterates over the pages of a ListAliases operation,
  1769. // calling the "fn" function with the response data for each page. To stop
  1770. // iterating, return false from the fn function.
  1771. //
  1772. // See ListAliases method for more information on how to use this operation.
  1773. //
  1774. // Note: This operation can generate multiple requests to a service.
  1775. //
  1776. // // Example iterating over at most 3 pages of a ListAliases operation.
  1777. // pageNum := 0
  1778. // err := client.ListAliasesPages(params,
  1779. // func(page *ListAliasesOutput, lastPage bool) bool {
  1780. // pageNum++
  1781. // fmt.Println(page)
  1782. // return pageNum <= 3
  1783. // })
  1784. //
  1785. func (c *WorkMail) ListAliasesPages(input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool) error {
  1786. return c.ListAliasesPagesWithContext(aws.BackgroundContext(), input, fn)
  1787. }
  1788. // ListAliasesPagesWithContext same as ListAliasesPages except
  1789. // it takes a Context and allows setting request options on the pages.
  1790. //
  1791. // The context must be non-nil and will be used for request cancellation. If
  1792. // the context is nil a panic will occur. In the future the SDK may create
  1793. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1794. // for more information on using Contexts.
  1795. func (c *WorkMail) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool, opts ...request.Option) error {
  1796. p := request.Pagination{
  1797. NewRequest: func() (*request.Request, error) {
  1798. var inCpy *ListAliasesInput
  1799. if input != nil {
  1800. tmp := *input
  1801. inCpy = &tmp
  1802. }
  1803. req, _ := c.ListAliasesRequest(inCpy)
  1804. req.SetContext(ctx)
  1805. req.ApplyOptions(opts...)
  1806. return req, nil
  1807. },
  1808. }
  1809. cont := true
  1810. for p.Next() && cont {
  1811. cont = fn(p.Page().(*ListAliasesOutput), !p.HasNextPage())
  1812. }
  1813. return p.Err()
  1814. }
  1815. const opListGroupMembers = "ListGroupMembers"
  1816. // ListGroupMembersRequest generates a "aws/request.Request" representing the
  1817. // client's request for the ListGroupMembers operation. The "output" return
  1818. // value will be populated with the request's response once the request completes
  1819. // successfully.
  1820. //
  1821. // Use "Send" method on the returned Request to send the API call to the service.
  1822. // the "output" return value is not valid until after Send returns without error.
  1823. //
  1824. // See ListGroupMembers for more information on using the ListGroupMembers
  1825. // API call, and error handling.
  1826. //
  1827. // This method is useful when you want to inject custom logic or configuration
  1828. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1829. //
  1830. //
  1831. // // Example sending a request using the ListGroupMembersRequest method.
  1832. // req, resp := client.ListGroupMembersRequest(params)
  1833. //
  1834. // err := req.Send()
  1835. // if err == nil { // resp is now filled
  1836. // fmt.Println(resp)
  1837. // }
  1838. //
  1839. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers
  1840. func (c *WorkMail) ListGroupMembersRequest(input *ListGroupMembersInput) (req *request.Request, output *ListGroupMembersOutput) {
  1841. op := &request.Operation{
  1842. Name: opListGroupMembers,
  1843. HTTPMethod: "POST",
  1844. HTTPPath: "/",
  1845. Paginator: &request.Paginator{
  1846. InputTokens: []string{"NextToken"},
  1847. OutputTokens: []string{"NextToken"},
  1848. LimitToken: "MaxResults",
  1849. TruncationToken: "",
  1850. },
  1851. }
  1852. if input == nil {
  1853. input = &ListGroupMembersInput{}
  1854. }
  1855. output = &ListGroupMembersOutput{}
  1856. req = c.newRequest(op, input, output)
  1857. return
  1858. }
  1859. // ListGroupMembers API operation for Amazon WorkMail.
  1860. //
  1861. // Returns an overview of the members of a group.
  1862. //
  1863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1864. // with awserr.Error's Code and Message methods to get detailed information about
  1865. // the error.
  1866. //
  1867. // See the AWS API reference guide for Amazon WorkMail's
  1868. // API operation ListGroupMembers for usage and error information.
  1869. //
  1870. // Returned Error Codes:
  1871. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  1872. // The identifier supplied for the entity is valid, but it does not exist in
  1873. // your organization.
  1874. //
  1875. // * ErrCodeEntityStateException "EntityStateException"
  1876. // You are performing an operation on an entity that isn't in the expected state,
  1877. // such as trying to update a deleted user.
  1878. //
  1879. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1880. // One or more of the input parameters don't match the service's restrictions.
  1881. //
  1882. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  1883. // An operation received a valid organization identifier that either doesn't
  1884. // belong or exist in the system.
  1885. //
  1886. // * ErrCodeOrganizationStateException "OrganizationStateException"
  1887. // The organization must have a valid state (Active or Synchronizing) to perform
  1888. // certain operations on the organization or its entities.
  1889. //
  1890. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers
  1891. func (c *WorkMail) ListGroupMembers(input *ListGroupMembersInput) (*ListGroupMembersOutput, error) {
  1892. req, out := c.ListGroupMembersRequest(input)
  1893. return out, req.Send()
  1894. }
  1895. // ListGroupMembersWithContext is the same as ListGroupMembers with the addition of
  1896. // the ability to pass a context and additional request options.
  1897. //
  1898. // See ListGroupMembers for details on how to use this API operation.
  1899. //
  1900. // The context must be non-nil and will be used for request cancellation. If
  1901. // the context is nil a panic will occur. In the future the SDK may create
  1902. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1903. // for more information on using Contexts.
  1904. func (c *WorkMail) ListGroupMembersWithContext(ctx aws.Context, input *ListGroupMembersInput, opts ...request.Option) (*ListGroupMembersOutput, error) {
  1905. req, out := c.ListGroupMembersRequest(input)
  1906. req.SetContext(ctx)
  1907. req.ApplyOptions(opts...)
  1908. return out, req.Send()
  1909. }
  1910. // ListGroupMembersPages iterates over the pages of a ListGroupMembers operation,
  1911. // calling the "fn" function with the response data for each page. To stop
  1912. // iterating, return false from the fn function.
  1913. //
  1914. // See ListGroupMembers method for more information on how to use this operation.
  1915. //
  1916. // Note: This operation can generate multiple requests to a service.
  1917. //
  1918. // // Example iterating over at most 3 pages of a ListGroupMembers operation.
  1919. // pageNum := 0
  1920. // err := client.ListGroupMembersPages(params,
  1921. // func(page *ListGroupMembersOutput, lastPage bool) bool {
  1922. // pageNum++
  1923. // fmt.Println(page)
  1924. // return pageNum <= 3
  1925. // })
  1926. //
  1927. func (c *WorkMail) ListGroupMembersPages(input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool) error {
  1928. return c.ListGroupMembersPagesWithContext(aws.BackgroundContext(), input, fn)
  1929. }
  1930. // ListGroupMembersPagesWithContext same as ListGroupMembersPages except
  1931. // it takes a Context and allows setting request options on the pages.
  1932. //
  1933. // The context must be non-nil and will be used for request cancellation. If
  1934. // the context is nil a panic will occur. In the future the SDK may create
  1935. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1936. // for more information on using Contexts.
  1937. func (c *WorkMail) ListGroupMembersPagesWithContext(ctx aws.Context, input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool, opts ...request.Option) error {
  1938. p := request.Pagination{
  1939. NewRequest: func() (*request.Request, error) {
  1940. var inCpy *ListGroupMembersInput
  1941. if input != nil {
  1942. tmp := *input
  1943. inCpy = &tmp
  1944. }
  1945. req, _ := c.ListGroupMembersRequest(inCpy)
  1946. req.SetContext(ctx)
  1947. req.ApplyOptions(opts...)
  1948. return req, nil
  1949. },
  1950. }
  1951. cont := true
  1952. for p.Next() && cont {
  1953. cont = fn(p.Page().(*ListGroupMembersOutput), !p.HasNextPage())
  1954. }
  1955. return p.Err()
  1956. }
  1957. const opListGroups = "ListGroups"
  1958. // ListGroupsRequest generates a "aws/request.Request" representing the
  1959. // client's request for the ListGroups operation. The "output" return
  1960. // value will be populated with the request's response once the request completes
  1961. // successfully.
  1962. //
  1963. // Use "Send" method on the returned Request to send the API call to the service.
  1964. // the "output" return value is not valid until after Send returns without error.
  1965. //
  1966. // See ListGroups for more information on using the ListGroups
  1967. // API call, and error handling.
  1968. //
  1969. // This method is useful when you want to inject custom logic or configuration
  1970. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1971. //
  1972. //
  1973. // // Example sending a request using the ListGroupsRequest method.
  1974. // req, resp := client.ListGroupsRequest(params)
  1975. //
  1976. // err := req.Send()
  1977. // if err == nil { // resp is now filled
  1978. // fmt.Println(resp)
  1979. // }
  1980. //
  1981. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups
  1982. func (c *WorkMail) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) {
  1983. op := &request.Operation{
  1984. Name: opListGroups,
  1985. HTTPMethod: "POST",
  1986. HTTPPath: "/",
  1987. Paginator: &request.Paginator{
  1988. InputTokens: []string{"NextToken"},
  1989. OutputTokens: []string{"NextToken"},
  1990. LimitToken: "MaxResults",
  1991. TruncationToken: "",
  1992. },
  1993. }
  1994. if input == nil {
  1995. input = &ListGroupsInput{}
  1996. }
  1997. output = &ListGroupsOutput{}
  1998. req = c.newRequest(op, input, output)
  1999. return
  2000. }
  2001. // ListGroups API operation for Amazon WorkMail.
  2002. //
  2003. // Returns summaries of the organization's groups.
  2004. //
  2005. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2006. // with awserr.Error's Code and Message methods to get detailed information about
  2007. // the error.
  2008. //
  2009. // See the AWS API reference guide for Amazon WorkMail's
  2010. // API operation ListGroups for usage and error information.
  2011. //
  2012. // Returned Error Codes:
  2013. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2014. // The identifier supplied for the entity is valid, but it does not exist in
  2015. // your organization.
  2016. //
  2017. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2018. // One or more of the input parameters don't match the service's restrictions.
  2019. //
  2020. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2021. // An operation received a valid organization identifier that either doesn't
  2022. // belong or exist in the system.
  2023. //
  2024. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2025. // The organization must have a valid state (Active or Synchronizing) to perform
  2026. // certain operations on the organization or its entities.
  2027. //
  2028. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups
  2029. func (c *WorkMail) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) {
  2030. req, out := c.ListGroupsRequest(input)
  2031. return out, req.Send()
  2032. }
  2033. // ListGroupsWithContext is the same as ListGroups with the addition of
  2034. // the ability to pass a context and additional request options.
  2035. //
  2036. // See ListGroups for details on how to use this API operation.
  2037. //
  2038. // The context must be non-nil and will be used for request cancellation. If
  2039. // the context is nil a panic will occur. In the future the SDK may create
  2040. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2041. // for more information on using Contexts.
  2042. func (c *WorkMail) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) {
  2043. req, out := c.ListGroupsRequest(input)
  2044. req.SetContext(ctx)
  2045. req.ApplyOptions(opts...)
  2046. return out, req.Send()
  2047. }
  2048. // ListGroupsPages iterates over the pages of a ListGroups operation,
  2049. // calling the "fn" function with the response data for each page. To stop
  2050. // iterating, return false from the fn function.
  2051. //
  2052. // See ListGroups method for more information on how to use this operation.
  2053. //
  2054. // Note: This operation can generate multiple requests to a service.
  2055. //
  2056. // // Example iterating over at most 3 pages of a ListGroups operation.
  2057. // pageNum := 0
  2058. // err := client.ListGroupsPages(params,
  2059. // func(page *ListGroupsOutput, lastPage bool) bool {
  2060. // pageNum++
  2061. // fmt.Println(page)
  2062. // return pageNum <= 3
  2063. // })
  2064. //
  2065. func (c *WorkMail) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error {
  2066. return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
  2067. }
  2068. // ListGroupsPagesWithContext same as ListGroupsPages except
  2069. // it takes a Context and allows setting request options on the pages.
  2070. //
  2071. // The context must be non-nil and will be used for request cancellation. If
  2072. // the context is nil a panic will occur. In the future the SDK may create
  2073. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2074. // for more information on using Contexts.
  2075. func (c *WorkMail) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error {
  2076. p := request.Pagination{
  2077. NewRequest: func() (*request.Request, error) {
  2078. var inCpy *ListGroupsInput
  2079. if input != nil {
  2080. tmp := *input
  2081. inCpy = &tmp
  2082. }
  2083. req, _ := c.ListGroupsRequest(inCpy)
  2084. req.SetContext(ctx)
  2085. req.ApplyOptions(opts...)
  2086. return req, nil
  2087. },
  2088. }
  2089. cont := true
  2090. for p.Next() && cont {
  2091. cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage())
  2092. }
  2093. return p.Err()
  2094. }
  2095. const opListMailboxPermissions = "ListMailboxPermissions"
  2096. // ListMailboxPermissionsRequest generates a "aws/request.Request" representing the
  2097. // client's request for the ListMailboxPermissions operation. The "output" return
  2098. // value will be populated with the request's response once the request completes
  2099. // successfully.
  2100. //
  2101. // Use "Send" method on the returned Request to send the API call to the service.
  2102. // the "output" return value is not valid until after Send returns without error.
  2103. //
  2104. // See ListMailboxPermissions for more information on using the ListMailboxPermissions
  2105. // API call, and error handling.
  2106. //
  2107. // This method is useful when you want to inject custom logic or configuration
  2108. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2109. //
  2110. //
  2111. // // Example sending a request using the ListMailboxPermissionsRequest method.
  2112. // req, resp := client.ListMailboxPermissionsRequest(params)
  2113. //
  2114. // err := req.Send()
  2115. // if err == nil { // resp is now filled
  2116. // fmt.Println(resp)
  2117. // }
  2118. //
  2119. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListMailboxPermissions
  2120. func (c *WorkMail) ListMailboxPermissionsRequest(input *ListMailboxPermissionsInput) (req *request.Request, output *ListMailboxPermissionsOutput) {
  2121. op := &request.Operation{
  2122. Name: opListMailboxPermissions,
  2123. HTTPMethod: "POST",
  2124. HTTPPath: "/",
  2125. Paginator: &request.Paginator{
  2126. InputTokens: []string{"NextToken"},
  2127. OutputTokens: []string{"NextToken"},
  2128. LimitToken: "MaxResults",
  2129. TruncationToken: "",
  2130. },
  2131. }
  2132. if input == nil {
  2133. input = &ListMailboxPermissionsInput{}
  2134. }
  2135. output = &ListMailboxPermissionsOutput{}
  2136. req = c.newRequest(op, input, output)
  2137. return
  2138. }
  2139. // ListMailboxPermissions API operation for Amazon WorkMail.
  2140. //
  2141. // Lists the mailbox permissions associated with a mailbox.
  2142. //
  2143. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2144. // with awserr.Error's Code and Message methods to get detailed information about
  2145. // the error.
  2146. //
  2147. // See the AWS API reference guide for Amazon WorkMail's
  2148. // API operation ListMailboxPermissions for usage and error information.
  2149. //
  2150. // Returned Error Codes:
  2151. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2152. // The identifier supplied for the entity is valid, but it does not exist in
  2153. // your organization.
  2154. //
  2155. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2156. // One or more of the input parameters don't match the service's restrictions.
  2157. //
  2158. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2159. // An operation received a valid organization identifier that either doesn't
  2160. // belong or exist in the system.
  2161. //
  2162. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2163. // The organization must have a valid state (Active or Synchronizing) to perform
  2164. // certain operations on the organization or its entities.
  2165. //
  2166. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListMailboxPermissions
  2167. func (c *WorkMail) ListMailboxPermissions(input *ListMailboxPermissionsInput) (*ListMailboxPermissionsOutput, error) {
  2168. req, out := c.ListMailboxPermissionsRequest(input)
  2169. return out, req.Send()
  2170. }
  2171. // ListMailboxPermissionsWithContext is the same as ListMailboxPermissions with the addition of
  2172. // the ability to pass a context and additional request options.
  2173. //
  2174. // See ListMailboxPermissions for details on how to use this API operation.
  2175. //
  2176. // The context must be non-nil and will be used for request cancellation. If
  2177. // the context is nil a panic will occur. In the future the SDK may create
  2178. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2179. // for more information on using Contexts.
  2180. func (c *WorkMail) ListMailboxPermissionsWithContext(ctx aws.Context, input *ListMailboxPermissionsInput, opts ...request.Option) (*ListMailboxPermissionsOutput, error) {
  2181. req, out := c.ListMailboxPermissionsRequest(input)
  2182. req.SetContext(ctx)
  2183. req.ApplyOptions(opts...)
  2184. return out, req.Send()
  2185. }
  2186. // ListMailboxPermissionsPages iterates over the pages of a ListMailboxPermissions operation,
  2187. // calling the "fn" function with the response data for each page. To stop
  2188. // iterating, return false from the fn function.
  2189. //
  2190. // See ListMailboxPermissions method for more information on how to use this operation.
  2191. //
  2192. // Note: This operation can generate multiple requests to a service.
  2193. //
  2194. // // Example iterating over at most 3 pages of a ListMailboxPermissions operation.
  2195. // pageNum := 0
  2196. // err := client.ListMailboxPermissionsPages(params,
  2197. // func(page *ListMailboxPermissionsOutput, lastPage bool) bool {
  2198. // pageNum++
  2199. // fmt.Println(page)
  2200. // return pageNum <= 3
  2201. // })
  2202. //
  2203. func (c *WorkMail) ListMailboxPermissionsPages(input *ListMailboxPermissionsInput, fn func(*ListMailboxPermissionsOutput, bool) bool) error {
  2204. return c.ListMailboxPermissionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2205. }
  2206. // ListMailboxPermissionsPagesWithContext same as ListMailboxPermissionsPages except
  2207. // it takes a Context and allows setting request options on the pages.
  2208. //
  2209. // The context must be non-nil and will be used for request cancellation. If
  2210. // the context is nil a panic will occur. In the future the SDK may create
  2211. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2212. // for more information on using Contexts.
  2213. func (c *WorkMail) ListMailboxPermissionsPagesWithContext(ctx aws.Context, input *ListMailboxPermissionsInput, fn func(*ListMailboxPermissionsOutput, bool) bool, opts ...request.Option) error {
  2214. p := request.Pagination{
  2215. NewRequest: func() (*request.Request, error) {
  2216. var inCpy *ListMailboxPermissionsInput
  2217. if input != nil {
  2218. tmp := *input
  2219. inCpy = &tmp
  2220. }
  2221. req, _ := c.ListMailboxPermissionsRequest(inCpy)
  2222. req.SetContext(ctx)
  2223. req.ApplyOptions(opts...)
  2224. return req, nil
  2225. },
  2226. }
  2227. cont := true
  2228. for p.Next() && cont {
  2229. cont = fn(p.Page().(*ListMailboxPermissionsOutput), !p.HasNextPage())
  2230. }
  2231. return p.Err()
  2232. }
  2233. const opListOrganizations = "ListOrganizations"
  2234. // ListOrganizationsRequest generates a "aws/request.Request" representing the
  2235. // client's request for the ListOrganizations operation. The "output" return
  2236. // value will be populated with the request's response once the request completes
  2237. // successfully.
  2238. //
  2239. // Use "Send" method on the returned Request to send the API call to the service.
  2240. // the "output" return value is not valid until after Send returns without error.
  2241. //
  2242. // See ListOrganizations for more information on using the ListOrganizations
  2243. // API call, and error handling.
  2244. //
  2245. // This method is useful when you want to inject custom logic or configuration
  2246. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2247. //
  2248. //
  2249. // // Example sending a request using the ListOrganizationsRequest method.
  2250. // req, resp := client.ListOrganizationsRequest(params)
  2251. //
  2252. // err := req.Send()
  2253. // if err == nil { // resp is now filled
  2254. // fmt.Println(resp)
  2255. // }
  2256. //
  2257. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations
  2258. func (c *WorkMail) ListOrganizationsRequest(input *ListOrganizationsInput) (req *request.Request, output *ListOrganizationsOutput) {
  2259. op := &request.Operation{
  2260. Name: opListOrganizations,
  2261. HTTPMethod: "POST",
  2262. HTTPPath: "/",
  2263. Paginator: &request.Paginator{
  2264. InputTokens: []string{"NextToken"},
  2265. OutputTokens: []string{"NextToken"},
  2266. LimitToken: "MaxResults",
  2267. TruncationToken: "",
  2268. },
  2269. }
  2270. if input == nil {
  2271. input = &ListOrganizationsInput{}
  2272. }
  2273. output = &ListOrganizationsOutput{}
  2274. req = c.newRequest(op, input, output)
  2275. return
  2276. }
  2277. // ListOrganizations API operation for Amazon WorkMail.
  2278. //
  2279. // Returns summaries of the customer's non-deleted organizations.
  2280. //
  2281. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2282. // with awserr.Error's Code and Message methods to get detailed information about
  2283. // the error.
  2284. //
  2285. // See the AWS API reference guide for Amazon WorkMail's
  2286. // API operation ListOrganizations for usage and error information.
  2287. //
  2288. // Returned Error Codes:
  2289. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2290. // One or more of the input parameters don't match the service's restrictions.
  2291. //
  2292. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations
  2293. func (c *WorkMail) ListOrganizations(input *ListOrganizationsInput) (*ListOrganizationsOutput, error) {
  2294. req, out := c.ListOrganizationsRequest(input)
  2295. return out, req.Send()
  2296. }
  2297. // ListOrganizationsWithContext is the same as ListOrganizations with the addition of
  2298. // the ability to pass a context and additional request options.
  2299. //
  2300. // See ListOrganizations for details on how to use this API operation.
  2301. //
  2302. // The context must be non-nil and will be used for request cancellation. If
  2303. // the context is nil a panic will occur. In the future the SDK may create
  2304. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2305. // for more information on using Contexts.
  2306. func (c *WorkMail) ListOrganizationsWithContext(ctx aws.Context, input *ListOrganizationsInput, opts ...request.Option) (*ListOrganizationsOutput, error) {
  2307. req, out := c.ListOrganizationsRequest(input)
  2308. req.SetContext(ctx)
  2309. req.ApplyOptions(opts...)
  2310. return out, req.Send()
  2311. }
  2312. // ListOrganizationsPages iterates over the pages of a ListOrganizations operation,
  2313. // calling the "fn" function with the response data for each page. To stop
  2314. // iterating, return false from the fn function.
  2315. //
  2316. // See ListOrganizations method for more information on how to use this operation.
  2317. //
  2318. // Note: This operation can generate multiple requests to a service.
  2319. //
  2320. // // Example iterating over at most 3 pages of a ListOrganizations operation.
  2321. // pageNum := 0
  2322. // err := client.ListOrganizationsPages(params,
  2323. // func(page *ListOrganizationsOutput, lastPage bool) bool {
  2324. // pageNum++
  2325. // fmt.Println(page)
  2326. // return pageNum <= 3
  2327. // })
  2328. //
  2329. func (c *WorkMail) ListOrganizationsPages(input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool) error {
  2330. return c.ListOrganizationsPagesWithContext(aws.BackgroundContext(), input, fn)
  2331. }
  2332. // ListOrganizationsPagesWithContext same as ListOrganizationsPages except
  2333. // it takes a Context and allows setting request options on the pages.
  2334. //
  2335. // The context must be non-nil and will be used for request cancellation. If
  2336. // the context is nil a panic will occur. In the future the SDK may create
  2337. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2338. // for more information on using Contexts.
  2339. func (c *WorkMail) ListOrganizationsPagesWithContext(ctx aws.Context, input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool, opts ...request.Option) error {
  2340. p := request.Pagination{
  2341. NewRequest: func() (*request.Request, error) {
  2342. var inCpy *ListOrganizationsInput
  2343. if input != nil {
  2344. tmp := *input
  2345. inCpy = &tmp
  2346. }
  2347. req, _ := c.ListOrganizationsRequest(inCpy)
  2348. req.SetContext(ctx)
  2349. req.ApplyOptions(opts...)
  2350. return req, nil
  2351. },
  2352. }
  2353. cont := true
  2354. for p.Next() && cont {
  2355. cont = fn(p.Page().(*ListOrganizationsOutput), !p.HasNextPage())
  2356. }
  2357. return p.Err()
  2358. }
  2359. const opListResourceDelegates = "ListResourceDelegates"
  2360. // ListResourceDelegatesRequest generates a "aws/request.Request" representing the
  2361. // client's request for the ListResourceDelegates operation. The "output" return
  2362. // value will be populated with the request's response once the request completes
  2363. // successfully.
  2364. //
  2365. // Use "Send" method on the returned Request to send the API call to the service.
  2366. // the "output" return value is not valid until after Send returns without error.
  2367. //
  2368. // See ListResourceDelegates for more information on using the ListResourceDelegates
  2369. // API call, and error handling.
  2370. //
  2371. // This method is useful when you want to inject custom logic or configuration
  2372. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2373. //
  2374. //
  2375. // // Example sending a request using the ListResourceDelegatesRequest method.
  2376. // req, resp := client.ListResourceDelegatesRequest(params)
  2377. //
  2378. // err := req.Send()
  2379. // if err == nil { // resp is now filled
  2380. // fmt.Println(resp)
  2381. // }
  2382. //
  2383. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates
  2384. func (c *WorkMail) ListResourceDelegatesRequest(input *ListResourceDelegatesInput) (req *request.Request, output *ListResourceDelegatesOutput) {
  2385. op := &request.Operation{
  2386. Name: opListResourceDelegates,
  2387. HTTPMethod: "POST",
  2388. HTTPPath: "/",
  2389. }
  2390. if input == nil {
  2391. input = &ListResourceDelegatesInput{}
  2392. }
  2393. output = &ListResourceDelegatesOutput{}
  2394. req = c.newRequest(op, input, output)
  2395. return
  2396. }
  2397. // ListResourceDelegates API operation for Amazon WorkMail.
  2398. //
  2399. // Lists the delegates associated with a resource. Users and groups can be resource
  2400. // delegates and answer requests on behalf of the resource.
  2401. //
  2402. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2403. // with awserr.Error's Code and Message methods to get detailed information about
  2404. // the error.
  2405. //
  2406. // See the AWS API reference guide for Amazon WorkMail's
  2407. // API operation ListResourceDelegates for usage and error information.
  2408. //
  2409. // Returned Error Codes:
  2410. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2411. // The identifier supplied for the entity is valid, but it does not exist in
  2412. // your organization.
  2413. //
  2414. // * ErrCodeEntityStateException "EntityStateException"
  2415. // You are performing an operation on an entity that isn't in the expected state,
  2416. // such as trying to update a deleted user.
  2417. //
  2418. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2419. // One or more of the input parameters don't match the service's restrictions.
  2420. //
  2421. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2422. // An operation received a valid organization identifier that either doesn't
  2423. // belong or exist in the system.
  2424. //
  2425. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2426. // The organization must have a valid state (Active or Synchronizing) to perform
  2427. // certain operations on the organization or its entities.
  2428. //
  2429. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates
  2430. func (c *WorkMail) ListResourceDelegates(input *ListResourceDelegatesInput) (*ListResourceDelegatesOutput, error) {
  2431. req, out := c.ListResourceDelegatesRequest(input)
  2432. return out, req.Send()
  2433. }
  2434. // ListResourceDelegatesWithContext is the same as ListResourceDelegates with the addition of
  2435. // the ability to pass a context and additional request options.
  2436. //
  2437. // See ListResourceDelegates for details on how to use this API operation.
  2438. //
  2439. // The context must be non-nil and will be used for request cancellation. If
  2440. // the context is nil a panic will occur. In the future the SDK may create
  2441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2442. // for more information on using Contexts.
  2443. func (c *WorkMail) ListResourceDelegatesWithContext(ctx aws.Context, input *ListResourceDelegatesInput, opts ...request.Option) (*ListResourceDelegatesOutput, error) {
  2444. req, out := c.ListResourceDelegatesRequest(input)
  2445. req.SetContext(ctx)
  2446. req.ApplyOptions(opts...)
  2447. return out, req.Send()
  2448. }
  2449. const opListResources = "ListResources"
  2450. // ListResourcesRequest generates a "aws/request.Request" representing the
  2451. // client's request for the ListResources operation. The "output" return
  2452. // value will be populated with the request's response once the request completes
  2453. // successfully.
  2454. //
  2455. // Use "Send" method on the returned Request to send the API call to the service.
  2456. // the "output" return value is not valid until after Send returns without error.
  2457. //
  2458. // See ListResources for more information on using the ListResources
  2459. // API call, and error handling.
  2460. //
  2461. // This method is useful when you want to inject custom logic or configuration
  2462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2463. //
  2464. //
  2465. // // Example sending a request using the ListResourcesRequest method.
  2466. // req, resp := client.ListResourcesRequest(params)
  2467. //
  2468. // err := req.Send()
  2469. // if err == nil { // resp is now filled
  2470. // fmt.Println(resp)
  2471. // }
  2472. //
  2473. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources
  2474. func (c *WorkMail) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) {
  2475. op := &request.Operation{
  2476. Name: opListResources,
  2477. HTTPMethod: "POST",
  2478. HTTPPath: "/",
  2479. Paginator: &request.Paginator{
  2480. InputTokens: []string{"NextToken"},
  2481. OutputTokens: []string{"NextToken"},
  2482. LimitToken: "MaxResults",
  2483. TruncationToken: "",
  2484. },
  2485. }
  2486. if input == nil {
  2487. input = &ListResourcesInput{}
  2488. }
  2489. output = &ListResourcesOutput{}
  2490. req = c.newRequest(op, input, output)
  2491. return
  2492. }
  2493. // ListResources API operation for Amazon WorkMail.
  2494. //
  2495. // Returns summaries of the organization's resources.
  2496. //
  2497. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2498. // with awserr.Error's Code and Message methods to get detailed information about
  2499. // the error.
  2500. //
  2501. // See the AWS API reference guide for Amazon WorkMail's
  2502. // API operation ListResources for usage and error information.
  2503. //
  2504. // Returned Error Codes:
  2505. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2506. // One or more of the input parameters don't match the service's restrictions.
  2507. //
  2508. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2509. // An operation received a valid organization identifier that either doesn't
  2510. // belong or exist in the system.
  2511. //
  2512. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2513. // The organization must have a valid state (Active or Synchronizing) to perform
  2514. // certain operations on the organization or its entities.
  2515. //
  2516. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources
  2517. func (c *WorkMail) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) {
  2518. req, out := c.ListResourcesRequest(input)
  2519. return out, req.Send()
  2520. }
  2521. // ListResourcesWithContext is the same as ListResources with the addition of
  2522. // the ability to pass a context and additional request options.
  2523. //
  2524. // See ListResources for details on how to use this API operation.
  2525. //
  2526. // The context must be non-nil and will be used for request cancellation. If
  2527. // the context is nil a panic will occur. In the future the SDK may create
  2528. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2529. // for more information on using Contexts.
  2530. func (c *WorkMail) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) {
  2531. req, out := c.ListResourcesRequest(input)
  2532. req.SetContext(ctx)
  2533. req.ApplyOptions(opts...)
  2534. return out, req.Send()
  2535. }
  2536. // ListResourcesPages iterates over the pages of a ListResources operation,
  2537. // calling the "fn" function with the response data for each page. To stop
  2538. // iterating, return false from the fn function.
  2539. //
  2540. // See ListResources method for more information on how to use this operation.
  2541. //
  2542. // Note: This operation can generate multiple requests to a service.
  2543. //
  2544. // // Example iterating over at most 3 pages of a ListResources operation.
  2545. // pageNum := 0
  2546. // err := client.ListResourcesPages(params,
  2547. // func(page *ListResourcesOutput, lastPage bool) bool {
  2548. // pageNum++
  2549. // fmt.Println(page)
  2550. // return pageNum <= 3
  2551. // })
  2552. //
  2553. func (c *WorkMail) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error {
  2554. return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
  2555. }
  2556. // ListResourcesPagesWithContext same as ListResourcesPages except
  2557. // it takes a Context and allows setting request options on the pages.
  2558. //
  2559. // The context must be non-nil and will be used for request cancellation. If
  2560. // the context is nil a panic will occur. In the future the SDK may create
  2561. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2562. // for more information on using Contexts.
  2563. func (c *WorkMail) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error {
  2564. p := request.Pagination{
  2565. NewRequest: func() (*request.Request, error) {
  2566. var inCpy *ListResourcesInput
  2567. if input != nil {
  2568. tmp := *input
  2569. inCpy = &tmp
  2570. }
  2571. req, _ := c.ListResourcesRequest(inCpy)
  2572. req.SetContext(ctx)
  2573. req.ApplyOptions(opts...)
  2574. return req, nil
  2575. },
  2576. }
  2577. cont := true
  2578. for p.Next() && cont {
  2579. cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage())
  2580. }
  2581. return p.Err()
  2582. }
  2583. const opListUsers = "ListUsers"
  2584. // ListUsersRequest generates a "aws/request.Request" representing the
  2585. // client's request for the ListUsers operation. The "output" return
  2586. // value will be populated with the request's response once the request completes
  2587. // successfully.
  2588. //
  2589. // Use "Send" method on the returned Request to send the API call to the service.
  2590. // the "output" return value is not valid until after Send returns without error.
  2591. //
  2592. // See ListUsers for more information on using the ListUsers
  2593. // API call, and error handling.
  2594. //
  2595. // This method is useful when you want to inject custom logic or configuration
  2596. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2597. //
  2598. //
  2599. // // Example sending a request using the ListUsersRequest method.
  2600. // req, resp := client.ListUsersRequest(params)
  2601. //
  2602. // err := req.Send()
  2603. // if err == nil { // resp is now filled
  2604. // fmt.Println(resp)
  2605. // }
  2606. //
  2607. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers
  2608. func (c *WorkMail) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) {
  2609. op := &request.Operation{
  2610. Name: opListUsers,
  2611. HTTPMethod: "POST",
  2612. HTTPPath: "/",
  2613. Paginator: &request.Paginator{
  2614. InputTokens: []string{"NextToken"},
  2615. OutputTokens: []string{"NextToken"},
  2616. LimitToken: "MaxResults",
  2617. TruncationToken: "",
  2618. },
  2619. }
  2620. if input == nil {
  2621. input = &ListUsersInput{}
  2622. }
  2623. output = &ListUsersOutput{}
  2624. req = c.newRequest(op, input, output)
  2625. return
  2626. }
  2627. // ListUsers API operation for Amazon WorkMail.
  2628. //
  2629. // Returns summaries of the organization's users.
  2630. //
  2631. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2632. // with awserr.Error's Code and Message methods to get detailed information about
  2633. // the error.
  2634. //
  2635. // See the AWS API reference guide for Amazon WorkMail's
  2636. // API operation ListUsers for usage and error information.
  2637. //
  2638. // Returned Error Codes:
  2639. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2640. // One or more of the input parameters don't match the service's restrictions.
  2641. //
  2642. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2643. // An operation received a valid organization identifier that either doesn't
  2644. // belong or exist in the system.
  2645. //
  2646. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2647. // The organization must have a valid state (Active or Synchronizing) to perform
  2648. // certain operations on the organization or its entities.
  2649. //
  2650. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers
  2651. func (c *WorkMail) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) {
  2652. req, out := c.ListUsersRequest(input)
  2653. return out, req.Send()
  2654. }
  2655. // ListUsersWithContext is the same as ListUsers with the addition of
  2656. // the ability to pass a context and additional request options.
  2657. //
  2658. // See ListUsers for details on how to use this API operation.
  2659. //
  2660. // The context must be non-nil and will be used for request cancellation. If
  2661. // the context is nil a panic will occur. In the future the SDK may create
  2662. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2663. // for more information on using Contexts.
  2664. func (c *WorkMail) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) {
  2665. req, out := c.ListUsersRequest(input)
  2666. req.SetContext(ctx)
  2667. req.ApplyOptions(opts...)
  2668. return out, req.Send()
  2669. }
  2670. // ListUsersPages iterates over the pages of a ListUsers operation,
  2671. // calling the "fn" function with the response data for each page. To stop
  2672. // iterating, return false from the fn function.
  2673. //
  2674. // See ListUsers method for more information on how to use this operation.
  2675. //
  2676. // Note: This operation can generate multiple requests to a service.
  2677. //
  2678. // // Example iterating over at most 3 pages of a ListUsers operation.
  2679. // pageNum := 0
  2680. // err := client.ListUsersPages(params,
  2681. // func(page *ListUsersOutput, lastPage bool) bool {
  2682. // pageNum++
  2683. // fmt.Println(page)
  2684. // return pageNum <= 3
  2685. // })
  2686. //
  2687. func (c *WorkMail) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error {
  2688. return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn)
  2689. }
  2690. // ListUsersPagesWithContext same as ListUsersPages except
  2691. // it takes a Context and allows setting request options on the pages.
  2692. //
  2693. // The context must be non-nil and will be used for request cancellation. If
  2694. // the context is nil a panic will occur. In the future the SDK may create
  2695. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2696. // for more information on using Contexts.
  2697. func (c *WorkMail) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error {
  2698. p := request.Pagination{
  2699. NewRequest: func() (*request.Request, error) {
  2700. var inCpy *ListUsersInput
  2701. if input != nil {
  2702. tmp := *input
  2703. inCpy = &tmp
  2704. }
  2705. req, _ := c.ListUsersRequest(inCpy)
  2706. req.SetContext(ctx)
  2707. req.ApplyOptions(opts...)
  2708. return req, nil
  2709. },
  2710. }
  2711. cont := true
  2712. for p.Next() && cont {
  2713. cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage())
  2714. }
  2715. return p.Err()
  2716. }
  2717. const opPutMailboxPermissions = "PutMailboxPermissions"
  2718. // PutMailboxPermissionsRequest generates a "aws/request.Request" representing the
  2719. // client's request for the PutMailboxPermissions operation. The "output" return
  2720. // value will be populated with the request's response once the request completes
  2721. // successfully.
  2722. //
  2723. // Use "Send" method on the returned Request to send the API call to the service.
  2724. // the "output" return value is not valid until after Send returns without error.
  2725. //
  2726. // See PutMailboxPermissions for more information on using the PutMailboxPermissions
  2727. // API call, and error handling.
  2728. //
  2729. // This method is useful when you want to inject custom logic or configuration
  2730. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2731. //
  2732. //
  2733. // // Example sending a request using the PutMailboxPermissionsRequest method.
  2734. // req, resp := client.PutMailboxPermissionsRequest(params)
  2735. //
  2736. // err := req.Send()
  2737. // if err == nil { // resp is now filled
  2738. // fmt.Println(resp)
  2739. // }
  2740. //
  2741. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutMailboxPermissions
  2742. func (c *WorkMail) PutMailboxPermissionsRequest(input *PutMailboxPermissionsInput) (req *request.Request, output *PutMailboxPermissionsOutput) {
  2743. op := &request.Operation{
  2744. Name: opPutMailboxPermissions,
  2745. HTTPMethod: "POST",
  2746. HTTPPath: "/",
  2747. }
  2748. if input == nil {
  2749. input = &PutMailboxPermissionsInput{}
  2750. }
  2751. output = &PutMailboxPermissionsOutput{}
  2752. req = c.newRequest(op, input, output)
  2753. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2754. return
  2755. }
  2756. // PutMailboxPermissions API operation for Amazon WorkMail.
  2757. //
  2758. // Sets permissions for a user or group. This replaces any pre-existing permissions
  2759. // set for the entity.
  2760. //
  2761. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2762. // with awserr.Error's Code and Message methods to get detailed information about
  2763. // the error.
  2764. //
  2765. // See the AWS API reference guide for Amazon WorkMail's
  2766. // API operation PutMailboxPermissions for usage and error information.
  2767. //
  2768. // Returned Error Codes:
  2769. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2770. // The identifier supplied for the entity is valid, but it does not exist in
  2771. // your organization.
  2772. //
  2773. // * ErrCodeEntityStateException "EntityStateException"
  2774. // You are performing an operation on an entity that isn't in the expected state,
  2775. // such as trying to update a deleted user.
  2776. //
  2777. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2778. // One or more of the input parameters don't match the service's restrictions.
  2779. //
  2780. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2781. // An operation received a valid organization identifier that either doesn't
  2782. // belong or exist in the system.
  2783. //
  2784. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2785. // The organization must have a valid state (Active or Synchronizing) to perform
  2786. // certain operations on the organization or its entities.
  2787. //
  2788. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutMailboxPermissions
  2789. func (c *WorkMail) PutMailboxPermissions(input *PutMailboxPermissionsInput) (*PutMailboxPermissionsOutput, error) {
  2790. req, out := c.PutMailboxPermissionsRequest(input)
  2791. return out, req.Send()
  2792. }
  2793. // PutMailboxPermissionsWithContext is the same as PutMailboxPermissions with the addition of
  2794. // the ability to pass a context and additional request options.
  2795. //
  2796. // See PutMailboxPermissions 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 *WorkMail) PutMailboxPermissionsWithContext(ctx aws.Context, input *PutMailboxPermissionsInput, opts ...request.Option) (*PutMailboxPermissionsOutput, error) {
  2803. req, out := c.PutMailboxPermissionsRequest(input)
  2804. req.SetContext(ctx)
  2805. req.ApplyOptions(opts...)
  2806. return out, req.Send()
  2807. }
  2808. const opRegisterToWorkMail = "RegisterToWorkMail"
  2809. // RegisterToWorkMailRequest generates a "aws/request.Request" representing the
  2810. // client's request for the RegisterToWorkMail 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 RegisterToWorkMail for more information on using the RegisterToWorkMail
  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 RegisterToWorkMailRequest method.
  2825. // req, resp := client.RegisterToWorkMailRequest(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/workmail-2017-10-01/RegisterToWorkMail
  2833. func (c *WorkMail) RegisterToWorkMailRequest(input *RegisterToWorkMailInput) (req *request.Request, output *RegisterToWorkMailOutput) {
  2834. op := &request.Operation{
  2835. Name: opRegisterToWorkMail,
  2836. HTTPMethod: "POST",
  2837. HTTPPath: "/",
  2838. }
  2839. if input == nil {
  2840. input = &RegisterToWorkMailInput{}
  2841. }
  2842. output = &RegisterToWorkMailOutput{}
  2843. req = c.newRequest(op, input, output)
  2844. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2845. return
  2846. }
  2847. // RegisterToWorkMail API operation for Amazon WorkMail.
  2848. //
  2849. // Registers an existing and disabled user, group, or resource/entity for Amazon
  2850. // WorkMail use by associating a mailbox and calendaring capabilities. It performs
  2851. // no change if the entity is enabled and fails if the entity is deleted. This
  2852. // operation results in the accumulation of costs. For more information, see
  2853. // Pricing (http://aws.amazon.com/workmail/pricing). The equivalent console
  2854. // functionality for this operation is Enable. Users can either be created by
  2855. // calling the CreateUser API or they can be synchronized from your directory.
  2856. // For more information, see DeregisterFromWorkMail.
  2857. //
  2858. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2859. // with awserr.Error's Code and Message methods to get detailed information about
  2860. // the error.
  2861. //
  2862. // See the AWS API reference guide for Amazon WorkMail's
  2863. // API operation RegisterToWorkMail for usage and error information.
  2864. //
  2865. // Returned Error Codes:
  2866. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  2867. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  2868. // WorkMail service.
  2869. //
  2870. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  2871. // The directory that you are trying to perform operations on isn't available.
  2872. //
  2873. // * ErrCodeEmailAddressInUseException "EmailAddressInUseException"
  2874. // The email address that you're trying to assign is already created for a different
  2875. // user, group, or resource.
  2876. //
  2877. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2878. // The identifier supplied for the entity is valid, but it does not exist in
  2879. // your organization.
  2880. //
  2881. // * ErrCodeEntityStateException "EntityStateException"
  2882. // You are performing an operation on an entity that isn't in the expected state,
  2883. // such as trying to update a deleted user.
  2884. //
  2885. // * ErrCodeEntityAlreadyRegisteredException "EntityAlreadyRegisteredException"
  2886. // The user, group, or resource that you're trying to register is already registered.
  2887. //
  2888. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2889. // One or more of the input parameters don't match the service's restrictions.
  2890. //
  2891. // * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException"
  2892. // For an email or alias to be created in Amazon WorkMail, the included domain
  2893. // must be defined in the organization.
  2894. //
  2895. // * ErrCodeMailDomainStateException "MailDomainStateException"
  2896. // After a domain has been added to the organization, it must be verified. The
  2897. // domain is not yet verified.
  2898. //
  2899. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  2900. // An operation received a valid organization identifier that either doesn't
  2901. // belong or exist in the system.
  2902. //
  2903. // * ErrCodeOrganizationStateException "OrganizationStateException"
  2904. // The organization must have a valid state (Active or Synchronizing) to perform
  2905. // certain operations on the organization or its entities.
  2906. //
  2907. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail
  2908. func (c *WorkMail) RegisterToWorkMail(input *RegisterToWorkMailInput) (*RegisterToWorkMailOutput, error) {
  2909. req, out := c.RegisterToWorkMailRequest(input)
  2910. return out, req.Send()
  2911. }
  2912. // RegisterToWorkMailWithContext is the same as RegisterToWorkMail with the addition of
  2913. // the ability to pass a context and additional request options.
  2914. //
  2915. // See RegisterToWorkMail for details on how to use this API operation.
  2916. //
  2917. // The context must be non-nil and will be used for request cancellation. If
  2918. // the context is nil a panic will occur. In the future the SDK may create
  2919. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2920. // for more information on using Contexts.
  2921. func (c *WorkMail) RegisterToWorkMailWithContext(ctx aws.Context, input *RegisterToWorkMailInput, opts ...request.Option) (*RegisterToWorkMailOutput, error) {
  2922. req, out := c.RegisterToWorkMailRequest(input)
  2923. req.SetContext(ctx)
  2924. req.ApplyOptions(opts...)
  2925. return out, req.Send()
  2926. }
  2927. const opResetPassword = "ResetPassword"
  2928. // ResetPasswordRequest generates a "aws/request.Request" representing the
  2929. // client's request for the ResetPassword operation. The "output" return
  2930. // value will be populated with the request's response once the request completes
  2931. // successfully.
  2932. //
  2933. // Use "Send" method on the returned Request to send the API call to the service.
  2934. // the "output" return value is not valid until after Send returns without error.
  2935. //
  2936. // See ResetPassword for more information on using the ResetPassword
  2937. // API call, and error handling.
  2938. //
  2939. // This method is useful when you want to inject custom logic or configuration
  2940. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2941. //
  2942. //
  2943. // // Example sending a request using the ResetPasswordRequest method.
  2944. // req, resp := client.ResetPasswordRequest(params)
  2945. //
  2946. // err := req.Send()
  2947. // if err == nil { // resp is now filled
  2948. // fmt.Println(resp)
  2949. // }
  2950. //
  2951. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword
  2952. func (c *WorkMail) ResetPasswordRequest(input *ResetPasswordInput) (req *request.Request, output *ResetPasswordOutput) {
  2953. op := &request.Operation{
  2954. Name: opResetPassword,
  2955. HTTPMethod: "POST",
  2956. HTTPPath: "/",
  2957. }
  2958. if input == nil {
  2959. input = &ResetPasswordInput{}
  2960. }
  2961. output = &ResetPasswordOutput{}
  2962. req = c.newRequest(op, input, output)
  2963. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2964. return
  2965. }
  2966. // ResetPassword API operation for Amazon WorkMail.
  2967. //
  2968. // Allows the administrator to reset the password for a user.
  2969. //
  2970. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2971. // with awserr.Error's Code and Message methods to get detailed information about
  2972. // the error.
  2973. //
  2974. // See the AWS API reference guide for Amazon WorkMail's
  2975. // API operation ResetPassword for usage and error information.
  2976. //
  2977. // Returned Error Codes:
  2978. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  2979. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  2980. // WorkMail service.
  2981. //
  2982. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  2983. // The directory that you are trying to perform operations on isn't available.
  2984. //
  2985. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  2986. // The identifier supplied for the entity is valid, but it does not exist in
  2987. // your organization.
  2988. //
  2989. // * ErrCodeEntityStateException "EntityStateException"
  2990. // You are performing an operation on an entity that isn't in the expected state,
  2991. // such as trying to update a deleted user.
  2992. //
  2993. // * ErrCodeInvalidParameterException "InvalidParameterException"
  2994. // One or more of the input parameters don't match the service's restrictions.
  2995. //
  2996. // * ErrCodeInvalidPasswordException "InvalidPasswordException"
  2997. // The supplied password doesn't match the minimum security constraints, such
  2998. // as length or use of special characters.
  2999. //
  3000. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  3001. // An operation received a valid organization identifier that either doesn't
  3002. // belong or exist in the system.
  3003. //
  3004. // * ErrCodeOrganizationStateException "OrganizationStateException"
  3005. // The organization must have a valid state (Active or Synchronizing) to perform
  3006. // certain operations on the organization or its entities.
  3007. //
  3008. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  3009. // You can't perform a write operation against a read-only directory.
  3010. //
  3011. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword
  3012. func (c *WorkMail) ResetPassword(input *ResetPasswordInput) (*ResetPasswordOutput, error) {
  3013. req, out := c.ResetPasswordRequest(input)
  3014. return out, req.Send()
  3015. }
  3016. // ResetPasswordWithContext is the same as ResetPassword with the addition of
  3017. // the ability to pass a context and additional request options.
  3018. //
  3019. // See ResetPassword for details on how to use this API operation.
  3020. //
  3021. // The context must be non-nil and will be used for request cancellation. If
  3022. // the context is nil a panic will occur. In the future the SDK may create
  3023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3024. // for more information on using Contexts.
  3025. func (c *WorkMail) ResetPasswordWithContext(ctx aws.Context, input *ResetPasswordInput, opts ...request.Option) (*ResetPasswordOutput, error) {
  3026. req, out := c.ResetPasswordRequest(input)
  3027. req.SetContext(ctx)
  3028. req.ApplyOptions(opts...)
  3029. return out, req.Send()
  3030. }
  3031. const opUpdatePrimaryEmailAddress = "UpdatePrimaryEmailAddress"
  3032. // UpdatePrimaryEmailAddressRequest generates a "aws/request.Request" representing the
  3033. // client's request for the UpdatePrimaryEmailAddress operation. The "output" return
  3034. // value will be populated with the request's response once the request completes
  3035. // successfully.
  3036. //
  3037. // Use "Send" method on the returned Request to send the API call to the service.
  3038. // the "output" return value is not valid until after Send returns without error.
  3039. //
  3040. // See UpdatePrimaryEmailAddress for more information on using the UpdatePrimaryEmailAddress
  3041. // API call, and error handling.
  3042. //
  3043. // This method is useful when you want to inject custom logic or configuration
  3044. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3045. //
  3046. //
  3047. // // Example sending a request using the UpdatePrimaryEmailAddressRequest method.
  3048. // req, resp := client.UpdatePrimaryEmailAddressRequest(params)
  3049. //
  3050. // err := req.Send()
  3051. // if err == nil { // resp is now filled
  3052. // fmt.Println(resp)
  3053. // }
  3054. //
  3055. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress
  3056. func (c *WorkMail) UpdatePrimaryEmailAddressRequest(input *UpdatePrimaryEmailAddressInput) (req *request.Request, output *UpdatePrimaryEmailAddressOutput) {
  3057. op := &request.Operation{
  3058. Name: opUpdatePrimaryEmailAddress,
  3059. HTTPMethod: "POST",
  3060. HTTPPath: "/",
  3061. }
  3062. if input == nil {
  3063. input = &UpdatePrimaryEmailAddressInput{}
  3064. }
  3065. output = &UpdatePrimaryEmailAddressOutput{}
  3066. req = c.newRequest(op, input, output)
  3067. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3068. return
  3069. }
  3070. // UpdatePrimaryEmailAddress API operation for Amazon WorkMail.
  3071. //
  3072. // Updates the primary email for an entity. The current email is moved into
  3073. // the list of aliases (or swapped between an existing alias and the current
  3074. // primary email) and the email provided in the input is promoted as the primary.
  3075. //
  3076. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3077. // with awserr.Error's Code and Message methods to get detailed information about
  3078. // the error.
  3079. //
  3080. // See the AWS API reference guide for Amazon WorkMail's
  3081. // API operation UpdatePrimaryEmailAddress for usage and error information.
  3082. //
  3083. // Returned Error Codes:
  3084. // * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException"
  3085. // The Directory Service doesn't recognize the credentials supplied by the Amazon
  3086. // WorkMail service.
  3087. //
  3088. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  3089. // The directory that you are trying to perform operations on isn't available.
  3090. //
  3091. // * ErrCodeEmailAddressInUseException "EmailAddressInUseException"
  3092. // The email address that you're trying to assign is already created for a different
  3093. // user, group, or resource.
  3094. //
  3095. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  3096. // The identifier supplied for the entity is valid, but it does not exist in
  3097. // your organization.
  3098. //
  3099. // * ErrCodeEntityStateException "EntityStateException"
  3100. // You are performing an operation on an entity that isn't in the expected state,
  3101. // such as trying to update a deleted user.
  3102. //
  3103. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3104. // One or more of the input parameters don't match the service's restrictions.
  3105. //
  3106. // * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException"
  3107. // For an email or alias to be created in Amazon WorkMail, the included domain
  3108. // must be defined in the organization.
  3109. //
  3110. // * ErrCodeMailDomainStateException "MailDomainStateException"
  3111. // After a domain has been added to the organization, it must be verified. The
  3112. // domain is not yet verified.
  3113. //
  3114. // * ErrCodeInvalidParameterException "InvalidParameterException"
  3115. // One or more of the input parameters don't match the service's restrictions.
  3116. //
  3117. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  3118. // An operation received a valid organization identifier that either doesn't
  3119. // belong or exist in the system.
  3120. //
  3121. // * ErrCodeOrganizationStateException "OrganizationStateException"
  3122. // The organization must have a valid state (Active or Synchronizing) to perform
  3123. // certain operations on the organization or its entities.
  3124. //
  3125. // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
  3126. // You can't perform a write operation against a read-only directory.
  3127. //
  3128. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress
  3129. func (c *WorkMail) UpdatePrimaryEmailAddress(input *UpdatePrimaryEmailAddressInput) (*UpdatePrimaryEmailAddressOutput, error) {
  3130. req, out := c.UpdatePrimaryEmailAddressRequest(input)
  3131. return out, req.Send()
  3132. }
  3133. // UpdatePrimaryEmailAddressWithContext is the same as UpdatePrimaryEmailAddress with the addition of
  3134. // the ability to pass a context and additional request options.
  3135. //
  3136. // See UpdatePrimaryEmailAddress for details on how to use this API operation.
  3137. //
  3138. // The context must be non-nil and will be used for request cancellation. If
  3139. // the context is nil a panic will occur. In the future the SDK may create
  3140. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3141. // for more information on using Contexts.
  3142. func (c *WorkMail) UpdatePrimaryEmailAddressWithContext(ctx aws.Context, input *UpdatePrimaryEmailAddressInput, opts ...request.Option) (*UpdatePrimaryEmailAddressOutput, error) {
  3143. req, out := c.UpdatePrimaryEmailAddressRequest(input)
  3144. req.SetContext(ctx)
  3145. req.ApplyOptions(opts...)
  3146. return out, req.Send()
  3147. }
  3148. const opUpdateResource = "UpdateResource"
  3149. // UpdateResourceRequest generates a "aws/request.Request" representing the
  3150. // client's request for the UpdateResource operation. The "output" return
  3151. // value will be populated with the request's response once the request completes
  3152. // successfully.
  3153. //
  3154. // Use "Send" method on the returned Request to send the API call to the service.
  3155. // the "output" return value is not valid until after Send returns without error.
  3156. //
  3157. // See UpdateResource for more information on using the UpdateResource
  3158. // API call, and error handling.
  3159. //
  3160. // This method is useful when you want to inject custom logic or configuration
  3161. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3162. //
  3163. //
  3164. // // Example sending a request using the UpdateResourceRequest method.
  3165. // req, resp := client.UpdateResourceRequest(params)
  3166. //
  3167. // err := req.Send()
  3168. // if err == nil { // resp is now filled
  3169. // fmt.Println(resp)
  3170. // }
  3171. //
  3172. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource
  3173. func (c *WorkMail) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *UpdateResourceOutput) {
  3174. op := &request.Operation{
  3175. Name: opUpdateResource,
  3176. HTTPMethod: "POST",
  3177. HTTPPath: "/",
  3178. }
  3179. if input == nil {
  3180. input = &UpdateResourceInput{}
  3181. }
  3182. output = &UpdateResourceOutput{}
  3183. req = c.newRequest(op, input, output)
  3184. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3185. return
  3186. }
  3187. // UpdateResource API operation for Amazon WorkMail.
  3188. //
  3189. // Updates data for the resource. It must be preceded by a describe call in
  3190. // order to have the latest information. The dataset in the request should be
  3191. // the one expected when performing another describe call.
  3192. //
  3193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3194. // with awserr.Error's Code and Message methods to get detailed information about
  3195. // the error.
  3196. //
  3197. // See the AWS API reference guide for Amazon WorkMail's
  3198. // API operation UpdateResource for usage and error information.
  3199. //
  3200. // Returned Error Codes:
  3201. // * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException"
  3202. // The directory that you are trying to perform operations on isn't available.
  3203. //
  3204. // * ErrCodeEntityNotFoundException "EntityNotFoundException"
  3205. // The identifier supplied for the entity is valid, but it does not exist in
  3206. // your organization.
  3207. //
  3208. // * ErrCodeEntityStateException "EntityStateException"
  3209. // You are performing an operation on an entity that isn't in the expected state,
  3210. // such as trying to update a deleted user.
  3211. //
  3212. // * ErrCodeInvalidConfigurationException "InvalidConfigurationException"
  3213. // The configuration for a resource isn't valid. A resource must either be able
  3214. // to auto-respond to requests or have at least one delegate associated that
  3215. // can do it on its behalf.
  3216. //
  3217. // * ErrCodeEmailAddressInUseException "EmailAddressInUseException"
  3218. // The email address that you're trying to assign is already created for a different
  3219. // user, group, or resource.
  3220. //
  3221. // * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException"
  3222. // For an email or alias to be created in Amazon WorkMail, the included domain
  3223. // must be defined in the organization.
  3224. //
  3225. // * ErrCodeMailDomainStateException "MailDomainStateException"
  3226. // After a domain has been added to the organization, it must be verified. The
  3227. // domain is not yet verified.
  3228. //
  3229. // * ErrCodeNameAvailabilityException "NameAvailabilityException"
  3230. // The entity (user, group, or user) name isn't unique in Amazon WorkMail.
  3231. //
  3232. // * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException"
  3233. // An operation received a valid organization identifier that either doesn't
  3234. // belong or exist in the system.
  3235. //
  3236. // * ErrCodeOrganizationStateException "OrganizationStateException"
  3237. // The organization must have a valid state (Active or Synchronizing) to perform
  3238. // certain operations on the organization or its entities.
  3239. //
  3240. // See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource
  3241. func (c *WorkMail) UpdateResource(input *UpdateResourceInput) (*UpdateResourceOutput, error) {
  3242. req, out := c.UpdateResourceRequest(input)
  3243. return out, req.Send()
  3244. }
  3245. // UpdateResourceWithContext is the same as UpdateResource with the addition of
  3246. // the ability to pass a context and additional request options.
  3247. //
  3248. // See UpdateResource for details on how to use this API operation.
  3249. //
  3250. // The context must be non-nil and will be used for request cancellation. If
  3251. // the context is nil a panic will occur. In the future the SDK may create
  3252. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3253. // for more information on using Contexts.
  3254. func (c *WorkMail) UpdateResourceWithContext(ctx aws.Context, input *UpdateResourceInput, opts ...request.Option) (*UpdateResourceOutput, error) {
  3255. req, out := c.UpdateResourceRequest(input)
  3256. req.SetContext(ctx)
  3257. req.ApplyOptions(opts...)
  3258. return out, req.Send()
  3259. }
  3260. type AssociateDelegateToResourceInput struct {
  3261. _ struct{} `type:"structure"`
  3262. // The member (user or group) to associate to the resource.
  3263. //
  3264. // EntityId is a required field
  3265. EntityId *string `min:"12" type:"string" required:"true"`
  3266. // The organization under which the resource exists.
  3267. //
  3268. // OrganizationId is a required field
  3269. OrganizationId *string `type:"string" required:"true"`
  3270. // The resource for which members are associated.
  3271. //
  3272. // ResourceId is a required field
  3273. ResourceId *string `type:"string" required:"true"`
  3274. }
  3275. // String returns the string representation
  3276. func (s AssociateDelegateToResourceInput) String() string {
  3277. return awsutil.Prettify(s)
  3278. }
  3279. // GoString returns the string representation
  3280. func (s AssociateDelegateToResourceInput) GoString() string {
  3281. return s.String()
  3282. }
  3283. // Validate inspects the fields of the type to determine if they are valid.
  3284. func (s *AssociateDelegateToResourceInput) Validate() error {
  3285. invalidParams := request.ErrInvalidParams{Context: "AssociateDelegateToResourceInput"}
  3286. if s.EntityId == nil {
  3287. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  3288. }
  3289. if s.EntityId != nil && len(*s.EntityId) < 12 {
  3290. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  3291. }
  3292. if s.OrganizationId == nil {
  3293. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3294. }
  3295. if s.ResourceId == nil {
  3296. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3297. }
  3298. if invalidParams.Len() > 0 {
  3299. return invalidParams
  3300. }
  3301. return nil
  3302. }
  3303. // SetEntityId sets the EntityId field's value.
  3304. func (s *AssociateDelegateToResourceInput) SetEntityId(v string) *AssociateDelegateToResourceInput {
  3305. s.EntityId = &v
  3306. return s
  3307. }
  3308. // SetOrganizationId sets the OrganizationId field's value.
  3309. func (s *AssociateDelegateToResourceInput) SetOrganizationId(v string) *AssociateDelegateToResourceInput {
  3310. s.OrganizationId = &v
  3311. return s
  3312. }
  3313. // SetResourceId sets the ResourceId field's value.
  3314. func (s *AssociateDelegateToResourceInput) SetResourceId(v string) *AssociateDelegateToResourceInput {
  3315. s.ResourceId = &v
  3316. return s
  3317. }
  3318. type AssociateDelegateToResourceOutput struct {
  3319. _ struct{} `type:"structure"`
  3320. }
  3321. // String returns the string representation
  3322. func (s AssociateDelegateToResourceOutput) String() string {
  3323. return awsutil.Prettify(s)
  3324. }
  3325. // GoString returns the string representation
  3326. func (s AssociateDelegateToResourceOutput) GoString() string {
  3327. return s.String()
  3328. }
  3329. type AssociateMemberToGroupInput struct {
  3330. _ struct{} `type:"structure"`
  3331. // The group for which the member is associated.
  3332. //
  3333. // GroupId is a required field
  3334. GroupId *string `min:"12" type:"string" required:"true"`
  3335. // The member to associate to the group.
  3336. //
  3337. // MemberId is a required field
  3338. MemberId *string `min:"12" type:"string" required:"true"`
  3339. // The organization under which the group exists.
  3340. //
  3341. // OrganizationId is a required field
  3342. OrganizationId *string `type:"string" required:"true"`
  3343. }
  3344. // String returns the string representation
  3345. func (s AssociateMemberToGroupInput) String() string {
  3346. return awsutil.Prettify(s)
  3347. }
  3348. // GoString returns the string representation
  3349. func (s AssociateMemberToGroupInput) GoString() string {
  3350. return s.String()
  3351. }
  3352. // Validate inspects the fields of the type to determine if they are valid.
  3353. func (s *AssociateMemberToGroupInput) Validate() error {
  3354. invalidParams := request.ErrInvalidParams{Context: "AssociateMemberToGroupInput"}
  3355. if s.GroupId == nil {
  3356. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  3357. }
  3358. if s.GroupId != nil && len(*s.GroupId) < 12 {
  3359. invalidParams.Add(request.NewErrParamMinLen("GroupId", 12))
  3360. }
  3361. if s.MemberId == nil {
  3362. invalidParams.Add(request.NewErrParamRequired("MemberId"))
  3363. }
  3364. if s.MemberId != nil && len(*s.MemberId) < 12 {
  3365. invalidParams.Add(request.NewErrParamMinLen("MemberId", 12))
  3366. }
  3367. if s.OrganizationId == nil {
  3368. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3369. }
  3370. if invalidParams.Len() > 0 {
  3371. return invalidParams
  3372. }
  3373. return nil
  3374. }
  3375. // SetGroupId sets the GroupId field's value.
  3376. func (s *AssociateMemberToGroupInput) SetGroupId(v string) *AssociateMemberToGroupInput {
  3377. s.GroupId = &v
  3378. return s
  3379. }
  3380. // SetMemberId sets the MemberId field's value.
  3381. func (s *AssociateMemberToGroupInput) SetMemberId(v string) *AssociateMemberToGroupInput {
  3382. s.MemberId = &v
  3383. return s
  3384. }
  3385. // SetOrganizationId sets the OrganizationId field's value.
  3386. func (s *AssociateMemberToGroupInput) SetOrganizationId(v string) *AssociateMemberToGroupInput {
  3387. s.OrganizationId = &v
  3388. return s
  3389. }
  3390. type AssociateMemberToGroupOutput struct {
  3391. _ struct{} `type:"structure"`
  3392. }
  3393. // String returns the string representation
  3394. func (s AssociateMemberToGroupOutput) String() string {
  3395. return awsutil.Prettify(s)
  3396. }
  3397. // GoString returns the string representation
  3398. func (s AssociateMemberToGroupOutput) GoString() string {
  3399. return s.String()
  3400. }
  3401. // At least one delegate must be associated to the resource to disable automatic
  3402. // replies from the resource.
  3403. type BookingOptions struct {
  3404. _ struct{} `type:"structure"`
  3405. // The resource's ability to automatically reply to requests. If disabled, delegates
  3406. // must be associated to the resource.
  3407. AutoAcceptRequests *bool `type:"boolean"`
  3408. // The resource's ability to automatically decline any conflicting requests.
  3409. AutoDeclineConflictingRequests *bool `type:"boolean"`
  3410. // The resource's ability to automatically decline any recurring requests.
  3411. AutoDeclineRecurringRequests *bool `type:"boolean"`
  3412. }
  3413. // String returns the string representation
  3414. func (s BookingOptions) String() string {
  3415. return awsutil.Prettify(s)
  3416. }
  3417. // GoString returns the string representation
  3418. func (s BookingOptions) GoString() string {
  3419. return s.String()
  3420. }
  3421. // SetAutoAcceptRequests sets the AutoAcceptRequests field's value.
  3422. func (s *BookingOptions) SetAutoAcceptRequests(v bool) *BookingOptions {
  3423. s.AutoAcceptRequests = &v
  3424. return s
  3425. }
  3426. // SetAutoDeclineConflictingRequests sets the AutoDeclineConflictingRequests field's value.
  3427. func (s *BookingOptions) SetAutoDeclineConflictingRequests(v bool) *BookingOptions {
  3428. s.AutoDeclineConflictingRequests = &v
  3429. return s
  3430. }
  3431. // SetAutoDeclineRecurringRequests sets the AutoDeclineRecurringRequests field's value.
  3432. func (s *BookingOptions) SetAutoDeclineRecurringRequests(v bool) *BookingOptions {
  3433. s.AutoDeclineRecurringRequests = &v
  3434. return s
  3435. }
  3436. type CreateAliasInput struct {
  3437. _ struct{} `type:"structure"`
  3438. // The alias to add to the user.
  3439. //
  3440. // Alias is a required field
  3441. Alias *string `min:"1" type:"string" required:"true"`
  3442. // The alias is added to this Amazon WorkMail entity.
  3443. //
  3444. // EntityId is a required field
  3445. EntityId *string `min:"12" type:"string" required:"true"`
  3446. // The organization under which the member exists.
  3447. //
  3448. // OrganizationId is a required field
  3449. OrganizationId *string `type:"string" required:"true"`
  3450. }
  3451. // String returns the string representation
  3452. func (s CreateAliasInput) String() string {
  3453. return awsutil.Prettify(s)
  3454. }
  3455. // GoString returns the string representation
  3456. func (s CreateAliasInput) GoString() string {
  3457. return s.String()
  3458. }
  3459. // Validate inspects the fields of the type to determine if they are valid.
  3460. func (s *CreateAliasInput) Validate() error {
  3461. invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
  3462. if s.Alias == nil {
  3463. invalidParams.Add(request.NewErrParamRequired("Alias"))
  3464. }
  3465. if s.Alias != nil && len(*s.Alias) < 1 {
  3466. invalidParams.Add(request.NewErrParamMinLen("Alias", 1))
  3467. }
  3468. if s.EntityId == nil {
  3469. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  3470. }
  3471. if s.EntityId != nil && len(*s.EntityId) < 12 {
  3472. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  3473. }
  3474. if s.OrganizationId == nil {
  3475. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3476. }
  3477. if invalidParams.Len() > 0 {
  3478. return invalidParams
  3479. }
  3480. return nil
  3481. }
  3482. // SetAlias sets the Alias field's value.
  3483. func (s *CreateAliasInput) SetAlias(v string) *CreateAliasInput {
  3484. s.Alias = &v
  3485. return s
  3486. }
  3487. // SetEntityId sets the EntityId field's value.
  3488. func (s *CreateAliasInput) SetEntityId(v string) *CreateAliasInput {
  3489. s.EntityId = &v
  3490. return s
  3491. }
  3492. // SetOrganizationId sets the OrganizationId field's value.
  3493. func (s *CreateAliasInput) SetOrganizationId(v string) *CreateAliasInput {
  3494. s.OrganizationId = &v
  3495. return s
  3496. }
  3497. type CreateAliasOutput struct {
  3498. _ struct{} `type:"structure"`
  3499. }
  3500. // String returns the string representation
  3501. func (s CreateAliasOutput) String() string {
  3502. return awsutil.Prettify(s)
  3503. }
  3504. // GoString returns the string representation
  3505. func (s CreateAliasOutput) GoString() string {
  3506. return s.String()
  3507. }
  3508. type CreateGroupInput struct {
  3509. _ struct{} `type:"structure"`
  3510. // The name of the group.
  3511. //
  3512. // Name is a required field
  3513. Name *string `min:"1" type:"string" required:"true"`
  3514. // The organization under which the group is to be created.
  3515. //
  3516. // OrganizationId is a required field
  3517. OrganizationId *string `type:"string" required:"true"`
  3518. }
  3519. // String returns the string representation
  3520. func (s CreateGroupInput) String() string {
  3521. return awsutil.Prettify(s)
  3522. }
  3523. // GoString returns the string representation
  3524. func (s CreateGroupInput) GoString() string {
  3525. return s.String()
  3526. }
  3527. // Validate inspects the fields of the type to determine if they are valid.
  3528. func (s *CreateGroupInput) Validate() error {
  3529. invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"}
  3530. if s.Name == nil {
  3531. invalidParams.Add(request.NewErrParamRequired("Name"))
  3532. }
  3533. if s.Name != nil && len(*s.Name) < 1 {
  3534. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3535. }
  3536. if s.OrganizationId == nil {
  3537. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3538. }
  3539. if invalidParams.Len() > 0 {
  3540. return invalidParams
  3541. }
  3542. return nil
  3543. }
  3544. // SetName sets the Name field's value.
  3545. func (s *CreateGroupInput) SetName(v string) *CreateGroupInput {
  3546. s.Name = &v
  3547. return s
  3548. }
  3549. // SetOrganizationId sets the OrganizationId field's value.
  3550. func (s *CreateGroupInput) SetOrganizationId(v string) *CreateGroupInput {
  3551. s.OrganizationId = &v
  3552. return s
  3553. }
  3554. type CreateGroupOutput struct {
  3555. _ struct{} `type:"structure"`
  3556. // The ID of the group.
  3557. GroupId *string `min:"12" type:"string"`
  3558. }
  3559. // String returns the string representation
  3560. func (s CreateGroupOutput) String() string {
  3561. return awsutil.Prettify(s)
  3562. }
  3563. // GoString returns the string representation
  3564. func (s CreateGroupOutput) GoString() string {
  3565. return s.String()
  3566. }
  3567. // SetGroupId sets the GroupId field's value.
  3568. func (s *CreateGroupOutput) SetGroupId(v string) *CreateGroupOutput {
  3569. s.GroupId = &v
  3570. return s
  3571. }
  3572. type CreateResourceInput struct {
  3573. _ struct{} `type:"structure"`
  3574. // The name of the created resource.
  3575. //
  3576. // Name is a required field
  3577. Name *string `min:"1" type:"string" required:"true"`
  3578. // The identifier associated with the organization for which the resource is
  3579. // created.
  3580. //
  3581. // OrganizationId is a required field
  3582. OrganizationId *string `type:"string" required:"true"`
  3583. // The type of the created resource.
  3584. //
  3585. // Type is a required field
  3586. Type *string `type:"string" required:"true" enum:"ResourceType"`
  3587. }
  3588. // String returns the string representation
  3589. func (s CreateResourceInput) String() string {
  3590. return awsutil.Prettify(s)
  3591. }
  3592. // GoString returns the string representation
  3593. func (s CreateResourceInput) GoString() string {
  3594. return s.String()
  3595. }
  3596. // Validate inspects the fields of the type to determine if they are valid.
  3597. func (s *CreateResourceInput) Validate() error {
  3598. invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"}
  3599. if s.Name == nil {
  3600. invalidParams.Add(request.NewErrParamRequired("Name"))
  3601. }
  3602. if s.Name != nil && len(*s.Name) < 1 {
  3603. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3604. }
  3605. if s.OrganizationId == nil {
  3606. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3607. }
  3608. if s.Type == nil {
  3609. invalidParams.Add(request.NewErrParamRequired("Type"))
  3610. }
  3611. if invalidParams.Len() > 0 {
  3612. return invalidParams
  3613. }
  3614. return nil
  3615. }
  3616. // SetName sets the Name field's value.
  3617. func (s *CreateResourceInput) SetName(v string) *CreateResourceInput {
  3618. s.Name = &v
  3619. return s
  3620. }
  3621. // SetOrganizationId sets the OrganizationId field's value.
  3622. func (s *CreateResourceInput) SetOrganizationId(v string) *CreateResourceInput {
  3623. s.OrganizationId = &v
  3624. return s
  3625. }
  3626. // SetType sets the Type field's value.
  3627. func (s *CreateResourceInput) SetType(v string) *CreateResourceInput {
  3628. s.Type = &v
  3629. return s
  3630. }
  3631. type CreateResourceOutput struct {
  3632. _ struct{} `type:"structure"`
  3633. // The identifier of the created resource.
  3634. ResourceId *string `type:"string"`
  3635. }
  3636. // String returns the string representation
  3637. func (s CreateResourceOutput) String() string {
  3638. return awsutil.Prettify(s)
  3639. }
  3640. // GoString returns the string representation
  3641. func (s CreateResourceOutput) GoString() string {
  3642. return s.String()
  3643. }
  3644. // SetResourceId sets the ResourceId field's value.
  3645. func (s *CreateResourceOutput) SetResourceId(v string) *CreateResourceOutput {
  3646. s.ResourceId = &v
  3647. return s
  3648. }
  3649. type CreateUserInput struct {
  3650. _ struct{} `type:"structure"`
  3651. // The display name for the user to be created.
  3652. //
  3653. // DisplayName is a required field
  3654. DisplayName *string `type:"string" required:"true"`
  3655. // The name for the user to be created.
  3656. //
  3657. // Name is a required field
  3658. Name *string `min:"1" type:"string" required:"true"`
  3659. // The identifier of the organization for which the user is created.
  3660. //
  3661. // OrganizationId is a required field
  3662. OrganizationId *string `type:"string" required:"true"`
  3663. // The password for the user to be created.
  3664. //
  3665. // Password is a required field
  3666. Password *string `type:"string" required:"true" sensitive:"true"`
  3667. }
  3668. // String returns the string representation
  3669. func (s CreateUserInput) String() string {
  3670. return awsutil.Prettify(s)
  3671. }
  3672. // GoString returns the string representation
  3673. func (s CreateUserInput) GoString() string {
  3674. return s.String()
  3675. }
  3676. // Validate inspects the fields of the type to determine if they are valid.
  3677. func (s *CreateUserInput) Validate() error {
  3678. invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"}
  3679. if s.DisplayName == nil {
  3680. invalidParams.Add(request.NewErrParamRequired("DisplayName"))
  3681. }
  3682. if s.Name == nil {
  3683. invalidParams.Add(request.NewErrParamRequired("Name"))
  3684. }
  3685. if s.Name != nil && len(*s.Name) < 1 {
  3686. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3687. }
  3688. if s.OrganizationId == nil {
  3689. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3690. }
  3691. if s.Password == nil {
  3692. invalidParams.Add(request.NewErrParamRequired("Password"))
  3693. }
  3694. if invalidParams.Len() > 0 {
  3695. return invalidParams
  3696. }
  3697. return nil
  3698. }
  3699. // SetDisplayName sets the DisplayName field's value.
  3700. func (s *CreateUserInput) SetDisplayName(v string) *CreateUserInput {
  3701. s.DisplayName = &v
  3702. return s
  3703. }
  3704. // SetName sets the Name field's value.
  3705. func (s *CreateUserInput) SetName(v string) *CreateUserInput {
  3706. s.Name = &v
  3707. return s
  3708. }
  3709. // SetOrganizationId sets the OrganizationId field's value.
  3710. func (s *CreateUserInput) SetOrganizationId(v string) *CreateUserInput {
  3711. s.OrganizationId = &v
  3712. return s
  3713. }
  3714. // SetPassword sets the Password field's value.
  3715. func (s *CreateUserInput) SetPassword(v string) *CreateUserInput {
  3716. s.Password = &v
  3717. return s
  3718. }
  3719. type CreateUserOutput struct {
  3720. _ struct{} `type:"structure"`
  3721. // The information regarding the newly created user.
  3722. UserId *string `min:"12" type:"string"`
  3723. }
  3724. // String returns the string representation
  3725. func (s CreateUserOutput) String() string {
  3726. return awsutil.Prettify(s)
  3727. }
  3728. // GoString returns the string representation
  3729. func (s CreateUserOutput) GoString() string {
  3730. return s.String()
  3731. }
  3732. // SetUserId sets the UserId field's value.
  3733. func (s *CreateUserOutput) SetUserId(v string) *CreateUserOutput {
  3734. s.UserId = &v
  3735. return s
  3736. }
  3737. // The name of the attribute, which is one of the values defined in the UserAttribute
  3738. // enumeration.
  3739. type Delegate struct {
  3740. _ struct{} `type:"structure"`
  3741. // The identifier for the user or group is associated as the resource's delegate.
  3742. //
  3743. // Id is a required field
  3744. Id *string `type:"string" required:"true"`
  3745. // The type of the delegate: user or group.
  3746. //
  3747. // Type is a required field
  3748. Type *string `type:"string" required:"true" enum:"MemberType"`
  3749. }
  3750. // String returns the string representation
  3751. func (s Delegate) String() string {
  3752. return awsutil.Prettify(s)
  3753. }
  3754. // GoString returns the string representation
  3755. func (s Delegate) GoString() string {
  3756. return s.String()
  3757. }
  3758. // SetId sets the Id field's value.
  3759. func (s *Delegate) SetId(v string) *Delegate {
  3760. s.Id = &v
  3761. return s
  3762. }
  3763. // SetType sets the Type field's value.
  3764. func (s *Delegate) SetType(v string) *Delegate {
  3765. s.Type = &v
  3766. return s
  3767. }
  3768. type DeleteAliasInput struct {
  3769. _ struct{} `type:"structure"`
  3770. // The aliases to be removed from the user's set of aliases. Duplicate entries
  3771. // in the list are collapsed into single entries (the list is transformed into
  3772. // a set).
  3773. //
  3774. // Alias is a required field
  3775. Alias *string `min:"1" type:"string" required:"true"`
  3776. // The identifier for the Amazon WorkMail entity to have the aliases removed.
  3777. //
  3778. // EntityId is a required field
  3779. EntityId *string `min:"12" type:"string" required:"true"`
  3780. // The identifier for the organization under which the user exists.
  3781. //
  3782. // OrganizationId is a required field
  3783. OrganizationId *string `type:"string" required:"true"`
  3784. }
  3785. // String returns the string representation
  3786. func (s DeleteAliasInput) String() string {
  3787. return awsutil.Prettify(s)
  3788. }
  3789. // GoString returns the string representation
  3790. func (s DeleteAliasInput) GoString() string {
  3791. return s.String()
  3792. }
  3793. // Validate inspects the fields of the type to determine if they are valid.
  3794. func (s *DeleteAliasInput) Validate() error {
  3795. invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
  3796. if s.Alias == nil {
  3797. invalidParams.Add(request.NewErrParamRequired("Alias"))
  3798. }
  3799. if s.Alias != nil && len(*s.Alias) < 1 {
  3800. invalidParams.Add(request.NewErrParamMinLen("Alias", 1))
  3801. }
  3802. if s.EntityId == nil {
  3803. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  3804. }
  3805. if s.EntityId != nil && len(*s.EntityId) < 12 {
  3806. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  3807. }
  3808. if s.OrganizationId == nil {
  3809. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3810. }
  3811. if invalidParams.Len() > 0 {
  3812. return invalidParams
  3813. }
  3814. return nil
  3815. }
  3816. // SetAlias sets the Alias field's value.
  3817. func (s *DeleteAliasInput) SetAlias(v string) *DeleteAliasInput {
  3818. s.Alias = &v
  3819. return s
  3820. }
  3821. // SetEntityId sets the EntityId field's value.
  3822. func (s *DeleteAliasInput) SetEntityId(v string) *DeleteAliasInput {
  3823. s.EntityId = &v
  3824. return s
  3825. }
  3826. // SetOrganizationId sets the OrganizationId field's value.
  3827. func (s *DeleteAliasInput) SetOrganizationId(v string) *DeleteAliasInput {
  3828. s.OrganizationId = &v
  3829. return s
  3830. }
  3831. type DeleteAliasOutput struct {
  3832. _ struct{} `type:"structure"`
  3833. }
  3834. // String returns the string representation
  3835. func (s DeleteAliasOutput) String() string {
  3836. return awsutil.Prettify(s)
  3837. }
  3838. // GoString returns the string representation
  3839. func (s DeleteAliasOutput) GoString() string {
  3840. return s.String()
  3841. }
  3842. type DeleteGroupInput struct {
  3843. _ struct{} `type:"structure"`
  3844. // The identifier of the group to be deleted.
  3845. //
  3846. // GroupId is a required field
  3847. GroupId *string `min:"12" type:"string" required:"true"`
  3848. // The organization that contains the group.
  3849. //
  3850. // OrganizationId is a required field
  3851. OrganizationId *string `type:"string" required:"true"`
  3852. }
  3853. // String returns the string representation
  3854. func (s DeleteGroupInput) String() string {
  3855. return awsutil.Prettify(s)
  3856. }
  3857. // GoString returns the string representation
  3858. func (s DeleteGroupInput) GoString() string {
  3859. return s.String()
  3860. }
  3861. // Validate inspects the fields of the type to determine if they are valid.
  3862. func (s *DeleteGroupInput) Validate() error {
  3863. invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"}
  3864. if s.GroupId == nil {
  3865. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  3866. }
  3867. if s.GroupId != nil && len(*s.GroupId) < 12 {
  3868. invalidParams.Add(request.NewErrParamMinLen("GroupId", 12))
  3869. }
  3870. if s.OrganizationId == nil {
  3871. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3872. }
  3873. if invalidParams.Len() > 0 {
  3874. return invalidParams
  3875. }
  3876. return nil
  3877. }
  3878. // SetGroupId sets the GroupId field's value.
  3879. func (s *DeleteGroupInput) SetGroupId(v string) *DeleteGroupInput {
  3880. s.GroupId = &v
  3881. return s
  3882. }
  3883. // SetOrganizationId sets the OrganizationId field's value.
  3884. func (s *DeleteGroupInput) SetOrganizationId(v string) *DeleteGroupInput {
  3885. s.OrganizationId = &v
  3886. return s
  3887. }
  3888. type DeleteGroupOutput struct {
  3889. _ struct{} `type:"structure"`
  3890. }
  3891. // String returns the string representation
  3892. func (s DeleteGroupOutput) String() string {
  3893. return awsutil.Prettify(s)
  3894. }
  3895. // GoString returns the string representation
  3896. func (s DeleteGroupOutput) GoString() string {
  3897. return s.String()
  3898. }
  3899. type DeleteMailboxPermissionsInput struct {
  3900. _ struct{} `type:"structure"`
  3901. // The identifier of the entity (user or group) for which to delete mailbox
  3902. // permissions.
  3903. //
  3904. // EntityId is a required field
  3905. EntityId *string `min:"12" type:"string" required:"true"`
  3906. // The identifier of the entity (user or group) for which to delete granted
  3907. // permissions.
  3908. //
  3909. // GranteeId is a required field
  3910. GranteeId *string `min:"12" type:"string" required:"true"`
  3911. // The identifier of the organization under which the entity (user or group)
  3912. // exists.
  3913. //
  3914. // OrganizationId is a required field
  3915. OrganizationId *string `type:"string" required:"true"`
  3916. }
  3917. // String returns the string representation
  3918. func (s DeleteMailboxPermissionsInput) String() string {
  3919. return awsutil.Prettify(s)
  3920. }
  3921. // GoString returns the string representation
  3922. func (s DeleteMailboxPermissionsInput) GoString() string {
  3923. return s.String()
  3924. }
  3925. // Validate inspects the fields of the type to determine if they are valid.
  3926. func (s *DeleteMailboxPermissionsInput) Validate() error {
  3927. invalidParams := request.ErrInvalidParams{Context: "DeleteMailboxPermissionsInput"}
  3928. if s.EntityId == nil {
  3929. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  3930. }
  3931. if s.EntityId != nil && len(*s.EntityId) < 12 {
  3932. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  3933. }
  3934. if s.GranteeId == nil {
  3935. invalidParams.Add(request.NewErrParamRequired("GranteeId"))
  3936. }
  3937. if s.GranteeId != nil && len(*s.GranteeId) < 12 {
  3938. invalidParams.Add(request.NewErrParamMinLen("GranteeId", 12))
  3939. }
  3940. if s.OrganizationId == nil {
  3941. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3942. }
  3943. if invalidParams.Len() > 0 {
  3944. return invalidParams
  3945. }
  3946. return nil
  3947. }
  3948. // SetEntityId sets the EntityId field's value.
  3949. func (s *DeleteMailboxPermissionsInput) SetEntityId(v string) *DeleteMailboxPermissionsInput {
  3950. s.EntityId = &v
  3951. return s
  3952. }
  3953. // SetGranteeId sets the GranteeId field's value.
  3954. func (s *DeleteMailboxPermissionsInput) SetGranteeId(v string) *DeleteMailboxPermissionsInput {
  3955. s.GranteeId = &v
  3956. return s
  3957. }
  3958. // SetOrganizationId sets the OrganizationId field's value.
  3959. func (s *DeleteMailboxPermissionsInput) SetOrganizationId(v string) *DeleteMailboxPermissionsInput {
  3960. s.OrganizationId = &v
  3961. return s
  3962. }
  3963. type DeleteMailboxPermissionsOutput struct {
  3964. _ struct{} `type:"structure"`
  3965. }
  3966. // String returns the string representation
  3967. func (s DeleteMailboxPermissionsOutput) String() string {
  3968. return awsutil.Prettify(s)
  3969. }
  3970. // GoString returns the string representation
  3971. func (s DeleteMailboxPermissionsOutput) GoString() string {
  3972. return s.String()
  3973. }
  3974. type DeleteResourceInput struct {
  3975. _ struct{} `type:"structure"`
  3976. // The identifier associated with the organization for which the resource is
  3977. // deleted.
  3978. //
  3979. // OrganizationId is a required field
  3980. OrganizationId *string `type:"string" required:"true"`
  3981. // The identifier of the resource to be deleted.
  3982. //
  3983. // ResourceId is a required field
  3984. ResourceId *string `type:"string" required:"true"`
  3985. }
  3986. // String returns the string representation
  3987. func (s DeleteResourceInput) String() string {
  3988. return awsutil.Prettify(s)
  3989. }
  3990. // GoString returns the string representation
  3991. func (s DeleteResourceInput) GoString() string {
  3992. return s.String()
  3993. }
  3994. // Validate inspects the fields of the type to determine if they are valid.
  3995. func (s *DeleteResourceInput) Validate() error {
  3996. invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"}
  3997. if s.OrganizationId == nil {
  3998. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  3999. }
  4000. if s.ResourceId == nil {
  4001. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4002. }
  4003. if invalidParams.Len() > 0 {
  4004. return invalidParams
  4005. }
  4006. return nil
  4007. }
  4008. // SetOrganizationId sets the OrganizationId field's value.
  4009. func (s *DeleteResourceInput) SetOrganizationId(v string) *DeleteResourceInput {
  4010. s.OrganizationId = &v
  4011. return s
  4012. }
  4013. // SetResourceId sets the ResourceId field's value.
  4014. func (s *DeleteResourceInput) SetResourceId(v string) *DeleteResourceInput {
  4015. s.ResourceId = &v
  4016. return s
  4017. }
  4018. type DeleteResourceOutput struct {
  4019. _ struct{} `type:"structure"`
  4020. }
  4021. // String returns the string representation
  4022. func (s DeleteResourceOutput) String() string {
  4023. return awsutil.Prettify(s)
  4024. }
  4025. // GoString returns the string representation
  4026. func (s DeleteResourceOutput) GoString() string {
  4027. return s.String()
  4028. }
  4029. type DeleteUserInput struct {
  4030. _ struct{} `type:"structure"`
  4031. // The organization that contains the user.
  4032. //
  4033. // OrganizationId is a required field
  4034. OrganizationId *string `type:"string" required:"true"`
  4035. // The identifier of the user to be deleted.
  4036. //
  4037. // UserId is a required field
  4038. UserId *string `min:"12" type:"string" required:"true"`
  4039. }
  4040. // String returns the string representation
  4041. func (s DeleteUserInput) String() string {
  4042. return awsutil.Prettify(s)
  4043. }
  4044. // GoString returns the string representation
  4045. func (s DeleteUserInput) GoString() string {
  4046. return s.String()
  4047. }
  4048. // Validate inspects the fields of the type to determine if they are valid.
  4049. func (s *DeleteUserInput) Validate() error {
  4050. invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"}
  4051. if s.OrganizationId == nil {
  4052. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4053. }
  4054. if s.UserId == nil {
  4055. invalidParams.Add(request.NewErrParamRequired("UserId"))
  4056. }
  4057. if s.UserId != nil && len(*s.UserId) < 12 {
  4058. invalidParams.Add(request.NewErrParamMinLen("UserId", 12))
  4059. }
  4060. if invalidParams.Len() > 0 {
  4061. return invalidParams
  4062. }
  4063. return nil
  4064. }
  4065. // SetOrganizationId sets the OrganizationId field's value.
  4066. func (s *DeleteUserInput) SetOrganizationId(v string) *DeleteUserInput {
  4067. s.OrganizationId = &v
  4068. return s
  4069. }
  4070. // SetUserId sets the UserId field's value.
  4071. func (s *DeleteUserInput) SetUserId(v string) *DeleteUserInput {
  4072. s.UserId = &v
  4073. return s
  4074. }
  4075. type DeleteUserOutput struct {
  4076. _ struct{} `type:"structure"`
  4077. }
  4078. // String returns the string representation
  4079. func (s DeleteUserOutput) String() string {
  4080. return awsutil.Prettify(s)
  4081. }
  4082. // GoString returns the string representation
  4083. func (s DeleteUserOutput) GoString() string {
  4084. return s.String()
  4085. }
  4086. type DeregisterFromWorkMailInput struct {
  4087. _ struct{} `type:"structure"`
  4088. // The identifier for the entity to be updated.
  4089. //
  4090. // EntityId is a required field
  4091. EntityId *string `min:"12" type:"string" required:"true"`
  4092. // The identifier for the organization under which the Amazon WorkMail entity
  4093. // exists.
  4094. //
  4095. // OrganizationId is a required field
  4096. OrganizationId *string `type:"string" required:"true"`
  4097. }
  4098. // String returns the string representation
  4099. func (s DeregisterFromWorkMailInput) String() string {
  4100. return awsutil.Prettify(s)
  4101. }
  4102. // GoString returns the string representation
  4103. func (s DeregisterFromWorkMailInput) GoString() string {
  4104. return s.String()
  4105. }
  4106. // Validate inspects the fields of the type to determine if they are valid.
  4107. func (s *DeregisterFromWorkMailInput) Validate() error {
  4108. invalidParams := request.ErrInvalidParams{Context: "DeregisterFromWorkMailInput"}
  4109. if s.EntityId == nil {
  4110. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  4111. }
  4112. if s.EntityId != nil && len(*s.EntityId) < 12 {
  4113. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  4114. }
  4115. if s.OrganizationId == nil {
  4116. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4117. }
  4118. if invalidParams.Len() > 0 {
  4119. return invalidParams
  4120. }
  4121. return nil
  4122. }
  4123. // SetEntityId sets the EntityId field's value.
  4124. func (s *DeregisterFromWorkMailInput) SetEntityId(v string) *DeregisterFromWorkMailInput {
  4125. s.EntityId = &v
  4126. return s
  4127. }
  4128. // SetOrganizationId sets the OrganizationId field's value.
  4129. func (s *DeregisterFromWorkMailInput) SetOrganizationId(v string) *DeregisterFromWorkMailInput {
  4130. s.OrganizationId = &v
  4131. return s
  4132. }
  4133. type DeregisterFromWorkMailOutput struct {
  4134. _ struct{} `type:"structure"`
  4135. }
  4136. // String returns the string representation
  4137. func (s DeregisterFromWorkMailOutput) String() string {
  4138. return awsutil.Prettify(s)
  4139. }
  4140. // GoString returns the string representation
  4141. func (s DeregisterFromWorkMailOutput) GoString() string {
  4142. return s.String()
  4143. }
  4144. type DescribeGroupInput struct {
  4145. _ struct{} `type:"structure"`
  4146. // The identifier for the group to be described.
  4147. //
  4148. // GroupId is a required field
  4149. GroupId *string `min:"12" type:"string" required:"true"`
  4150. // The identifier for the organization under which the group exists.
  4151. //
  4152. // OrganizationId is a required field
  4153. OrganizationId *string `type:"string" required:"true"`
  4154. }
  4155. // String returns the string representation
  4156. func (s DescribeGroupInput) String() string {
  4157. return awsutil.Prettify(s)
  4158. }
  4159. // GoString returns the string representation
  4160. func (s DescribeGroupInput) GoString() string {
  4161. return s.String()
  4162. }
  4163. // Validate inspects the fields of the type to determine if they are valid.
  4164. func (s *DescribeGroupInput) Validate() error {
  4165. invalidParams := request.ErrInvalidParams{Context: "DescribeGroupInput"}
  4166. if s.GroupId == nil {
  4167. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  4168. }
  4169. if s.GroupId != nil && len(*s.GroupId) < 12 {
  4170. invalidParams.Add(request.NewErrParamMinLen("GroupId", 12))
  4171. }
  4172. if s.OrganizationId == nil {
  4173. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4174. }
  4175. if invalidParams.Len() > 0 {
  4176. return invalidParams
  4177. }
  4178. return nil
  4179. }
  4180. // SetGroupId sets the GroupId field's value.
  4181. func (s *DescribeGroupInput) SetGroupId(v string) *DescribeGroupInput {
  4182. s.GroupId = &v
  4183. return s
  4184. }
  4185. // SetOrganizationId sets the OrganizationId field's value.
  4186. func (s *DescribeGroupInput) SetOrganizationId(v string) *DescribeGroupInput {
  4187. s.OrganizationId = &v
  4188. return s
  4189. }
  4190. type DescribeGroupOutput struct {
  4191. _ struct{} `type:"structure"`
  4192. // The date and time when a user was deregistered from Amazon WorkMail, in UNIX
  4193. // epoch time format.
  4194. DisabledDate *time.Time `type:"timestamp"`
  4195. // The email of the described group.
  4196. Email *string `min:"1" type:"string"`
  4197. // The date and time when a user was registered to Amazon WorkMail, in UNIX
  4198. // epoch time format.
  4199. EnabledDate *time.Time `type:"timestamp"`
  4200. // The identifier of the described group.
  4201. GroupId *string `min:"12" type:"string"`
  4202. // The name of the described group.
  4203. Name *string `min:"1" type:"string"`
  4204. // The state of the user: enabled (registered to Amazon WorkMail) or disabled
  4205. // (deregistered or never registered to Amazon WorkMail).
  4206. State *string `type:"string" enum:"EntityState"`
  4207. }
  4208. // String returns the string representation
  4209. func (s DescribeGroupOutput) String() string {
  4210. return awsutil.Prettify(s)
  4211. }
  4212. // GoString returns the string representation
  4213. func (s DescribeGroupOutput) GoString() string {
  4214. return s.String()
  4215. }
  4216. // SetDisabledDate sets the DisabledDate field's value.
  4217. func (s *DescribeGroupOutput) SetDisabledDate(v time.Time) *DescribeGroupOutput {
  4218. s.DisabledDate = &v
  4219. return s
  4220. }
  4221. // SetEmail sets the Email field's value.
  4222. func (s *DescribeGroupOutput) SetEmail(v string) *DescribeGroupOutput {
  4223. s.Email = &v
  4224. return s
  4225. }
  4226. // SetEnabledDate sets the EnabledDate field's value.
  4227. func (s *DescribeGroupOutput) SetEnabledDate(v time.Time) *DescribeGroupOutput {
  4228. s.EnabledDate = &v
  4229. return s
  4230. }
  4231. // SetGroupId sets the GroupId field's value.
  4232. func (s *DescribeGroupOutput) SetGroupId(v string) *DescribeGroupOutput {
  4233. s.GroupId = &v
  4234. return s
  4235. }
  4236. // SetName sets the Name field's value.
  4237. func (s *DescribeGroupOutput) SetName(v string) *DescribeGroupOutput {
  4238. s.Name = &v
  4239. return s
  4240. }
  4241. // SetState sets the State field's value.
  4242. func (s *DescribeGroupOutput) SetState(v string) *DescribeGroupOutput {
  4243. s.State = &v
  4244. return s
  4245. }
  4246. type DescribeOrganizationInput struct {
  4247. _ struct{} `type:"structure"`
  4248. // The identifier for the organization to be described.
  4249. //
  4250. // OrganizationId is a required field
  4251. OrganizationId *string `type:"string" required:"true"`
  4252. }
  4253. // String returns the string representation
  4254. func (s DescribeOrganizationInput) String() string {
  4255. return awsutil.Prettify(s)
  4256. }
  4257. // GoString returns the string representation
  4258. func (s DescribeOrganizationInput) GoString() string {
  4259. return s.String()
  4260. }
  4261. // Validate inspects the fields of the type to determine if they are valid.
  4262. func (s *DescribeOrganizationInput) Validate() error {
  4263. invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationInput"}
  4264. if s.OrganizationId == nil {
  4265. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4266. }
  4267. if invalidParams.Len() > 0 {
  4268. return invalidParams
  4269. }
  4270. return nil
  4271. }
  4272. // SetOrganizationId sets the OrganizationId field's value.
  4273. func (s *DescribeOrganizationInput) SetOrganizationId(v string) *DescribeOrganizationInput {
  4274. s.OrganizationId = &v
  4275. return s
  4276. }
  4277. type DescribeOrganizationOutput struct {
  4278. _ struct{} `type:"structure"`
  4279. // The alias for an organization.
  4280. Alias *string `min:"1" type:"string"`
  4281. // The date at which the organization became usable in the Amazon WorkMail context,
  4282. // in UNIX epoch time format.
  4283. CompletedDate *time.Time `type:"timestamp"`
  4284. // The default mail domain associated with the organization.
  4285. DefaultMailDomain *string `type:"string"`
  4286. // The identifier for the directory associated with an Amazon WorkMail organization.
  4287. DirectoryId *string `type:"string"`
  4288. // The type of directory associated with the Amazon WorkMail organization.
  4289. DirectoryType *string `type:"string"`
  4290. // The (optional) error message indicating if unexpected behavior was encountered
  4291. // with regards to the organization.
  4292. ErrorMessage *string `type:"string"`
  4293. // The identifier of an organization.
  4294. OrganizationId *string `type:"string"`
  4295. // The state of an organization.
  4296. State *string `type:"string"`
  4297. }
  4298. // String returns the string representation
  4299. func (s DescribeOrganizationOutput) String() string {
  4300. return awsutil.Prettify(s)
  4301. }
  4302. // GoString returns the string representation
  4303. func (s DescribeOrganizationOutput) GoString() string {
  4304. return s.String()
  4305. }
  4306. // SetAlias sets the Alias field's value.
  4307. func (s *DescribeOrganizationOutput) SetAlias(v string) *DescribeOrganizationOutput {
  4308. s.Alias = &v
  4309. return s
  4310. }
  4311. // SetCompletedDate sets the CompletedDate field's value.
  4312. func (s *DescribeOrganizationOutput) SetCompletedDate(v time.Time) *DescribeOrganizationOutput {
  4313. s.CompletedDate = &v
  4314. return s
  4315. }
  4316. // SetDefaultMailDomain sets the DefaultMailDomain field's value.
  4317. func (s *DescribeOrganizationOutput) SetDefaultMailDomain(v string) *DescribeOrganizationOutput {
  4318. s.DefaultMailDomain = &v
  4319. return s
  4320. }
  4321. // SetDirectoryId sets the DirectoryId field's value.
  4322. func (s *DescribeOrganizationOutput) SetDirectoryId(v string) *DescribeOrganizationOutput {
  4323. s.DirectoryId = &v
  4324. return s
  4325. }
  4326. // SetDirectoryType sets the DirectoryType field's value.
  4327. func (s *DescribeOrganizationOutput) SetDirectoryType(v string) *DescribeOrganizationOutput {
  4328. s.DirectoryType = &v
  4329. return s
  4330. }
  4331. // SetErrorMessage sets the ErrorMessage field's value.
  4332. func (s *DescribeOrganizationOutput) SetErrorMessage(v string) *DescribeOrganizationOutput {
  4333. s.ErrorMessage = &v
  4334. return s
  4335. }
  4336. // SetOrganizationId sets the OrganizationId field's value.
  4337. func (s *DescribeOrganizationOutput) SetOrganizationId(v string) *DescribeOrganizationOutput {
  4338. s.OrganizationId = &v
  4339. return s
  4340. }
  4341. // SetState sets the State field's value.
  4342. func (s *DescribeOrganizationOutput) SetState(v string) *DescribeOrganizationOutput {
  4343. s.State = &v
  4344. return s
  4345. }
  4346. type DescribeResourceInput struct {
  4347. _ struct{} `type:"structure"`
  4348. // The identifier associated with the organization for which the resource is
  4349. // described.
  4350. //
  4351. // OrganizationId is a required field
  4352. OrganizationId *string `type:"string" required:"true"`
  4353. // The identifier of the resource to be described.
  4354. //
  4355. // ResourceId is a required field
  4356. ResourceId *string `type:"string" required:"true"`
  4357. }
  4358. // String returns the string representation
  4359. func (s DescribeResourceInput) String() string {
  4360. return awsutil.Prettify(s)
  4361. }
  4362. // GoString returns the string representation
  4363. func (s DescribeResourceInput) GoString() string {
  4364. return s.String()
  4365. }
  4366. // Validate inspects the fields of the type to determine if they are valid.
  4367. func (s *DescribeResourceInput) Validate() error {
  4368. invalidParams := request.ErrInvalidParams{Context: "DescribeResourceInput"}
  4369. if s.OrganizationId == nil {
  4370. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4371. }
  4372. if s.ResourceId == nil {
  4373. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4374. }
  4375. if invalidParams.Len() > 0 {
  4376. return invalidParams
  4377. }
  4378. return nil
  4379. }
  4380. // SetOrganizationId sets the OrganizationId field's value.
  4381. func (s *DescribeResourceInput) SetOrganizationId(v string) *DescribeResourceInput {
  4382. s.OrganizationId = &v
  4383. return s
  4384. }
  4385. // SetResourceId sets the ResourceId field's value.
  4386. func (s *DescribeResourceInput) SetResourceId(v string) *DescribeResourceInput {
  4387. s.ResourceId = &v
  4388. return s
  4389. }
  4390. type DescribeResourceOutput struct {
  4391. _ struct{} `type:"structure"`
  4392. // The booking options for the described resource.
  4393. BookingOptions *BookingOptions `type:"structure"`
  4394. // The date and time when a resource was registered from Amazon WorkMail, in
  4395. // UNIX epoch time format.
  4396. DisabledDate *time.Time `type:"timestamp"`
  4397. // The email of the described resource.
  4398. Email *string `min:"1" type:"string"`
  4399. // The date and time when a resource was registered to Amazon WorkMail, in UNIX
  4400. // epoch time format.
  4401. EnabledDate *time.Time `type:"timestamp"`
  4402. // The name of the described resource.
  4403. Name *string `min:"1" type:"string"`
  4404. // The identifier of the described resource.
  4405. ResourceId *string `type:"string"`
  4406. // The state of the resource: enabled (registered to Amazon WorkMail) or disabled
  4407. // (deregistered or never registered to Amazon WorkMail).
  4408. State *string `type:"string" enum:"EntityState"`
  4409. // The type of the described resource.
  4410. Type *string `type:"string" enum:"ResourceType"`
  4411. }
  4412. // String returns the string representation
  4413. func (s DescribeResourceOutput) String() string {
  4414. return awsutil.Prettify(s)
  4415. }
  4416. // GoString returns the string representation
  4417. func (s DescribeResourceOutput) GoString() string {
  4418. return s.String()
  4419. }
  4420. // SetBookingOptions sets the BookingOptions field's value.
  4421. func (s *DescribeResourceOutput) SetBookingOptions(v *BookingOptions) *DescribeResourceOutput {
  4422. s.BookingOptions = v
  4423. return s
  4424. }
  4425. // SetDisabledDate sets the DisabledDate field's value.
  4426. func (s *DescribeResourceOutput) SetDisabledDate(v time.Time) *DescribeResourceOutput {
  4427. s.DisabledDate = &v
  4428. return s
  4429. }
  4430. // SetEmail sets the Email field's value.
  4431. func (s *DescribeResourceOutput) SetEmail(v string) *DescribeResourceOutput {
  4432. s.Email = &v
  4433. return s
  4434. }
  4435. // SetEnabledDate sets the EnabledDate field's value.
  4436. func (s *DescribeResourceOutput) SetEnabledDate(v time.Time) *DescribeResourceOutput {
  4437. s.EnabledDate = &v
  4438. return s
  4439. }
  4440. // SetName sets the Name field's value.
  4441. func (s *DescribeResourceOutput) SetName(v string) *DescribeResourceOutput {
  4442. s.Name = &v
  4443. return s
  4444. }
  4445. // SetResourceId sets the ResourceId field's value.
  4446. func (s *DescribeResourceOutput) SetResourceId(v string) *DescribeResourceOutput {
  4447. s.ResourceId = &v
  4448. return s
  4449. }
  4450. // SetState sets the State field's value.
  4451. func (s *DescribeResourceOutput) SetState(v string) *DescribeResourceOutput {
  4452. s.State = &v
  4453. return s
  4454. }
  4455. // SetType sets the Type field's value.
  4456. func (s *DescribeResourceOutput) SetType(v string) *DescribeResourceOutput {
  4457. s.Type = &v
  4458. return s
  4459. }
  4460. type DescribeUserInput struct {
  4461. _ struct{} `type:"structure"`
  4462. // The identifier for the organization under which the user exists.
  4463. //
  4464. // OrganizationId is a required field
  4465. OrganizationId *string `type:"string" required:"true"`
  4466. // The identifier for the user to be described.
  4467. //
  4468. // UserId is a required field
  4469. UserId *string `min:"12" type:"string" required:"true"`
  4470. }
  4471. // String returns the string representation
  4472. func (s DescribeUserInput) String() string {
  4473. return awsutil.Prettify(s)
  4474. }
  4475. // GoString returns the string representation
  4476. func (s DescribeUserInput) GoString() string {
  4477. return s.String()
  4478. }
  4479. // Validate inspects the fields of the type to determine if they are valid.
  4480. func (s *DescribeUserInput) Validate() error {
  4481. invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"}
  4482. if s.OrganizationId == nil {
  4483. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4484. }
  4485. if s.UserId == nil {
  4486. invalidParams.Add(request.NewErrParamRequired("UserId"))
  4487. }
  4488. if s.UserId != nil && len(*s.UserId) < 12 {
  4489. invalidParams.Add(request.NewErrParamMinLen("UserId", 12))
  4490. }
  4491. if invalidParams.Len() > 0 {
  4492. return invalidParams
  4493. }
  4494. return nil
  4495. }
  4496. // SetOrganizationId sets the OrganizationId field's value.
  4497. func (s *DescribeUserInput) SetOrganizationId(v string) *DescribeUserInput {
  4498. s.OrganizationId = &v
  4499. return s
  4500. }
  4501. // SetUserId sets the UserId field's value.
  4502. func (s *DescribeUserInput) SetUserId(v string) *DescribeUserInput {
  4503. s.UserId = &v
  4504. return s
  4505. }
  4506. type DescribeUserOutput struct {
  4507. _ struct{} `type:"structure"`
  4508. // The date and time at which the user was disabled for Amazon WorkMail usage,
  4509. // in UNIX epoch time format.
  4510. DisabledDate *time.Time `type:"timestamp"`
  4511. // The display name of the user.
  4512. DisplayName *string `type:"string"`
  4513. // The email of the user.
  4514. Email *string `min:"1" type:"string"`
  4515. // The date and time at which the user was enabled for Amazon WorkMail usage,
  4516. // in UNIX epoch time format.
  4517. EnabledDate *time.Time `type:"timestamp"`
  4518. // The name for the user.
  4519. Name *string `min:"1" type:"string"`
  4520. // The state of a user: enabled (registered to Amazon WorkMail) or disabled
  4521. // (deregistered or never registered to Amazon WorkMail).
  4522. State *string `type:"string" enum:"EntityState"`
  4523. // The identifier for the described user.
  4524. UserId *string `min:"12" type:"string"`
  4525. // In certain cases other entities are modeled as users. If interoperability
  4526. // is enabled, resources are imported into Amazon WorkMail as users. Because
  4527. // different Amazon WorkMail organizations rely on different directory types,
  4528. // administrators can distinguish between a user that is not registered to Amazon
  4529. // WorkMail (is disabled and has a user role) and the administrative users of
  4530. // the directory. The values are USER, RESOURCE, and SYSTEM_USER.
  4531. UserRole *string `type:"string" enum:"UserRole"`
  4532. }
  4533. // String returns the string representation
  4534. func (s DescribeUserOutput) String() string {
  4535. return awsutil.Prettify(s)
  4536. }
  4537. // GoString returns the string representation
  4538. func (s DescribeUserOutput) GoString() string {
  4539. return s.String()
  4540. }
  4541. // SetDisabledDate sets the DisabledDate field's value.
  4542. func (s *DescribeUserOutput) SetDisabledDate(v time.Time) *DescribeUserOutput {
  4543. s.DisabledDate = &v
  4544. return s
  4545. }
  4546. // SetDisplayName sets the DisplayName field's value.
  4547. func (s *DescribeUserOutput) SetDisplayName(v string) *DescribeUserOutput {
  4548. s.DisplayName = &v
  4549. return s
  4550. }
  4551. // SetEmail sets the Email field's value.
  4552. func (s *DescribeUserOutput) SetEmail(v string) *DescribeUserOutput {
  4553. s.Email = &v
  4554. return s
  4555. }
  4556. // SetEnabledDate sets the EnabledDate field's value.
  4557. func (s *DescribeUserOutput) SetEnabledDate(v time.Time) *DescribeUserOutput {
  4558. s.EnabledDate = &v
  4559. return s
  4560. }
  4561. // SetName sets the Name field's value.
  4562. func (s *DescribeUserOutput) SetName(v string) *DescribeUserOutput {
  4563. s.Name = &v
  4564. return s
  4565. }
  4566. // SetState sets the State field's value.
  4567. func (s *DescribeUserOutput) SetState(v string) *DescribeUserOutput {
  4568. s.State = &v
  4569. return s
  4570. }
  4571. // SetUserId sets the UserId field's value.
  4572. func (s *DescribeUserOutput) SetUserId(v string) *DescribeUserOutput {
  4573. s.UserId = &v
  4574. return s
  4575. }
  4576. // SetUserRole sets the UserRole field's value.
  4577. func (s *DescribeUserOutput) SetUserRole(v string) *DescribeUserOutput {
  4578. s.UserRole = &v
  4579. return s
  4580. }
  4581. type DisassociateDelegateFromResourceInput struct {
  4582. _ struct{} `type:"structure"`
  4583. // The identifier for the member (user, group) to be removed from the resource's
  4584. // delegates.
  4585. //
  4586. // EntityId is a required field
  4587. EntityId *string `min:"12" type:"string" required:"true"`
  4588. // The identifier for the organization under which the resource exists.
  4589. //
  4590. // OrganizationId is a required field
  4591. OrganizationId *string `type:"string" required:"true"`
  4592. // The identifier of the resource from which delegates' set members are removed.
  4593. //
  4594. // ResourceId is a required field
  4595. ResourceId *string `type:"string" required:"true"`
  4596. }
  4597. // String returns the string representation
  4598. func (s DisassociateDelegateFromResourceInput) String() string {
  4599. return awsutil.Prettify(s)
  4600. }
  4601. // GoString returns the string representation
  4602. func (s DisassociateDelegateFromResourceInput) GoString() string {
  4603. return s.String()
  4604. }
  4605. // Validate inspects the fields of the type to determine if they are valid.
  4606. func (s *DisassociateDelegateFromResourceInput) Validate() error {
  4607. invalidParams := request.ErrInvalidParams{Context: "DisassociateDelegateFromResourceInput"}
  4608. if s.EntityId == nil {
  4609. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  4610. }
  4611. if s.EntityId != nil && len(*s.EntityId) < 12 {
  4612. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  4613. }
  4614. if s.OrganizationId == nil {
  4615. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4616. }
  4617. if s.ResourceId == nil {
  4618. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4619. }
  4620. if invalidParams.Len() > 0 {
  4621. return invalidParams
  4622. }
  4623. return nil
  4624. }
  4625. // SetEntityId sets the EntityId field's value.
  4626. func (s *DisassociateDelegateFromResourceInput) SetEntityId(v string) *DisassociateDelegateFromResourceInput {
  4627. s.EntityId = &v
  4628. return s
  4629. }
  4630. // SetOrganizationId sets the OrganizationId field's value.
  4631. func (s *DisassociateDelegateFromResourceInput) SetOrganizationId(v string) *DisassociateDelegateFromResourceInput {
  4632. s.OrganizationId = &v
  4633. return s
  4634. }
  4635. // SetResourceId sets the ResourceId field's value.
  4636. func (s *DisassociateDelegateFromResourceInput) SetResourceId(v string) *DisassociateDelegateFromResourceInput {
  4637. s.ResourceId = &v
  4638. return s
  4639. }
  4640. type DisassociateDelegateFromResourceOutput struct {
  4641. _ struct{} `type:"structure"`
  4642. }
  4643. // String returns the string representation
  4644. func (s DisassociateDelegateFromResourceOutput) String() string {
  4645. return awsutil.Prettify(s)
  4646. }
  4647. // GoString returns the string representation
  4648. func (s DisassociateDelegateFromResourceOutput) GoString() string {
  4649. return s.String()
  4650. }
  4651. type DisassociateMemberFromGroupInput struct {
  4652. _ struct{} `type:"structure"`
  4653. // The identifier for the group from which members are removed.
  4654. //
  4655. // GroupId is a required field
  4656. GroupId *string `min:"12" type:"string" required:"true"`
  4657. // The identifier for the member to be removed to the group.
  4658. //
  4659. // MemberId is a required field
  4660. MemberId *string `min:"12" type:"string" required:"true"`
  4661. // The identifier for the organization under which the group exists.
  4662. //
  4663. // OrganizationId is a required field
  4664. OrganizationId *string `type:"string" required:"true"`
  4665. }
  4666. // String returns the string representation
  4667. func (s DisassociateMemberFromGroupInput) String() string {
  4668. return awsutil.Prettify(s)
  4669. }
  4670. // GoString returns the string representation
  4671. func (s DisassociateMemberFromGroupInput) GoString() string {
  4672. return s.String()
  4673. }
  4674. // Validate inspects the fields of the type to determine if they are valid.
  4675. func (s *DisassociateMemberFromGroupInput) Validate() error {
  4676. invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberFromGroupInput"}
  4677. if s.GroupId == nil {
  4678. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  4679. }
  4680. if s.GroupId != nil && len(*s.GroupId) < 12 {
  4681. invalidParams.Add(request.NewErrParamMinLen("GroupId", 12))
  4682. }
  4683. if s.MemberId == nil {
  4684. invalidParams.Add(request.NewErrParamRequired("MemberId"))
  4685. }
  4686. if s.MemberId != nil && len(*s.MemberId) < 12 {
  4687. invalidParams.Add(request.NewErrParamMinLen("MemberId", 12))
  4688. }
  4689. if s.OrganizationId == nil {
  4690. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4691. }
  4692. if invalidParams.Len() > 0 {
  4693. return invalidParams
  4694. }
  4695. return nil
  4696. }
  4697. // SetGroupId sets the GroupId field's value.
  4698. func (s *DisassociateMemberFromGroupInput) SetGroupId(v string) *DisassociateMemberFromGroupInput {
  4699. s.GroupId = &v
  4700. return s
  4701. }
  4702. // SetMemberId sets the MemberId field's value.
  4703. func (s *DisassociateMemberFromGroupInput) SetMemberId(v string) *DisassociateMemberFromGroupInput {
  4704. s.MemberId = &v
  4705. return s
  4706. }
  4707. // SetOrganizationId sets the OrganizationId field's value.
  4708. func (s *DisassociateMemberFromGroupInput) SetOrganizationId(v string) *DisassociateMemberFromGroupInput {
  4709. s.OrganizationId = &v
  4710. return s
  4711. }
  4712. type DisassociateMemberFromGroupOutput struct {
  4713. _ struct{} `type:"structure"`
  4714. }
  4715. // String returns the string representation
  4716. func (s DisassociateMemberFromGroupOutput) String() string {
  4717. return awsutil.Prettify(s)
  4718. }
  4719. // GoString returns the string representation
  4720. func (s DisassociateMemberFromGroupOutput) GoString() string {
  4721. return s.String()
  4722. }
  4723. // The representation of an Amazon WorkMail group.
  4724. type Group struct {
  4725. _ struct{} `type:"structure"`
  4726. // The date indicating when the group was disabled from Amazon WorkMail use.
  4727. DisabledDate *time.Time `type:"timestamp"`
  4728. // The email of the group.
  4729. Email *string `min:"1" type:"string"`
  4730. // The date indicating when the group was enabled for Amazon WorkMail use.
  4731. EnabledDate *time.Time `type:"timestamp"`
  4732. // The identifier of the group.
  4733. Id *string `min:"12" type:"string"`
  4734. // The name of the group.
  4735. Name *string `min:"1" type:"string"`
  4736. // The state of the group, which can be ENABLED, DISABLED, or DELETED.
  4737. State *string `type:"string" enum:"EntityState"`
  4738. }
  4739. // String returns the string representation
  4740. func (s Group) String() string {
  4741. return awsutil.Prettify(s)
  4742. }
  4743. // GoString returns the string representation
  4744. func (s Group) GoString() string {
  4745. return s.String()
  4746. }
  4747. // SetDisabledDate sets the DisabledDate field's value.
  4748. func (s *Group) SetDisabledDate(v time.Time) *Group {
  4749. s.DisabledDate = &v
  4750. return s
  4751. }
  4752. // SetEmail sets the Email field's value.
  4753. func (s *Group) SetEmail(v string) *Group {
  4754. s.Email = &v
  4755. return s
  4756. }
  4757. // SetEnabledDate sets the EnabledDate field's value.
  4758. func (s *Group) SetEnabledDate(v time.Time) *Group {
  4759. s.EnabledDate = &v
  4760. return s
  4761. }
  4762. // SetId sets the Id field's value.
  4763. func (s *Group) SetId(v string) *Group {
  4764. s.Id = &v
  4765. return s
  4766. }
  4767. // SetName sets the Name field's value.
  4768. func (s *Group) SetName(v string) *Group {
  4769. s.Name = &v
  4770. return s
  4771. }
  4772. // SetState sets the State field's value.
  4773. func (s *Group) SetState(v string) *Group {
  4774. s.State = &v
  4775. return s
  4776. }
  4777. type ListAliasesInput struct {
  4778. _ struct{} `type:"structure"`
  4779. // The identifier for the entity for which to list the aliases.
  4780. //
  4781. // EntityId is a required field
  4782. EntityId *string `min:"12" type:"string" required:"true"`
  4783. // The maximum number of results to return in a single call.
  4784. MaxResults *int64 `min:"1" type:"integer"`
  4785. // The token to use to retrieve the next page of results. The first call does
  4786. // not contain any tokens.
  4787. NextToken *string `min:"1" type:"string"`
  4788. // The identifier for the organization under which the entity exists.
  4789. //
  4790. // OrganizationId is a required field
  4791. OrganizationId *string `type:"string" required:"true"`
  4792. }
  4793. // String returns the string representation
  4794. func (s ListAliasesInput) String() string {
  4795. return awsutil.Prettify(s)
  4796. }
  4797. // GoString returns the string representation
  4798. func (s ListAliasesInput) GoString() string {
  4799. return s.String()
  4800. }
  4801. // Validate inspects the fields of the type to determine if they are valid.
  4802. func (s *ListAliasesInput) Validate() error {
  4803. invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
  4804. if s.EntityId == nil {
  4805. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  4806. }
  4807. if s.EntityId != nil && len(*s.EntityId) < 12 {
  4808. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  4809. }
  4810. if s.MaxResults != nil && *s.MaxResults < 1 {
  4811. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4812. }
  4813. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4814. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4815. }
  4816. if s.OrganizationId == nil {
  4817. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4818. }
  4819. if invalidParams.Len() > 0 {
  4820. return invalidParams
  4821. }
  4822. return nil
  4823. }
  4824. // SetEntityId sets the EntityId field's value.
  4825. func (s *ListAliasesInput) SetEntityId(v string) *ListAliasesInput {
  4826. s.EntityId = &v
  4827. return s
  4828. }
  4829. // SetMaxResults sets the MaxResults field's value.
  4830. func (s *ListAliasesInput) SetMaxResults(v int64) *ListAliasesInput {
  4831. s.MaxResults = &v
  4832. return s
  4833. }
  4834. // SetNextToken sets the NextToken field's value.
  4835. func (s *ListAliasesInput) SetNextToken(v string) *ListAliasesInput {
  4836. s.NextToken = &v
  4837. return s
  4838. }
  4839. // SetOrganizationId sets the OrganizationId field's value.
  4840. func (s *ListAliasesInput) SetOrganizationId(v string) *ListAliasesInput {
  4841. s.OrganizationId = &v
  4842. return s
  4843. }
  4844. type ListAliasesOutput struct {
  4845. _ struct{} `type:"structure"`
  4846. // The entity's paginated aliases.
  4847. Aliases []*string `type:"list"`
  4848. // The token to use to retrieve the next page of results. The value is "null"
  4849. // when there are no more results to return.
  4850. NextToken *string `min:"1" type:"string"`
  4851. }
  4852. // String returns the string representation
  4853. func (s ListAliasesOutput) String() string {
  4854. return awsutil.Prettify(s)
  4855. }
  4856. // GoString returns the string representation
  4857. func (s ListAliasesOutput) GoString() string {
  4858. return s.String()
  4859. }
  4860. // SetAliases sets the Aliases field's value.
  4861. func (s *ListAliasesOutput) SetAliases(v []*string) *ListAliasesOutput {
  4862. s.Aliases = v
  4863. return s
  4864. }
  4865. // SetNextToken sets the NextToken field's value.
  4866. func (s *ListAliasesOutput) SetNextToken(v string) *ListAliasesOutput {
  4867. s.NextToken = &v
  4868. return s
  4869. }
  4870. type ListGroupMembersInput struct {
  4871. _ struct{} `type:"structure"`
  4872. // The identifier for the group to which the members are associated.
  4873. //
  4874. // GroupId is a required field
  4875. GroupId *string `min:"12" type:"string" required:"true"`
  4876. // The maximum number of results to return in a single call.
  4877. MaxResults *int64 `min:"1" type:"integer"`
  4878. // The token to use to retrieve the next page of results. The first call does
  4879. // not contain any tokens.
  4880. NextToken *string `min:"1" type:"string"`
  4881. // The identifier for the organization under which the group exists.
  4882. //
  4883. // OrganizationId is a required field
  4884. OrganizationId *string `type:"string" required:"true"`
  4885. }
  4886. // String returns the string representation
  4887. func (s ListGroupMembersInput) String() string {
  4888. return awsutil.Prettify(s)
  4889. }
  4890. // GoString returns the string representation
  4891. func (s ListGroupMembersInput) GoString() string {
  4892. return s.String()
  4893. }
  4894. // Validate inspects the fields of the type to determine if they are valid.
  4895. func (s *ListGroupMembersInput) Validate() error {
  4896. invalidParams := request.ErrInvalidParams{Context: "ListGroupMembersInput"}
  4897. if s.GroupId == nil {
  4898. invalidParams.Add(request.NewErrParamRequired("GroupId"))
  4899. }
  4900. if s.GroupId != nil && len(*s.GroupId) < 12 {
  4901. invalidParams.Add(request.NewErrParamMinLen("GroupId", 12))
  4902. }
  4903. if s.MaxResults != nil && *s.MaxResults < 1 {
  4904. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4905. }
  4906. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4907. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4908. }
  4909. if s.OrganizationId == nil {
  4910. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4911. }
  4912. if invalidParams.Len() > 0 {
  4913. return invalidParams
  4914. }
  4915. return nil
  4916. }
  4917. // SetGroupId sets the GroupId field's value.
  4918. func (s *ListGroupMembersInput) SetGroupId(v string) *ListGroupMembersInput {
  4919. s.GroupId = &v
  4920. return s
  4921. }
  4922. // SetMaxResults sets the MaxResults field's value.
  4923. func (s *ListGroupMembersInput) SetMaxResults(v int64) *ListGroupMembersInput {
  4924. s.MaxResults = &v
  4925. return s
  4926. }
  4927. // SetNextToken sets the NextToken field's value.
  4928. func (s *ListGroupMembersInput) SetNextToken(v string) *ListGroupMembersInput {
  4929. s.NextToken = &v
  4930. return s
  4931. }
  4932. // SetOrganizationId sets the OrganizationId field's value.
  4933. func (s *ListGroupMembersInput) SetOrganizationId(v string) *ListGroupMembersInput {
  4934. s.OrganizationId = &v
  4935. return s
  4936. }
  4937. type ListGroupMembersOutput struct {
  4938. _ struct{} `type:"structure"`
  4939. // The members associated to the group.
  4940. Members []*Member `type:"list"`
  4941. // The token to use to retrieve the next page of results. The first call does
  4942. // not contain any tokens.
  4943. NextToken *string `min:"1" type:"string"`
  4944. }
  4945. // String returns the string representation
  4946. func (s ListGroupMembersOutput) String() string {
  4947. return awsutil.Prettify(s)
  4948. }
  4949. // GoString returns the string representation
  4950. func (s ListGroupMembersOutput) GoString() string {
  4951. return s.String()
  4952. }
  4953. // SetMembers sets the Members field's value.
  4954. func (s *ListGroupMembersOutput) SetMembers(v []*Member) *ListGroupMembersOutput {
  4955. s.Members = v
  4956. return s
  4957. }
  4958. // SetNextToken sets the NextToken field's value.
  4959. func (s *ListGroupMembersOutput) SetNextToken(v string) *ListGroupMembersOutput {
  4960. s.NextToken = &v
  4961. return s
  4962. }
  4963. type ListGroupsInput struct {
  4964. _ struct{} `type:"structure"`
  4965. // The maximum number of results to return in a single call.
  4966. MaxResults *int64 `min:"1" type:"integer"`
  4967. // The token to use to retrieve the next page of results. The first call does
  4968. // not contain any tokens.
  4969. NextToken *string `min:"1" type:"string"`
  4970. // The identifier for the organization under which the groups exist.
  4971. //
  4972. // OrganizationId is a required field
  4973. OrganizationId *string `type:"string" required:"true"`
  4974. }
  4975. // String returns the string representation
  4976. func (s ListGroupsInput) String() string {
  4977. return awsutil.Prettify(s)
  4978. }
  4979. // GoString returns the string representation
  4980. func (s ListGroupsInput) GoString() string {
  4981. return s.String()
  4982. }
  4983. // Validate inspects the fields of the type to determine if they are valid.
  4984. func (s *ListGroupsInput) Validate() error {
  4985. invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"}
  4986. if s.MaxResults != nil && *s.MaxResults < 1 {
  4987. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  4988. }
  4989. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4990. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4991. }
  4992. if s.OrganizationId == nil {
  4993. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  4994. }
  4995. if invalidParams.Len() > 0 {
  4996. return invalidParams
  4997. }
  4998. return nil
  4999. }
  5000. // SetMaxResults sets the MaxResults field's value.
  5001. func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput {
  5002. s.MaxResults = &v
  5003. return s
  5004. }
  5005. // SetNextToken sets the NextToken field's value.
  5006. func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput {
  5007. s.NextToken = &v
  5008. return s
  5009. }
  5010. // SetOrganizationId sets the OrganizationId field's value.
  5011. func (s *ListGroupsInput) SetOrganizationId(v string) *ListGroupsInput {
  5012. s.OrganizationId = &v
  5013. return s
  5014. }
  5015. type ListGroupsOutput struct {
  5016. _ struct{} `type:"structure"`
  5017. // The overview of groups for an organization.
  5018. Groups []*Group `type:"list"`
  5019. // The token to use to retrieve the next page of results. The value is "null"
  5020. // when there are no more results to return.
  5021. NextToken *string `min:"1" type:"string"`
  5022. }
  5023. // String returns the string representation
  5024. func (s ListGroupsOutput) String() string {
  5025. return awsutil.Prettify(s)
  5026. }
  5027. // GoString returns the string representation
  5028. func (s ListGroupsOutput) GoString() string {
  5029. return s.String()
  5030. }
  5031. // SetGroups sets the Groups field's value.
  5032. func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput {
  5033. s.Groups = v
  5034. return s
  5035. }
  5036. // SetNextToken sets the NextToken field's value.
  5037. func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput {
  5038. s.NextToken = &v
  5039. return s
  5040. }
  5041. type ListMailboxPermissionsInput struct {
  5042. _ struct{} `type:"structure"`
  5043. // The identifier of the entity (user or group) for which to list mailbox permissions.
  5044. //
  5045. // EntityId is a required field
  5046. EntityId *string `min:"12" type:"string" required:"true"`
  5047. // The maximum number of results to return in a single call.
  5048. MaxResults *int64 `min:"1" type:"integer"`
  5049. // The token to use to retrieve the next page of results. The first call does
  5050. // not contain any tokens.
  5051. NextToken *string `min:"1" type:"string"`
  5052. // The identifier of the organization under which the entity (user or group)
  5053. // exists.
  5054. //
  5055. // OrganizationId is a required field
  5056. OrganizationId *string `type:"string" required:"true"`
  5057. }
  5058. // String returns the string representation
  5059. func (s ListMailboxPermissionsInput) String() string {
  5060. return awsutil.Prettify(s)
  5061. }
  5062. // GoString returns the string representation
  5063. func (s ListMailboxPermissionsInput) GoString() string {
  5064. return s.String()
  5065. }
  5066. // Validate inspects the fields of the type to determine if they are valid.
  5067. func (s *ListMailboxPermissionsInput) Validate() error {
  5068. invalidParams := request.ErrInvalidParams{Context: "ListMailboxPermissionsInput"}
  5069. if s.EntityId == nil {
  5070. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  5071. }
  5072. if s.EntityId != nil && len(*s.EntityId) < 12 {
  5073. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  5074. }
  5075. if s.MaxResults != nil && *s.MaxResults < 1 {
  5076. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5077. }
  5078. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5079. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5080. }
  5081. if s.OrganizationId == nil {
  5082. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5083. }
  5084. if invalidParams.Len() > 0 {
  5085. return invalidParams
  5086. }
  5087. return nil
  5088. }
  5089. // SetEntityId sets the EntityId field's value.
  5090. func (s *ListMailboxPermissionsInput) SetEntityId(v string) *ListMailboxPermissionsInput {
  5091. s.EntityId = &v
  5092. return s
  5093. }
  5094. // SetMaxResults sets the MaxResults field's value.
  5095. func (s *ListMailboxPermissionsInput) SetMaxResults(v int64) *ListMailboxPermissionsInput {
  5096. s.MaxResults = &v
  5097. return s
  5098. }
  5099. // SetNextToken sets the NextToken field's value.
  5100. func (s *ListMailboxPermissionsInput) SetNextToken(v string) *ListMailboxPermissionsInput {
  5101. s.NextToken = &v
  5102. return s
  5103. }
  5104. // SetOrganizationId sets the OrganizationId field's value.
  5105. func (s *ListMailboxPermissionsInput) SetOrganizationId(v string) *ListMailboxPermissionsInput {
  5106. s.OrganizationId = &v
  5107. return s
  5108. }
  5109. type ListMailboxPermissionsOutput struct {
  5110. _ struct{} `type:"structure"`
  5111. // The token to use to retrieve the next page of results. The value is "null"
  5112. // when there are no more results to return.
  5113. NextToken *string `min:"1" type:"string"`
  5114. // One page of the entity's mailbox permissions.
  5115. Permissions []*Permission `type:"list"`
  5116. }
  5117. // String returns the string representation
  5118. func (s ListMailboxPermissionsOutput) String() string {
  5119. return awsutil.Prettify(s)
  5120. }
  5121. // GoString returns the string representation
  5122. func (s ListMailboxPermissionsOutput) GoString() string {
  5123. return s.String()
  5124. }
  5125. // SetNextToken sets the NextToken field's value.
  5126. func (s *ListMailboxPermissionsOutput) SetNextToken(v string) *ListMailboxPermissionsOutput {
  5127. s.NextToken = &v
  5128. return s
  5129. }
  5130. // SetPermissions sets the Permissions field's value.
  5131. func (s *ListMailboxPermissionsOutput) SetPermissions(v []*Permission) *ListMailboxPermissionsOutput {
  5132. s.Permissions = v
  5133. return s
  5134. }
  5135. type ListOrganizationsInput struct {
  5136. _ struct{} `type:"structure"`
  5137. // The maximum number of results to return in a single call.
  5138. MaxResults *int64 `min:"1" type:"integer"`
  5139. // The token to use to retrieve the next page of results. The first call does
  5140. // not contain any tokens.
  5141. NextToken *string `min:"1" type:"string"`
  5142. }
  5143. // String returns the string representation
  5144. func (s ListOrganizationsInput) String() string {
  5145. return awsutil.Prettify(s)
  5146. }
  5147. // GoString returns the string representation
  5148. func (s ListOrganizationsInput) GoString() string {
  5149. return s.String()
  5150. }
  5151. // Validate inspects the fields of the type to determine if they are valid.
  5152. func (s *ListOrganizationsInput) Validate() error {
  5153. invalidParams := request.ErrInvalidParams{Context: "ListOrganizationsInput"}
  5154. if s.MaxResults != nil && *s.MaxResults < 1 {
  5155. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5156. }
  5157. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5158. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5159. }
  5160. if invalidParams.Len() > 0 {
  5161. return invalidParams
  5162. }
  5163. return nil
  5164. }
  5165. // SetMaxResults sets the MaxResults field's value.
  5166. func (s *ListOrganizationsInput) SetMaxResults(v int64) *ListOrganizationsInput {
  5167. s.MaxResults = &v
  5168. return s
  5169. }
  5170. // SetNextToken sets the NextToken field's value.
  5171. func (s *ListOrganizationsInput) SetNextToken(v string) *ListOrganizationsInput {
  5172. s.NextToken = &v
  5173. return s
  5174. }
  5175. type ListOrganizationsOutput struct {
  5176. _ struct{} `type:"structure"`
  5177. // The token to use to retrieve the next page of results. The value is "null"
  5178. // when there are no more results to return.
  5179. NextToken *string `min:"1" type:"string"`
  5180. // The overview of owned organizations presented as a list of organization summaries.
  5181. OrganizationSummaries []*OrganizationSummary `type:"list"`
  5182. }
  5183. // String returns the string representation
  5184. func (s ListOrganizationsOutput) String() string {
  5185. return awsutil.Prettify(s)
  5186. }
  5187. // GoString returns the string representation
  5188. func (s ListOrganizationsOutput) GoString() string {
  5189. return s.String()
  5190. }
  5191. // SetNextToken sets the NextToken field's value.
  5192. func (s *ListOrganizationsOutput) SetNextToken(v string) *ListOrganizationsOutput {
  5193. s.NextToken = &v
  5194. return s
  5195. }
  5196. // SetOrganizationSummaries sets the OrganizationSummaries field's value.
  5197. func (s *ListOrganizationsOutput) SetOrganizationSummaries(v []*OrganizationSummary) *ListOrganizationsOutput {
  5198. s.OrganizationSummaries = v
  5199. return s
  5200. }
  5201. type ListResourceDelegatesInput struct {
  5202. _ struct{} `type:"structure"`
  5203. // The number of maximum results in a page.
  5204. MaxResults *int64 `min:"1" type:"integer"`
  5205. // The token used to paginate through the delegates associated with a resource.
  5206. NextToken *string `min:"1" type:"string"`
  5207. // The identifier for the organization that contains the resource for which
  5208. // delegates are listed.
  5209. //
  5210. // OrganizationId is a required field
  5211. OrganizationId *string `type:"string" required:"true"`
  5212. // The identifier for the resource whose delegates are listed.
  5213. //
  5214. // ResourceId is a required field
  5215. ResourceId *string `min:"12" type:"string" required:"true"`
  5216. }
  5217. // String returns the string representation
  5218. func (s ListResourceDelegatesInput) String() string {
  5219. return awsutil.Prettify(s)
  5220. }
  5221. // GoString returns the string representation
  5222. func (s ListResourceDelegatesInput) GoString() string {
  5223. return s.String()
  5224. }
  5225. // Validate inspects the fields of the type to determine if they are valid.
  5226. func (s *ListResourceDelegatesInput) Validate() error {
  5227. invalidParams := request.ErrInvalidParams{Context: "ListResourceDelegatesInput"}
  5228. if s.MaxResults != nil && *s.MaxResults < 1 {
  5229. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5230. }
  5231. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5232. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5233. }
  5234. if s.OrganizationId == nil {
  5235. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5236. }
  5237. if s.ResourceId == nil {
  5238. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5239. }
  5240. if s.ResourceId != nil && len(*s.ResourceId) < 12 {
  5241. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 12))
  5242. }
  5243. if invalidParams.Len() > 0 {
  5244. return invalidParams
  5245. }
  5246. return nil
  5247. }
  5248. // SetMaxResults sets the MaxResults field's value.
  5249. func (s *ListResourceDelegatesInput) SetMaxResults(v int64) *ListResourceDelegatesInput {
  5250. s.MaxResults = &v
  5251. return s
  5252. }
  5253. // SetNextToken sets the NextToken field's value.
  5254. func (s *ListResourceDelegatesInput) SetNextToken(v string) *ListResourceDelegatesInput {
  5255. s.NextToken = &v
  5256. return s
  5257. }
  5258. // SetOrganizationId sets the OrganizationId field's value.
  5259. func (s *ListResourceDelegatesInput) SetOrganizationId(v string) *ListResourceDelegatesInput {
  5260. s.OrganizationId = &v
  5261. return s
  5262. }
  5263. // SetResourceId sets the ResourceId field's value.
  5264. func (s *ListResourceDelegatesInput) SetResourceId(v string) *ListResourceDelegatesInput {
  5265. s.ResourceId = &v
  5266. return s
  5267. }
  5268. type ListResourceDelegatesOutput struct {
  5269. _ struct{} `type:"structure"`
  5270. // One page of the resource's delegates.
  5271. Delegates []*Delegate `type:"list"`
  5272. // The token used to paginate through the delegates associated with a resource.
  5273. // While results are still available, it has an associated value. When the last
  5274. // page is reached, the token is empty.
  5275. NextToken *string `min:"1" type:"string"`
  5276. }
  5277. // String returns the string representation
  5278. func (s ListResourceDelegatesOutput) String() string {
  5279. return awsutil.Prettify(s)
  5280. }
  5281. // GoString returns the string representation
  5282. func (s ListResourceDelegatesOutput) GoString() string {
  5283. return s.String()
  5284. }
  5285. // SetDelegates sets the Delegates field's value.
  5286. func (s *ListResourceDelegatesOutput) SetDelegates(v []*Delegate) *ListResourceDelegatesOutput {
  5287. s.Delegates = v
  5288. return s
  5289. }
  5290. // SetNextToken sets the NextToken field's value.
  5291. func (s *ListResourceDelegatesOutput) SetNextToken(v string) *ListResourceDelegatesOutput {
  5292. s.NextToken = &v
  5293. return s
  5294. }
  5295. type ListResourcesInput struct {
  5296. _ struct{} `type:"structure"`
  5297. // The maximum number of results to return in a single call.
  5298. MaxResults *int64 `min:"1" type:"integer"`
  5299. // The token to use to retrieve the next page of results. The first call does
  5300. // not contain any tokens.
  5301. NextToken *string `min:"1" type:"string"`
  5302. // The identifier for the organization under which the resources exist.
  5303. //
  5304. // OrganizationId is a required field
  5305. OrganizationId *string `type:"string" required:"true"`
  5306. }
  5307. // String returns the string representation
  5308. func (s ListResourcesInput) String() string {
  5309. return awsutil.Prettify(s)
  5310. }
  5311. // GoString returns the string representation
  5312. func (s ListResourcesInput) GoString() string {
  5313. return s.String()
  5314. }
  5315. // Validate inspects the fields of the type to determine if they are valid.
  5316. func (s *ListResourcesInput) Validate() error {
  5317. invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"}
  5318. if s.MaxResults != nil && *s.MaxResults < 1 {
  5319. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5320. }
  5321. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5322. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5323. }
  5324. if s.OrganizationId == nil {
  5325. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5326. }
  5327. if invalidParams.Len() > 0 {
  5328. return invalidParams
  5329. }
  5330. return nil
  5331. }
  5332. // SetMaxResults sets the MaxResults field's value.
  5333. func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput {
  5334. s.MaxResults = &v
  5335. return s
  5336. }
  5337. // SetNextToken sets the NextToken field's value.
  5338. func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput {
  5339. s.NextToken = &v
  5340. return s
  5341. }
  5342. // SetOrganizationId sets the OrganizationId field's value.
  5343. func (s *ListResourcesInput) SetOrganizationId(v string) *ListResourcesInput {
  5344. s.OrganizationId = &v
  5345. return s
  5346. }
  5347. type ListResourcesOutput struct {
  5348. _ struct{} `type:"structure"`
  5349. // The token used to paginate through all the organization's resources. While
  5350. // results are still available, it has an associated value. When the last page
  5351. // is reached, the token is empty.
  5352. NextToken *string `min:"1" type:"string"`
  5353. // One page of the organization's resource representation.
  5354. Resources []*Resource `type:"list"`
  5355. }
  5356. // String returns the string representation
  5357. func (s ListResourcesOutput) String() string {
  5358. return awsutil.Prettify(s)
  5359. }
  5360. // GoString returns the string representation
  5361. func (s ListResourcesOutput) GoString() string {
  5362. return s.String()
  5363. }
  5364. // SetNextToken sets the NextToken field's value.
  5365. func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput {
  5366. s.NextToken = &v
  5367. return s
  5368. }
  5369. // SetResources sets the Resources field's value.
  5370. func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput {
  5371. s.Resources = v
  5372. return s
  5373. }
  5374. type ListUsersInput struct {
  5375. _ struct{} `type:"structure"`
  5376. // The maximum number of results to return in a single call.
  5377. MaxResults *int64 `min:"1" type:"integer"`
  5378. // TBD
  5379. NextToken *string `min:"1" type:"string"`
  5380. // The identifier for the organization under which the users exist.
  5381. //
  5382. // OrganizationId is a required field
  5383. OrganizationId *string `type:"string" required:"true"`
  5384. }
  5385. // String returns the string representation
  5386. func (s ListUsersInput) String() string {
  5387. return awsutil.Prettify(s)
  5388. }
  5389. // GoString returns the string representation
  5390. func (s ListUsersInput) GoString() string {
  5391. return s.String()
  5392. }
  5393. // Validate inspects the fields of the type to determine if they are valid.
  5394. func (s *ListUsersInput) Validate() error {
  5395. invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"}
  5396. if s.MaxResults != nil && *s.MaxResults < 1 {
  5397. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  5398. }
  5399. if s.NextToken != nil && len(*s.NextToken) < 1 {
  5400. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  5401. }
  5402. if s.OrganizationId == nil {
  5403. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5404. }
  5405. if invalidParams.Len() > 0 {
  5406. return invalidParams
  5407. }
  5408. return nil
  5409. }
  5410. // SetMaxResults sets the MaxResults field's value.
  5411. func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput {
  5412. s.MaxResults = &v
  5413. return s
  5414. }
  5415. // SetNextToken sets the NextToken field's value.
  5416. func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput {
  5417. s.NextToken = &v
  5418. return s
  5419. }
  5420. // SetOrganizationId sets the OrganizationId field's value.
  5421. func (s *ListUsersInput) SetOrganizationId(v string) *ListUsersInput {
  5422. s.OrganizationId = &v
  5423. return s
  5424. }
  5425. type ListUsersOutput struct {
  5426. _ struct{} `type:"structure"`
  5427. // The token to use to retrieve the next page of results. This value is `null`
  5428. // when there are no more results to return.
  5429. NextToken *string `min:"1" type:"string"`
  5430. // The overview of users for an organization.
  5431. Users []*User `type:"list"`
  5432. }
  5433. // String returns the string representation
  5434. func (s ListUsersOutput) String() string {
  5435. return awsutil.Prettify(s)
  5436. }
  5437. // GoString returns the string representation
  5438. func (s ListUsersOutput) GoString() string {
  5439. return s.String()
  5440. }
  5441. // SetNextToken sets the NextToken field's value.
  5442. func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput {
  5443. s.NextToken = &v
  5444. return s
  5445. }
  5446. // SetUsers sets the Users field's value.
  5447. func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput {
  5448. s.Users = v
  5449. return s
  5450. }
  5451. // The representation of a group member (user or group).
  5452. type Member struct {
  5453. _ struct{} `type:"structure"`
  5454. // The date indicating when the member was disabled from Amazon WorkMail use.
  5455. DisabledDate *time.Time `type:"timestamp"`
  5456. // The date indicating when the member was enabled for Amazon WorkMail use.
  5457. EnabledDate *time.Time `type:"timestamp"`
  5458. // The identifier of the member.
  5459. Id *string `type:"string"`
  5460. // The name of the member.
  5461. Name *string `type:"string"`
  5462. // The state of the member, which can be ENABLED, DISABLED, or DELETED.
  5463. State *string `type:"string" enum:"EntityState"`
  5464. // A member can be a user or group.
  5465. Type *string `type:"string" enum:"MemberType"`
  5466. }
  5467. // String returns the string representation
  5468. func (s Member) String() string {
  5469. return awsutil.Prettify(s)
  5470. }
  5471. // GoString returns the string representation
  5472. func (s Member) GoString() string {
  5473. return s.String()
  5474. }
  5475. // SetDisabledDate sets the DisabledDate field's value.
  5476. func (s *Member) SetDisabledDate(v time.Time) *Member {
  5477. s.DisabledDate = &v
  5478. return s
  5479. }
  5480. // SetEnabledDate sets the EnabledDate field's value.
  5481. func (s *Member) SetEnabledDate(v time.Time) *Member {
  5482. s.EnabledDate = &v
  5483. return s
  5484. }
  5485. // SetId sets the Id field's value.
  5486. func (s *Member) SetId(v string) *Member {
  5487. s.Id = &v
  5488. return s
  5489. }
  5490. // SetName sets the Name field's value.
  5491. func (s *Member) SetName(v string) *Member {
  5492. s.Name = &v
  5493. return s
  5494. }
  5495. // SetState sets the State field's value.
  5496. func (s *Member) SetState(v string) *Member {
  5497. s.State = &v
  5498. return s
  5499. }
  5500. // SetType sets the Type field's value.
  5501. func (s *Member) SetType(v string) *Member {
  5502. s.Type = &v
  5503. return s
  5504. }
  5505. // The brief overview associated with an organization.
  5506. type OrganizationSummary struct {
  5507. _ struct{} `type:"structure"`
  5508. // The alias associated with the organization.
  5509. Alias *string `min:"1" type:"string"`
  5510. // The error message associated with the organization. It is only present if
  5511. // unexpected behavior has occurred with regards to the organization. It provides
  5512. // insight or solutions regarding unexpected behavior.
  5513. ErrorMessage *string `type:"string"`
  5514. // The identifier associated with the organization.
  5515. OrganizationId *string `type:"string"`
  5516. // The state associated with the organization.
  5517. State *string `type:"string"`
  5518. }
  5519. // String returns the string representation
  5520. func (s OrganizationSummary) String() string {
  5521. return awsutil.Prettify(s)
  5522. }
  5523. // GoString returns the string representation
  5524. func (s OrganizationSummary) GoString() string {
  5525. return s.String()
  5526. }
  5527. // SetAlias sets the Alias field's value.
  5528. func (s *OrganizationSummary) SetAlias(v string) *OrganizationSummary {
  5529. s.Alias = &v
  5530. return s
  5531. }
  5532. // SetErrorMessage sets the ErrorMessage field's value.
  5533. func (s *OrganizationSummary) SetErrorMessage(v string) *OrganizationSummary {
  5534. s.ErrorMessage = &v
  5535. return s
  5536. }
  5537. // SetOrganizationId sets the OrganizationId field's value.
  5538. func (s *OrganizationSummary) SetOrganizationId(v string) *OrganizationSummary {
  5539. s.OrganizationId = &v
  5540. return s
  5541. }
  5542. // SetState sets the State field's value.
  5543. func (s *OrganizationSummary) SetState(v string) *OrganizationSummary {
  5544. s.State = &v
  5545. return s
  5546. }
  5547. // Permission granted to an entity (user, group) to access a certain aspect
  5548. // of another entity's mailbox.
  5549. type Permission struct {
  5550. _ struct{} `type:"structure"`
  5551. // The identifier of the entity (user or group) to which the permissions are
  5552. // granted.
  5553. //
  5554. // GranteeId is a required field
  5555. GranteeId *string `min:"12" type:"string" required:"true"`
  5556. // The type of entity (user, group) of the entity referred to in GranteeId.
  5557. //
  5558. // GranteeType is a required field
  5559. GranteeType *string `type:"string" required:"true" enum:"MemberType"`
  5560. // The permissions granted to the grantee. SEND_AS allows the grantee to send
  5561. // email as the owner of the mailbox (the grantee is not mentioned on these
  5562. // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the
  5563. // owner of the mailbox (the grantee is not mentioned as the physical sender
  5564. // of these emails). FULL_ACCESS allows the grantee full access to the mailbox,
  5565. // irrespective of other folder-level permissions set on the mailbox.
  5566. //
  5567. // PermissionValues is a required field
  5568. PermissionValues []*string `type:"list" required:"true"`
  5569. }
  5570. // String returns the string representation
  5571. func (s Permission) String() string {
  5572. return awsutil.Prettify(s)
  5573. }
  5574. // GoString returns the string representation
  5575. func (s Permission) GoString() string {
  5576. return s.String()
  5577. }
  5578. // SetGranteeId sets the GranteeId field's value.
  5579. func (s *Permission) SetGranteeId(v string) *Permission {
  5580. s.GranteeId = &v
  5581. return s
  5582. }
  5583. // SetGranteeType sets the GranteeType field's value.
  5584. func (s *Permission) SetGranteeType(v string) *Permission {
  5585. s.GranteeType = &v
  5586. return s
  5587. }
  5588. // SetPermissionValues sets the PermissionValues field's value.
  5589. func (s *Permission) SetPermissionValues(v []*string) *Permission {
  5590. s.PermissionValues = v
  5591. return s
  5592. }
  5593. type PutMailboxPermissionsInput struct {
  5594. _ struct{} `type:"structure"`
  5595. // The identifier of the entity (user or group) for which to update mailbox
  5596. // permissions.
  5597. //
  5598. // EntityId is a required field
  5599. EntityId *string `min:"12" type:"string" required:"true"`
  5600. // The identifier of the entity (user or group) to which to grant the permissions.
  5601. //
  5602. // GranteeId is a required field
  5603. GranteeId *string `min:"12" type:"string" required:"true"`
  5604. // The identifier of the organization under which the entity (user or group)
  5605. // exists.
  5606. //
  5607. // OrganizationId is a required field
  5608. OrganizationId *string `type:"string" required:"true"`
  5609. // The permissions granted to the grantee. SEND_AS allows the grantee to send
  5610. // email as the owner of the mailbox (the grantee is not mentioned on these
  5611. // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the
  5612. // owner of the mailbox (the grantee is not mentioned as the physical sender
  5613. // of these emails). FULL_ACCESS allows the grantee full access to the mailbox,
  5614. // irrespective of other folder-level permissions set on the mailbox.
  5615. //
  5616. // PermissionValues is a required field
  5617. PermissionValues []*string `type:"list" required:"true"`
  5618. }
  5619. // String returns the string representation
  5620. func (s PutMailboxPermissionsInput) String() string {
  5621. return awsutil.Prettify(s)
  5622. }
  5623. // GoString returns the string representation
  5624. func (s PutMailboxPermissionsInput) GoString() string {
  5625. return s.String()
  5626. }
  5627. // Validate inspects the fields of the type to determine if they are valid.
  5628. func (s *PutMailboxPermissionsInput) Validate() error {
  5629. invalidParams := request.ErrInvalidParams{Context: "PutMailboxPermissionsInput"}
  5630. if s.EntityId == nil {
  5631. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  5632. }
  5633. if s.EntityId != nil && len(*s.EntityId) < 12 {
  5634. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  5635. }
  5636. if s.GranteeId == nil {
  5637. invalidParams.Add(request.NewErrParamRequired("GranteeId"))
  5638. }
  5639. if s.GranteeId != nil && len(*s.GranteeId) < 12 {
  5640. invalidParams.Add(request.NewErrParamMinLen("GranteeId", 12))
  5641. }
  5642. if s.OrganizationId == nil {
  5643. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5644. }
  5645. if s.PermissionValues == nil {
  5646. invalidParams.Add(request.NewErrParamRequired("PermissionValues"))
  5647. }
  5648. if invalidParams.Len() > 0 {
  5649. return invalidParams
  5650. }
  5651. return nil
  5652. }
  5653. // SetEntityId sets the EntityId field's value.
  5654. func (s *PutMailboxPermissionsInput) SetEntityId(v string) *PutMailboxPermissionsInput {
  5655. s.EntityId = &v
  5656. return s
  5657. }
  5658. // SetGranteeId sets the GranteeId field's value.
  5659. func (s *PutMailboxPermissionsInput) SetGranteeId(v string) *PutMailboxPermissionsInput {
  5660. s.GranteeId = &v
  5661. return s
  5662. }
  5663. // SetOrganizationId sets the OrganizationId field's value.
  5664. func (s *PutMailboxPermissionsInput) SetOrganizationId(v string) *PutMailboxPermissionsInput {
  5665. s.OrganizationId = &v
  5666. return s
  5667. }
  5668. // SetPermissionValues sets the PermissionValues field's value.
  5669. func (s *PutMailboxPermissionsInput) SetPermissionValues(v []*string) *PutMailboxPermissionsInput {
  5670. s.PermissionValues = v
  5671. return s
  5672. }
  5673. type PutMailboxPermissionsOutput struct {
  5674. _ struct{} `type:"structure"`
  5675. }
  5676. // String returns the string representation
  5677. func (s PutMailboxPermissionsOutput) String() string {
  5678. return awsutil.Prettify(s)
  5679. }
  5680. // GoString returns the string representation
  5681. func (s PutMailboxPermissionsOutput) GoString() string {
  5682. return s.String()
  5683. }
  5684. type RegisterToWorkMailInput struct {
  5685. _ struct{} `type:"structure"`
  5686. // The email for the entity to be updated.
  5687. //
  5688. // Email is a required field
  5689. Email *string `min:"1" type:"string" required:"true"`
  5690. // The identifier for the entity to be updated.
  5691. //
  5692. // EntityId is a required field
  5693. EntityId *string `min:"12" type:"string" required:"true"`
  5694. // The identifier for the organization under which the Amazon WorkMail entity
  5695. // exists.
  5696. //
  5697. // OrganizationId is a required field
  5698. OrganizationId *string `type:"string" required:"true"`
  5699. }
  5700. // String returns the string representation
  5701. func (s RegisterToWorkMailInput) String() string {
  5702. return awsutil.Prettify(s)
  5703. }
  5704. // GoString returns the string representation
  5705. func (s RegisterToWorkMailInput) GoString() string {
  5706. return s.String()
  5707. }
  5708. // Validate inspects the fields of the type to determine if they are valid.
  5709. func (s *RegisterToWorkMailInput) Validate() error {
  5710. invalidParams := request.ErrInvalidParams{Context: "RegisterToWorkMailInput"}
  5711. if s.Email == nil {
  5712. invalidParams.Add(request.NewErrParamRequired("Email"))
  5713. }
  5714. if s.Email != nil && len(*s.Email) < 1 {
  5715. invalidParams.Add(request.NewErrParamMinLen("Email", 1))
  5716. }
  5717. if s.EntityId == nil {
  5718. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  5719. }
  5720. if s.EntityId != nil && len(*s.EntityId) < 12 {
  5721. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  5722. }
  5723. if s.OrganizationId == nil {
  5724. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5725. }
  5726. if invalidParams.Len() > 0 {
  5727. return invalidParams
  5728. }
  5729. return nil
  5730. }
  5731. // SetEmail sets the Email field's value.
  5732. func (s *RegisterToWorkMailInput) SetEmail(v string) *RegisterToWorkMailInput {
  5733. s.Email = &v
  5734. return s
  5735. }
  5736. // SetEntityId sets the EntityId field's value.
  5737. func (s *RegisterToWorkMailInput) SetEntityId(v string) *RegisterToWorkMailInput {
  5738. s.EntityId = &v
  5739. return s
  5740. }
  5741. // SetOrganizationId sets the OrganizationId field's value.
  5742. func (s *RegisterToWorkMailInput) SetOrganizationId(v string) *RegisterToWorkMailInput {
  5743. s.OrganizationId = &v
  5744. return s
  5745. }
  5746. type RegisterToWorkMailOutput struct {
  5747. _ struct{} `type:"structure"`
  5748. }
  5749. // String returns the string representation
  5750. func (s RegisterToWorkMailOutput) String() string {
  5751. return awsutil.Prettify(s)
  5752. }
  5753. // GoString returns the string representation
  5754. func (s RegisterToWorkMailOutput) GoString() string {
  5755. return s.String()
  5756. }
  5757. type ResetPasswordInput struct {
  5758. _ struct{} `type:"structure"`
  5759. // The identifier of the organization that contains the user for which the password
  5760. // is reset.
  5761. //
  5762. // OrganizationId is a required field
  5763. OrganizationId *string `type:"string" required:"true"`
  5764. // The new password for the user.
  5765. //
  5766. // Password is a required field
  5767. Password *string `type:"string" required:"true" sensitive:"true"`
  5768. // The identifier of the user for whom the password is reset.
  5769. //
  5770. // UserId is a required field
  5771. UserId *string `min:"12" type:"string" required:"true"`
  5772. }
  5773. // String returns the string representation
  5774. func (s ResetPasswordInput) String() string {
  5775. return awsutil.Prettify(s)
  5776. }
  5777. // GoString returns the string representation
  5778. func (s ResetPasswordInput) GoString() string {
  5779. return s.String()
  5780. }
  5781. // Validate inspects the fields of the type to determine if they are valid.
  5782. func (s *ResetPasswordInput) Validate() error {
  5783. invalidParams := request.ErrInvalidParams{Context: "ResetPasswordInput"}
  5784. if s.OrganizationId == nil {
  5785. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5786. }
  5787. if s.Password == nil {
  5788. invalidParams.Add(request.NewErrParamRequired("Password"))
  5789. }
  5790. if s.UserId == nil {
  5791. invalidParams.Add(request.NewErrParamRequired("UserId"))
  5792. }
  5793. if s.UserId != nil && len(*s.UserId) < 12 {
  5794. invalidParams.Add(request.NewErrParamMinLen("UserId", 12))
  5795. }
  5796. if invalidParams.Len() > 0 {
  5797. return invalidParams
  5798. }
  5799. return nil
  5800. }
  5801. // SetOrganizationId sets the OrganizationId field's value.
  5802. func (s *ResetPasswordInput) SetOrganizationId(v string) *ResetPasswordInput {
  5803. s.OrganizationId = &v
  5804. return s
  5805. }
  5806. // SetPassword sets the Password field's value.
  5807. func (s *ResetPasswordInput) SetPassword(v string) *ResetPasswordInput {
  5808. s.Password = &v
  5809. return s
  5810. }
  5811. // SetUserId sets the UserId field's value.
  5812. func (s *ResetPasswordInput) SetUserId(v string) *ResetPasswordInput {
  5813. s.UserId = &v
  5814. return s
  5815. }
  5816. type ResetPasswordOutput struct {
  5817. _ struct{} `type:"structure"`
  5818. }
  5819. // String returns the string representation
  5820. func (s ResetPasswordOutput) String() string {
  5821. return awsutil.Prettify(s)
  5822. }
  5823. // GoString returns the string representation
  5824. func (s ResetPasswordOutput) GoString() string {
  5825. return s.String()
  5826. }
  5827. // The overview for a resource containing relevant data regarding it.
  5828. type Resource struct {
  5829. _ struct{} `type:"structure"`
  5830. // The date indicating when the resource was disabled from Amazon WorkMail use.
  5831. DisabledDate *time.Time `type:"timestamp"`
  5832. // The email of the resource.
  5833. Email *string `min:"1" type:"string"`
  5834. // The date indicating when the resource was enabled for Amazon WorkMail use.
  5835. EnabledDate *time.Time `type:"timestamp"`
  5836. // The identifier of the resource.
  5837. Id *string `min:"12" type:"string"`
  5838. // The name of the resource.
  5839. Name *string `min:"1" type:"string"`
  5840. // The state of the resource, which can be ENABLED, DISABLED, or DELETED.
  5841. State *string `type:"string" enum:"EntityState"`
  5842. // The type of the resource: equipment or room.
  5843. Type *string `type:"string" enum:"ResourceType"`
  5844. }
  5845. // String returns the string representation
  5846. func (s Resource) String() string {
  5847. return awsutil.Prettify(s)
  5848. }
  5849. // GoString returns the string representation
  5850. func (s Resource) GoString() string {
  5851. return s.String()
  5852. }
  5853. // SetDisabledDate sets the DisabledDate field's value.
  5854. func (s *Resource) SetDisabledDate(v time.Time) *Resource {
  5855. s.DisabledDate = &v
  5856. return s
  5857. }
  5858. // SetEmail sets the Email field's value.
  5859. func (s *Resource) SetEmail(v string) *Resource {
  5860. s.Email = &v
  5861. return s
  5862. }
  5863. // SetEnabledDate sets the EnabledDate field's value.
  5864. func (s *Resource) SetEnabledDate(v time.Time) *Resource {
  5865. s.EnabledDate = &v
  5866. return s
  5867. }
  5868. // SetId sets the Id field's value.
  5869. func (s *Resource) SetId(v string) *Resource {
  5870. s.Id = &v
  5871. return s
  5872. }
  5873. // SetName sets the Name field's value.
  5874. func (s *Resource) SetName(v string) *Resource {
  5875. s.Name = &v
  5876. return s
  5877. }
  5878. // SetState sets the State field's value.
  5879. func (s *Resource) SetState(v string) *Resource {
  5880. s.State = &v
  5881. return s
  5882. }
  5883. // SetType sets the Type field's value.
  5884. func (s *Resource) SetType(v string) *Resource {
  5885. s.Type = &v
  5886. return s
  5887. }
  5888. type UpdatePrimaryEmailAddressInput struct {
  5889. _ struct{} `type:"structure"`
  5890. // The value of the email to be updated as primary.
  5891. //
  5892. // Email is a required field
  5893. Email *string `min:"1" type:"string" required:"true"`
  5894. // The entity to update (user, group, or resource).
  5895. //
  5896. // EntityId is a required field
  5897. EntityId *string `min:"12" type:"string" required:"true"`
  5898. // The organization that contains the entity to update.
  5899. //
  5900. // OrganizationId is a required field
  5901. OrganizationId *string `type:"string" required:"true"`
  5902. }
  5903. // String returns the string representation
  5904. func (s UpdatePrimaryEmailAddressInput) String() string {
  5905. return awsutil.Prettify(s)
  5906. }
  5907. // GoString returns the string representation
  5908. func (s UpdatePrimaryEmailAddressInput) GoString() string {
  5909. return s.String()
  5910. }
  5911. // Validate inspects the fields of the type to determine if they are valid.
  5912. func (s *UpdatePrimaryEmailAddressInput) Validate() error {
  5913. invalidParams := request.ErrInvalidParams{Context: "UpdatePrimaryEmailAddressInput"}
  5914. if s.Email == nil {
  5915. invalidParams.Add(request.NewErrParamRequired("Email"))
  5916. }
  5917. if s.Email != nil && len(*s.Email) < 1 {
  5918. invalidParams.Add(request.NewErrParamMinLen("Email", 1))
  5919. }
  5920. if s.EntityId == nil {
  5921. invalidParams.Add(request.NewErrParamRequired("EntityId"))
  5922. }
  5923. if s.EntityId != nil && len(*s.EntityId) < 12 {
  5924. invalidParams.Add(request.NewErrParamMinLen("EntityId", 12))
  5925. }
  5926. if s.OrganizationId == nil {
  5927. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5928. }
  5929. if invalidParams.Len() > 0 {
  5930. return invalidParams
  5931. }
  5932. return nil
  5933. }
  5934. // SetEmail sets the Email field's value.
  5935. func (s *UpdatePrimaryEmailAddressInput) SetEmail(v string) *UpdatePrimaryEmailAddressInput {
  5936. s.Email = &v
  5937. return s
  5938. }
  5939. // SetEntityId sets the EntityId field's value.
  5940. func (s *UpdatePrimaryEmailAddressInput) SetEntityId(v string) *UpdatePrimaryEmailAddressInput {
  5941. s.EntityId = &v
  5942. return s
  5943. }
  5944. // SetOrganizationId sets the OrganizationId field's value.
  5945. func (s *UpdatePrimaryEmailAddressInput) SetOrganizationId(v string) *UpdatePrimaryEmailAddressInput {
  5946. s.OrganizationId = &v
  5947. return s
  5948. }
  5949. type UpdatePrimaryEmailAddressOutput struct {
  5950. _ struct{} `type:"structure"`
  5951. }
  5952. // String returns the string representation
  5953. func (s UpdatePrimaryEmailAddressOutput) String() string {
  5954. return awsutil.Prettify(s)
  5955. }
  5956. // GoString returns the string representation
  5957. func (s UpdatePrimaryEmailAddressOutput) GoString() string {
  5958. return s.String()
  5959. }
  5960. type UpdateResourceInput struct {
  5961. _ struct{} `type:"structure"`
  5962. // The resource's booking options to be updated.
  5963. BookingOptions *BookingOptions `type:"structure"`
  5964. // The name of the resource to be updated.
  5965. Name *string `min:"1" type:"string"`
  5966. // The identifier associated with the organization for which the resource is
  5967. // updated.
  5968. //
  5969. // OrganizationId is a required field
  5970. OrganizationId *string `type:"string" required:"true"`
  5971. // The identifier of the resource to be updated.
  5972. //
  5973. // ResourceId is a required field
  5974. ResourceId *string `type:"string" required:"true"`
  5975. }
  5976. // String returns the string representation
  5977. func (s UpdateResourceInput) String() string {
  5978. return awsutil.Prettify(s)
  5979. }
  5980. // GoString returns the string representation
  5981. func (s UpdateResourceInput) GoString() string {
  5982. return s.String()
  5983. }
  5984. // Validate inspects the fields of the type to determine if they are valid.
  5985. func (s *UpdateResourceInput) Validate() error {
  5986. invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"}
  5987. if s.Name != nil && len(*s.Name) < 1 {
  5988. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  5989. }
  5990. if s.OrganizationId == nil {
  5991. invalidParams.Add(request.NewErrParamRequired("OrganizationId"))
  5992. }
  5993. if s.ResourceId == nil {
  5994. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5995. }
  5996. if invalidParams.Len() > 0 {
  5997. return invalidParams
  5998. }
  5999. return nil
  6000. }
  6001. // SetBookingOptions sets the BookingOptions field's value.
  6002. func (s *UpdateResourceInput) SetBookingOptions(v *BookingOptions) *UpdateResourceInput {
  6003. s.BookingOptions = v
  6004. return s
  6005. }
  6006. // SetName sets the Name field's value.
  6007. func (s *UpdateResourceInput) SetName(v string) *UpdateResourceInput {
  6008. s.Name = &v
  6009. return s
  6010. }
  6011. // SetOrganizationId sets the OrganizationId field's value.
  6012. func (s *UpdateResourceInput) SetOrganizationId(v string) *UpdateResourceInput {
  6013. s.OrganizationId = &v
  6014. return s
  6015. }
  6016. // SetResourceId sets the ResourceId field's value.
  6017. func (s *UpdateResourceInput) SetResourceId(v string) *UpdateResourceInput {
  6018. s.ResourceId = &v
  6019. return s
  6020. }
  6021. type UpdateResourceOutput struct {
  6022. _ struct{} `type:"structure"`
  6023. }
  6024. // String returns the string representation
  6025. func (s UpdateResourceOutput) String() string {
  6026. return awsutil.Prettify(s)
  6027. }
  6028. // GoString returns the string representation
  6029. func (s UpdateResourceOutput) GoString() string {
  6030. return s.String()
  6031. }
  6032. // The representation of an Amazon WorkMail user.
  6033. type User struct {
  6034. _ struct{} `type:"structure"`
  6035. // The date indicating when the user was disabled from Amazon WorkMail use.
  6036. DisabledDate *time.Time `type:"timestamp"`
  6037. // The display name of the user.
  6038. DisplayName *string `type:"string"`
  6039. // The email of the user.
  6040. Email *string `min:"1" type:"string"`
  6041. // The date indicating when the user was enabled for Amazon WorkMail use.
  6042. EnabledDate *time.Time `type:"timestamp"`
  6043. // The identifier of the user.
  6044. Id *string `min:"12" type:"string"`
  6045. // The name of the user.
  6046. Name *string `min:"1" type:"string"`
  6047. // The state of the user, which can be ENABLED, DISABLED, or DELETED.
  6048. State *string `type:"string" enum:"EntityState"`
  6049. // The role of the user.
  6050. UserRole *string `type:"string" enum:"UserRole"`
  6051. }
  6052. // String returns the string representation
  6053. func (s User) String() string {
  6054. return awsutil.Prettify(s)
  6055. }
  6056. // GoString returns the string representation
  6057. func (s User) GoString() string {
  6058. return s.String()
  6059. }
  6060. // SetDisabledDate sets the DisabledDate field's value.
  6061. func (s *User) SetDisabledDate(v time.Time) *User {
  6062. s.DisabledDate = &v
  6063. return s
  6064. }
  6065. // SetDisplayName sets the DisplayName field's value.
  6066. func (s *User) SetDisplayName(v string) *User {
  6067. s.DisplayName = &v
  6068. return s
  6069. }
  6070. // SetEmail sets the Email field's value.
  6071. func (s *User) SetEmail(v string) *User {
  6072. s.Email = &v
  6073. return s
  6074. }
  6075. // SetEnabledDate sets the EnabledDate field's value.
  6076. func (s *User) SetEnabledDate(v time.Time) *User {
  6077. s.EnabledDate = &v
  6078. return s
  6079. }
  6080. // SetId sets the Id field's value.
  6081. func (s *User) SetId(v string) *User {
  6082. s.Id = &v
  6083. return s
  6084. }
  6085. // SetName sets the Name field's value.
  6086. func (s *User) SetName(v string) *User {
  6087. s.Name = &v
  6088. return s
  6089. }
  6090. // SetState sets the State field's value.
  6091. func (s *User) SetState(v string) *User {
  6092. s.State = &v
  6093. return s
  6094. }
  6095. // SetUserRole sets the UserRole field's value.
  6096. func (s *User) SetUserRole(v string) *User {
  6097. s.UserRole = &v
  6098. return s
  6099. }
  6100. const (
  6101. // EntityStateEnabled is a EntityState enum value
  6102. EntityStateEnabled = "ENABLED"
  6103. // EntityStateDisabled is a EntityState enum value
  6104. EntityStateDisabled = "DISABLED"
  6105. // EntityStateDeleted is a EntityState enum value
  6106. EntityStateDeleted = "DELETED"
  6107. )
  6108. const (
  6109. // MemberTypeGroup is a MemberType enum value
  6110. MemberTypeGroup = "GROUP"
  6111. // MemberTypeUser is a MemberType enum value
  6112. MemberTypeUser = "USER"
  6113. )
  6114. const (
  6115. // PermissionTypeFullAccess is a PermissionType enum value
  6116. PermissionTypeFullAccess = "FULL_ACCESS"
  6117. // PermissionTypeSendAs is a PermissionType enum value
  6118. PermissionTypeSendAs = "SEND_AS"
  6119. // PermissionTypeSendOnBehalf is a PermissionType enum value
  6120. PermissionTypeSendOnBehalf = "SEND_ON_BEHALF"
  6121. )
  6122. const (
  6123. // ResourceTypeRoom is a ResourceType enum value
  6124. ResourceTypeRoom = "ROOM"
  6125. // ResourceTypeEquipment is a ResourceType enum value
  6126. ResourceTypeEquipment = "EQUIPMENT"
  6127. )
  6128. const (
  6129. // UserRoleUser is a UserRole enum value
  6130. UserRoleUser = "USER"
  6131. // UserRoleResource is a UserRole enum value
  6132. UserRoleResource = "RESOURCE"
  6133. // UserRoleSystemUser is a UserRole enum value
  6134. UserRoleSystemUser = "SYSTEM_USER"
  6135. )